From a034080d245a114cf31fa3e47fd6f041a2a1c7e3 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 4 Jan 2024 16:40:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4=202.=E6=96=B0=E5=A2=9E=E8=BF=90=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E6=9A=82=E5=AD=98=E5=8D=95=E6=95=B0=E6=8D=AE=E6=B8=85?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/TrunklineBillladingEntity.java | 3 ++ .../entity/TrunklineBillladingLogEntity.java | 4 +- .../feign/IWarehouseWaybillClient.java | 6 +++ .../impl/PanFactoryDataServiceImpl.java | 8 +++ .../patch/jobhandle/SyncWarehouseData.java | 51 +++++++++++++++++++ .../mapper/WarehouseMappingDataMapper.java | 14 +++++ .../mapper/WarehouseMappingDataMapper.xml | 50 ++++++++++++++++++ .../service/IWarehouseMappingDataService.java | 14 +++++ .../impl/SyncOrderInfoServiceImpl.java | 9 +++- .../impl/WarehouseMappingDataServiceImpl.java | 35 +++++++++++++ .../mapper/TrunklineBillladingMapper.xml | 5 +- .../impl/TrunklineBillladingServiceImpl.java | 10 ++-- .../feign/WarehouseWaybillClient.java | 10 ++++ .../mapper/WarehouseWaybillMapper.java | 4 ++ .../mapper/WarehouseWaybillMapper.xml | 11 ++++ .../service/IWarehouseWaybillService.java | 4 ++ .../impl/WarehouseTrayTypeServiceImpl.java | 11 +++- .../impl/WarehouseWaybillServiceImpl.java | 10 ++++ 18 files changed, 249 insertions(+), 10 deletions(-) diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java index 4023620ac..421e87d85 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java @@ -109,5 +109,8 @@ public class TrunklineBillladingEntity extends TenantEntity { /** 创建人名称 */ @ApiModelProperty(name = "创建人名称",notes = "") private String createUserName ; + /** remark */ + @ApiModelProperty(name = "备注",notes = "") + private String remark ; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLogEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLogEntity.java index a774aff9f..18513d517 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLogEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLogEntity.java @@ -45,9 +45,9 @@ public class TrunklineBillladingLogEntity extends TenantEntity { private Long billladingId ; /** 描述内容 */ @ApiModelProperty(name = "操作后",notes = "") - private String after ; + private String afterOpreation ; /** 描述内容 */ @ApiModelProperty(name = "操作前",notes = "") - private String before ; + private String beforeOpreation ; } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java index a3d098c92..00c198ab5 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java @@ -65,4 +65,10 @@ public interface IWarehouseWaybillClient { @GetMapping(API_PREFIX + "/findList") List findList(); + + @GetMapping(API_PREFIX + "/findMoreWaybillNo") + List findMoreWaybillNo(); + + @GetMapping(API_PREFIX + "/findLastData") + Long findLastData(@RequestParam String waybillNo); } 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 9e81470a3..6e319e6da 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 @@ -113,6 +113,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { private final ITrunklineAdvanceDetailClient trunklineAdvanceDetailClient; private final IOrderCountClient orderCountClient; + private final BladeRedis redis; // @Override // public FactoryTokenVO getToken(String corpId, String appKey, String appSecret) throws NoSuchAlgorithmException { @@ -769,11 +770,18 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { if (StringUtil.isBlank(waybillNo)) { return; } + + if(redis.exists("dealwithWaybillNo:"+waybillNo)){ + log.info("###########saveWaybillEntity: 已有保存数据 waybillNo={}",waybillNo); + return; + } + //通过运单号先去查询新系统是否存在这个运单号 WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNo); logger.info("#################handleDataToPlatform.warehouseWaybill: {}", warehouseWaybill); if (Objects.isNull(warehouseWaybill)) { + redis.setEx("dealwithWaybillNo:"+waybillNo,waybillNo,30L); //如果新系统中不存在这个运单,那么就去查询老系统的运单数据 WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(waybillNo); logger.info("#################handleDataToPlatform.wayBillEntity: {}", wayBillEntity); diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java index b74d5476c..504821260 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java @@ -6,6 +6,7 @@ import com.logpm.basicdata.feign.*; import com.logpm.oldproject.entity.*; import com.logpm.oldproject.feign.*; import com.logpm.patch.service.IWarehouseMappingDataService; +import com.logpm.warehouse.feign.IWarehouseWaybillClient; import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.handler.annotation.XxlJob; import lombok.AllArgsConstructor; @@ -27,6 +28,8 @@ public class SyncWarehouseData { private final IBasicdataGoodsAllocationClient basicdataGoodsAllocationClient;//货位 private final IBasicdataTrayClient basicdataTrayClient;//托盘 + private final IWarehouseWaybillClient warehouseWaybillClient; + //-----------------老系统 private final IWarehouseClient warehouseClient;//仓库 private final ICargoClient cargoClient;//货区 @@ -294,6 +297,54 @@ public class SyncWarehouseData { } + @XxlJob("clearWaybillData") + public ReturnT clearWaybillData(String param) { + log.info("############clearWaybillData: 清理重复运单数据 param={}", param); + + List ls = new ArrayList<>(); + + if(StringUtil.isNotBlank(param)){ + ls.add(param); + }else{ + ls = warehouseMappingDataService.findMoreWaybillNo(); + } + + for (String waybillNo : ls) { + + Long waybillId = warehouseMappingDataService.findLastData(waybillNo); + + warehouseMappingDataService.deletedByNotId(waybillId,waybillNo); + } + + return ReturnT.SUCCESS; + } + + + @XxlJob("clearAdvanceData") + public ReturnT clearAdvanceData(String param) { + log.info("############clearAdvanceData: 清理重复暂存单数据 param={}", param); + + List ls = new ArrayList<>(); + + if(StringUtil.isNotBlank(param)){ + ls.add(param); + }else{ + ls = warehouseMappingDataService.findMoreOrderCode(); + } + + for (String orderCode : ls) { + + Long advanceId = warehouseMappingDataService.findAdvanceLastData(orderCode); + + warehouseMappingDataService.deletedAdvanceByNotId(advanceId,orderCode); + + warehouseMappingDataService.deletedAdcanceDetailByNotId(advanceId,orderCode); + } + + return ReturnT.SUCCESS; + } + + private boolean saveTrayData(Long newWarehouseId, Integer oldWarehouseId) { //通过老系统仓库id查询所有托盘信息 List trayEntityList = trayClient.getAllTrayByWarehouseId(oldWarehouseId); diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java index 1dac0d802..6e818dfd9 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java @@ -32,4 +32,18 @@ public interface WarehouseMappingDataMapper { List findAllocationDoubleDataAll(); JSONObject findAllocationDoubleInfoListByOrderPackageCode(@Param("orderPackageCode") String orderPackageCode); + + List findMoreWaybillNo(); + + Long findLastData(@Param("waybillNo") String waybillNo); + + void deletedByNotId(@Param("waybillId") Long waybillId,@Param("waybillNo") String waybillNo); + + List findMoreOrderCode(); + + Long findAdvanceLastData(@Param("orderCode") String orderCode); + + void deletedAdvanceByNotId(@Param("advanceId") Long advanceId, @Param("orderCode") String orderCode); + + void deletedAdcanceDetailByNotId(@Param("advanceId") Long advanceId, @Param("orderCode") String orderCode); } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml index 34c0160af..e1d61dc8e 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml @@ -83,4 +83,54 @@ limit 1 + + + + + + delete from logpm_warehouse_waybill + where waybill_no = #{waybillNo} + and id != #{waybillId} + + + + + + + + delete from logpm_trunkline_advance + where order_code = #{orderCode} + and id != #{advanceId} + + + + delete from logpm_trunkline_advance_detail + where order_code = #{orderCode} + and advance_id != #{advanceId} + + diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java index c83781ef7..b7dfc038f 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java @@ -28,4 +28,18 @@ public interface IWarehouseMappingDataService { List findAllocationDoubleDataAll(); JSONObject findAllocationDoubleInfoListByOrderPackageCode(String orderPackageCode); + + List findMoreWaybillNo(); + + Long findLastData(String waybillNo); + + void deletedByNotId(Long waybillId, String waybillNo); + + List findMoreOrderCode(); + + Long findAdvanceLastData(String orderCode); + + void deletedAdvanceByNotId(Long advanceId, String orderCode); + + void deletedAdcanceDetailByNotId(Long advanceId, String orderCode); } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java index 8d91fa0c5..09e090dcb 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java @@ -37,6 +37,7 @@ import org.springblade.common.constant.order.*; import org.springblade.common.constant.orderpackage.*; import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; +import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; @@ -81,6 +82,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { private final IDetailProductClient detailProductClient; private final ITrunklineDetailProductClient trunklineDetailProductClient; private final ITrunklineAdvanceDetailClient trunklineAdvanceDetailClient; + private final BladeRedis redis; @Transactional(rollbackFor = Exception.class) @Override @@ -1570,12 +1572,17 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { //如果新系统中不存在这个运单,那么就去查询老系统的运单数据 WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(waybillNo); + if(redis.exists("dealwithWaybillNo:"+waybillNo)){ + log.info("###########saveWaybillEntity: 已有保存数据 waybillNo={}",waybillNo); + return null; + } + //通过运单号先去查询新系统是否存在这个运单号 WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNo); log.info("#################handleDataToPlatform.warehouseWaybill: {}", warehouseWaybill); if (Objects.isNull(warehouseWaybill)) { - + redis.setEx("dealwithWaybillNo:"+waybillNo,waybillNo,30L); log.info("#################handleDataToPlatform.wayBillEntity: {}", wayBillEntity); if (Objects.isNull(wayBillEntity)) { log.warn("##############saveWaybillEntity: 老系统中未找到对应运单waybillNo={}", waybillNo); diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java index 35182c696..ae1ffd608 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java @@ -71,4 +71,39 @@ public class WarehouseMappingDataServiceImpl implements IWarehouseMappingDataSer public JSONObject findAllocationDoubleInfoListByOrderPackageCode(String orderPackageCode) { return warehouseMappingDataMapper.findAllocationDoubleInfoListByOrderPackageCode(orderPackageCode); } + + @Override + public List findMoreWaybillNo() { + return warehouseMappingDataMapper.findMoreWaybillNo(); + } + + @Override + public Long findLastData(String waybillNo) { + return warehouseMappingDataMapper.findLastData(waybillNo); + } + + @Override + public void deletedByNotId(Long waybillId, String waybillNo) { + warehouseMappingDataMapper.deletedByNotId(waybillId,waybillNo); + } + + @Override + public List findMoreOrderCode() { + return warehouseMappingDataMapper.findMoreOrderCode(); + } + + @Override + public Long findAdvanceLastData(String orderCode) { + return warehouseMappingDataMapper.findAdvanceLastData(orderCode); + } + + @Override + public void deletedAdvanceByNotId(Long advanceId, String orderCode) { + warehouseMappingDataMapper.deletedAdvanceByNotId(advanceId,orderCode); + } + + @Override + public void deletedAdcanceDetailByNotId(Long advanceId, String orderCode) { + warehouseMappingDataMapper.deletedAdcanceDetailByNotId(advanceId,orderCode); + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml index 297064527..1a517af53 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml @@ -55,7 +55,10 @@ line_name_title lineNameTitle, plan_num planNum, charge_type chargeType, - billlading_status billladingStatus + billlading_status billladingStatus, + warehouse_name warehouseName, + carrier_name carrierName, + remark remark from logpm_trunkline_billlading where billlading_status = '2' diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java index 76e3abe93..5d6e1adf6 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java @@ -128,7 +128,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl pageList(IPage page, @Param("param") WarehouseWaybillDTO waybillDTO); + + List findMoreWaybillNo(); + + Long findLastData(@Param("waybillNo") String waybillNo); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml index adf145621..e77170a0f 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml @@ -153,4 +153,15 @@ + + + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java index 85c23871a..f5d0343ad 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java @@ -52,4 +52,8 @@ public interface IWarehouseWaybillService extends BaseService pageList(WarehouseWaybillDTO waybillDTO); R findWaybillInfo(String waybillNo); + + List findMoreWaybillNo(); + + Long findLastData(String waybillNo); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java index 489d94195..2b24c07de 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java @@ -52,6 +52,7 @@ import org.springblade.common.constant.orderpackage.*; import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.ObjectUtil; @@ -120,6 +121,8 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl orderPageList(TrayTypeDTO trayTypeDTO,Long warehouseId) { @@ -3282,6 +3285,12 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl findMoreWaybillNo() { + return baseMapper.findMoreWaybillNo(); + } + + @Override + public Long findLastData(String waybillNo) { + return baseMapper.findLastData(waybillNo); + } } From ca35369ad3dc19fda644b8f10dd123ac7eb15088 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 4 Jan 2024 17:29:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?1.=E6=8E=A8=E9=80=81=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=AD=A5=E8=AE=A2=E5=8D=95=20=E5=93=81?= =?UTF-8?q?=E7=89=8C=E5=8A=A0=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factory/pan/service/impl/PanFactoryDataServiceImpl.java | 1 + .../com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java | 1 + 2 files changed, 2 insertions(+) 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 6e319e6da..438c1f6c6 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 @@ -701,6 +701,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { entity.setOrderCode(distributionStockArticleEntity.getOrderCode()); entity.setServiceNumber(distributionStockArticleEntity.getServiceNumber()); entity.setWaybillNumber(waybillNo); + entity.setBrandName(distributionStockArticleEntity.getBrand()); // if(ObjectUtil.isNotEmpty(warehouseWaybill)){ // entity.setWarehouseId(warehouseWaybill.getId()); // } diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java index 09e090dcb..cc9dfb3b5 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java @@ -1440,6 +1440,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { entity.setWarehouseId(distributionStockArticleEntity.getWarehouseId()); entity.setStockArticleId(distributionStockArticleEntity.getId()); entity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue()); + entity.setBrandName(distributionStockArticleEntity.getBrand()); //状态:1到货,2分拣,3装车,4卸货,5出库,6配送 // if(1 == status){ // entity.setOrderPackageStatus(OrderPackageStatusConstant.yiruku.getValue()); From d00db37b5fd930469bae71475292e1bd2ecf83b0 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 4 Jan 2024 17:50:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF=E6=8F=90=E8=B4=A7?= =?UTF-8?q?=E5=8D=95=20=E8=8A=82=E7=82=B9=E5=88=97=E8=A1=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/logpm/trunkline/vo/TrunklineBillladingVO.java | 1 + .../trunkline/mapper/TrunklineBillladingLineMapper.java | 7 +++++++ .../trunkline/mapper/TrunklineBillladingLineMapper.xml | 6 ++++++ .../service/ITrunklineBillladingLineService.java | 5 +++++ .../service/impl/TrunklineBillladingLineServiceImpl.java | 8 ++++++++ .../service/impl/TrunklineBillladingServiceImpl.java | 4 ++++ 6 files changed, 31 insertions(+) diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java index 2572cf6b8..12b74b864 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java @@ -19,5 +19,6 @@ public class TrunklineBillladingVO extends TrunklineBillladingEntity { private List waybillList = new ArrayList<>(); + private List lineList = new ArrayList<>(); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java index 8e7b5fcab..43ca9d106 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java @@ -2,8 +2,15 @@ package com.logpm.trunkline.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import com.logpm.trunkline.vo.TrunklineBillladingLineVO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; @Mapper public interface TrunklineBillladingLineMapper extends BaseMapper { + + List findListByBillladingId(@Param("billladingId") Long billladingId); + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml index b9de6ea86..f2a6600ca 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml @@ -2,5 +2,11 @@ + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java index 44cdf8073..a529203d8 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java @@ -1,9 +1,14 @@ package com.logpm.trunkline.service; import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import com.logpm.trunkline.vo.TrunklineBillladingLineVO; import org.springblade.core.mp.base.BaseService; +import java.util.List; + public interface ITrunklineBillladingLineService extends BaseService { void deleteByBillladingId(Long billladingId); + + List findListByBillladingId(Long billladingId); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java index f736b835d..c5f50c00d 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java @@ -4,11 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; import com.logpm.trunkline.mapper.TrunklineBillladingLineMapper; import com.logpm.trunkline.service.ITrunklineBillladingLineService; +import com.logpm.trunkline.vo.TrunklineBillladingLineVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.mp.base.BaseServiceImpl; import org.springframework.stereotype.Service; +import java.util.List; + @Slf4j @AllArgsConstructor @Service @@ -20,4 +23,9 @@ public class TrunklineBillladingLineServiceImpl extends BaseServiceImpl findListByBillladingId(Long billladingId) { + return baseMapper.findListByBillladingId(billladingId); + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java index 5d6e1adf6..d028556b3 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java @@ -343,6 +343,10 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl lineList = billladingLineService.findListByBillladingId(billladingId); + + trunklineBillladingVO.setLineList(lineList); + //查询提货单关联的运单信息 List ls = billladingWaybillService.findWaybillInfoListByBillladingId(billladingId);