|
|
@@ -2759,14 +2759,14 @@ public String check(@RequestBody MesElectricTorque mesElectricTorque,HttpServlet
|
|
|
String oprno = request.getParameter("oprno");
|
|
|
String lineSn = request.getParameter("lineSn");
|
|
|
String batchSn = request.getParameter("batchSn");
|
|
|
- String craft = "400004";
|
|
|
+ String craft = "400001";
|
|
|
|
|
|
if(StringUtils.isEmpty(sn) || StringUtils.isEmpty(oprno) || StringUtils.isEmpty(batchSn) || StringUtils.isEmpty(lineSn)){
|
|
|
return renderResult(Global.FALSE, text("参数错误!"));
|
|
|
}
|
|
|
|
|
|
if(!CommonUitl.checkBatchSn(batchSn,sn)){
|
|
|
- return renderResult(Global.FALSE, text("底护板与该工件不匹配!"));
|
|
|
+ return renderResult(Global.FALSE, text("水冷版与该工件不匹配!"));
|
|
|
}
|
|
|
|
|
|
String userCode = UserUtils.getUser().getUserCode();
|
|
|
@@ -2782,7 +2782,7 @@ public String check(@RequestBody MesElectricTorque mesElectricTorque,HttpServlet
|
|
|
}
|
|
|
|
|
|
if(mesProductRecord1.getContent().equals("OK") || mesProductRecord1.getContent().equals("NG")){
|
|
|
- return renderResult(Global.FALSE, text("本工位该工件已加工,不能绑定底护板!"));
|
|
|
+ return renderResult(Global.FALSE, text("本工位该工件已加工,不能绑定水冷板!"));
|
|
|
}
|
|
|
|
|
|
// 检查是否已绑定其他工件
|
|
|
@@ -2791,7 +2791,7 @@ public String check(@RequestBody MesElectricTorque mesElectricTorque,HttpServlet
|
|
|
mesProductDhb.getSqlMap().getWhere().and("a.sn",QueryType.NE,sn);
|
|
|
MesProductDhb mesProductDhb1 = mesProductDhbService.findInfo(mesProductDhb);
|
|
|
if(!ObjectUtils.isEmpty(mesProductDhb1)){
|
|
|
- return renderResult(Global.FALSE, text("该底护板已与其他工件绑定!"));
|
|
|
+ return renderResult(Global.FALSE, text("该水冷板已与其他工件绑定!"));
|
|
|
}
|
|
|
|
|
|
MesProductRecord mesProductRecord3 = mesProductRecordService.findByUpdateCate(sn,oprno,craft,lineSn);
|
|
|
@@ -4166,4 +4166,85 @@ public String check(@RequestBody MesElectricTorque mesElectricTorque,HttpServlet
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ //水冷版提交页面
|
|
|
+ @PostMapping(value = "pdaXtOP130")
|
|
|
+ @ResponseBody
|
|
|
+ @Transactional
|
|
|
+ public String pdaXtOP130result( HttpServletRequest request) {
|
|
|
+ String sn = request.getParameter("sn");
|
|
|
+ String oprno = request.getParameter("oprno");
|
|
|
+ String lbSn = request.getParameter("lbSn");//水冷版
|
|
|
+ String lineSn = request.getParameter("lineSn");
|
|
|
+ String result = request.getParameter("result");
|
|
|
+
|
|
|
+ String craft = "100000";
|
|
|
+ String remark = request.getParameter("remark");
|
|
|
+ String oldOprno = oprno;
|
|
|
+ if(oldOprno.length()==5){
|
|
|
+ oldOprno += "A";
|
|
|
+ }
|
|
|
+ String mesProductRecord_image = request.getParameter("mesProductRecord_image");
|
|
|
+// if(com.alibaba.druid.util.StringUtils.isEmpty(mesProductRecord_image)){
|
|
|
+// return renderResult(Global.FALSE, text("图片不能为空!"));
|
|
|
+// }
|
|
|
+ if(StringUtils.isEmpty(sn) || StringUtils.isEmpty(oprno) || StringUtils.isEmpty(result) || StringUtils.isEmpty(lineSn)){
|
|
|
+ return renderResult(Global.FALSE, text("参数错误!"));
|
|
|
+ }
|
|
|
+ if(StringUtils.isEmpty(lbSn) ){
|
|
|
+ return renderResult(Global.FALSE, text("请扫冷板码!"));
|
|
|
+ }
|
|
|
+ if(!result.equals("OK") && !result.equals("NG")){
|
|
|
+ return renderResult(Global.FALSE, text("结果错误!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ User user = UserUtils.getUser();
|
|
|
+ String userCode = user.getUserCode();
|
|
|
+
|
|
|
+ List<ParamsResp> params = new ArrayList<>();
|
|
|
+
|
|
|
+ // 获取工位配置
|
|
|
+ MesLineProcess mesLineProcess1 = mesLineProcessService.findInfoByOprnoLineSn(oprno,lineSn);
|
|
|
+ if(ObjectUtils.isEmpty(mesLineProcess1)){
|
|
|
+ return renderResult(Global.FALSE, text("子工位未配置!"));
|
|
|
+ }
|
|
|
+ //先查询是否被绑定
|
|
|
+ MesProductDhb mesProductDhb1 = new MesProductDhb();
|
|
|
+ mesProductDhb1.setBatchSn(lbSn);
|
|
|
+ mesProductDhb1 = mesProductDhbService.findInfo(mesProductDhb1);
|
|
|
+ if(!ObjectUtils.isEmpty(mesProductDhb1)){
|
|
|
+ return renderResult(Global.FALSE, text("此冷板已绑定"+"绑定工件为"+mesProductDhb1.getSn()));
|
|
|
+ }
|
|
|
+ //查询冷板模板
|
|
|
+ MesProductRecord mesProductRecord = new MesProductRecord();
|
|
|
+ mesProductRecord.setSn(sn);
|
|
|
+ mesProductRecord.setCraft("400001");
|
|
|
+ mesProductRecord.setOprno("OP130");
|
|
|
+ mesProductRecord.setLineSn(lineSn);
|
|
|
+ mesProductRecord = mesProductRecordService.findInfo(mesProductRecord);
|
|
|
+ //绑定冷板码
|
|
|
+ mesProductRecord.setMaterielSn(lbSn);//绑定水冷版
|
|
|
+ mesProductRecord.setOprno("OP130A");
|
|
|
+ mesProductRecordService.save(mesProductRecord);
|
|
|
+ //作存储记录
|
|
|
+ MesProductDhb mesProductDhb = new MesProductDhb();
|
|
|
+ mesProductDhb.setSn(sn);
|
|
|
+ mesProductDhb.setBatchSn(lbSn);
|
|
|
+ mesProductDhbService.save(mesProductDhb);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ String res = updateQualityCommon(mesLineProcess1,oprno,lineSn,sn,craft,result,userCode,params,remark);
|
|
|
+ String checkret = res.substring(2,4);
|
|
|
+ if(!checkret.equals("OK")){
|
|
|
+ String lx = res.substring(0,2)+" ";
|
|
|
+ String lmsg = ErrorMsg.getErrorMsg(checkret,lx);
|
|
|
+ return renderResult(Global.FALSE, text(lmsg));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return renderResult(Global.TRUE, text("操作成功!"));
|
|
|
+ }
|
|
|
+
|
|
|
}
|