|
|
@@ -4143,6 +4143,13 @@ public class MesProductRecordController extends BaseController {
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
+ // 判断工件码是否为空
|
|
|
+ if(StringUtils.isEmpty(mesProcessProduct1.getSn()) || mesProcessProduct1.getSn().equals("")) {
|
|
|
+ resp.setResult(Global.FALSE);
|
|
|
+ resp.setMessage("当前工位暂无加工工件");
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
resp.setData(mesProcessProduct1.getSn());
|
|
|
resp.setResult(Global.TRUE);
|
|
|
resp.setMessage("成功");
|
|
|
@@ -4246,27 +4253,24 @@ public class MesProductRecordController extends BaseController {
|
|
|
try {
|
|
|
if (!craft.equals("100000")){
|
|
|
mesProductRecordService.updateRecord(sn,oprno, craft,"",result,userCode,lineSn);
|
|
|
+ return renderResult(Global.TRUE, text("操作成功!"));
|
|
|
}else {
|
|
|
|
|
|
List<ParamsResp> params = mesProductRecordService.getQualityParams(oldOprno,lineSn,ps);
|
|
|
String res = updateQualityCommon(mesLineProcess1,oprno,lineSn,sn,craft,result,userCode,params);
|
|
|
logger.info("res:"+res);
|
|
|
- if(!res.equals("RSOK")){
|
|
|
- String lx = ret.substring(0,2);
|
|
|
- String checkret = ret.substring(2,4);
|
|
|
- String lmsg = ErrorMsg.getErrorMsg(checkret,lx);
|
|
|
- return renderResult(Global.FALSE, text(lmsg));
|
|
|
+ if(res == null || !res.equals("RSOK")){
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return renderResult(Global.FALSE, text("操作失败!"));
|
|
|
}else{
|
|
|
return renderResult(Global.TRUE, text("操作成功!"));
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- // 手动设置回滚,防止@Transactional失效
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
logger.info(e.getMessage());
|
|
|
return renderResult(Global.FALSE, text("操作失败!"));
|
|
|
}
|
|
|
- return renderResult(Global.TRUE, text("操作成功!"));
|
|
|
}
|
|
|
|
|
|
// 客户端创建订单接口
|
|
|
@@ -4524,7 +4528,18 @@ public class MesProductRecordController extends BaseController {
|
|
|
@PostMapping(value = "pdaQueryQuality")
|
|
|
@ResponseBody
|
|
|
public CommonResp pdaQueryQuality(HttpServletRequest request) {
|
|
|
- CommonResp resp = pccheck(request);
|
|
|
+
|
|
|
+ CommonResp resp = new CommonResp<>();
|
|
|
+
|
|
|
+ // 查询工位是否有数据
|
|
|
+ resp =pdaQueryIsSn(request);
|
|
|
+ if ("false".equals(resp.getResult())){
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ resp = pccheck(request);
|
|
|
String sn = request.getParameter("sn");
|
|
|
String oprno = request.getParameter("oprno");
|
|
|
String lineSn = request.getParameter("lineSn");
|