From 41251b892bf44b99d8b87058ca658f019c49857e Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Fri, 22 Dec 2023 09:46:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E6=8E=A8=E9=80=81=E5=BC=80=E5=8D=95?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oldproject/feign/OldWaybillClient.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OldWaybillClient.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OldWaybillClient.java index d27f5775e..c20cecb94 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OldWaybillClient.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OldWaybillClient.java @@ -13,7 +13,6 @@ import jodd.util.StringUtil; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.OldSystemDataPushConfig; -import org.springblade.common.exception.CustomerException; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.tool.api.R; import org.springframework.beans.factory.annotation.Autowired; @@ -23,6 +22,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.util.Date; import java.util.HashMap; import java.util.Map; +import java.util.Objects; @ApiIgnore() @RestController @@ -48,10 +48,10 @@ public class OldWaybillClient implements IOldWaybillClient { WayBillEntity byWaybillId = wayBillService.getByWaybillId(Integer.parseInt(waybillId)); - - if(byWaybillId==null){ - return null; + while (Objects.isNull(byWaybillId)){ + byWaybillId = wayBillService.getByWaybillId(Integer.parseInt(waybillId)); } + log.info(">>>>>>>>>>>>>>>>> 运单信息 {}", byWaybillId); log.info(">>>>>>>>>>>>>>>>> 旧仓库ID 集合 {}", OldSystemDataPushConfig.getWarehourseIdList()); @@ -59,17 +59,18 @@ public class OldWaybillClient implements IOldWaybillClient { // 需要验证当前需要开启的数据推送仓库 null+"" if (!OldSystemDataPushConfig.getWarehourseIdList().contains(byWaybillId.getWarehouseId() + "")) { log.info(">>> waybillDataHandler 当前开单仓库不是目前系统上线运行仓库 {}", byWaybillId.getWarehouseId()); - return null; + return R.fail(405,"当前仓不处理"); } String authCode = oldLogin(byWaybillId.getArriveSiteId() + ""); String url = oldSystemProperties.getUrl() + "openApi/newSystem.WaybillQuery/index?waybillId=" + waybillId; - + log.info("#############waybillDataHandler: 请求地址为 url={}",url); String body = HttpRequest.get(url).header("token", authCode).execute().body(); log.info(">>>>> waybillDataHandler 老系统返回结果 {} ",body); JSONObject jsonObject = JSONObject.parseObject(body); - if (200 == Integer.parseInt(jsonObject.get("code").toString())) { + Integer code = jsonObject.getInteger("code"); + if (200 == code) { // 请求成功 JSONArray jsonArray = jsonObject.getJSONArray("data"); // 循环结果 @@ -85,12 +86,9 @@ public class OldWaybillClient implements IOldWaybillClient { String operationTime = DateUtil.format(new Date(), "yyyy-MM-dd hh:mm:ss"); oldSystemWaybillClient.handleDataToPlatform(unitNo, operationTime); } - } } else { log.error("##################waybillDataHandler: 请求老系统接口 失败,url:{},waybillId:{}", url, waybillId); - - // 请求失败 } } catch (Exception e) { log.error(">>>> 运单信息查询解析报错 ", e); From f03af21c9be56f0c5da792d95641db95bf70f7be Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Fri, 22 Dec 2023 10:57:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=AD=BE=E6=94=B6?= =?UTF-8?q?=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/DistributionParcelListMapper.java | 8 +++++ .../mapper/DistributionParcelListMapper.xml | 4 +++ .../IDistributionParcelListService.java | 8 +++++ .../DistributionParcelListServiceImpl.java | 5 +++ .../impl/DistributionSignforServiceImpl.java | 35 ++++++++++++++++++- 5 files changed, 59 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java index 44481b3fb..66e34731e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java @@ -140,4 +140,12 @@ public interface DistributionParcelListMapper extends BaseMapper packageIds); + + /** + * 根据二维码查询包件信息 + * @param orderPackageCode + * @param warehouseId + * @return + */ + DistributionParcelListEntity selectByOrderPackageCode(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml index 56b4800cc..f74e32aa7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml @@ -868,6 +868,10 @@ where order_package_code = #{orderPackageCode} and order_package_status in ('20','30') + update logpm_distribution_parcel_list diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java index b9761ee39..5176732fa 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java @@ -161,4 +161,12 @@ public interface IDistributionParcelListService extends BaseService parcelListEntities = distributionDeliveryListMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); //该货物是否属于该计划 List distributionParcelListEntities = parcelListEntities.stream().filter(p -> p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList()); + if (Func.isNotEmpty(distributionParcelListEntities) && distributionParcelListEntities.size() == 1) { //这里按道理也具备签收条件,需要标注该装车记录不正常 log.error("#####################distributionParcelListEntities窜货", distributionParcelListEntities); @@ -802,7 +808,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper().lambda() // .ne(DistributionLoadscanEntity::getScanStatus, 1) // .eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())