|
|
@@ -205,6 +205,8 @@ public class MesProductRecordController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private MesProductCcService mesProductCcService;
|
|
|
+ @Autowired
|
|
|
+ private MesProductOprnoService mesProductOprnoService;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -1442,6 +1444,50 @@ 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;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (oprnoOld.equals("OP380")){
|
|
|
// 查询开始时间
|
|
|
MesDeviceTime mesDeviceTime = mesDeviceTimeService.getInfoByOprnoAndSnAndCate(oprno,sn,lineSn);
|
|
|
@@ -3526,6 +3572,37 @@ public class MesProductRecordController extends BaseController {
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
+// //OP220拍照
|
|
|
+// @PostMapping(value = "OP220PhotoApi")
|
|
|
+// public CommonResp OP220PhotoApi(HttpServletRequest request) {
|
|
|
+// CommonResp<String> resp = new CommonResp<>();
|
|
|
+// String oprno = request.getParameter("oprno");//OP220
|
|
|
+// String sn = request.getParameter("sn");
|
|
|
+// String mesOP220Photo = request.getParameter("mes_OP220Photo");
|
|
|
+// if (StringUtils.isEmpty(mesOP220Photo)){
|
|
|
+// resp.setMessage("图片不能为空");
|
|
|
+// return resp;
|
|
|
+// }
|
|
|
+// if(StringUtils.isEmpty(sn)){
|
|
|
+// resp.setMessage("工件码错误");
|
|
|
+// return resp;
|
|
|
+// }
|
|
|
+//
|
|
|
+// MesProductRecord mesProductRecord = new MesProductRecord();
|
|
|
+// mesProductRecord.setSn(sn);
|
|
|
+// mesProductRecord.setOprno("OP220");
|
|
|
+// MesProductRecord info = mesProductRecordService.findInfo(mesProductRecord);
|
|
|
+// FileUploadUtils.saveFileUpload(info, info.getId(), "mes_OP220Photo");
|
|
|
+//
|
|
|
+// //存一个图片表
|
|
|
+//
|
|
|
+//
|
|
|
+// resp.setResult(Global.TRUE);
|
|
|
+// resp.setMessage("成功");
|
|
|
+// return resp;
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
// 客户端检查质量接口
|
|
|
@PostMapping(value = "pccheck")
|
|
|
@ResponseBody
|