|
|
@@ -362,7 +362,22 @@ public class MesProductRecordController extends BaseController {
|
|
|
if(!ObjectUtils.isEmpty(mt)){
|
|
|
page.getList().get(i).setMessageType(mt.getCate());
|
|
|
page.getList().get(i).setTitle(mt.getTitle());
|
|
|
-
|
|
|
+ }
|
|
|
+ // 根据工位号和产线编号查询工位名称
|
|
|
+ MesProductRecord record = page.getList().get(i);
|
|
|
+ if(!StringUtils.isEmpty(record.getOprno()) && !StringUtils.isEmpty(record.getLineSn())){
|
|
|
+ // 先用原始工位号查询,查不到再尝试补A查询
|
|
|
+ MesLineProcess lpQuery = new MesLineProcess();
|
|
|
+ lpQuery.setOprno(record.getOprno());
|
|
|
+ lpQuery.setLineSn(record.getLineSn());
|
|
|
+ MesLineProcess mesLineProcess = mesLineProcessService.findInfo(lpQuery);
|
|
|
+ if(ObjectUtils.isEmpty(mesLineProcess) && record.getOprno().length() == 5){
|
|
|
+ lpQuery.setOprno(record.getOprno() + "A");
|
|
|
+ mesLineProcess = mesLineProcessService.findInfo(lpQuery);
|
|
|
+ }
|
|
|
+ if(!ObjectUtils.isEmpty(mesLineProcess)){
|
|
|
+ record.setOprnoName(mesLineProcess.getTitle());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return page;
|
|
|
@@ -3700,13 +3715,13 @@ public class MesProductRecordController extends BaseController {
|
|
|
return CommonUitl.getXml("NG;参数错误;");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
String[] commands = commandString.split(";", -1);
|
|
|
// 01--序号检查 04--结果上传 05--序号过站
|
|
|
if (!commands[0].equals("01") && !commands[0].equals("04") && !commands[0].equals("05")) {
|
|
|
return CommonUitl.getXml("NG;命令错误;");
|
|
|
} else {
|
|
|
if (("01").equals(commands[0])) {
|
|
|
-
|
|
|
if (commands.length != 8 ) {
|
|
|
return CommonUitl.getXml("NG;长度错误;");
|
|
|
}
|
|
|
@@ -3715,12 +3730,20 @@ public class MesProductRecordController extends BaseController {
|
|
|
String lineSn = "XT";
|
|
|
String oldOprno = oprno;
|
|
|
oprno = CommonUitl.formatOprno(oprno);
|
|
|
+
|
|
|
+
|
|
|
if (StringUtils.isEmpty(sn)) {
|
|
|
return CommonUitl.getXml("NG;工件码不能为空;");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(oprno)) {
|
|
|
return CommonUitl.getXml("NG;工位号不能为空;");
|
|
|
}
|
|
|
+ boolean checkOP500Photo = mesProductRecordService.checkOP500Photo(sn, lineSn);
|
|
|
+
|
|
|
+ if (!checkOP500Photo){
|
|
|
+ return CommonUitl.getXml("OP500未拍照或未加工");
|
|
|
+ }
|
|
|
+
|
|
|
String userCode = commands[1];
|
|
|
String ret = checkQualityResult(oldOprno, sn, lineSn, userCode);
|
|
|
if (ret.equals("RSUD")) {
|
|
|
@@ -3756,6 +3779,7 @@ public class MesProductRecordController extends BaseController {
|
|
|
return CommonUitl.getXml("NG;参数错误;");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@PostMapping(value = "cc")
|
|
|
@ResponseBody
|
|
|
public String cc(HttpServletRequest request) {
|