| | |
| | | List<PdckqrParam.Material> materials = param.getMaterials(); |
| | | |
| | | boolean isFullyCancelled = compareAndCheckCancellation(wrkDetls, materials); |
| | | // todo 两箱盘两箱需要确定位置没错 |
| | | |
| | | if (isFullyCancelled) { // 盘点物料确成功,工作档转换 盘点出库->盘点再入库,下发回库命令 |
| | | // 保存工作主档历史档 |
| | | if (!wrkMastLogService.save(wrkMast.getWrkNo())) { |
| | |
| | | return R.ok("盘点确认成功"); |
| | | |
| | | } else { // 物料不一致 |
| | | // todo 不一致的处理处理方法待定 |
| | | // 不一致的处理处理方法:弹出调整界面 |
| | | |
| | | // 重新扫描实物上面的码进行调整 |
| | | // 实物在库存里面的地方清空,任务所在库存清空 |
| | | // 将实物和当前托盘位置和库位绑定 |
| | | // 一个木箱情况直接调整 |
| | | // 两个木箱出两个 都调整 |
| | | // 两个木箱出一个 调整一个 |
| | | // 工作档标记异常->回库 |
| | | |
| | | return R.error("盘点确认异常"); |
| | | } |
| | | |
| | | return R.error("盘点确认异常"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | locTypeDto.setLocType1((short) 1); |
| | | StartupDto dto = commonService.getLocNo(1, param.getPalletizingNo(), locTypeDto, 0); |
| | | |
| | | // 返回GWCS目标信息 |
| | | boolean result = pushStaNoToGwcs(param.getPalletizingNo(), dto.getStaNo(), dto.getWorkNo(), param.getBarcode()); |
| | | // if (!result) { |
| | | // throw new CoolException("入库回推入库码头给GWCS失败"); |
| | | // } |
| | | |
| | | int workNo = dto.getWorkNo(); |
| | | Date now = new Date(); |
| | | // 生成工作档 |
| | |
| | | // 重新定位木箱位置 |
| | | for (FxprkParam.Box box :param.getBoxList()) { |
| | | if (box.getPackageGroupNo().equals(obj.getBrand())) { |
| | | if (!box.getBoxPos().equals(obj.getOrigin())) { |
| | | if (!box.getBoxPos().equals(obj.getOrigin()) || !wrkDetl.getZpallet().equals(param.getBarcode())) { |
| | | wrkDetl.setOrigin(box.getBoxPos()); |
| | | wrkDetl.setZpallet(param.getBarcode()); |
| | | wrkDetl.setBarcode(param.getBarcode()); |
| | |
| | | } |
| | | } |
| | | |
| | | // 一楼反修品入库的木箱通过包装组号需给mes推送待判 |
| | | pushDpToMes(groupNos); |
| | | |
| | | // 更新目标库位状态 |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | if (locMast.getLocSts().equals("O")) { |
| | |
| | | } else { |
| | | throw new CoolException(dto.getLocNo() + "目标库位已被占用"); |
| | | } |
| | | |
| | | // 返回GWCS目标信息 |
| | | boolean result = pushStaNoToGwcs(param.getPalletizingNo(), dto.getStaNo(), dto.getWorkNo(), param.getBarcode()); |
| | | |
| | | // 一楼反修品入库的木箱通过包装组号需给mes推送待判 |
| | | pushDpToMes(groupNos); |
| | | |
| | | return R.ok("入库成功"); |
| | | } |
| | | |
| | |
| | | boolean success = false; |
| | | // 获取请求头 |
| | | Map<String,Object> headers = new HashMap<>(); |
| | | headers.put("digi-type","sync "); |
| | | headers.put("digi-protocol","raw"); |
| | | headers.put("digi-datakey"," XCommon.ImportData"); |
| | | headers.put("Content-Type","application/json;charset=UTF-8"); |
| | | |
| | | // 构造请求体 |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | String response = ""; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(MesConstant.MES_IP_PORT) |
| | | .setPath(MesConstant.MES_DP_URL) |
| | | .setUri(MesConstant.MES_CC_IP_PORT) |
| | | .setPath(MesConstant.MES_CC_DP_URL) |
| | | .setHeaders(headers) |
| | | .setJson(body) |
| | | .build() |
| | | .doPost(); |
| | | .doGet(); |
| | | if (!Cools.isEmpty(response)) { |
| | | JSONObject jsonObject1 = JSONObject.parseObject(response); |
| | | int code = (int) jsonObject1.get("code"); |
| | | String msg = (String) jsonObject1.get("msg"); |
| | | if (code != 200) { |
| | | throw new CoolException(msg); |
| | | boolean state = jsonObject1.getBoolean("state"); |
| | | String msg = (String) jsonObject1.get("message"); |
| | | if (code == 200 && state) { |
| | | success = true; |
| | | } |
| | | success = true; |
| | | throw new CoolException(msg); |
| | | } else { |
| | | log.error("返修品入库给mes推送待判失败!!!url:{};request:{};response:{}", MesConstant.URL + MesConstant.PAKIN_URL, body, response); |
| | | log.error("返修品入库给mes推送待判失败!!!url:{};request:{};response:{}", MesConstant.MES_CC_IP_PORT + MesConstant.MES_CC_IP_PORT, body, response); |
| | | throw new CoolException("返修品入库给mes推送待判失败"); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "返修品入库给mes推送待判", |
| | | MesConstant.MES_IP_PORT + MesConstant.MES_DP_URL, |
| | | MesConstant.MES_CC_IP_PORT + MesConstant.MES_CC_IP_PORT, |
| | | null, |
| | | "127.0.0.1", |
| | | body, |