|
@@ -1794,8 +1794,10 @@ public class AWImplClient implements AWClint {
|
|
.formUuid("FORM-7A52930D0E834522AD65A4CFE2C0818F1KQO")
|
|
.formUuid("FORM-7A52930D0E834522AD65A4CFE2C0818F1KQO")
|
|
.searchFieldJson(JSONObject.toJSONString(UtilMap.map("textField_lth2h04b",charter))).build());
|
|
.searchFieldJson(JSONObject.toJSONString(UtilMap.map("textField_lth2h04b",charter))).build());
|
|
Map<String,Map> charterMap=new HashMap();
|
|
Map<String,Map> charterMap=new HashMap();
|
|
|
|
+ Map<String,String> instIdList=new HashMap<>();
|
|
for (int j = 0; j < list.size(); j++) {
|
|
for (int j = 0; j < list.size(); j++) {
|
|
Map item=list.get(j);
|
|
Map item=list.get(j);
|
|
|
|
+ instIdList.put(UtilMap.getString(item,"textField_lt2d2x79"),UtilMap.getString(item,"instanceId"));
|
|
String no = getCode(UtilMap.getString(item,"textField_lt2d2x79"));
|
|
String no = getCode(UtilMap.getString(item,"textField_lt2d2x79"));
|
|
charterMap.put(no,item);
|
|
charterMap.put(no,item);
|
|
list.get(j).put("id",no);
|
|
list.get(j).put("id",no);
|
|
@@ -1857,7 +1859,7 @@ public class AWImplClient implements AWClint {
|
|
String no=UtilMap.getString(item,"textField_lt2d2x79");
|
|
String no=UtilMap.getString(item,"textField_lt2d2x79");
|
|
String codeNo=getCode(no);
|
|
String codeNo=getCode(no);
|
|
if(charterMap.containsKey(codeNo)){
|
|
if(charterMap.containsKey(codeNo)){
|
|
- dataList.get(i).put("associationFormField_lvy7yjq8",getAss(no,UtilMap.getString(charterMap,"instanceId")));
|
|
|
|
|
|
+ dataList.get(i).put("associationFormField_lvy7yjq8",getAss(no,instIdList.get(no)));
|
|
dataList.get(i).put("textField_lyqprdyf",codeNo); // 序号
|
|
dataList.get(i).put("textField_lyqprdyf",codeNo); // 序号
|
|
}else{
|
|
}else{
|
|
// 新增
|
|
// 新增
|
|
@@ -1881,6 +1883,7 @@ public class AWImplClient implements AWClint {
|
|
noNew=level==1?categoryNew+"001":fno+".1";
|
|
noNew=level==1?categoryNew+"001":fno+".1";
|
|
}
|
|
}
|
|
codeNo=noNew;
|
|
codeNo=noNew;
|
|
|
|
+ fno=getFnoValue(list,fno);
|
|
String nowTime= LocalDateTime.now().format(DateTimeFormatter.ofPattern("MMddHHmmssS"));
|
|
String nowTime= LocalDateTime.now().format(DateTimeFormatter.ofPattern("MMddHHmmssS"));
|
|
dataList.get(i).put("textField_lt2d2x79",noNew+"_"+nowTime);
|
|
dataList.get(i).put("textField_lt2d2x79",noNew+"_"+nowTime);
|
|
dataList.get(i).put("textField_m0afm8pd",fno);
|
|
dataList.get(i).put("textField_m0afm8pd",fno);
|
|
@@ -1942,6 +1945,18 @@ public class AWImplClient implements AWClint {
|
|
return category+paddedBeforeDot + afterDot;
|
|
return category+paddedBeforeDot + afterDot;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private String getFnoValue(List<Map> list, String fno){
|
|
|
|
+ if(StringUtils.isBlank(fno)){
|
|
|
|
+ return "";
|
|
|
|
+ }
|
|
|
|
+ List<Map> list1=list.stream()
|
|
|
|
+ .filter(map -> UtilMap.getString(map, "textField_lt2d2x79").contains(fno+"_")).collect(Collectors.toList()); // 父编号查询编号
|
|
|
|
+ if(list1!=null&&list1.size()>0){
|
|
|
|
+ return UtilMap.getString(list1.get(0),"textField_lt2d2x79");
|
|
|
|
+ }
|
|
|
|
+ return "";
|
|
|
|
+ }
|
|
|
|
+
|
|
private Map getMaxValue(List<Map> list, String level, String category,String fno){
|
|
private Map getMaxValue(List<Map> list, String level, String category,String fno){
|
|
// 查找符合条件的最大 id
|
|
// 查找符合条件的最大 id
|
|
List<Map> list1=list.stream()
|
|
List<Map> list1=list.stream()
|