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 2925bc82..d070f3e5 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 @@ -85,9 +85,26 @@ public class ProcesNumberUtil { 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 publishfileid=nowData.getString("PUBLISHFILEID"); + + RowMap rowMap=DBSql.getMap("SELECT PLCATEGORY FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID='"+publishfileid+"' "); + String name = "00R00"; + if(rowMap!=null){ + String plcategory=rowMap.getString("PLCATEGORY"); + if(plcategory.equals("process")){ + name = number + "/P"+number; + }else if(plcategory.equals("control")){ + name = "00/R00"; + }else if(plcategory.equals("data")){ + name = "00/R00"; + } + } + + String processNum = levelnum + "." + name + 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'";