| | |
| | | @Override |
| | | @Transactional |
| | | public void combPACK(CombParam param) { |
| | | if (Cools.isEmpty(param.getPackNo())){ |
| | | throw new CoolException("缺少参数:packNo"); |
| | | }else if (Cools.isEmpty(param.getPackName())){ |
| | | throw new CoolException("缺少参数:packName"); |
| | | }else if (Cools.isEmpty(param.getSettingTimes())){ |
| | | throw new CoolException("缺少参数:settingTimes"); |
| | | }else if (Cools.isEmpty(param.getRequestTime())){ |
| | | throw new CoolException("缺少参数:requestTime"); |
| | | } |
| | | if (Cools.isEmpty(param.getPackNo())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | |
| | | @Override |
| | | @Transactional |
| | | public void combPackOut(CombParam param) { |
| | | if (Cools.isEmpty(param.getPackNo())){ |
| | | throw new CoolException("缺少参数:packNo"); |
| | | }else if (Cools.isEmpty(param.getPackName())){ |
| | | throw new CoolException("缺少参数:packName"); |
| | | }else if (Cools.isEmpty(param.getSettingTimes())){ |
| | | throw new CoolException("缺少参数:settingTimes"); |
| | | }else if (Cools.isEmpty(param.getRequestTime())){ |
| | | throw new CoolException("缺少参数:requestTime"); |
| | | } |
| | | if (Cools.isEmpty(param.getPackNo())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | |
| | | .eq("barcode", param.getPackNo())); |
| | | if (Cools.isEmpty(locMast)){ |
| | | throw new CoolException("未查询到PACK码为:"+param.getPackNo()+"的货物"); |
| | | }else if (locMast.getLocSts().equals("F")){ |
| | | }else if (!locMast.getLocSts().equals("F")){ |
| | | throw new CoolException("PACK码为:"+param.getPackNo()+"的货物库位状态不是“F”"); |
| | | }else if (locMast.getFireStatus()!=0){ |
| | | throw new CoolException("警告!!!PACK码为:"+param.getPackNo()+"的库位:"+locMast.getLocNo()+"消防状态异常!!!"); |
| | |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | if (jsonObject.getDate("isComplete").equals(true)){ |
| | | // if (jsonObject.getDate("isComplete").equals(true)){ |
| | | success = true; |
| | | }else if (jsonObject.getDate("isComplete").equals(false)){ |
| | | success = false; |
| | | }else { |
| | | log.error("返回值出错!!!url:{};request:{};response:{}", mesUrl+mesPath, JSON.toJSONString(combParam), response); |
| | | throw new CoolException("返回值出错"); |
| | | } |
| | | // }else if (jsonObject.getDate("isComplete").equals(false)){ |
| | | // success = false; |
| | | // }else { |
| | | // log.error("返回值出错!!!url:{};request:{};response:{}", mesUrl+"/"+mesPath, JSON.toJSONString(combParam), response); |
| | | // throw new CoolException("返回值出错"); |
| | | // } |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", mesUrl+mesPath, JSON.toJSONString(combParam), response); |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", mesUrl+"/"+mesPath, JSON.toJSONString(combParam), response); |
| | | throw new CoolException("上报mes系统失败"); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "成品库入库上报", |
| | | mesUrl + mesPath, |
| | | "上报mes系统", |
| | | mesUrl +"/"+ mesPath, |
| | | null, |
| | | "127.0.0.1", |
| | | JSON.toJSONString(combParam), |