|
@@ -210,6 +210,8 @@ public class MesProductRecordController extends BaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private MesProductOprnoService mesProductOprnoService;
|
|
private MesProductOprnoService mesProductOprnoService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
|
+ private MesProductPhotoSideService mesProductPhotoSideService;
|
|
|
|
|
+ @Autowired
|
|
|
private MesProductGlueService mesProductGlueService;
|
|
private MesProductGlueService mesProductGlueService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private MesGlueRecordService mesGlueRecordService;
|
|
private MesGlueRecordService mesGlueRecordService;
|
|
@@ -1679,6 +1681,18 @@ public class MesProductRecordController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ // OP520 正反面子工位:OP520A 正面 / OP520B 反面,两面 OK 后更新 OP520
|
|
|
|
|
+ if ("OP520A".equals(oprno) || "OP520B".equals(oprno)) {
|
|
|
|
|
+ List<BindMaterialResp> bmlists520 = mesLineProcessMaterialService.getBindMaterial(MesProductPhotoSide.OPRNO_FRONT, lineSn);
|
|
|
|
|
+ boolean parentUpdated = mesProductPhotoSideService.submitOp520Side(sn, oprno, lineSn, content, userCode, params, bmlists520);
|
|
|
|
|
+ if (!parentUpdated) {
|
|
|
|
|
+ ret = "RSOK";
|
|
|
|
|
+ return ret;
|
|
|
|
|
+ }
|
|
|
|
|
+ ret = "RSOK";
|
|
|
|
|
+ return ret;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (oprnoOld.equals("OP380")){
|
|
if (oprnoOld.equals("OP380")){
|
|
|
// 查询开始时间
|
|
// 查询开始时间
|
|
|
MesDeviceTime mesDeviceTime = mesDeviceTimeService.getInfoByOprnoAndSnAndCate(oprno,sn,lineSn);
|
|
MesDeviceTime mesDeviceTime = mesDeviceTimeService.getInfoByOprnoAndSnAndCate(oprno,sn,lineSn);
|
|
@@ -2868,6 +2882,8 @@ public class MesProductRecordController extends BaseController {
|
|
|
}
|
|
}
|
|
|
String check = Global.getConfig("mes.qm.ng.time");
|
|
String check = Global.getConfig("mes.qm.ng.time");
|
|
|
if(check.equals("1")){
|
|
if(check.equals("1")){
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 检查是否超过15分钟
|
|
// 检查是否超过15分钟
|
|
|
MesProductQm mpr2 = new MesProductQm();
|
|
MesProductQm mpr2 = new MesProductQm();
|
|
|
mpr2.setComponentNum(sn);
|
|
mpr2.setComponentNum(sn);
|
|
@@ -2887,9 +2903,7 @@ public class MesProductRecordController extends BaseController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// OK当前工位已加工合格/NG当前工位已加工不合格/QN前工位不合格/UD可以加工/其他-该工件不可加工
|
|
// OK当前工位已加工合格/NG当前工位已加工不合格/QN前工位不合格/UD可以加工/其他-该工件不可加工
|
|
|
if(ret.equals("RSUD")){
|
|
if(ret.equals("RSUD")){
|
|
|
resp.setMessage("工件可以加工");
|
|
resp.setMessage("工件可以加工");
|
|
@@ -2905,7 +2919,6 @@ public class MesProductRecordController extends BaseController {
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
@PostMapping(value = "qmresult")
|
|
@PostMapping(value = "qmresult")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public String qmresult(MesProductQmReq mesProductQmReq,HttpServletRequest request) {
|
|
public String qmresult(MesProductQmReq mesProductQmReq,HttpServletRequest request) {
|
|
@@ -2935,7 +2948,6 @@ public class MesProductRecordController extends BaseController {
|
|
|
if(StringUtils.isEmpty(sn) || StringUtils.isEmpty(oprno) || StringUtils.isEmpty(result) || StringUtils.isEmpty(lineSn)){
|
|
if(StringUtils.isEmpty(sn) || StringUtils.isEmpty(oprno) || StringUtils.isEmpty(result) || StringUtils.isEmpty(lineSn)){
|
|
|
return renderResult(Global.FALSE, text("参数错误1!"));
|
|
return renderResult(Global.FALSE, text("参数错误1!"));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
try{
|
|
try{
|
|
|
MesProductQm mesProductQm = new MesProductQm();
|
|
MesProductQm mesProductQm = new MesProductQm();
|
|
|
mesProductQm.setOprno(oprno);
|
|
mesProductQm.setOprno(oprno);
|
|
@@ -2953,14 +2965,12 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesProductQm.setTitle(title);
|
|
mesProductQm.setTitle(title);
|
|
|
mesProductQm.setRemark(remark);
|
|
mesProductQm.setRemark(remark);
|
|
|
mesProductQmService.add(mesProductQm);
|
|
mesProductQmService.add(mesProductQm);
|
|
|
-
|
|
|
|
|
List<ParamsResp> params = new ArrayList<>();
|
|
List<ParamsResp> params = new ArrayList<>();
|
|
|
ParamsResp paramsResp1 = new ParamsResp();
|
|
ParamsResp paramsResp1 = new ParamsResp();
|
|
|
paramsResp1.setCraft("400001");
|
|
paramsResp1.setCraft("400001");
|
|
|
paramsResp1.setResult("OK");
|
|
paramsResp1.setResult("OK");
|
|
|
paramsResp1.setVal(userCode);
|
|
paramsResp1.setVal(userCode);
|
|
|
params.add(paramsResp1);
|
|
params.add(paramsResp1);
|
|
|
-
|
|
|
|
|
String content = "NG";
|
|
String content = "NG";
|
|
|
if(result.equals("OK")){
|
|
if(result.equals("OK")){
|
|
|
content="OK";
|
|
content="OK";
|
|
@@ -3004,22 +3014,16 @@ public class MesProductRecordController extends BaseController {
|
|
|
@RequestMapping(value = "workData")
|
|
@RequestMapping(value = "workData")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public Page<MesProductRecord> workData(MesProductRecordUser mesProductRecordUser,MesProductRecord mesProductRecord, HttpServletRequest request, HttpServletResponse response) {
|
|
public Page<MesProductRecord> workData(MesProductRecordUser mesProductRecordUser,MesProductRecord mesProductRecord, HttpServletRequest request, HttpServletResponse response) {
|
|
|
-
|
|
|
|
|
Date edate = new Date();
|
|
Date edate = new Date();
|
|
|
-
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.add(Calendar.HOUR, -48); // 减去48小时
|
|
calendar.add(Calendar.HOUR, -48); // 减去48小时
|
|
|
Date sdate = calendar.getTime();
|
|
Date sdate = calendar.getTime();
|
|
|
-
|
|
|
|
|
mesProductRecord.setUpdateDate_gte(sdate);
|
|
mesProductRecord.setUpdateDate_gte(sdate);
|
|
|
mesProductRecord.setUpdateDate_lte(edate);
|
|
mesProductRecord.setUpdateDate_lte(edate);
|
|
|
-
|
|
|
|
|
if(mesProductRecord.getOprno().length() == 5){
|
|
if(mesProductRecord.getOprno().length() == 5){
|
|
|
mesProductRecord.setOprno(mesProductRecord.getOprno()+"A");
|
|
mesProductRecord.setOprno(mesProductRecord.getOprno()+"A");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
Page page1 = new Page<>(request, response);
|
|
Page page1 = new Page<>(request, response);
|
|
|
mesProductRecord.setPage(page1);
|
|
mesProductRecord.setPage(page1);
|
|
|
mesProductRecord.setCraft("100000");
|
|
mesProductRecord.setCraft("100000");
|
|
@@ -4136,6 +4140,16 @@ public class MesProductRecordController extends BaseController {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // OP520 正反面子工位
|
|
|
|
|
+ if ("OP520A".equals(oprno) || "OP520B".equals(oprno)) {
|
|
|
|
|
+ List<BindMaterialResp> bmlists520 = mesLineProcessMaterialService.getBindMaterial(MesProductPhotoSide.OPRNO_FRONT, lineSn);
|
|
|
|
|
+ boolean parentUpdated = mesProductPhotoSideService.submitOp520Side(sn, oprno, lineSn, result, userCode, params, bmlists520);
|
|
|
|
|
+ if (!parentUpdated) {
|
|
|
|
|
+ return renderResult(Global.TRUE, text("子工位提交成功,等待另一面完成"));
|
|
|
|
|
+ }
|
|
|
|
|
+ return renderResult(Global.TRUE, text("提交成功"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (oprnoOld.equals("OP380")){
|
|
if (oprnoOld.equals("OP380")){
|
|
|
// 查询开始时间
|
|
// 查询开始时间
|
|
|
MesDeviceTime mesDeviceTime = mesDeviceTimeService.getInfoByOprnoAndSnAndCate(oprno,sn,lineSn);
|
|
MesDeviceTime mesDeviceTime = mesDeviceTimeService.getInfoByOprnoAndSnAndCate(oprno,sn,lineSn);
|