文件编号生成规则修改
This commit is contained in:
parent
ce00194f08
commit
cd6010a4fe
@ -41,7 +41,9 @@ public class ProcesNumberUtil {
|
|||||||
String updateSql = "update BO_ACT_PROCESSNUMBER set PROCESS_NUMBERS=%s where ID='%s'";
|
String updateSql = "update BO_ACT_PROCESSNUMBER set PROCESS_NUMBERS=%s where ID='%s'";
|
||||||
DBSql.update(String.format(updateSql, nowNum + 1, result.getString("ID")));
|
DBSql.update(String.format(updateSql, nowNum + 1, result.getString("ID")));
|
||||||
if (nowNum < 10) {
|
if (nowNum < 10) {
|
||||||
return "0" + nowNum;
|
return "00" + nowNum;
|
||||||
|
}else if(nowNum >=10&&nowNum < 100){
|
||||||
|
return "0" + nowNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (plcategory.contains("control")) {
|
} else if (plcategory.contains("control")) {
|
||||||
@ -59,7 +61,9 @@ public class ProcesNumberUtil {
|
|||||||
String updateSql = "update BO_ACT_PROCESSNUMBER set SYSTEM_NUMBERS=%s where ID='%s'";
|
String updateSql = "update BO_ACT_PROCESSNUMBER set SYSTEM_NUMBERS=%s where ID='%s'";
|
||||||
DBSql.update(String.format(updateSql, nowNum + 1, result.getString("ID")));
|
DBSql.update(String.format(updateSql, nowNum + 1, result.getString("ID")));
|
||||||
if (nowNum < 10) {
|
if (nowNum < 10) {
|
||||||
return "0" + nowNum;
|
return "00" + nowNum;
|
||||||
|
}else if(nowNum >=10&&nowNum < 100){
|
||||||
|
return "0" + nowNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (plcategory.contains("form")) {
|
} else if (plcategory.contains("form")) {
|
||||||
@ -77,7 +81,9 @@ public class ProcesNumberUtil {
|
|||||||
String updateSql = "update BO_ACT_PROCESSNUMBER set FORM_NUMBERS=%s where ID='%s'";
|
String updateSql = "update BO_ACT_PROCESSNUMBER set FORM_NUMBERS=%s where ID='%s'";
|
||||||
DBSql.update(String.format(updateSql, nowNum + 1, result.getString("ID")));
|
DBSql.update(String.format(updateSql, nowNum + 1, result.getString("ID")));
|
||||||
if (nowNum < 10) {
|
if (nowNum < 10) {
|
||||||
return "0" + nowNum;
|
return "00" + nowNum;
|
||||||
|
}else if(nowNum >=10&&nowNum < 100){
|
||||||
|
return "0" + nowNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -184,15 +190,14 @@ public class ProcesNumberUtil {
|
|||||||
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);
|
System.err.println("number======="+number);
|
||||||
number = "19";
|
|
||||||
if (plcategory.contains("process")) {
|
if (plcategory.contains("process")) {
|
||||||
name = number + "/P" + number;
|
name = "/P" + number;
|
||||||
} else if (plcategory.contains("control")) {
|
} else if (plcategory.contains("control")) {
|
||||||
name = "00" + "/R" + number;
|
name = "/R" + number;
|
||||||
} else if (plcategory.contains("form")) {
|
} else if (plcategory.contains("form")) {
|
||||||
fileName = "form_number";
|
fileName = "form_number";
|
||||||
name = number + "/T" + number;
|
name = "/T" + number;
|
||||||
}
|
}
|
||||||
if (!"".equals(plvers)) {
|
if (!"".equals(plvers)) {
|
||||||
if (plvers.length() > 1) {
|
if (plvers.length() > 1) {
|
||||||
@ -204,7 +209,7 @@ public class ProcesNumberUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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()));
|
||||||
System.out.println("更新表单文件编号回填:" + update + "--->" + processNum+" 文件id"+s);
|
System.out.println("更新表单文件编号回填:" + update + "--->" + processNum+" 文件id"+s);
|
||||||
@ -262,13 +267,14 @@ public class ProcesNumberUtil {
|
|||||||
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);
|
||||||
|
|
||||||
if (plcategory.contains("process")) {
|
if (plcategory.contains("process")) {
|
||||||
name = number + "/P" + number;
|
name = "/P" + number;
|
||||||
} else if (plcategory.contains("control")) {
|
} else if (plcategory.contains("control")) {
|
||||||
name = number + "/R" + number;
|
name = "/R" + number;
|
||||||
} else if (plcategory.contains("form")) {
|
} else if (plcategory.contains("form")) {
|
||||||
fileName = "form_number";
|
fileName = "form_number";
|
||||||
name = number + "/T" + number;
|
name = "/T" + number;
|
||||||
}
|
}
|
||||||
if (!"".equals(plvers)) {
|
if (!"".equals(plvers)) {
|
||||||
if (plvers.length() > 1) {
|
if (plvers.length() > 1) {
|
||||||
@ -280,7 +286,7 @@ public class ProcesNumberUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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()));
|
||||||
System.out.println("表单文件编号回填:" + update + "--->" + processNum);
|
System.out.println("表单文件编号回填:" + update + "--->" + processNum);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user