11 Commity be96756113 ... 69bb3049e4

Autor SHA1 Wiadomość Data
  zhanghe 69bb3049e4 Merge remote-tracking branch 'origin/master' 3 dni temu
  zhanghe 4ed1fa4345 气密可提交三次 3 dni temu
  zhanghe 7dfedf96e9 OP220子结果提交取消 4 dni temu
  zhanghe 6c8a06ecd3 OP220子结果提交 1 tydzień temu
  zhanghe c0d7e327b8 优化 1 tydzień temu
  zhanghe 65efa0f7da Merge remote-tracking branch 'origin/master' 1 tydzień temu
  zhanghe efdd084a04 Merge remote-tracking branch 'origin/master' 1 tydzień temu
  zhanghe 7185f5dfaa 优化 2 tygodni temu
  jingbo 2c332486bc GP12拍照上传优化 2 tygodni temu
  jingbo 97263c089b 绑定内容接口优化 3 tygodni temu
  jingbo 49663698e8 初始化 3 tygodni temu

+ 56 - 37
src/main/java/com/jeesite/modules/mes/web/MesProductRecordController.java

@@ -1353,6 +1353,25 @@ public class MesProductRecordController extends BaseController {
 		if(mesLineProcess1.getRepeat().equals("1") && (ret.equals(bs+"OK") || ret.equals(bs+"NG"))){ // 可重复工作
 			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;
 	}
@@ -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;
+//						}
+//
+//					}