|
@@ -149,10 +149,15 @@ public class MesRepairQualityController extends BaseController {
|
|
|
String sn = req.getParameter("sn");
|
|
String sn = req.getParameter("sn");
|
|
|
String remark = req.getParameter("remark");
|
|
String remark = req.getParameter("remark");
|
|
|
String result = req.getParameter("result");
|
|
String result = req.getParameter("result");
|
|
|
|
|
+ String returnOprno = req.getParameter("returnOprno");
|
|
|
if(StringUtils.isEmpty(sn)){
|
|
if(StringUtils.isEmpty(sn)){
|
|
|
resp.setMessage("参数错误");
|
|
resp.setMessage("参数错误");
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
|
|
|
+ if(StringUtils.isEmpty(returnOprno)){
|
|
|
|
|
+ resp.setMessage("参数错误");
|
|
|
|
|
+ return resp;
|
|
|
|
|
+ }
|
|
|
if(!result.equals("1") && !result.equals("2")){
|
|
if(!result.equals("1") && !result.equals("2")){
|
|
|
resp.setMessage("参数错误");
|
|
resp.setMessage("参数错误");
|
|
|
return resp;
|
|
return resp;
|
|
@@ -176,7 +181,11 @@ public class MesRepairQualityController extends BaseController {
|
|
|
resp.setMessage("返修记录不存在");
|
|
resp.setMessage("返修记录不存在");
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
|
- if(!mesRepair.getState().equals("2")){
|
|
|
|
|
|
|
+ if(mesRepair.getState().equals("1")){
|
|
|
|
|
+ resp.setMessage("当前工件未维修!");
|
|
|
|
|
+ return resp;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(mesRepair.getState().equals("3")){
|
|
|
resp.setMessage("当前工件已检查!");
|
|
resp.setMessage("当前工件已检查!");
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
@@ -194,6 +203,7 @@ public class MesRepairQualityController extends BaseController {
|
|
|
mesRepair.setCheckDate(new Date());
|
|
mesRepair.setCheckDate(new Date());
|
|
|
mesRepair.setState("3");
|
|
mesRepair.setState("3");
|
|
|
mesRepair.setResult(result);
|
|
mesRepair.setResult(result);
|
|
|
|
|
+ mesRepair.setReturnOprno(returnOprno);
|
|
|
mesRepairService.save(mesRepair);
|
|
mesRepairService.save(mesRepair);
|
|
|
|
|
|
|
|
MesProductRecord mesProductRecord = new MesProductRecord();
|
|
MesProductRecord mesProductRecord = new MesProductRecord();
|
|
@@ -208,32 +218,6 @@ public class MesRepairQualityController extends BaseController {
|
|
|
}else{
|
|
}else{
|
|
|
pp.setContent("OK");
|
|
pp.setContent("OK");
|
|
|
mesProductRecordService.save(pp);
|
|
mesProductRecordService.save(pp);
|
|
|
-
|
|
|
|
|
- String repairItemId = "18565249649801748481111";
|
|
|
|
|
- if(mesRepair.getItemId().equals(repairItemId)){ // 底护板更换
|
|
|
|
|
- String[] qmoprnos = new String[]{"OP330","OP360","OP370","OP380","OP390","OP400","OP410"};
|
|
|
|
|
- for (String op:qmoprnos){
|
|
|
|
|
- // 返回工位改成UDF
|
|
|
|
|
- MesProductRecord mesProductRecord2 = new MesProductRecord();
|
|
|
|
|
- mesProductRecord2.setSn(mesRepair.getSn());
|
|
|
|
|
- mesProductRecord2.setOprno(op);
|
|
|
|
|
- mesProductRecord2.setCraft("100000");
|
|
|
|
|
- MesProductRecord pp2 = mesProductRecordService.findInfo(mesProductRecord2);
|
|
|
|
|
- if(!ObjectUtils.isEmpty(pp2) && !pp2.getContent().equals("UDF")){
|
|
|
|
|
- pp2.setContent("UDF");
|
|
|
|
|
- mesProductRecordService.save(pp2);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }else{
|
|
|
|
|
- // 返回工位改成UDF
|
|
|
|
|
- MesProductRecord mesProductRecord2 = new MesProductRecord();
|
|
|
|
|
- mesProductRecord2.setSn(mesRepair.getSn());
|
|
|
|
|
- mesProductRecord2.setOprno(mesRepair.getReturnOprno());
|
|
|
|
|
- mesProductRecord2.setCraft("100000");
|
|
|
|
|
- MesProductRecord pp2 = mesProductRecordService.findInfo(mesProductRecord2);
|
|
|
|
|
- pp2.setContent("UDF");
|
|
|
|
|
- mesProductRecordService.save(pp2);
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(result.equals("1")){ // 返修OK
|
|
if(result.equals("1")){ // 返修OK
|