|
|
@@ -126,6 +126,8 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
|
|
|
|
|
|
@Autowired
|
|
|
private MesProductModelService mesProductModelService;
|
|
|
+ @Autowired
|
|
|
+ private MesProductModifyRecordService mesProductModifyRecordService;
|
|
|
|
|
|
@Override
|
|
|
public void save(MesProductRecord mesProductRecord) {
|
|
|
@@ -603,6 +605,7 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
|
|
|
|
|
|
// 更新过程参数
|
|
|
for (MesProductRecord mesProductRecord : lists){
|
|
|
+ String oldcontent = mesProductRecord.getContent();
|
|
|
if(crafts.size() > 0 && crafts.contains(mesProductRecord.getCraft())){ // 更新参数
|
|
|
for(ParamsResp paramsResp:paramsResps){
|
|
|
if(paramsResp.getCraft().equals(mesProductRecord.getCraft())){
|
|
|
@@ -613,6 +616,20 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
|
|
|
}
|
|
|
mesProductRecord.setSource("0");
|
|
|
super.update(mesProductRecord);
|
|
|
+
|
|
|
+ // 修改记录
|
|
|
+ MesProductModifyRecord mesProductModifyRecord1 = new MesProductModifyRecord();
|
|
|
+ mesProductModifyRecord1.setOprno(oldOprno);
|
|
|
+ mesProductModifyRecord1.setSn(mesProductRecord.getSn());
|
|
|
+ mesProductModifyRecord1.setCraft(mesProductRecord.getCraft());
|
|
|
+ mesProductModifyRecord1.setLineSn(mesProductRecord.getLineSn());
|
|
|
+ mesProductModifyRecord1.setContent(paramsResp.getResult());
|
|
|
+ mesProductModifyRecord1.setContentOld(oldcontent);
|
|
|
+ mesProductModifyRecord1.setSource("0");
|
|
|
+ mesProductModifyRecord1.setMaterielSn(mesProductRecord.getMaterielSn());
|
|
|
+ mesProductModifyRecord1.setCreateBy(userCode);
|
|
|
+ mesProductModifyRecord1.setUpdateBy(userCode);
|
|
|
+ mesProductModifyRecordService.save(mesProductModifyRecord1);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -626,6 +643,20 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
|
|
|
mesProductRecord.setMaterielSn(mesLineProcess1.getDevices());
|
|
|
mesProductRecord.setContent("OK");
|
|
|
super.update(mesProductRecord);
|
|
|
+
|
|
|
+ // 修改记录
|
|
|
+ MesProductModifyRecord mesProductModifyRecord1 = new MesProductModifyRecord();
|
|
|
+ mesProductModifyRecord1.setOprno(oldOprno);
|
|
|
+ mesProductModifyRecord1.setSn(mesProductRecord.getSn());
|
|
|
+ mesProductModifyRecord1.setCraft(mesProductRecord.getCraft());
|
|
|
+ mesProductModifyRecord1.setLineSn(mesProductRecord.getLineSn());
|
|
|
+ mesProductModifyRecord1.setContent("OK");
|
|
|
+ mesProductModifyRecord1.setContentOld(oldcontent);
|
|
|
+ mesProductModifyRecord1.setSource("0");
|
|
|
+ mesProductModifyRecord1.setMaterielSn(mesProductRecord.getMaterielSn());
|
|
|
+ mesProductModifyRecord1.setCreateBy(userCode);
|
|
|
+ mesProductModifyRecord1.setUpdateBy(userCode);
|
|
|
+ mesProductModifyRecordService.save(mesProductModifyRecord1);
|
|
|
}else if(mesProductRecord.getCraft().equals("400003")){
|
|
|
if(oldOprno.length() == 6){
|
|
|
mesProductRecord.setOprno(oldOprno);
|
|
|
@@ -633,6 +664,20 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
|
|
|
mesProductRecord.setMaterielSn(mesLineProcess1.getGzs());
|
|
|
mesProductRecord.setContent("OK");
|
|
|
super.update(mesProductRecord);
|
|
|
+
|
|
|
+ // 修改记录
|
|
|
+ MesProductModifyRecord mesProductModifyRecord1 = new MesProductModifyRecord();
|
|
|
+ mesProductModifyRecord1.setOprno(oldOprno);
|
|
|
+ mesProductModifyRecord1.setSn(mesProductRecord.getSn());
|
|
|
+ mesProductModifyRecord1.setCraft(mesProductRecord.getCraft());
|
|
|
+ mesProductModifyRecord1.setLineSn(mesProductRecord.getLineSn());
|
|
|
+ mesProductModifyRecord1.setContent("OK");
|
|
|
+ mesProductModifyRecord1.setContentOld(oldcontent);
|
|
|
+ mesProductModifyRecord1.setSource("0");
|
|
|
+ mesProductModifyRecord1.setMaterielSn(mesProductRecord.getMaterielSn());
|
|
|
+ mesProductModifyRecord1.setCreateBy(userCode);
|
|
|
+ mesProductModifyRecord1.setUpdateBy(userCode);
|
|
|
+ mesProductModifyRecordService.save(mesProductModifyRecord1);
|
|
|
}
|
|
|
|
|
|
// 更新主结果
|