|
@@ -4125,22 +4125,25 @@ public class MesProductRecordController extends BaseController {
|
|
|
String oprno = request.getParameter("oprno");
|
|
String oprno = request.getParameter("oprno");
|
|
|
String lineSn = request.getParameter("lineSn");
|
|
String lineSn = request.getParameter("lineSn");
|
|
|
|
|
|
|
|
- MesDeviceTime mesDeviceTime = new MesDeviceTime();
|
|
|
|
|
- mesDeviceTime.setOprno(oprno);
|
|
|
|
|
- mesDeviceTime.setProductCate(lineSn);
|
|
|
|
|
- MesDeviceTime mesDeviceTime1 = mesDeviceTimeService.findInfo(mesDeviceTime);
|
|
|
|
|
- if(ObjectUtils.isEmpty(mesDeviceTime1)){
|
|
|
|
|
|
|
+ if(StringUtils.isEmpty(oprno) || StringUtils.isEmpty(lineSn)){
|
|
|
resp.setResult(Global.FALSE);
|
|
resp.setResult(Global.FALSE);
|
|
|
- resp.setMessage("当前工位未加工工件");
|
|
|
|
|
|
|
+ resp.setMessage("参数错误");
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
|
- if(mesDeviceTime1.getEndDate() == null){
|
|
|
|
|
|
|
+
|
|
|
|
|
+// MesDeviceTime mesDeviceTime = new MesDeviceTime();
|
|
|
|
|
+// mesDeviceTime.setOprno(oprno);
|
|
|
|
|
+// mesDeviceTime.setProductCate(lineSn);
|
|
|
|
|
+// MesDeviceTime mesDeviceTime1 = mesDeviceTimeService.findInfo(mesDeviceTime);
|
|
|
|
|
+ MesProcessProduct mesProcessProduct1 = mesProcessProductService.findByCateAndOprno(lineSn,oprno);
|
|
|
|
|
+
|
|
|
|
|
+ if(ObjectUtils.isEmpty(mesProcessProduct1)){
|
|
|
resp.setResult(Global.FALSE);
|
|
resp.setResult(Global.FALSE);
|
|
|
- resp.setMessage("当前工位未加工工件");
|
|
|
|
|
|
|
+ resp.setMessage("当前工位暂无加工工件");
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- resp.setData(mesDeviceTime1.getSn());
|
|
|
|
|
|
|
+ resp.setData(mesProcessProduct1.getSn());
|
|
|
resp.setResult(Global.TRUE);
|
|
resp.setResult(Global.TRUE);
|
|
|
resp.setMessage("成功");
|
|
resp.setMessage("成功");
|
|
|
|
|
|