| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int inspectionReport(List<Long> ids,String orderType) { |
| | | public int inspectionReport(List<Long> ids,String orderType,String materialProp) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .in(IfsInventoryQuantity::getId, ids) |
| | |
| | | .set(IfsInventoryQuantity::getDeclareUserId, userId) |
| | | .set(IfsInventoryQuantity::getIsInspect, 1) |
| | | .set(IfsInventoryQuantity::getOrderType,orderType) |
| | | .set(IfsInventoryQuantity::getMaterialProp,materialProp) |
| | | .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now()) |
| | | ); |
| | | threadPoolTaskExecutor.execute(() -> { |
| | |
| | | .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now()) |
| | | .set(IfsInventoryQuantity::getUpdateBatchNo, ifsInventoryQuantity.getUpdateBatchNo()) |
| | | .set(IfsInventoryQuantity::getOrderType,ifsInventoryQuantity.getOrderType()) |
| | | .set(IfsInventoryQuantity::getMaterialProp,ifsInventoryQuantity.getMaterialProp()) |
| | | ); |
| | | |
| | | threadPoolTaskExecutor.execute(() -> { |
| | |
| | | inAttrMap.put("BATCH_INFO", batchInfoData); |
| | | String inAttr = JSONObject.toJSONString(inAttrMap); |
| | | //调用ifs接口 |
| | | Result result = ifsApiUtils.updateMoveReceiptLot(inAttr); |
| | | Result result = ifsApiUtils.updateMoveReceiptLot(ifsInventoryQuantity.getContract(),inAttr); |
| | | if(result.getCode()!=200){ |
| | | throw new RuntimeException("IFS采购接收更改批号请求异常:"+result.getMessage()); |
| | | } |
| | |
| | | } |
| | | //ifs更改批号接口调用成功,拉取新拆分的ifs订单并报检 |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("LOCATION_NO","1302"); |
| | | // map.put("LOCATION_NO","1302"); |
| | | map.put("STATE_DB","To be Inspected"); |
| | | map.put("PART_NO",ifsInventoryQuantity.getPartNo()); |
| | | map.put("ORDER_NO",ifsInventoryQuantity.getOrderNo()); |
| | |
| | | if(Objects.nonNull(splitOrderList) && !splitOrderList.isEmpty()){ |
| | | List<Long> ids = splitOrderList.stream().map(IfsInventoryQuantity::getId).collect(Collectors.toList()); |
| | | ids.add(ifsInventoryQuantity.getId()); |
| | | this.inspectionReport(ids,OrderType.RAW.getValue()); |
| | | this.inspectionReport(ids,OrderType.RAW.getValue(),orderSplitDTO.getMaterialProp()); |
| | | } |
| | | //勾选同步到MES,保存订单拆分记录 |
| | | if(orderSplitDTO.getPushToMes()){ |