修改手册编号多版本生成错误问题
This commit is contained in:
parent
402e4c6c5c
commit
bc792bd492
Binary file not shown.
@ -1,5 +1,7 @@
|
|||||||
package com.actionsoft.apps.coe.pal.publisher.client.util;
|
package com.actionsoft.apps.coe.pal.publisher.client.util;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||||
import com.actionsoft.bpms.bo.engine.BO;
|
import com.actionsoft.bpms.bo.engine.BO;
|
||||||
import com.actionsoft.bpms.bpmn.engine.model.run.delegate.ProcessInstance;
|
import com.actionsoft.bpms.bpmn.engine.model.run.delegate.ProcessInstance;
|
||||||
import com.actionsoft.bpms.commons.database.RowMap;
|
import com.actionsoft.bpms.commons.database.RowMap;
|
||||||
@ -140,13 +142,16 @@ public class ProcesNumberUtil {
|
|||||||
String plvers = rowMap.getString("PLVER");
|
String plvers = rowMap.getString("PLVER");
|
||||||
if (!"".equals(plvers)) {
|
if (!"".equals(plvers)) {
|
||||||
if (plvers.length() > 1) {
|
if (plvers.length() > 1) {
|
||||||
plver = plvers.substring(0, 1) + "."
|
if(plvers.contains(".")){
|
||||||
+ plvers.substring(plvers.length() - 1, plvers.length());
|
plver = plvers.substring(0,plvers.indexOf(".")) + "." + plvers.substring(plvers.length() - 1, plvers.length());
|
||||||
|
}else{
|
||||||
|
plver = plvers+ ".0";
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
plver = plvers.substring(0, 1) + ".0";
|
plver = plvers.substring(0, 1) + ".0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 CHANGE_NUMBER = '%s' where CHANGEDFILEIDNEW = '%s'";
|
String updateSql = "update BO_ACT_COE_PUBLISH_C set CHANGE_NUMBER = '%s' where CHANGEDFILEIDNEW = '%s'";
|
||||||
//更新子表文件编码属性
|
//更新子表文件编码属性
|
||||||
@ -268,14 +273,16 @@ public class ProcesNumberUtil {
|
|||||||
}
|
}
|
||||||
if (!"".equals(plvers)) {
|
if (!"".equals(plvers)) {
|
||||||
if (plvers.length() > 1) {
|
if (plvers.length() > 1) {
|
||||||
plver = plvers.substring(0, 1) + "."
|
if(plvers.contains(".")){
|
||||||
+ plvers.substring(plvers.length() - 1, plvers.length());
|
plver = plvers.substring(0,plvers.indexOf(".")) + "." + plvers.substring(plvers.length() - 1, plvers.length());
|
||||||
|
}else{
|
||||||
|
plver = plvers+ ".0";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
plver = plvers.substring(0, 1) + ".0";
|
plver = plvers.substring(0, 1) + ".0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String processNum = levelnum + name + "V" + plver + "-" + orgCode + regionCode + productCode;
|
String processNum = levelnum + name + "V" + plver + "-" + orgCode + regionCode + productCode;
|
||||||
String s = changData.getId();
|
String s = changData.getId();
|
||||||
int update = DBSql.update(String.format(updateSql, processNum, s.toLowerCase()));
|
int update = DBSql.update(String.format(updateSql, processNum, s.toLowerCase()));
|
||||||
@ -401,14 +408,17 @@ public class ProcesNumberUtil {
|
|||||||
}
|
}
|
||||||
if (!"".equals(plvers)) {
|
if (!"".equals(plvers)) {
|
||||||
if (plvers.length() > 1) {
|
if (plvers.length() > 1) {
|
||||||
plver = plvers.substring(0, 1) + "."
|
if(plvers.contains(".")){
|
||||||
+ plvers.substring(plvers.length() - 1, plvers.length());
|
plver = plvers.substring(0,plvers.indexOf(".")) + "." + plvers.substring(plvers.length() - 1, plvers.length());
|
||||||
|
}else{
|
||||||
|
plver = plvers+ ".0";
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
plver = plvers.substring(0, 1) + ".0";
|
plver = plvers.substring(0, 1) + ".0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String processNum = levelnum + name + "V" + plver + "-" + orgCode + regionCode + productCode;
|
String processNum = levelnum + name + "V" + plver + "-" + orgCode + regionCode + productCode;
|
||||||
String s = nowData.getId();
|
String s = nowData.getId();
|
||||||
int update = DBSql.update(String.format(updateSql, processNum, s.toLowerCase()));
|
int update = DBSql.update(String.format(updateSql, processNum, s.toLowerCase()));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user