|
@@ -197,10 +197,9 @@ public class EmsGmPcJhServiceImpl extends BaseServiceImpl<EmsGmPcJh, String> imp
|
|
|
break;
|
|
|
default: throw new Exception("请选择模板文件");
|
|
|
}
|
|
|
- String maxid = emsGmPcJhMapper.getMaxid(spp);
|
|
|
- String strh =maxid.substring(maxid.length() -2,maxid.length());
|
|
|
- Integer seq = Integer.parseInt(strh)+(i-1);
|
|
|
- spp.setId(maxid.replace("-"+strh,seq<10?"-0"+seq.toString():"-"+seq.toString()));
|
|
|
+
|
|
|
+ //spp.setId(maxid.replace("-"+strh,seq<10?"-0"+seq.toString():"-"+seq.toString()));
|
|
|
+
|
|
|
spp.setState("0");
|
|
|
spp.setCreateMan(payload.getUserName());
|
|
|
spp.setCreateTime(new Date());
|
|
@@ -248,6 +247,18 @@ public class EmsGmPcJhServiceImpl extends BaseServiceImpl<EmsGmPcJh, String> imp
|
|
|
throw new MarketSlmException(500,"模板文件存在模板外的列,请仔细检查!!");
|
|
|
}
|
|
|
}
|
|
|
+ String maxid = emsGmPcJhMapper.getMaxid(spp);
|
|
|
+ //String strh =maxid.substring(maxid.length() -2,maxid.length());
|
|
|
+ String strh =maxid.split("-")[3];
|
|
|
+ Integer seq = Integer.parseInt(strh)+(i-1);
|
|
|
+ if("1".equals(spp.getTag())) {
|
|
|
+ spp.setId(spp.getType() + spp.getStartTime() + "-" + String.format("%03d",seq));
|
|
|
+ if(emsGmPcJhMapper.getOlnyData(spp).size() > 0){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ spp.setId(spp.getType() + spp.getStartTime() + "-" + String.format("%02d",seq));
|
|
|
+ }
|
|
|
//spp.setSteelCode(steel);
|
|
|
//spp.setHeatno(heat);
|
|
|
//for (int j=2;j<10;j++)
|
|
@@ -424,6 +435,11 @@ public class EmsGmPcJhServiceImpl extends BaseServiceImpl<EmsGmPcJh, String> imp
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<EmsGmPcJh> getOlnyData(EmsGmPcJh emsGmPcJh) {
|
|
|
+ return emsGmPcJhMapper.getOlnyData(emsGmPcJh);
|
|
|
+ }
|
|
|
+
|
|
|
public String setWorkprocType(String str){
|
|
|
if (str.contains("N-G1-")){
|
|
|
return "AT2005";
|