From 34dec0c0b7e7472a3914d841c16f7402bde62f05 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Mon, 22 Apr 2024 19:03:48 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF-bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/DictBizConstant.java | 2 + .../entity/DistributionParcelListEntity.java | 2 +- .../com/logpm/trunkline/dto/OpenOrderDTO.java | 4 + .../entity/TrunklineAdvanceDetailEntity.java | 3 + .../logpm/trunkline/vo/EditOrderMsgVO.java | 14 ++ .../trunkline/vo/LoadingDetailExportVO.java | 65 ++++++ .../com/logpm/trunkline/vo/OpenOrderVO.java | 7 + .../entity/WarehouseWaybillEntity.java | 14 ++ .../warehouse/vo/WarehouseWaybillVO.java | 2 + .../DistributionParcelListServiceImpl.java | 2 +- .../impl/SyncOrderInfoServiceImpl.java | 2 +- .../controller/CarsLoadController.java | 18 ++ .../mapper/TrunklineAdvanceDetailMapper.xml | 3 +- .../mapper/TrunklineAdvanceMapper.xml | 17 +- .../mapper/TrunklineBillladingMapper.xml | 5 +- .../TrunklineBillladingWaybillMapper.xml | 1 + .../mapper/TrunklineCarsLoadMapper.java | 5 + .../mapper/TrunklineCarsLoadMapper.xml | 2 + .../mapper/TrunklineCarsLoadScanMapper.java | 2 + .../mapper/TrunklineCarsLoadScanMapper.xml | 34 ++- .../ITrunklineCarsLoadScanService.java | 1 + .../service/ITrunklineCarsLoadService.java | 2 + .../service/impl/InComingServiceImpl.java | 18 +- .../service/impl/OpenOrderServiceImpl.java | 23 +- .../impl/TrunklineAdvanceServiceImpl.java | 4 +- .../impl/TrunklineBillladingServiceImpl.java | 209 +++++++++--------- .../TrunklineCarsLoadLineServiceImpl.java | 3 +- .../TrunklineCarsLoadScanServiceImpl.java | 5 + .../impl/TrunklineCarsLoadServiceImpl.java | 148 +++++-------- .../api/WarehouseTrayTypeApiController.java | 72 +++--- 30 files changed, 422 insertions(+), 267 deletions(-) create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/EditOrderMsgVO.java create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java index 42defa89b..33112603b 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java @@ -113,6 +113,8 @@ public class DictBizConstant { public static final String OPEN_ORDER_URGENCY = "open_order_urgency"; public static final String OPEN_ORDER_RECEIPT = "open_order_receipt"; public static final String OPEN_ORDER_TRANSPORT_TYPE = "open_order_transport_type"; + public static final String OPEN_ORDER_CHARGE_TYPE = "open_order_charge_type"; + public static final String EDIT_WAYBILL_REASON_TYPE = "edit_waybill_reason_type"; /* 异常工单状态 */ public static final String PC_WORK_ORDER = "pc_work_order"; //PC工单异常类型 diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java index c8a08bab3..e44b04a01 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java @@ -197,7 +197,7 @@ public class DistributionParcelListEntity extends TenantEntity { * 运单ID */ @ApiModelProperty(value = "运单ID") - private String waybillId; + private Long waybillId; /** * 客户id */ 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 c47812b5f..ab14c07b0 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 @@ -16,6 +16,8 @@ public class OpenOrderDTO implements Serializable { private String brand;//品牌 private String trainNumber;//客户车次号 private String waybillNo;//运单号 + private String departure;//发站 + private String departureCode; private Long departureWarehouseId;//发站仓id private String departureWarehouseName;//发站仓名称 private String destination;//到站 @@ -26,6 +28,8 @@ public class OpenOrderDTO implements Serializable { private List advanceIds;//暂存单ids private String orderCode;//订单号 private String openOrderDate;//开单时间 + private String dearCode;//商场编码 + private String dearName;//商场名称 private Long shipperId;//发货单位id private String shipper;//发货单位 diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java index b3465ce13..39fc53ee5 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java @@ -90,6 +90,9 @@ public class TrunklineAdvanceDetailEntity extends TenantEntity { /** 服务号 */ @ApiModelProperty(name = "服务号",notes = "") private String serviceNum ; + /** 运单id */ + @ApiModelProperty(name = "运单id",notes = "") + private Long waybillId ; /** 运单号 */ @ApiModelProperty(name = "运单号",notes = "") private String waybillNo ; diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/EditOrderMsgVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/EditOrderMsgVO.java new file mode 100644 index 000000000..f91f46c00 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/EditOrderMsgVO.java @@ -0,0 +1,14 @@ +package com.logpm.trunkline.vo; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class EditOrderMsgVO implements Serializable { + + private String itemName; + private String oldValue; + private String newValue; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java new file mode 100644 index 000000000..87512aacf --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java @@ -0,0 +1,65 @@ +package com.logpm.trunkline.vo; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class LoadingDetailExportVO implements Serializable { + + @ExcelProperty(value = "运单号") + private String waybillNo; + + @ExcelProperty(value = "配载批次") + private String carsNo; + + @ExcelProperty(value = "合同号") + private String orderCode; + + @ExcelProperty(value = "包条码-产品名称") + private String scanCode; + + @ExcelProperty(value = "装车人") + private String loadingUserName; + + @ExcelProperty(value = "装车仓库") + private String warehouseNname; + + @ExcelProperty(value = "计划目的仓库") + private String finalNodeName; + + @ExcelProperty(value = "装卸状态") + private String scanStatus; + + @ExcelProperty(value = "托盘名称") + private String trayName; + + @ExcelProperty(value = "托盘码") + private String trayCode; + + @ExcelProperty(value = "卸车仓库") + private String unloadNodeName; + + @ExcelProperty(value = "卸车人") + private String unloadUserName; + + @ExcelProperty(value = "类型") + private String type; + + @ExcelProperty(value = "数量") + private String num; + + @ExcelProperty(value = "有无数据") + private String isData; + + @ExcelProperty(value = "是否装车异常") + private String loadingAbnormal; + + @ExcelProperty(value = "是否卸车异常") + private String unloadAbnormal; + + @ExcelProperty(value = "是否补录") + private String isSupple; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OpenOrderVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OpenOrderVO.java index ed0f0e146..b44ff6c7a 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OpenOrderVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OpenOrderVO.java @@ -10,9 +10,12 @@ import java.util.List; @Data public class OpenOrderVO implements Serializable { + private Long brandId; private String brand; private String trainNumber; private String orderCode; + private String dealerCode; + private String dealerName; private List advanceIds = new ArrayList<>(); @@ -22,6 +25,10 @@ public class OpenOrderVO implements Serializable { private String destinationWarehouseName;//目的仓名称 private Long destinationWarehouseId;//目的仓Id + private String departure;//发站 + private String departureCode;//发站编码 + private List departureArray;//发站 + private String destination;//到站 private String destinationCode;//到站编码 private List destinationArray;//到站 diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java index c20ce5ff7..037ab761e 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java @@ -445,4 +445,18 @@ public class WarehouseWaybillEntity extends TenantEntity { @ApiModelProperty(value = "成本件数") private Integer costNum; + @ApiModelProperty(value = "发站") + private String departure; + + @ApiModelProperty(value = "发站编码") + private String departureCode; + + @ApiModelProperty(value = "商场编码") + private String dearCode; + + @ApiModelProperty(value = "商场名称") + private String dearName; + + + } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java index b1cde7216..abf5bf291 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java @@ -39,4 +39,6 @@ public class WarehouseWaybillVO extends WarehouseWaybillEntity { private Integer handleNum; + private Long waybillId; + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java index 714cd5756..0f0c024ce 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java @@ -737,7 +737,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl orderCodes = new TreeSet<>(); for (DistributionParcelListEntity parcelListEntity : listEntityList) { Long packageWarehouseId = parcelListEntity.getWarehouseId(); - parcelListEntity.setWaybillId(waybillId + ""); + parcelListEntity.setWaybillId(waybillId); parcelListEntity.setWaybillNumber(waybillNo); parcelListEntity.setSendWarehouseId(departureWarehouseId); parcelListEntity.setSendWarehouseName(departureWarehouseName); 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 08529c467..5f0d8c551 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 @@ -235,7 +235,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { List parcelListEntityList = distributionParcelListClient.getListByOrderPackageCode(orderPackageCode); for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) { Long warehouseId = parcelListEntity.getWarehouseId(); - parcelListEntity.setWaybillId(waybillId+""); + parcelListEntity.setWaybillId(waybillId); parcelListEntity.setWaybillNumber(waybillNo); parcelListEntity.setSendWarehouseId(departureWarehouseId); parcelListEntity.setSendWarehouseName(departureWarehouseName); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java index 83a8d60b9..63a2c945c 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java @@ -7,6 +7,7 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.trunkline.dto.*; import com.logpm.trunkline.service.ITrunklineCarsLoadService; +import com.logpm.trunkline.vo.LoadingDetailExportVO; import com.logpm.trunkline.vo.TrunklineCarsLoadVO; import com.logpm.trunkline.vo.ZeroSuppleVO; import io.swagger.annotations.Api; @@ -14,11 +15,14 @@ import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.common.exception.CustomerException; +import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.StringUtil; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.util.Enumeration; import java.util.List; @@ -1189,6 +1193,20 @@ public class CarsLoadController { } } + @ResponseBody + @PostMapping("/loadingDetailExport") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "装车明细导出", notes = "传入loadCarsDTO") + public void loadingDetailExport(@RequestBody LoadCarsDTO loadCarsDTO, HttpServletResponse response) { + String method = "############loadingDetailExport: "; + log.info(method+"请求参数{}",loadCarsDTO); + List ls = carsLoadService.loadingDetailExport(loadCarsDTO); + //导出ls + ExcelUtil.export(response, "未盘点任务数据" + DateUtil.time(), "未盘点任务数据数据表", ls, LoadingDetailExportVO.class); + } + + + @ResponseBody @PostMapping("/carsLoadDetailInfo") @ApiOperationSupport(order = 1) diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml index c6f498d1d..e6b3b63a2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml @@ -170,7 +170,8 @@ update logpm_trunkline_advance_detail - set waybill_no = #{waybillNo} + set waybill_no = #{waybillNo}, + waybill_id = #{waybillId} where advance_id = #{advanceId} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml index 1e0fade47..a94dd98cf 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml @@ -84,7 +84,9 @@ - select lta.* - from logpm_trunkline_advance lta + select lta.*, + max(IF(ltad.package_status = '0',1,0)) isIncoming + from logpm_trunkline_advance_detail ltad + left join logpm_trunkline_advance lta on lta.id = ltad.advance_id WHERE 1=1 - and lta.warehouse_id = #{param.warehouseId} + and ltad.warehouse_id = #{param.warehouseId} - and lta.train_number = #{param.incomingCode} + and ltad.train_number = #{param.incomingCode} - and lta.order_code in + and ltad.order_code in #{item} + group by lta.id - select lww.waybill_no waybillNo, + select lww.id waybillId, + lww.waybill_no waybillNo, lww.create_time createTime, lww.goods_name goodsName, lww.destination destination, diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml index 0441a8ee0..4086707db 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml @@ -48,6 +48,7 @@ left join logpm_trunkline_billlading ltb on ltb.id = ltbw.billlading_id left join logpm_warehouse_waybill lww on lww.waybill_no = ltbw.waybill_no where ltbw.billlading_id = #{billladingId} + and ltbw.is_deleted = 0 diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java index 548e321e6..340b96c30 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java @@ -17,6 +17,11 @@ import java.util.List; @Mapper public interface TrunklineCarsLoadMapper extends BaseMapper { + /** + * @param page + * @param loadCarsDTO + * @return + */ IPage loadCarsPageList(IPage page, @Param("param") LoadCarsDTO loadCarsDTO); IPage arriveCarsPageList(IPage page, @Param("param") LoadCarsDTO loadCarsDTO); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml index 1a5bc1364..7efe9e771 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml @@ -41,6 +41,7 @@ left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcl.id where ltcl.is_deleted = 0 and ltcl.load_type != '4' + and ltcl.load_status != '100' and ltcl.start_warehouse_id = #{param.warehouseId} @@ -375,6 +376,7 @@ and ltcl.load_status = '0' + and ltcl.load_status != '100' and ltcl.load_status != '0' diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java index 0c37661b2..d532bbce3 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java @@ -126,4 +126,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper findWaybillCarsLoadInfo(@Param("waybillId") Long waybillId); List findWaybillTransferInfo(@Param("waybillId") Long waybillId); + + List loadingDetailExport(@Param("param") LoadCarsDTO loadCarsDTO); } 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 06a1d48d1..a7f98ac9f 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 @@ -583,10 +583,42 @@ ltcl.remark remark from logpm_trunkline_cars_load_scan ltcls left join logpm_trunkline_cars_load ltcl on ltcl.id = ltcls.load_id - where ltcls.waybill_no = #{waybillNo} + where ltcls.waybill_id = #{waybillId} and ltcl.load_type = 4 group by ltcl.cars_no order By ltcl.start_time asc + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java index 51bd8eabe..65870624b 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java @@ -122,4 +122,5 @@ public interface ITrunklineCarsLoadScanService extends BaseService findWaybillTransferInfo(Long waybillId); + List loadingDetailExport(LoadCarsDTO loadCarsDTO); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java index 342f8c137..5cad80db2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java @@ -5,6 +5,7 @@ import com.logpm.trunkline.dto.BatchUnloadDTO; import com.logpm.trunkline.dto.LoadCarsDTO; import com.logpm.trunkline.dto.TrunklineCarsLoadDTO; import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; +import com.logpm.trunkline.vo.LoadingDetailExportVO; import com.logpm.trunkline.vo.TripartiteTransferVO; import com.logpm.trunkline.vo.TrunklineCarsLoadVO; import org.springblade.core.mp.base.BaseService; @@ -205,4 +206,5 @@ public interface ITrunklineCarsLoadService extends BaseService loadingDetailExport(LoadCarsDTO loadCarsDTO); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java index 3c3f7cd2a..df09c01c1 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java @@ -146,15 +146,15 @@ public class InComingServiceImpl implements IInComingService { } List ls = advanceService.findIncomingOrderList(inComingDTO); - for (TrunklineAdvanceVO advanceVO : ls) { - Long advanceId = advanceVO.getId(); - Integer num = advanceDetailService.findListByAdvanceIdAndPackageStatus(advanceId,"0"); - if(num > 0){ - advanceVO.setIsIncoming(1); - }else{ - advanceVO.setIsIncoming(0); - } - } +// for (TrunklineAdvanceVO advanceVO : ls) { +// Long advanceId = advanceVO.getId(); +// Integer num = advanceDetailService.findListByAdvanceIdAndPackageStatus(advanceId,"0"); +// if(num > 0){ +// advanceVO.setIsIncoming(1); +// }else{ +// advanceVO.setIsIncoming(0); +// } +// } return R.data(ls); } 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 ed8542c61..93378b671 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 @@ -94,9 +94,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { page.setCurrent(advanceDTO.getPageNum()); page.setSize(advanceDTO.getPageSize()); - IPage pageList = advanceService.advancePageList(page, advanceDTO); - - return pageList; + return advanceService.advancePageList(page, advanceDTO); } @Override @@ -139,6 +137,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService { OpenOrderVO infoByIds = advanceService.selectInfoByIds(advanceIds); BeanUtil.copy(infoByIds, openOrderVO); openOrderVO.setAdvanceIds(advanceIds); + BasicdataBrandEntity basicdataBrandEntity = basicdataBrandClient.findEntityByName(brand); + if(!Objects.isNull(basicdataBrandEntity)){ + openOrderVO.setBrandId(basicdataBrandEntity.getId()); + } //发站仓-----目前登录人的仓库 openOrderVO.setDepartureWarehouseName(basicdataWarehouseEntity.getName()); openOrderVO.setDepartureWarehouseId(warehouseId); @@ -303,13 +305,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService { Long destinationWarehouseId = openOrderDTO.getDestinationWarehouseId(); String brand = openOrderDTO.getBrand(); - BasicdataBrandEntity basicdataBrandEntity = basicdataBrandClient.findEntityByName(brand); + Long brandId = openOrderDTO.getBrandId(); +// BasicdataBrandEntity basicdataBrandEntity = basicdataBrandClient.findEntityByName(brand); WarehouseWaybillEntity waybillEntity = new WarehouseWaybillEntity(); waybillEntity.setWaybillNo(waybillNo); - if (!Objects.isNull(basicdataBrandEntity)) { - waybillEntity.setBrandId(basicdataBrandEntity.getId()); - } +// if (!Objects.isNull(basicdataBrandEntity)) { +// waybillEntity.setBrandId(basicdataBrandEntity.getId()); +// } + + waybillEntity.setBrandId(brandId); waybillEntity.setBrand(brand); waybillEntity.setOrderNo(openOrderDTO.getOrderCode()); waybillEntity.setDepartureWarehouseId(departureWarehouseId); @@ -526,7 +531,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { } //判断是否是开单及入库的配置 - Boolean aBoolean = basicdataOpenIncomingClient.checkOpenIncoming(warehouseId, basicdataBrandEntity.getId()); + Boolean aBoolean = basicdataOpenIncomingClient.checkOpenIncoming(warehouseId, brandId); if (aBoolean) { openOrderAsyncService.incomingPackageBatch(advanceIds, AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getTenantId(), AuthUtil.getNickName(), IncomingTypeEnum.OPEN_TO_IN.getCode()); } @@ -2823,7 +2828,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { entity.setOrderPackageStockupStatus("10"); entity.setOrderPackageReservationStatus("10"); entity.setOrderPackageLoadingStatus("10"); - entity.setWaybillId(warehouseWaybill.getId() + ""); + entity.setWaybillId(warehouseWaybill.getId()); entity.setWaybillNumber(warehouseWaybill.getWaybillNo()); entity.setIsZero("1"); entity.setWarehouseEntryTimeEnd(date); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java index 250e10208..ec09b09a2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java @@ -227,7 +227,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl pageList = baseMapper.pageList(page,billladingDTO); - - return pageList; + return baseMapper.pageList(page,billladingDTO); } @Override @@ -124,7 +123,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl pageList = baseMapper.pageInfoList(page,billladingDTO); - - return pageList; + return baseMapper.pageInfoList(page,billladingDTO); } @Override @@ -168,7 +165,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl findAdvanceDetailList(BillladingDTO billladingDTO) { -// Integer pageNum = billladingDTO.getPageNum(); -// Integer pageSize = billladingDTO.getPageSize(); - String orderCode = billladingDTO.getOrderCode(); -// IPage page = new Page<>(); -// page.setCurrent(pageNum); -// page.setSize(pageSize); - List ls = baseMapper.findAdvanceDetailList(orderCode); + String orderCode = billladingDTO.getOrderCode(); - return ls; + return baseMapper.findAdvanceDetailList(orderCode); } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java index ab574ef14..2242d5bfe 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java @@ -31,7 +31,8 @@ public class TrunklineCarsLoadLineServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("load_id",loadId) - .eq("node_id",nodeId); + .eq("node_id",nodeId) + .eq("is_deleted",0); return baseMapper.selectOne(queryWrapper); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java index 3ad55de2b..058bc0b9a 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java @@ -298,4 +298,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl loadingDetailExport(LoadCarsDTO loadCarsDTO) { + return baseMapper.loadingDetailExport(loadCarsDTO); + } + } 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 0d7dd469c..0657da398 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 @@ -29,73 +29,11 @@ import com.logpm.factorydata.enums.BrandEnums; import com.logpm.factorydata.util.FactoryDataMessageSender; import com.logpm.factorydata.vo.NodePushMsg; import com.logpm.trunkline.bean.Resp; -import com.logpm.trunkline.dto.BatchUnloadDTO; -import com.logpm.trunkline.dto.InComingDTO; -import com.logpm.trunkline.dto.LoadCarsDTO; -import com.logpm.trunkline.dto.LoadScanBrandDTO; -import com.logpm.trunkline.dto.LoadingPackageDTO; -import com.logpm.trunkline.dto.LoadingZeroDTO; -import com.logpm.trunkline.dto.ProductInfoDTO; -import com.logpm.trunkline.dto.TrunklineCarsLoadDTO; -import com.logpm.trunkline.dto.TrunklineCarsLoadLineDTO; -import com.logpm.trunkline.dto.TrunklineCarsOrderDTO; -import com.logpm.trunkline.dto.UnloadPackageDTO; -import com.logpm.trunkline.dto.UnloadZeroDTO; -import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadContractEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadFinanceEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadLogEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity; -import com.logpm.trunkline.entity.TrunklineCarsOrderEntity; -import com.logpm.trunkline.entity.TrunklineCostShareRecordEntity; -import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity; -import com.logpm.trunkline.entity.TrunklineLoadSignPhotoEntity; +import com.logpm.trunkline.dto.*; +import com.logpm.trunkline.entity.*; import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper; -import com.logpm.trunkline.service.ICarsLoadAsyncService; -import com.logpm.trunkline.service.IInComingService; -import com.logpm.trunkline.service.IOpenOrderAsyncService; -import com.logpm.trunkline.service.IPackageTrackLogAsyncService; -import com.logpm.trunkline.service.ITrunklineAdvanceDetailService; -import com.logpm.trunkline.service.ITrunklineCarsLoadContractService; -import com.logpm.trunkline.service.ITrunklineCarsLoadFinanceService; -import com.logpm.trunkline.service.ITrunklineCarsLoadLineService; -import com.logpm.trunkline.service.ITrunklineCarsLoadLogService; -import com.logpm.trunkline.service.ITrunklineCarsLoadScanService; -import com.logpm.trunkline.service.ITrunklineCarsLoadService; -import com.logpm.trunkline.service.ITrunklineCarsLoadingLogService; -import com.logpm.trunkline.service.ITrunklineCarsOrderService; -import com.logpm.trunkline.service.ITrunklineCarsSignLogService; -import com.logpm.trunkline.service.ITrunklineCarsUnloadLogService; -import com.logpm.trunkline.service.ITrunklineCostShareRecordService; -import com.logpm.trunkline.service.ITrunklineLoadSignOrderService; -import com.logpm.trunkline.service.ITrunklineLoadSignPhotoService; -import com.logpm.trunkline.service.ITrunklineWaybillOrderService; -import com.logpm.trunkline.vo.CarsLoadAllOrderVO; -import com.logpm.trunkline.vo.CarsLoadOrderInfoVO; -import com.logpm.trunkline.vo.CarsLoadWaybillInfoVO; -import com.logpm.trunkline.vo.HasNotFinalNodeIdDataVO; -import com.logpm.trunkline.vo.LoadScanFinalNodeIdVO; -import com.logpm.trunkline.vo.LoadScanOrderVO; -import com.logpm.trunkline.vo.LoadZeroListVO; -import com.logpm.trunkline.vo.LoadingListGoodsVO; -import com.logpm.trunkline.vo.LoadingListMainVO; -import com.logpm.trunkline.vo.NodeNumDataVO; -import com.logpm.trunkline.vo.OrderScanDetailVO; -import com.logpm.trunkline.vo.SignOrderDetailVO; -import com.logpm.trunkline.vo.SignPackageVO; -import com.logpm.trunkline.vo.SignScanOrderVO; -import com.logpm.trunkline.vo.TripartiteTransferVO; -import com.logpm.trunkline.vo.TrunklineCarsLoadLoadingListVO; -import com.logpm.trunkline.vo.TrunklineCarsLoadScanVO; -import com.logpm.trunkline.vo.TrunklineCarsLoadVO; -import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO; -import com.logpm.trunkline.vo.UnloadPackageVO; -import com.logpm.trunkline.vo.UnloadScanOrderVO; -import com.logpm.trunkline.vo.UnloadZeroVO; -import com.logpm.trunkline.vo.WaybillCarsLoadVO; -import com.logpm.trunkline.vo.ZeroSuppleVO; +import com.logpm.trunkline.service.*; +import com.logpm.trunkline.vo.*; import com.logpm.warehouse.entity.WarehouseWayBillDetail; import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; @@ -105,11 +43,7 @@ import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringEscapeUtils; -import org.springblade.common.constant.CodeNumConstant; -import org.springblade.common.constant.DictBizConstant; -import org.springblade.common.constant.IncomingTypeEnum; -import org.springblade.common.constant.RabbitConstant; -import org.springblade.common.constant.WorkNodeEnums; +import org.springblade.common.constant.*; import org.springblade.common.constant.carsload.CarsLoadLogTypeConstant; import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; @@ -128,14 +62,8 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeSet; +import java.util.*; +import java.util.stream.Collectors; @Slf4j @Service @@ -186,15 +114,24 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl pageList = baseMapper.loadCarsPageList(page, loadCarsDTO); List records = pageList.getRecords(); - for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) { + //把records中的id封装成一个set + Set idsSet = records.stream() + .map(TrunklineCarsLoadVO::getId) // Assuming getId() method returns the id as an Integer + .collect(Collectors.toSet()); + //判空idsSet + if (idsSet.isEmpty()) { + return pageList; + } + //使用trunklineCarsLoadLineService通过idsSet关联loadId批量查询TrunklineCarsLoadLineEntity集合 + List loadLineList = trunklineCarsLoadLineService.list(new QueryWrapper().in("load_id", idsSet)); + //把loadLineList中对象通过loadId分组 + Map> loadLineMap = loadLineList.stream() + .collect(Collectors.groupingBy(TrunklineCarsLoadLineEntity::getLoadId)); + records.forEach(trunklineCarsLoadVO -> { Long loadId = trunklineCarsLoadVO.getId(); - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("is_deleted", 0) - .eq("load_id", loadId) - .orderByAsc("sort"); - List list = trunklineCarsLoadLineService.list(queryWrapper); + List list = loadLineMap.get(loadId); trunklineCarsLoadVO.setCarsLoadLineList(list); - } + }); pageList.setRecords(records); return pageList; } @@ -207,15 +144,24 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl pageList = baseMapper.arriveCarsPageList(page, loadCarsDTO); List records = pageList.getRecords(); - for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) { + //把records中的id封装成一个set + Set idsSet = records.stream() + .map(TrunklineCarsLoadVO::getId) // Assuming getId() method returns the id as an Integer + .collect(Collectors.toSet()); + //判空idsSet + if (idsSet.isEmpty()) { + return pageList; + } + //使用trunklineCarsLoadLineService通过idsSet关联loadId批量查询TrunklineCarsLoadLineEntity集合 + List loadLineList = trunklineCarsLoadLineService.list(new QueryWrapper().in("load_id", idsSet)); + //把loadLineList中对象通过loadId分组 + Map> loadLineMap = loadLineList.stream() + .collect(Collectors.groupingBy(TrunklineCarsLoadLineEntity::getLoadId)); + records.forEach(trunklineCarsLoadVO -> { Long loadId = trunklineCarsLoadVO.getId(); - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("is_deleted", 0) - .eq("load_id", loadId) - .orderByAsc("sort"); - List list = trunklineCarsLoadLineService.list(queryWrapper); + List list = loadLineMap.get(loadId); trunklineCarsLoadVO.setCarsLoadLineList(list); - } + }); pageList.setRecords(records); return pageList; } @@ -786,7 +732,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl carsLoadScanIdList = trunklineCarsLoadScanService.findAllIdListByLoadId(loadId); - removeCarsLoadScan(StringUtil.join(carsLoadScanIdList, ","), warehouseId); + //通过loadId更新carsOrder关联表中的所有订单startNum为0 + trunklineCarsOrderService.updateStartNumByLoadIdAndWarehouseId(loadId, warehouseId); + + if(CollUtil.isNotEmpty(carsLoadScanIdList)){ + removeCarsLoadScan(StringUtil.join(carsLoadScanIdList, ","), warehouseId); + } try { trunklineCarsLoadLogService.saveLog(carsLoadEntity, currentCarsLoadLineEntity, CarsLoadLogTypeConstant.CANCEL_CARS_LOAD.getValue()); @@ -2057,6 +2008,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl pageList = trunklineCarsLoadScanService.loadingDetail(page, loadCarsDTO); + trunklineCarsLoadScanService. + return R.data(pageList); } @@ -2154,6 +2107,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl pageList = baseMapper.carsLoadPageList(page, loadCarsDTO); List records = pageList.getRecords(); + //循环records,获取字典值 for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) { String loadStatus = trunklineCarsLoadVO.getLoadStatus(); String value = DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus); @@ -4478,6 +4433,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl loadingDetailExport(LoadCarsDTO loadCarsDTO) { + return trunklineCarsLoadScanService.loadingDetailExport(loadCarsDTO); + } + @Override public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) { log.info("##############loadingTrayInfo: 查询托盘的货物信息"); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java index c44067c05..139197ba8 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTrayTypeApiController.java @@ -99,7 +99,7 @@ public class WarehouseTrayTypeApiController { return R.fail(403,"仓库信息为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘码不能为空 trayCode={}",trayCode); return R.fail(403,"托盘码不能为空"); } @@ -146,11 +146,11 @@ public class WarehouseTrayTypeApiController { return R.fail(403,"仓库信息为空"); } - if(!StringUtil.hasLength(orderCode)){ + if(StringUtil.isBlank(orderCode)){ log.warn(method+"订单编号不能为空 orderCode={}",orderCode); return R.fail(403,"订单编号不能为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"订单编号不能为空 trayCode={}",trayCode); return R.fail(403,"订单编号不能为空"); } @@ -181,15 +181,15 @@ public class WarehouseTrayTypeApiController { String trayCode = trayTypeDTO.getTrayCode(); String orderPackageCode = trayTypeDTO.getOrderPackageCode();//包条码 - if(!StringUtil.hasLength(trayType)){ + if(StringUtil.isBlank(trayType)){ log.warn(method+"打托方式不能为空 trayType={}",trayType); return R.fail(403,"打托方式不能为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘码不能为空 trayCode={}",trayCode); return R.fail(403,"托盘码不能为空"); } - if(!StringUtil.hasLength(orderPackageCode)){ + if(StringUtil.isBlank(orderPackageCode)){ log.warn(method+"包条码不能为空 orderPackageCode={}",orderPackageCode); return R.fail(403,"包条码不能为空"); } @@ -223,11 +223,11 @@ public class WarehouseTrayTypeApiController { List orderPackageCodes = trayTypeDTO.getOrderPackageCodes(); String trayCode = trayTypeDTO.getTrayCode();//托盘码 - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘码不能为空 trayCode={}",trayCode); return R.fail(403,"托盘码不能为空"); } - if(Objects.isNull(orderPackageCodes)||orderPackageCodes.size() == 0){ + if(Objects.isNull(orderPackageCodes)||orderPackageCodes.isEmpty()){ log.warn(method+"包条码不能为空 orderPackageCodes={}",orderPackageCodes); return R.fail(403,"包条码不能为空"); } @@ -262,11 +262,11 @@ public class WarehouseTrayTypeApiController { String orderCode = trayTypeDTO.getOrderCode(); String trayCode = trayTypeDTO.getTrayCode();//托盘码 - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘码不能为空 trayCode={}",trayCode); return R.fail(403,"托盘码不能为空"); } - if(!StringUtil.hasLength(orderCode)){ + if(StringUtil.isBlank(orderCode)){ log.warn(method+"订单号不能为空 orderCode={}",orderCode); return R.fail(403,"订单号不能为空"); } @@ -345,7 +345,7 @@ public class WarehouseTrayTypeApiController { return R.fail(403,"仓库信息为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘码不能为空 trayCode={}",trayCode); return R.fail(403,"托盘码不能为空"); } @@ -388,7 +388,7 @@ public class WarehouseTrayTypeApiController { log.warn(method+"仓库信息不能为空"); return R.fail(403,"仓库信息不能为空"); } - if(!StringUtil.hasLength(waybillCode)){ + if(StringUtil.isBlank(waybillCode)){ log.warn(method+"运单号不能为空 waybillCode={}",waybillCode); return R.fail(403,"运单号不能为空"); } @@ -420,11 +420,11 @@ public class WarehouseTrayTypeApiController { log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); return R.fail(403,"仓库信息为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘号不能为空 trayCode={}",trayCode); return R.fail(403,"托盘号不能为空"); } - if(!StringUtil.hasLength(trayType)){ + if(StringUtil.isBlank(trayType)){ log.warn(method+"打托方式不能为空 trayCode={}",trayCode); return R.fail(403,"打托方式不能为空"); } @@ -455,11 +455,11 @@ public class WarehouseTrayTypeApiController { log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); return R.fail(403,"仓库信息为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘号不能为空 trayCode={}",trayCode); return R.fail(403,"托盘号不能为空"); } - if(!StringUtil.hasLength(orderCode)){ + if(StringUtil.isBlank(orderCode)){ log.warn(method+"订单不能为空 trayCode={}",trayCode); return R.fail(403,"打托方式不能为空"); } @@ -480,9 +480,12 @@ public class WarehouseTrayTypeApiController { public R updateZeroOrderNumByTrayCode(@RequestBody TrayTypeDTO trayTypeDTO) { String method = "###########updateZeroOrderNumByTrayCode: "; log.info(method + "更新零担订单数量 trayTypeDTO={}", trayTypeDTO); - String orderCode = trayTypeDTO.getOrderCode();//订单自编码 - String trayCode = trayTypeDTO.getTrayCode();//托盘码 - Integer num = trayTypeDTO.getNum();//数量 + //订单自编码 + String orderCode = trayTypeDTO.getOrderCode(); + //托盘码 + String trayCode = trayTypeDTO.getTrayCode(); + //数量 + Integer num = trayTypeDTO.getNum(); try{ BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); @@ -490,11 +493,11 @@ public class WarehouseTrayTypeApiController { log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); return R.fail(403,"仓库信息为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘号不能为空 trayCode={}",trayCode); return R.fail(403,"托盘号不能为空"); } - if(!StringUtil.hasLength(orderCode)){ + if(StringUtil.isBlank(orderCode)){ log.warn(method+"订单不能为空 orderCode={}",orderCode); return R.fail(403,"订单不能为空"); } @@ -524,10 +527,11 @@ public class WarehouseTrayTypeApiController { public R zeroOrderUpdateRemark(@RequestBody TrayTypeDTO trayTypeDTO) { String method = "###########updateZeroOrderNumByTrayCode: "; log.info(method + "更新零担订单数量 trayTypeDTO={}", trayTypeDTO); - String trayCode = trayTypeDTO.getTrayCode();//托盘码 + //托盘码 + String trayCode = trayTypeDTO.getTrayCode(); String remark = trayTypeDTO.getRemark(); try{ - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘号不能为空 trayCode={}",trayCode); return R.fail(403,"托盘号不能为空"); } @@ -597,7 +601,7 @@ public class WarehouseTrayTypeApiController { return R.fail(403,"仓库信息为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘码不能为空 trayCode={}",trayCode); return R.fail(403,"托盘码不能为空"); } @@ -644,15 +648,15 @@ public class WarehouseTrayTypeApiController { return R.fail(403,"仓库信息为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘码不能为空 trayCode={}",trayCode); return R.fail(403,"托盘码不能为空"); } - if(!StringUtil.hasLength(trayType)){ + if(StringUtil.isBlank(trayType)){ log.warn(method+"打托方式不能为空 trayType={}",trayType); return R.fail(403,"打托方式不能为空"); } - if(!StringUtil.hasLength(orderPackageCode)){ + if(StringUtil.isBlank(orderPackageCode)){ log.warn(method+"包条码不能为空 orderPackageCode={}",orderPackageCode); return R.fail(403,"包条码不能为空"); } @@ -777,7 +781,7 @@ public class WarehouseTrayTypeApiController { return R.fail(403,"仓库信息为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘码不能为空 trayCode={}",trayCode); return R.fail(403,"托盘码不能为空"); } @@ -827,7 +831,7 @@ public class WarehouseTrayTypeApiController { log.warn(method+"商场id不能为空 marketId={}",marketId); return R.fail(403,"商场id不能为空"); } - if(!StringUtil.hasLength(materialCode)){ + if(StringUtil.isBlank(materialCode)){ log.warn(method+"物料编码不能为空 materialCode={}",materialCode); return R.fail(403,"物料编码不能为空"); } @@ -863,7 +867,7 @@ public class WarehouseTrayTypeApiController { log.warn(method+"商场id不能为空 marketId={}",marketId); return R.fail(403,"商场id不能为空"); } - if(!StringUtil.hasLength(materialName)){ + if(StringUtil.isBlank(materialName)){ log.warn(method+"物料名称不能为空 materialCode={}",materialName); return R.fail(403,"物料名称不能为空"); } @@ -898,19 +902,19 @@ public class WarehouseTrayTypeApiController { return R.fail(403,"仓库信息不能为空"); } - if(!StringUtil.hasLength(trayCode)){ + if(StringUtil.isBlank(trayCode)){ log.warn(method+"托盘码不能为空 trayCode={}",trayCode); return R.fail(403,"托盘码不能为空"); } - if(!StringUtil.hasLength(trayType)){ + if(StringUtil.isBlank(trayType)){ log.warn(method+"打托方式不能为空 trayType={}",trayType); return R.fail(403,"打托方式不能为空"); } - if(!StringUtil.hasLength(materialCode)){ + if(StringUtil.isBlank(materialCode)){ log.warn(method+"物料编码不能为空 materialCode={}",materialCode); return R.fail(403,"物料编码不能为空"); } - if(!StringUtil.hasLength(incomingBatch)){ + if(StringUtil.isBlank(incomingBatch)){ log.warn(method+"批次号不能为空 incomingBatch={}",incomingBatch); return R.fail(403,"批次号不能为空"); }