流程发布代码更新
This commit is contained in:
parent
8a27c4169d
commit
e1e0cdfaa4
@ -8,6 +8,7 @@ import com.actionsoft.bpms.util.DBSql;
|
|||||||
import com.actionsoft.bpms.util.UUIDGener;
|
import com.actionsoft.bpms.util.UUIDGener;
|
||||||
import com.actionsoft.bpms.util.UtilString;
|
import com.actionsoft.bpms.util.UtilString;
|
||||||
import com.actionsoft.sdk.local.SDK;
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
import com.sun.org.apache.xalan.internal.xsltc.compiler.sym;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author baizp
|
* @author baizp
|
||||||
@ -23,6 +24,10 @@ public class ProcesNumberUtil {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getProcessNum(String levelCode, String regionCode,String plcategory) {
|
public String getProcessNum(String levelCode, String regionCode,String plcategory) {
|
||||||
|
System.err.println("=====levelCode======="+levelCode);
|
||||||
|
System.err.println("=====regionCode======="+regionCode);
|
||||||
|
System.err.println("=====plcategory======="+plcategory);
|
||||||
|
|
||||||
int nowNum = 1;
|
int nowNum = 1;
|
||||||
//流程编号
|
//流程编号
|
||||||
if (plcategory.contains("process")) {
|
if (plcategory.contains("process")) {
|
||||||
@ -102,10 +107,10 @@ public class ProcesNumberUtil {
|
|||||||
List<BO> changList = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_C").addQuery("BINDID=", bindId).list();
|
List<BO> changList = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_C").addQuery("BINDID=", bindId).list();
|
||||||
if (changList.size() != 0) {
|
if (changList.size() != 0) {
|
||||||
for (BO changData : changList) {
|
for (BO changData : changList) {
|
||||||
String publish_numner = changData.getString("PUBLISH_NUMBER");
|
String change_numner = changData.getString("CHANGE_NUMBER");
|
||||||
String changFileId = changData.getString("CHANGEFILEID");
|
String changFileId = changData.getString("CHANGEFILEID");
|
||||||
String changAfterFileId = changData.getString("CHANGEDFILEIDNEW");
|
String changAfterFileId = changData.getString("CHANGEDFILEIDNEW");
|
||||||
if(UtilString.isEmpty(publish_numner)) {
|
if(UtilString.isEmpty(change_numner)) {
|
||||||
RowMap rowMap = DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID='" + changFileId + "'");
|
RowMap rowMap = DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID='" + changFileId + "'");
|
||||||
String Vsion1Id = DBSql.getString("SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLRID='"
|
String Vsion1Id = DBSql.getString("SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLRID='"
|
||||||
+ rowMap.getString("PLRID") + "' AND" + " PLVER = 1 ");
|
+ rowMap.getString("PLRID") + "' AND" + " PLVER = 1 ");
|
||||||
@ -126,7 +131,7 @@ public class ProcesNumberUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String new_number = publish_number.replaceAll("V1.0", "V"+plver);
|
String new_number = publish_number.replaceAll("V1.0", "V"+plver);
|
||||||
String updateSql = "update BO_ACT_COE_PUBLISH_C set PUBLISH_NUMBER='%s' where CHANGEDFILEIDNEW = '%s'";
|
String updateSql = "update BO_ACT_COE_PUBLISH_C set CHANGE_NUMBER = '%s' where CHANGEDFILEIDNEW = '%s'";
|
||||||
//更新子表文件编码属性
|
//更新子表文件编码属性
|
||||||
int update = DBSql.update(String.format(updateSql, new_number, changAfterFileId));
|
int update = DBSql.update(String.format(updateSql, new_number, changAfterFileId));
|
||||||
System.out.println("更新子表文件编号:" + update + "--->" + new_number);
|
System.out.println("更新子表文件编号:" + update + "--->" + new_number);
|
||||||
@ -161,7 +166,9 @@ public class ProcesNumberUtil {
|
|||||||
String levelThree = authData.getString("LEVEL_3_PROCESS_ID");
|
String levelThree = authData.getString("LEVEL_3_PROCESS_ID");
|
||||||
String regionCode = authData.getString("ADAPT_REGION_CODE");
|
String regionCode = authData.getString("ADAPT_REGION_CODE");
|
||||||
String productCode = authData.getString("APPLICABLE_PRODUCT_CODE");
|
String productCode = authData.getString("APPLICABLE_PRODUCT_CODE");
|
||||||
|
System.err.println("========levelOne======"+levelOne);
|
||||||
|
System.err.println("========levelTwo======"+levelTwo);
|
||||||
|
System.err.println("========levelThree======"+levelThree);
|
||||||
// 依次生成编号~并回填 修改
|
// 依次生成编号~并回填 修改
|
||||||
if (UtilString.isNotEmpty(levelTwo)) {
|
if (UtilString.isNotEmpty(levelTwo)) {
|
||||||
levelTwo = levelTwo.substring(levelTwo.indexOf(".") + 1, levelTwo.length());
|
levelTwo = levelTwo.substring(levelTwo.indexOf(".") + 1, levelTwo.length());
|
||||||
@ -175,20 +182,22 @@ public class ProcesNumberUtil {
|
|||||||
}
|
}
|
||||||
String levelnum = levelOne + "." + levelTwo + "." + levelThree;
|
String levelnum = levelOne + "." + levelTwo + "." + levelThree;
|
||||||
|
|
||||||
String updateSql = "update BO_ACT_COE_PUBLISH_C set PUBLISH_NUMBER='%s' where ID = '%s'";
|
String updateSql = "update BO_ACT_COE_PUBLISH_C set CHANGE_NUMBER = '%s' where ID = '%s'";
|
||||||
rowMap = DBSql.getMap("SELECT PLVER,PLMETHODID FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID='"
|
rowMap = DBSql.getMap("SELECT PLVER,PLMETHODID FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID='"
|
||||||
+ changAfterFileId + "' AND" + " ISUSE = 1 ");
|
+ changAfterFileId + "' AND" + " ISUSE = 1 ");
|
||||||
String name = "00R00";
|
String name = "01R01";
|
||||||
String fileName = "file_number";
|
String fileName = "file_number";
|
||||||
String plver = "1.0";
|
String plver = "2.0";
|
||||||
if (rowMap != null) {
|
if (rowMap != null) {
|
||||||
String plcategory = rowMap.getString("PLMETHODID");
|
String plcategory = rowMap.getString("PLMETHODID");
|
||||||
String plvers = rowMap.getString("PLVER");
|
String plvers = rowMap.getString("PLVER");
|
||||||
String number = getProcessNum(levelnum, orgCode,plcategory);
|
String number = getProcessNum(levelnum, orgCode,plcategory);
|
||||||
|
System.err.println("=======number======="+number);
|
||||||
if (plcategory.contains("process")) {
|
if (plcategory.contains("process")) {
|
||||||
name = number + "/P" + number;
|
name = number + "/P" + number;
|
||||||
} else if (plcategory.contains("control")) {
|
} else if (plcategory.contains("control")) {
|
||||||
name = number + "/R" + number;
|
name = number + "/R" + number;
|
||||||
|
|
||||||
} else if (plcategory.contains("form")) {
|
} else if (plcategory.contains("form")) {
|
||||||
fileName = "form_number";
|
fileName = "form_number";
|
||||||
name = number + "/T" + number;
|
name = number + "/T" + number;
|
||||||
@ -210,20 +219,9 @@ public class ProcesNumberUtil {
|
|||||||
String updateAttrsql = "update APP_ACT_COE_PAL_PROP set PROPERTYVALUE='%s' where PROPERTYID='%s' AND PLID='%s'";
|
String updateAttrsql = "update APP_ACT_COE_PAL_PROP set PROPERTYVALUE='%s' where PROPERTYID='%s' AND PLID='%s'";
|
||||||
int update2 = DBSql.update(String.format(updateAttrsql, processNum, fileName, changAfterFileId));
|
int update2 = DBSql.update(String.format(updateAttrsql, processNum, fileName, changAfterFileId));
|
||||||
System.out.println("更新模型文件编号回填:" + update2 + "--->" + processNum +" 文件id"+changAfterFileId);
|
System.out.println("更新模型文件编号回填:" + update2 + "--->" + processNum +" 文件id"+changAfterFileId);
|
||||||
// 更新流程绩效的编号----规则没看懂
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2438,6 +2438,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
obj.put("changeFileId", changeBo.getString("CHANGEFILEID"));
|
obj.put("changeFileId", changeBo.getString("CHANGEFILEID"));
|
||||||
obj.put("changedDesc", changeBo.getString("CHANGEDDESC"));
|
obj.put("changedDesc", changeBo.getString("CHANGEDDESC"));
|
||||||
obj.put("changedFileIdNew", changeBo.getString("CHANGEDFILEIDNEW"));
|
obj.put("changedFileIdNew", changeBo.getString("CHANGEDFILEIDNEW"));
|
||||||
|
obj.put("changedNumber", changeBo.getString("CHANGE_NUMBER"));
|
||||||
obj.put("taskId", changeBo.getString("TASKID"));
|
obj.put("taskId", changeBo.getString("TASKID"));
|
||||||
JSONArray array = new JSONArray();
|
JSONArray array = new JSONArray();
|
||||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(changeBo.getString("CHANGEFILEID"));
|
PALRepositoryModel model = PALRepositoryCache.getCache().get(changeBo.getString("CHANGEFILEID"));
|
||||||
|
|||||||
@ -20,7 +20,7 @@ import com.actionsoft.sdk.local.api.BOQueryAPI;
|
|||||||
@Controller
|
@Controller
|
||||||
public class TaskController
|
public class TaskController
|
||||||
{
|
{
|
||||||
@Mapping("com.yili_process_page")
|
@Mapping("com.yili_process_page_bak")
|
||||||
public String processTest(UserContext me, RequestParams params)
|
public String processTest(UserContext me, RequestParams params)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user