|
@@ -1353,6 +1353,25 @@ public class MesProductRecordController extends BaseController {
|
|
|
if(mesLineProcess1.getRepeat().equals("1") && (ret.equals(bs+"OK") || ret.equals(bs+"NG"))){ // 可重复工作
|
|
if(mesLineProcess1.getRepeat().equals("1") && (ret.equals(bs+"OK") || ret.equals(bs+"NG"))){ // 可重复工作
|
|
|
ret = "RSUD";
|
|
ret = "RSUD";
|
|
|
}
|
|
}
|
|
|
|
|
+ //判断是否属于可做三次气密检测的工位 mes_qm_maxNumber次数 mes_qm_oprnos工位
|
|
|
|
|
+ String qmOprnos = Global.getConfig("mes_qm_oprnos");
|
|
|
|
|
+ if(!StringUtils.isEmpty(qmOprnos) && qmOprnos.contains(CommonUitl.formatOprno(oldOprno))){
|
|
|
|
|
+ int qmMaxNumber =new Integer(Global.getConfig("mes_qm_maxNumber")) ;
|
|
|
|
|
+ if(qmMaxNumber > 0){
|
|
|
|
|
+ MesProductQm mesProductQm = new MesProductQm();
|
|
|
|
|
+ mesProductQm.setComponentNum(sn);
|
|
|
|
|
+ mesProductQm.setOprno(oldOprno);
|
|
|
|
|
+
|
|
|
|
|
+ mesProductQm.setProductCate(lineSn);
|
|
|
|
|
+ List<MesProductQm> list = mesProductQmService.findList(mesProductQm);//----
|
|
|
|
|
+//判断列表长度
|
|
|
|
|
+ if(list.size() >= qmMaxNumber){
|
|
|
|
|
+ ret = bs+lxres;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return ret;
|
|
return ret;
|
|
|
}
|
|
}
|
|
@@ -1444,43 +1463,43 @@ public class MesProductRecordController extends BaseController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- MesProductOprno mesProductOprno = new MesProductOprno();
|
|
|
|
|
- mesProductOprno.setSn(sn);
|
|
|
|
|
- mesProductOprno.setOprno(oprnoOld);
|
|
|
|
|
- mesProductOprno.setLineSn(lineSn);
|
|
|
|
|
- MesProductOprno mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
|
|
|
- System.out.println(mesProductOprno1);
|
|
|
|
|
- if(ObjectUtils.isEmpty(mesProductOprno1)){
|
|
|
|
|
- //添加子工位表
|
|
|
|
|
- mesProductOprnoService.save(mesProductOprno);
|
|
|
|
|
- mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
|
|
|
- }
|
|
|
|
|
- //添加子工位
|
|
|
|
|
- if (!StringUtils.isEmpty(oprno) &&"OP220".equals(oprnoOld)){
|
|
|
|
|
-
|
|
|
|
|
- if("OP220A".equals(oprno) ){
|
|
|
|
|
- mesProductOprno1.setResult1(content);
|
|
|
|
|
- }else if("OP220B".equals(oprno)){
|
|
|
|
|
- mesProductOprno1.setResult2(content);
|
|
|
|
|
- }
|
|
|
|
|
- mesProductOprnoService.save(mesProductOprno1);
|
|
|
|
|
-
|
|
|
|
|
- // 全有结果
|
|
|
|
|
- if(mesProductOprno1.getResult1()!=null && !StringUtils.isEmpty(mesProductOprno1.getResult1()) && mesProductOprno1.getResult2()!=null && !StringUtils.isEmpty(mesProductOprno1.getResult2())){
|
|
|
|
|
- String lastRet = "NG";
|
|
|
|
|
- if(mesProductOprno1.getResult1().equals("OK") && mesProductOprno1.getResult2().equals("OK")){
|
|
|
|
|
- lastRet = "OK";
|
|
|
|
|
- }
|
|
|
|
|
- // 2.判断物料批次是否符合绑定
|
|
|
|
|
- List<BindMaterialResp> bmlists = mesLineProcessMaterialService.getBindMaterial(oprnoOld, lineSn);
|
|
|
|
|
- // 总结果产线要求写死“OK”
|
|
|
|
|
- mesProductRecordService.updateRecordResult(sn,oprnoOld,"100000","",lastRet,userCode,params,lineSn,true,bmlists);
|
|
|
|
|
- }else {
|
|
|
|
|
- ret = "RSOK";
|
|
|
|
|
- return ret;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// MesProductOprno mesProductOprno = new MesProductOprno();
|
|
|
|
|
+// mesProductOprno.setSn(sn);
|
|
|
|
|
+// mesProductOprno.setOprno(oprnoOld);
|
|
|
|
|
+// mesProductOprno.setLineSn(lineSn);
|
|
|
|
|
+// MesProductOprno mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
|
|
|
+// System.out.println(mesProductOprno1);
|
|
|
|
|
+// if(ObjectUtils.isEmpty(mesProductOprno1)){
|
|
|
|
|
+// //添加子工位表
|
|
|
|
|
+// mesProductOprnoService.save(mesProductOprno);
|
|
|
|
|
+// mesProductOprno1 = mesProductOprnoService.findInfo(mesProductOprno);
|
|
|
|
|
+// }
|
|
|
|
|
+// //添加子工位
|
|
|
|
|
+// if (!StringUtils.isEmpty(oprno) &&"OP220".equals(oprnoOld)){
|
|
|
|
|
+//
|
|
|
|
|
+// if("OP220A".equals(oprno) ){
|
|
|
|
|
+// mesProductOprno1.setResult1(content);
|
|
|
|
|
+// }else if("OP220B".equals(oprno)){
|
|
|
|
|
+// mesProductOprno1.setResult2(content);
|
|
|
|
|
+// }
|
|
|
|
|
+// mesProductOprnoService.save(mesProductOprno1);
|
|
|
|
|
+//
|
|
|
|
|
+// // 全有结果
|
|
|
|
|
+// if(mesProductOprno1.getResult1()!=null && !StringUtils.isEmpty(mesProductOprno1.getResult1()) && mesProductOprno1.getResult2()!=null && !StringUtils.isEmpty(mesProductOprno1.getResult2())){
|
|
|
|
|
+// String lastRet = "NG";
|
|
|
|
|
+// if(mesProductOprno1.getResult1().equals("OK") && mesProductOprno1.getResult2().equals("OK")){
|
|
|
|
|
+// lastRet = "OK";
|
|
|
|
|
+// }
|
|
|
|
|
+// // 2.判断物料批次是否符合绑定
|
|
|
|
|
+// List<BindMaterialResp> bmlists = mesLineProcessMaterialService.getBindMaterial(oprnoOld, lineSn);
|
|
|
|
|
+// // 总结果产线要求写死“OK”
|
|
|
|
|
+// mesProductRecordService.updateRecordResult(sn,oprnoOld,"100000","",lastRet,userCode,params,lineSn,true,bmlists);
|
|
|
|
|
+// }else {
|
|
|
|
|
+// ret = "RSOK";
|
|
|
|
|
+// return ret;
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|