From 143f236d6636422aa177995d87e6e7c0e2c5812b Mon Sep 17 00:00:00 2001 From: zhal <15900249928@163.com> Date: Mon, 25 Jul 2022 19:02:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pal/publisher/client/util/ProcesNumberUtil.java | 11 ++++++++++- .../PublishExecuteListenerInterfaceCreateNo.java | 2 +- .../event/PublishExecuteListenerInterfaceImpl.java | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/util/ProcesNumberUtil.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/util/ProcesNumberUtil.java index eefbc1fc..2925bc82 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/util/ProcesNumberUtil.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/util/ProcesNumberUtil.java @@ -47,13 +47,19 @@ public class ProcesNumberUtil { * @return */ public String getNumber(String bindId) { + System.out.println("生成编号并写入数据库==============================================="); //查询出主表数据 BO mainData = SDK.getBOAPI().getByProcess("BO_ACT_COE_PUBLISH", bindId); + + System.out.println("mainData==============================="+mainData); //根据主表数据查询出权限的编码 String qxSql = "select * from BO_ACT_AUTH_INFO where ORGNAME='%s' and LEVEL_1_PROCESS_NAME='%s' and LEVEL_2_PROCESS_NAME='%s' and LEVEL_3_PROCESS_NAME='%s'" + " and ADAPT_REGION_NAME = '%s' and APPLICABLE_PRODUCT='%s'"; RowMap authData = DBSql.getMap(String.format(qxSql, mainData.getString("ADAPT_NAME_THE_COMPANY"), mainData.getString("LEVEL_1_PROCESS_NAME") , mainData.getString("LEVEL_2_PROCESS_NAME"), mainData.getString("LEVEL_3_PROCESS_NAME"), mainData.getString("ADAPT_REGION_NAME"), mainData.getString("APPLICABLE_PRODUCT"))); + + System.out.println("authData==========================="+authData); + //获取所有的流程编码 如果为空则为00 String orgCode = authData.getString("ORGCODE"); String levelOne = authData.getString("LEVEL_1_PROCESS_ID"); @@ -75,10 +81,13 @@ public class ProcesNumberUtil { levelThree = "00"; } String levelnum = levelOne + "." + levelTwo + "." + levelThree; + + System.out.println("levelnum========================="+levelnum); String updateSql = "update BO_ACT_COE_PUBLISH_N set PROCESS_NUMBER='%s' where ID = '%S'"; for (BO nowData : dataList) { String number = getProcessNum(levelnum, orgCode); - String processNum = levelnum + number + "/R01V1.0" + orgCode + regionCode + productCode; + + String processNum = levelnum + "." + number + "/R01V1.0" + orgCode + regionCode + productCode; DBSql.update(String.format(updateSql, processNum, nowData.getId())); String publishFileId = nowData.getString("PUBLISHFILEID"); String updateAttrsql = "update APP_ACT_COE_PAL_PROP set PROPERTYVALUE='%s' where PROPERTYID='%s' AND PLID='%s'"; diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceCreateNo.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceCreateNo.java index a78e4b48..394cc9f4 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceCreateNo.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceCreateNo.java @@ -21,7 +21,7 @@ public class PublishExecuteListenerInterfaceCreateNo extends ExecuteListener imp @Override public String getDescription() { - return "将发布信息保存至CoE中。"; + return "任务完成后生成文件编号"; } @Override diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java index 2d893e6f..a90f3540 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java @@ -92,7 +92,7 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme repositoryDao.updatePublishStatusAndDate("N", boN.get("PUBLISHFILEID").toString(), null, model.getPublishDate()); } //by bzp 测试编号生成 - new ProcesNumberUtil().getNumber(processInstId); + //new ProcesNumberUtil().getNumber(processInstId); } if (bolistC != null) { for (BO boC : bolistC) {