Parcourir la source

优化提交结果绑定人员功能

jingbo il y a 5 mois
Parent
commit
a7592fbf00

+ 7 - 4
src/main/java/com/jeesite/modules/mes/service/MesProductRecordService.java

@@ -602,7 +602,7 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
 
 
 
-		if(!mesLineProcess1.getType().equals("3")){ // 单部件
+		if(!mesLineProcess1.getType().equals("3")){ // 不是单部件
 			// 更新过程参数
 			for (MesProductRecord mesProductRecord : lists){
 				String oldcontent = mesProductRecord.getContent();
@@ -701,9 +701,12 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
 					mesProductRecord2.setOprno(oprno);
 					mesProductRecord2.setSn(mesProductRecord.getSn());
 					mesProductRecord2.setLineSn(mesProductRecord.getLineSn());
-					mesProductRecord2.setContent(content);
 					mesProductRecord2.setCraft("400001");
-					mesProductRecordDao.updateResultByCraftAndSnAndLineSnAndOprno(mesProductRecord2);
+					MesProductRecord mesProductRecord3 = mesProductRecordDao.findInfo(mesProductRecord2);
+					mesProductRecord3.setOprno(oldOprno);
+					mesProductRecord3.setContent(content);
+					mesProductRecord3.setMaterielSn(userCode);
+					mesProductRecordDao.update(mesProductRecord3);
 
 
 					FileUploadUtils.saveFileUpload(mesProductRecord, mesProductRecord.getId(), "mesProductRecord_image");
@@ -964,7 +967,7 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
 
 		mesProductRecord.setMaterielSn(materielSn);
 		mesProductRecord.setContent(content);
-		mesProductRecord.setCraft("400001");
+		mesProductRecord.setCraft(craft);
 		mesProductRecord.setSource("0");
 		super.update(mesProductRecord);