From 768edd046730ee7b3bf94abc637002f19a89d7f2 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Fri, 10 May 2024 10:11:37 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=E5=A2=9E=E5=8A=A0=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/logpm/oldproject/feign/SignPushClient.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/SignPushClient.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/SignPushClient.java index bfa0285ec..b68041f29 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/SignPushClient.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/SignPushClient.java @@ -37,6 +37,8 @@ public class SignPushClient implements IOldSignPushClient { String url = oldSystemProperties.getUrl() + "openApi/newSystem.OptimsSign/index"; String data = JSON.toJSONString(signPushDataDTO); + + log.info(">>>> pushOldSystemSignInfo request url:{} data:{}",url,data); String body = HttpRequest.post(url).body(data).header("token", authCode).execute().body(); if (StringUtil.isNotBlank(body)) { JSONObject res = JSON.parseObject(body); @@ -44,6 +46,8 @@ public class SignPushClient implements IOldSignPushClient { result= true; } } + log.info(">>>> pushOldSystemSignInfo response url:{} body:{}",url,body); + log.info(">>>> pushOldSystemSignInfo 程序执行 end time : {} >> return result :{} ",System.currentTimeMillis(),result); return result; From f26a78c32cedfece82f5a2008331f1f8af562836 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Fri, 10 May 2024 11:22:48 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E5=99=A8=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AftersalesWorkOrderController.java | 6 ------ .../com/logpm/factory/config/InterceptorAdapterConfig.java | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java index a61a14c97..3af0c2f46 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java @@ -654,12 +654,6 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull( aftersalesWorkOrder.getOrderCode()) ){ throw new ServiceException("订单自编号未填!"); } -// if(ObjectUtils.isNull( aftersalesWorkOrder.getFirst()) ){ -// throw new ServiceException("一级品类未填!"); -// } -// if(ObjectUtils.isNull( aftersalesWorkOrder.getSecondary()) ){ -// throw new ServiceException("二级品类未填!"); -// } } try { aftersalesWorkOrder.setInitiationIdentification("PC"); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/InterceptorAdapterConfig.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/InterceptorAdapterConfig.java index bc294dfcb..ab61b8888 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/InterceptorAdapterConfig.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/InterceptorAdapterConfig.java @@ -33,12 +33,12 @@ public class InterceptorAdapterConfig implements WebMvcConfigurer { excludePathPatterns("/factory/auth/token"). excludePathPatterns("/factory/oupai/**"). excludePathPatterns("/factory/zb/**") - .excludePathPatterns("/factory/common/**").order(1); + .excludePathPatterns("/factory/common/**").order(2); InterceptorRegistration registryZbFactory = interceptorRegistry.addInterceptor(new ZbFactoryAccountsInterceptor(zbFactoryProperties)); - registryZbFactory.addPathPatterns("/factory/zb/**").order(2); + registryZbFactory.addPathPatterns("/factory/zb/**").order(3); - registry=interceptorRegistry.addInterceptor(new LocalServerLoginAccountsInterceptor(redis,environment)).addPathPatterns("/**").order(3); + registry=interceptorRegistry.addInterceptor(new LocalServerLoginAccountsInterceptor(redis,environment)).addPathPatterns("/**").order(1); } } From 7160a9edbbfb4ec68248002d3a11ebfef8f4e930 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Fri, 10 May 2024 11:44:03 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:=E5=8F=96=E6=B6=88nods?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comfac/controller/FactoryAuthController.java | 5 ++++- .../factory/config/InterceptorAdapterConfig.java | 12 +++++------- .../logpm/factory/mt/feign/MtOrderMainClinet.java | 2 +- .../factory/oupai/feign/OuPaiFactoryClinet.java | 2 +- .../factory/snm/feign/StationLineNumClient.java | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryAuthController.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryAuthController.java index fd821a727..f4a81b0e7 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryAuthController.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryAuthController.java @@ -26,6 +26,8 @@ import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springblade.common.exception.CustomerException; import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.secure.BladeUser; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springframework.validation.annotation.Validated; @@ -40,7 +42,6 @@ import javax.servlet.http.HttpServletResponse; * @since 2023-06-06 */ @Log4j2 -@NonDS @RestController @AllArgsConstructor @RequestMapping("/factory/auth") @@ -55,6 +56,8 @@ public class FactoryAuthController extends BladeController { @ApiOperation(value = "获取token推送", notes = "传入factoryAccountDTO") public R token(@Validated @RequestBody FactoryAccountDTO factoryAccountDTO, HttpServletResponse response) { log.info("############token: 获取账号token "); + BladeUser user = AuthUtil.getUser(); + log.info("############请求参数 user:{}",user); log.info("############请求参数 factoryAccountDTO:{}",factoryAccountDTO); //通过企业id 应用id 秘钥 获取对应的token String corpid = factoryAccountDTO.getCorpid();//企业id diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/InterceptorAdapterConfig.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/InterceptorAdapterConfig.java index ab61b8888..d16d65a3b 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/InterceptorAdapterConfig.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/InterceptorAdapterConfig.java @@ -28,17 +28,15 @@ public class InterceptorAdapterConfig implements WebMvcConfigurer { @Override public void addInterceptors(InterceptorRegistry interceptorRegistry) { - InterceptorRegistration registry = interceptorRegistry.addInterceptor(new FactoryAccountsInterceptor(factoryTokenService)); - registry.addPathPatterns("/factory/**"). + interceptorRegistry.addInterceptor(new FactoryAccountsInterceptor(factoryTokenService)) + .addPathPatterns("/factory/**"). excludePathPatterns("/factory/auth/token"). excludePathPatterns("/factory/oupai/**"). excludePathPatterns("/factory/zb/**") .excludePathPatterns("/factory/common/**").order(2); - InterceptorRegistration registryZbFactory = interceptorRegistry.addInterceptor(new ZbFactoryAccountsInterceptor(zbFactoryProperties)); - registryZbFactory.addPathPatterns("/factory/zb/**").order(3); - - - registry=interceptorRegistry.addInterceptor(new LocalServerLoginAccountsInterceptor(redis,environment)).addPathPatterns("/**").order(1); + interceptorRegistry.addInterceptor(new ZbFactoryAccountsInterceptor(zbFactoryProperties)) + .addPathPatterns("/factory/zb/**").order(3); + interceptorRegistry.addInterceptor(new LocalServerLoginAccountsInterceptor(redis,environment)).addPathPatterns("/**").order(1); } } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/feign/MtOrderMainClinet.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/feign/MtOrderMainClinet.java index b691e9a62..f2d9f9c28 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/feign/MtOrderMainClinet.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/feign/MtOrderMainClinet.java @@ -26,7 +26,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Map; -@NonDS + @ApiIgnore @RestController @AllArgsConstructor diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/feign/OuPaiFactoryClinet.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/feign/OuPaiFactoryClinet.java index bbfd67be8..010692d75 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/feign/OuPaiFactoryClinet.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/feign/OuPaiFactoryClinet.java @@ -26,7 +26,7 @@ import java.util.Map; * @Author Diss * @Create 2024/1/2 22:13 */ -@NonDS + @ApiIgnore @RestController @AllArgsConstructor diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/feign/StationLineNumClient.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/feign/StationLineNumClient.java index bf8b668ee..84caeb0e6 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/feign/StationLineNumClient.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/feign/StationLineNumClient.java @@ -13,7 +13,7 @@ import java.util.List; /** * 诗尼曼工厂线路信息外部服务 */ -@NonDS + @ApiIgnore @RestController @AllArgsConstructor From e985afe92a63865688a61ed9f06c405d49c15f4d Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Fri, 10 May 2024 12:24:13 +0800 Subject: [PATCH 4/7] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/logpm/trunkline/dto/LoadCarsDTO.java | 13 ++++ .../com/logpm/trunkline/dto/OpenOrderDTO.java | 2 + .../controller/OpenOrderController.java | 8 ++- .../mapper/TrunklineCarsLoadScanMapper.xml | 13 +++- .../trunkline/service/IOpenOrderService.java | 2 +- .../service/impl/OpenOrderServiceImpl.java | 64 +++++++++++++------ .../impl/TrunklineCarsLoadServiceImpl.java | 5 ++ .../mapper/WarehouseWaybillMapper.xml | 27 ++++++++ 8 files changed, 112 insertions(+), 22 deletions(-) diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java index d91e7c82d..8775e120e 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java @@ -135,4 +135,17 @@ public class LoadCarsDTO implements Serializable { private Integer unloadAbnormal; private Integer isSupple; + + private String createTimeStartStr; + private String createTimeEndStr; + + private Date createTimeStart; + private Date createTimeEnd; + + private String unloadTimeStartStr; + private String unloadTimeEndStr; + + private Date unloadTimeStart; + private Date unloadTimeEnd; + } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java index 291de11cc..20b2c01e7 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java @@ -110,6 +110,8 @@ public class OpenOrderDTO implements Serializable { private String editResonCode;//改单原因编码 private String editReson;//改单原因 + private String abolishReson;//作废原因 + private Integer pickupCompleteOrNot;//提货是否整车 0否 1是 private Integer trunklineCompleteOrNot;//干线是否整车 0否 1是 diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java index 9bf3452bd..dec3776b0 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java @@ -1685,6 +1685,7 @@ public class OpenOrderController { String method = "############abolishWaybill: "; log.info(method + "请求参数{}", openOrderDTO); List waybillIds = openOrderDTO.getWaybillIds(); + String abolishReson = openOrderDTO.getAbolishReson(); try{ BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); @@ -1698,7 +1699,12 @@ public class OpenOrderController { return R.fail(405,"运单ids为空"); } - return openOrderService.abolishWaybill(waybillIds,myCurrentWarehouse.getId(),myCurrentWarehouse.getName()); + if(StringUtil.isBlank(abolishReson)){ + log.warn(method+"请填写作废原因 abolishReson={}",abolishReson); + return R.fail(405,"请填写作废原因"); + } + + return openOrderService.abolishWaybill(waybillIds,myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),abolishReson); }catch (CustomerException e){ log.error(e.message,e); return R.fail(e.code,e.message); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml index 7dcf09cf8..f95b0a17c 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml @@ -134,7 +134,18 @@ and is_supple = #{param.isSupple} - + + and create_time >= #{param.createTimeStart} + + + and create_time <= #{param.createTimeEnd} + + + and unload_time >= #{param.unloadTimeStart} + + + and unload_time <= #{param.unloadTimeEnd} + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java index ec6946060..4fd39ba48 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java @@ -86,7 +86,7 @@ public interface IOpenOrderService { R unFreezeWaybill(List waybillIds, Long warehouseId, String warehouseName); - R abolishWaybill(List waybillIds, Long warehouseId, String warehouseName); + R abolishWaybill(List waybillIds, Long warehouseId, String warehouseName, String abolishReson); // R findWaybillInfo(String waybillNo); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 3f5b94d3a..860a4cdae 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -230,25 +230,51 @@ public class OpenOrderServiceImpl implements IOpenOrderService { basicdataFreightApiVO.setDestination(openOrderVO.getDestinationCode()); basicdataFreightApiVO.setArrivalWarehouse(openOrderVO.getDestinationWarehouseId() + ""); - for (AdvanceDetailGoodsVO advanceDetailGoodsVO : goodsList) { - String goodsName = advanceDetailGoodsVO.getGoodsName(); - BasicdataCategoryEntity basicdataCategoryEntity = basicdataCategoryClient.findByName(goodsName); - Long goodsId = null; - if (Objects.isNull(basicdataCategoryEntity)) { - basicdataCategoryEntity = new BasicdataCategoryEntity(); - basicdataCategoryEntity.setType(1); - basicdataCategoryEntity.setName(goodsName); - goodsId = basicdataCategoryClient.addReturnId(basicdataCategoryEntity); - } else { - goodsId = basicdataCategoryEntity.getId(); + if(goodsList.isEmpty()){ + List ls = new ArrayList<>(); + //把list中的元素通过packName分组如果pickName为空则换为"其他" + Map> groupedEntities = list.stream() + .collect(Collectors.groupingBy(entity -> { + String packName = entity.getPackName(); + return packName != null ? packName : "其他"; + })); + + groupedEntities.keySet().forEach(packName -> { + int total; + List advanceEntityList = groupedEntities.get(packName); + total = advanceEntityList.stream().mapToInt(TrunklineAdvanceEntity::getTotalNum).sum(); + AdvanceDetailGoodsVO advanceDetailGoodsVO = new AdvanceDetailGoodsVO(); + advanceDetailGoodsVO.setChargeType(1); + advanceDetailGoodsVO.setGoodsName(packName); + advanceDetailGoodsVO.setNum(total); + advanceDetailGoodsVO.setVolume(BigDecimal.ZERO); + advanceDetailGoodsVO.setWeight(BigDecimal.ZERO); + ls.add(advanceDetailGoodsVO); + }); + goodsList = new ArrayList<>(ls); + }else{ + for (AdvanceDetailGoodsVO advanceDetailGoodsVO : goodsList) { + String goodsName = advanceDetailGoodsVO.getGoodsName(); + BasicdataCategoryEntity basicdataCategoryEntity = basicdataCategoryClient.findByName(goodsName); + Long goodsId = null; + if (Objects.isNull(basicdataCategoryEntity)) { + basicdataCategoryEntity = new BasicdataCategoryEntity(); + basicdataCategoryEntity.setType(1); + basicdataCategoryEntity.setName(goodsName); + goodsId = basicdataCategoryClient.addReturnId(basicdataCategoryEntity); + } else { + goodsId = basicdataCategoryEntity.getId(); + } + advanceDetailGoodsVO.setGoodsId(goodsId); + basicdataFreightApiVO.setCategory(goodsId + ""); + List pirceList = basicdataFreightClient.pirce(basicdataFreightApiVO); + JSONArray price = JSONArray.parseArray(JSON.toJSONString(pirceList)); + advanceDetailGoodsVO.setArrPirce(price); } - advanceDetailGoodsVO.setGoodsId(goodsId); - basicdataFreightApiVO.setCategory(goodsId + ""); - List pirceList = basicdataFreightClient.pirce(basicdataFreightApiVO); - JSONArray price = JSONArray.parseArray(JSON.toJSONString(pirceList)); - advanceDetailGoodsVO.setArrPirce(price); } + + openOrderVO.setGoodsList(goodsList); //查询支付方式 @@ -2127,7 +2153,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { advanceEntity.setLegacyStatus("1"); } advanceEntity.setHasPackage(0); - advanceEntity.setCreateUserName(AuthUtil.getUserName()); + advanceEntity.setCreateUserName(AuthUtil.getNickName()); list.add(advanceEntity); } }); @@ -2731,7 +2757,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { @Transactional(rollbackFor = Exception.class) @Override - public R abolishWaybill(List waybillIds, Long warehouseId, String warehouseName) { + public R abolishWaybill(List waybillIds, Long warehouseId, String warehouseName, String abolishReson) { List waybillList = warehouseWaybillClient.findListByWaybillIds(waybillIds); List waybillEntities = warehouseWaybillClient.findListByWaybillIds(waybillIds); waybillList.forEach(waybillEntity -> { @@ -2785,7 +2811,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { waybillEntities.forEach(waybillEntity -> { String createOperationRemark = "作废运单" + waybillEntity.getWaybillNo() + ",时间:" + CommonUtil.dateToString(new Date()); - openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "1000", "作废运单", createOperationRemark, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName); + openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "1000", "作废运单", createOperationRemark+" 原因:"+abolishReson, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName); }); return R.success("作废成功"); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index ed4bfe45a..b6dbd378a 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -2054,6 +2054,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl pageList = trunklineCarsLoadScanService.loadingDetail(page, loadCarsDTO); return R.data(pageList); 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 a55b29270..53547d8e9 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 @@ -236,6 +236,33 @@ and create_time <= #{param.createTimeEndDate} + + and Locate(#{param.agent},agent) > 0 + + + and Locate(#{param.goodsName},goods_name) > 0 + + + and freeze_status = #{param.freezeStatus} + + + and abolish_status = #{param.abolishStatus} + + + and Locate(#{param.remark},remark) > 0 + + + and Locate(#{param.consigneeAddress},consignee_address) > 0 + + + and total_count = #{param.totalCount} + + + and total_weight = #{param.totalWeight} + + + and total_volume = #{param.totalVolume} + order by create_time desc From 97132a77850ab007e5ebc08bffeb95ec2fb5beb4 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Fri, 10 May 2024 13:41:34 +0800 Subject: [PATCH 5/7] =?UTF-8?q?fix:=E5=A2=9E=E5=8A=A0=E5=BC=82=E6=AD=A5?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/factory/config/ExecutorConfig.java | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 blade-service/logpm-factory/src/main/java/com/logpm/factory/config/ExecutorConfig.java diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/ExecutorConfig.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/ExecutorConfig.java new file mode 100644 index 000000000..66138ba55 --- /dev/null +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/config/ExecutorConfig.java @@ -0,0 +1,82 @@ +package com.logpm.factory.config; + +import lombok.extern.slf4j.Slf4j; +import org.slf4j.MDC; +import org.springblade.core.secure.utils.AuthUtil; +import org.springblade.core.tool.utils.ThreadLocalUtil; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.task.TaskDecorator; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; + +import javax.annotation.Nonnull; +import java.util.Map; +import java.util.concurrent.Executor; +import java.util.concurrent.ThreadPoolExecutor; + +@Configuration +@Slf4j +@EnableAsync +public class ExecutorConfig { + + @Bean + public Executor asyncExecutor() { + log.info("start async executor"); + ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor(); +// 配置核心线程数 + threadPoolTaskExecutor.setCorePoolSize(10); +// 配置最大线程数 + threadPoolTaskExecutor.setMaxPoolSize(20); +// 配置队列大小 + threadPoolTaskExecutor.setQueueCapacity(50); +// 配置线程池中线程的名称前缀 + threadPoolTaskExecutor.setThreadNamePrefix("ASYNC_THREAD_"); +// HelloWorldServiceImpl rejection-policy: 当pool已经达到max size时,如何处理新任务: +// CallerRunsPolicy: 不在新线程中执行任务,而是由调用者所在的线程来执行; +// AbortPolicy: 拒绝执行新任务,并抛出RejectedExecutionException异常; +// DiscardPolicy:丢弃当前将要加入队列的任务; +// DiscardOldestPolicy:丢弃任务队列中最旧的任务; + threadPoolTaskExecutor.setRejectedExecutionHandler( + new ThreadPoolExecutor.CallerRunsPolicy() + ); + threadPoolTaskExecutor.setTaskDecorator(new ContextCopyingDecorator()); + threadPoolTaskExecutor.initialize(); + return threadPoolTaskExecutor; + } + + + static class ContextCopyingDecorator implements TaskDecorator { + @Nonnull + @Override + public Runnable decorate(@Nonnull Runnable runnable) { + RequestAttributes context = RequestContextHolder.currentRequestAttributes(); + String tenantId = AuthUtil.getTenantId(); + Map all = ThreadLocalUtil.getAll(); + Map mdcMap = MDC.getCopyOfContextMap(); + return () -> { + try { + all.keySet().forEach(key -> ThreadLocalUtil.put(key, all.get(key))); + if (mdcMap != null && !mdcMap.isEmpty()) { + MDC.setContextMap(mdcMap); + } + RequestContextHolder.setRequestAttributes(context); + String tenantId1 = AuthUtil.getTenantId(); + + runnable.run(); + } finally { + RequestContextHolder.resetRequestAttributes(); + all.clear(); + if (mdcMap != null) { + mdcMap.clear(); + } + ThreadLocalUtil.clear(); + MDC.clear(); + } + }; + } + } + +} From 514aef14b092305a7460e057c6ccb6cfdf70dc07 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Fri, 10 May 2024 13:55:41 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=20=E8=87=AA=E6=8F=90=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E3=80=81=E5=AF=BC=E5=87=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/DistrilbutionBillLadingDTO.java | 15 +- .../mapper/DistributionParcelListMapper.xml | 8 +- .../mapper/DistrilbutionBillLadingMapper.java | 2 +- .../mapper/DistrilbutionBillLadingMapper.xml | 429 ++++++++++++------ .../DistributionDeliveryListServiceImpl.java | 22 +- .../DistrilbutionBillLadingServiceImpl.java | 161 ++----- 6 files changed, 378 insertions(+), 259 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java index baed00de9..78816800e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java @@ -52,10 +52,20 @@ public class DistrilbutionBillLadingDTO extends DistrilbutionBillLadingEntity { */ private String pickupBatch; + /** + * 提货批次 + */ + private String orderCode; + /** * 多个提货批次 */ private List pickupBatchs; + + /** + * 多个订单 + */ + private List orderCodes; /** * 服务号 */ @@ -142,10 +152,7 @@ public class DistrilbutionBillLadingDTO extends DistrilbutionBillLadingEntity { */ private String stockupCode; - /** - * 订单自编号 - */ - private String orderCode; + /** * 库存品 */ 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 4196fdab6..ad4753e00 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 @@ -1512,7 +1512,13 @@ ldl.signing_user AS nodeControlsUserName, ldl.signing_user_id AS nodeControlsUserId, IF(ldla.id is not null AND ldl.scan_status = '2','异常签收','扫描签收' )AS nodeName, - CONCAT('签收操作成功') AS description + CASE ldl.scan_status + WHEN '2' THEN CONCAT('扫描签收,签收方式:',IF(ldl.tray_no is not null,'托盘','包件'),IF(ldl.tray_no is null,'',ldl.tray_no)) + WHEN '3' THEN CONCAT('扫描签收,签收方式:订单') + WHEN '4' THEN CONCAT('扫描签收,签收方式:批量确认') + WHEN '5' THEN CONCAT('扫描签收,签收方式:未装车签收') + ELSE CONCAT('扫描装车,装车方式:',IF(ldl.tray_no is not null,'托盘','包件'),IF(ldl.tray_no is null,'',ldl.tray_no)) + END description FROM logpm_distribution_loadscan AS ldl LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldl.package_id = ldpl.id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java index d23a3783b..cf07dd518 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java @@ -99,7 +99,7 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper selectBillStockList(IPage page, @Param("distrilbutionBillLading") Map distrilbutionBillLading); - List exportDistributionBillLading(@Param("param") Map param, @Param("idArr") List idArr); + List exportDistributionBillLading(@Param("param") Map param); /** diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml index 4a693961a..17dbf5c05 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml @@ -32,97 +32,165 @@