From a4b3457735639875e23f9902d3c056d819e772a7 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Fri, 1 Sep 2023 15:30:00 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=A2=A6=E5=A4=A9=E4=BA=BA?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=95=B0=E6=8D=AE=E5=AD=97=E6=AE=B5=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/DistrilbutionBillLadingEntity.java | 3 +++ .../factory/mt/dto/MtReceiveContentDTO.java | 4 ++-- .../impl/MtFactoryDataServiceImpl.java | 21 ++++++------------- .../impl/PanFactoryDataServiceImpl.java | 4 +++- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistrilbutionBillLadingEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistrilbutionBillLadingEntity.java index e41039ab8..6a4f9eade 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistrilbutionBillLadingEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistrilbutionBillLadingEntity.java @@ -126,6 +126,9 @@ public class DistrilbutionBillLadingEntity extends TenantEntity { @ApiModelProperty("提货批次") private String pickupBatch; + @ApiModelProperty(value = "仓库Id") + private Long warehouseId; + diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtReceiveContentDTO.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtReceiveContentDTO.java index 487b358b7..4a324c686 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtReceiveContentDTO.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtReceiveContentDTO.java @@ -21,7 +21,7 @@ public class MtReceiveContentDTO { @JsonProperty("作业仓库") private String warehouse;//仓库编码 - @JsonProperty("发运单编号") - private String invoiceOrderCode;//发运单编号 + @JsonProperty("发货单编号") + private String invoiceOrderCode;//发货单编号 } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java index 6c563c7e9..ca6dd8113 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java @@ -260,14 +260,12 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { jsonObject1.put("USERID", userid); jsonObject1.put("USERPWD", pwd); jsonObject1.put("Timestamp", time); - logger.info("##############getMengtianToken: 获取梦天token请求参数 {}", jsonObject1); String result = HttpRequest.post(mtFactoryProperties.getUrl() + "/Auth/Validate") .header("Content-Type", "application/json").body(jsonObject1.toJSONString()).timeout(5 * 1000) .execute() .body(); //获取的结果转成json对象 JSONObject jsonObject = JSONObject.parseObject(result); - logger.info("##############getMengtianToken: 获取梦天token返回参数 {}", result); Integer code = jsonObject.getInteger("Result"); String access_token = jsonObject.getString("Data"); @@ -389,16 +387,13 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { public R sendReceiveInfo(ReceiveInfoDTO receiveInfoDTO) throws JsonProcessingException, NoSuchAlgorithmException { log.info("###########sendReceiveInfo: 处理签收图片数据开始"); - logger.info("#############sendReceiveInfo:tag{}", 1); Integer newDistributionContactId = receiveInfoDTO.getNewDistributionContactId(); List receiveBodyList = receiveInfoDTO.getReceiveBodyList(); List receivePhotoList = receiveInfoDTO.getReceivePhotoList(); - logger.info("#############sendReceiveInfo:tag{}", 2); //查询签收人 NewDistributionContactEntity newDistributionContactEntity = newDistributionContactClient.fingByNewDistributionContactId(newDistributionContactId); - logger.info("#############sendReceiveInfo:tag{}", 3); String receiver = null; if (!Objects.isNull(newDistributionContactEntity)) { @@ -414,7 +409,6 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { //循环处理签收信息 List mtReceiveContentDTOList = new ArrayList<>(); - logger.info("#############sendReceiveInfo:tag{}", 4); for (ReceiveBodyDTO receiveBodyDTO : receiveBodyList) { String unitNo = receiveBodyDTO.getUnitNo();//包条码 @@ -422,7 +416,6 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { QueryWrapper packageInfoQueryWrapper = new QueryWrapper<>(); packageInfoQueryWrapper.eq("package_code", unitNo); MtPackageInfo one = mtPackageInfoService.getOne(packageInfoQueryWrapper); - logger.info("#############sendReceiveInfo:tag{}", 5); if (Objects.isNull(one)) { logger.info("#############sendReceiveInfo: 当前包条码未找到对应数据unitNo={}", unitNo); @@ -430,17 +423,14 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { } Long orderId = one.getOrderId(); MtFactoryOrder mtFactoryOrder = mtFactoryOrderService.getById(orderId); - logger.info("#############sendReceiveInfo:tag{}", 6); if (Objects.isNull(mtFactoryOrder)) { logger.info("#############sendReceiveInfo: 未找到对应订单orderId={}", orderId); continue; } Long mainId = mtFactoryOrder.getMainId(); - logger.info("#############sendReceiveInfo:tag{}", 7); MtFactoryOrderMain mtFactoryOrderMain = mtFactoryOrderMainService.getById(mainId); - logger.info("#############sendReceiveInfo:tag{}", 8); if (Objects.isNull(mtFactoryOrderMain)) { logger.info("#############sendReceiveInfo: 未找到对应订单mainId={}", mainId); @@ -455,7 +445,6 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { mtReceiveContentDTO.setUnitNo(unitNo); mtReceiveContentDTO.setOperateDate(receiveBodyDTO.getOperateDate()); mtReceiveContentDTOList.add(mtReceiveContentDTO); - logger.info("#############sendReceiveInfo:tag{}", 9); } logger.info("#############sendReceiveInfo:tag{}", 10); @@ -476,7 +465,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { ObjectMapper objectMapper = new ObjectMapper(); String s = objectMapper.writeValueAsString(mtReceiveDTO); - logger.info("#############sendReceiveInfo:tag{}", 11); + log.info("###########sendReceiveInfo: 处理签收返回数据完成 {}",s); return sendMtFactoryData(mtFactoryProperties.getUrl() + "/ZXCFaHuoDan/QianShouDan", s, 5,mtReceiveDTO.getSendTaskId()); @@ -499,13 +488,11 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { //请求参数 R r =sendMtFactoryData(mtFactoryProperties.getUrl() + "/ZXCFaHuoDan/QueRenShouHuo", s, 4,unloadCarNum); if (r.getCode() == ResultCode.SUCCESS.getCode()) { - log.info("##################{} 梦天确认签收数据推送2", unloadCarNum); MtPushData mtPushData = new MtPushData(); mtPushData.setPushTime(new Date()); mtPushData.setPushStatus(1);// 推送状态 mtPushData.setRefCode(unloadCarNum); mtPushData.setRefType(1);// 订单主表 - // todo 这里需要查询主推送单的 ID List mtFactoryOrderMainList = mtFactoryOrderMainService.findMtFactoryOrderMainByInvoiceOrderCode(unloadCarNum); if (mtFactoryOrderMainList.size() > 0) { mtFactoryOrderMainList.get(0); @@ -529,6 +516,10 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { * @throws NoSuchAlgorithmException */ private R sendMtFactoryData(String url, String data, Integer type,String refCode) throws NoSuchAlgorithmException { + + logger.info("##############sendMtFactoryData 发送数据: {}", data); + + //先获取token String token = getMtToken(); //处理逻辑 @@ -541,7 +532,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { .body(data).timeout(5 * 1000) .execute().body(); - logger.info("##############sendMtFactoryData: {}", result); + logger.info("##############sendMtFactoryData 接受数据: {}", result); // 保存数据到数据库 MtOrderLogEntity mtOrderLogEntity = new MtOrderLogEntity(); mtOrderLogEntity.setReqArgs(data); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java index 90f3aa1c3..01087492b 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java @@ -504,6 +504,9 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { // 修改收货 if(distributionStockArticleEntity.getOrderStatus().equals(OrderStatusConstant.ruku.getValue())){ distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.yishouhuo.getValue()); + // 更新齐套状态 + // todo 这里需要多仓齐套的查询条件 + distributionStockArticleEntity.setCompleteSet(1); } // 修改最新的入库时间 distributionStockArticleEntity.setWarehouseEntryTimeEnd(new Date()); @@ -511,7 +514,6 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { // //包件保存成功去修改订单的数量 // distributionStockArticleClient.addHandQuantity(id, 1); - // todo 这里需要根据包件状态修改状态 logger.info("#################handleDataToPlatform: 数据处理完成"); } else { //已存在包件信息那就不处理