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 5c8e470de..8617c95df 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 @@ -15,6 +15,7 @@ public class DictBizConstant { public static final String BASIC_GROUNDING = "basic_grounding";//上架状态 public static final String STOCKUP_STATUS = "stockup_status";//备货状态 + public static final String ORDER_STOCKUP_STATUS = "order_stockup_status";//订单备货状态 public static final String ORDER_RESERVATION_STATUS = "order_reservation_status";//订单预约状态 public static final String RESERVATION_STATUS = "reservation_status";//预约状态 @@ -103,4 +104,6 @@ public class DictBizConstant { public static final String ORDER_PACKAGE_LOADING_STATUS = "order_package_loading_status";//预约签收状态 // --------------2023-10-12 --------------------- public static final String WAREHOUSE_QUEST_STATUS = "warehouse_quest_status"; //盘点任务 + // --------------2023-11-04 --------------------- + public static final String WAREHOUSE_RETENTION_TYPE = "warehouse_retention_type"; //滞留类型 } diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/retention/RetentionTypeConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/retention/RetentionTypeConstant.java new file mode 100644 index 000000000..eca334cad --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/retention/RetentionTypeConstant.java @@ -0,0 +1,47 @@ +package org.springblade.common.constant.retention; + +/** + * 订单冻结状态枚举 + * 对应码表 freeze_status + * @author pref + */ +public enum RetentionTypeConstant { + + zhuangchezhiliu("装车滞留",1), + peisongzhiliu("配送滞留",2), + chukuzhiliu("出库滞留",3), + quxiaozhiliu("取消滞留",4); + + + /** + * 状态 + */ + private String name; + + /** + * 值 + */ + private Integer value; + + + private RetentionTypeConstant(String name, Integer value) { + this.name = name; + this.value = value; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getValue() { + return value; + } + + public void setValue(Integer value) { + this.value = value; + } +} 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 50e716e84..a1c46e492 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 @@ -141,6 +141,61 @@ public class DistributionParcelListEntity extends TenantEntity { @ApiModelProperty(value = "客户id") @TableField(exist = false) private Long marketId; + + /** + * 商场名称 + */ + @ApiModelProperty(value = "商场名称") + @TableField(exist = false) + private String mallName; + /** + * 商场名称 + */ + @ApiModelProperty(value = "分类") + @TableField(exist = false) + private String genre; + /** + * 商场名称 + */ + @ApiModelProperty(value = "零担标识") + @TableField(exist = false) + private String isZero; + /** + * 商场名称 + */ + @ApiModelProperty(value = "商场iD") + @TableField(exist = false) + private Long mallId; + /** + * 托盘ID + */ + @ApiModelProperty(value = "托盘ID") + @TableField(exist = false) + private String trayId; + /** + * 托盘编码 + */ + @ApiModelProperty(value = "托盘编码") + @TableField(exist = false) + private String trayCode; + /** + * 货位ID + */ + @ApiModelProperty(value = "货位ID") + @TableField(exist = false) + private String allocationId; + /** + * 完整货位 + */ + @ApiModelProperty(value = "完整货位") + @TableField(exist = false) + private String positionCode; + /** + * 库存品ID + */ + @ApiModelProperty(value = "库存品ID") + @TableField(exist = false) + private Long stockId; /** * 物料Id */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java index 2ff7f4ef8..a64c8eef3 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java @@ -275,11 +275,11 @@ public class DistributionStockListEntity extends TenantEntity { */ @ApiModelProperty(value = "拆包ID") private Long pid; - /** - * 托盘ID - */ - @ApiModelProperty(value = "托盘ID") - private Long trayId; +// /** +// * 托盘ID +// */ +// @ApiModelProperty(value = "托盘ID") +// private Long trayId; /** * 托盘名称 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java index 1a5e61d73..c21ea65c6 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java @@ -78,6 +78,13 @@ public class DistributionStockupEntity extends TenantEntity { */ @ApiModelProperty(value = "备货库位") private String stockipAllocation; + + /** + * 托盘位 + */ + @ApiModelProperty(value = "托盘位") + @TableField(exist = false) + private String pallet; /** * 备货区ID */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java index 58513da3f..5ec37bca8 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java @@ -16,13 +16,18 @@ */ package com.logpm.distribution.feign; +import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity; import com.logpm.distribution.entity.DistributionDeliveryListEntity; +import com.logpm.distribution.vo.DistributionDeliveryListVO; +import com.logpm.distribution.vo.DistributionDeliverySelfVO; import org.springblade.common.constant.ModuleNameConstant; import org.springblade.core.mp.support.BladePage; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; +import java.util.List; + /** * 配送管理 Feign接口类 * @@ -45,6 +50,15 @@ public interface IDistributionDeliveryListClient { * @return BladePage */ @GetMapping(TOP) - BladePage top(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + BladePage deliveryListTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + + + /** + * 根据配送任务ID查询配送司机信息 + * @param deliveryId + * @return + */ + @GetMapping(TOP+"/getDeliveryDriverInfo") + DistributionDeliveryListVO getDeliveryDriverInfo(@RequestParam("current") Long deliveryId); } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java index ec567b9fe..6b56d4cd6 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java @@ -17,6 +17,8 @@ package com.logpm.distribution.feign; import com.logpm.distribution.entity.DistributionParcelListEntity; +import com.logpm.distribution.entity.DistributionStockArticleEntity; +import com.logpm.distribution.vo.DistributionParcelListVO; import org.springblade.common.constant.ModuleNameConstant; import org.springblade.core.mp.support.BladePage; import org.springframework.cloud.openfeign.FeignClient; @@ -41,6 +43,7 @@ public interface IDistributionParcelListClient { String API_PREFIX = "/client"; String TOP = API_PREFIX + "/top1"; String TOPPARCELLIST = API_PREFIX + "/getParcelList"; + String GETPARCELLISTINFO = API_PREFIX + "/getParcelListInfo"; @PostMapping(TOPPARCELLIST) List getParcelList(@RequestBody DistributionParcelListEntity parcelListEntity); @@ -102,4 +105,7 @@ public interface IDistributionParcelListClient { @GetMapping(API_PREFIX+"/updateStockArticleIdByOrderCode") void updateStockArticleIdByOrderCode(@RequestParam Long orderId, @RequestParam String orderCode); + + @PostMapping(GETPARCELLISTINFO) + List getParcelListInfo(@RequestBody DistributionParcelListVO parcelListVO); } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java index 0d293de12..ec0864d28 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java @@ -41,6 +41,7 @@ public interface IDistributionStockArticleClient { String API_PREFIX = "/client"; String TOP = API_PREFIX + "/top12"; + String GETSTOCKARTICLEINFO = API_PREFIX + "/getStockArticleInfo"; /** * 获取配送在库订单列表 @@ -104,4 +105,11 @@ public interface IDistributionStockArticleClient { @GetMapping(API_PREFIX + "/submitHandleNumByOrderId") void submitHandleNumByOrderId(@RequestParam Integer subNum, @RequestParam Long articleId); + + /** + * 查询订单信息数据 + * @return + */ + @PostMapping(GETSTOCKARTICLEINFO) + List getStockArticleInfo(@RequestBody DistributionStockArticleEntity distributionStockArticleEntity); } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java index c261acfd2..07efc59be 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java @@ -47,6 +47,7 @@ public interface IDistributionStockListClient { String ADDSTOCKLIST = API_PREFIX + "/addStockList"; String UPDATESTOCKLIST = API_PREFIX + "/updateStockList"; String PUTSTOCKLIST = API_PREFIX + "/putStockList"; + String GETSTOCKLISTINFO = API_PREFIX + "/getStockListInfo"; /** * 获取库存品管理列表 @@ -116,12 +117,12 @@ public interface IDistributionStockListClient { List getStockListByWarehouseIdAndMarketAndStockListInfo(@RequestParam("incomingBatch") String incomingBatch,@RequestParam("marketNames") List marketNames,@RequestParam("warehouseId") Long warehouseId); -// /** -// * 修改某个客户信息及物品信息 -// * -// * @return BladePage -// */ -// @PutMapping(PUTSTOCKLIST) -// Boolean putStockList(@RequestBody DistributionStockListEntity distributionStockListEntity); + /** + * 修改某个客户信息及物品信息 + * + * @return BladePage + */ + @PostMapping(GETSTOCKLISTINFO) + List getStockListInfo(@RequestBody DistributionStockListEntity distributionStockListEntity); } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java index 1523e5f82..961be6fd0 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java @@ -100,6 +100,19 @@ public class DistributionParcelListVO extends DistributionParcelListEntity { */ private List warehouseIdList; + /** + * 商场id + */ + private Long mallId; + /** + * 商场id + */ + private String genre; + /** + * 商场id + */ + private String isZero; + /** * 装车数量 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java index f379ca68a..dfd0e25a6 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java @@ -38,11 +38,21 @@ public class DistributionParcelListZeroVO implements Serializable { */ @ApiModelProperty(value = "填写数量") private Integer TiQuantity; + /** + * 冻结数量 + */ + @ApiModelProperty(value = "冻结数量") + private Integer deliveryQuantity; /** * 配送数量 */ @ApiModelProperty(value = "配送数量") - private Integer deliveryQuantity; + private Integer reservationQuantity; + /** + * 配送数量 + */ + @ApiModelProperty(value = "出库数量") + private Integer outboundQuantity; diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java new file mode 100644 index 000000000..1fc248fae --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java @@ -0,0 +1,84 @@ +package com.logpm.distribution.vo; + + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 滞留扫描对象 + */ +@Data +//@EqualsAndHashCode(callSuper = true) +public class DistributionRetentionScanVo { + + /** + * 预约Id + */ + private Long reservationId; + + /** + * 预约Id + */ + private String reservationCode; + + /** + * 订单Id + */ + private Long orderId; + + /** + * 订单自编码 + */ + private String orderCode; + + /** + * 订单Id + */ + private Long inventoryId; + + + + /** + * 物料编码 + */ + private String materialNumber; + + /** + * 物料名称 + */ + private String materialName; + + /** + * 包件ID + */ + private Long orderPackageId; + + /** + * 包条码 + */ + private String orderPackageCode; + + /** + * 滞留数量 + */ + private Integer retentionQuantity; + + /** + * 类型 + */ + private Integer conditions; + + + /** + * 配送ID + */ + private Long deliveryId; + + + /** + * 配送车次 + */ + private String trainNumber; + + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java index 99c8f0977..b7e23522d 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java @@ -102,10 +102,30 @@ public class DistributionStockListVO extends DistributionStockListEntity { */ @ApiModelProperty(value = "托盘id") private String trayCode; + /** + * 托盘id + */ + @ApiModelProperty(value = "托盘id") + private String trayId; + /** + * 库位id + */ + @ApiModelProperty(value = "库位id") + private String allocationId; /** * 货位信息 */ @ApiModelProperty(value = "货位信息") private String positionCode; + /** + * 类型 + */ + @ApiModelProperty(value = "类型") + private Integer conditions; + /** + * 类型 + */ + @ApiModelProperty(value = "shan") + private String mallName; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java index 80558e1aa..0f7f40d7b 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java @@ -33,6 +33,8 @@ public class DistributionStockupOrderListVO implements Serializable { private Long areaId; //货区id private String trayId; //托盘id + private String customerAddress; //客户地址 + private String firstsNumber; //品类数量 private Long shelfId; //货架id private Long parcelListId; //包件id private Long stockId; //备货id diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java index b7f18520b..718cacf3b 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java @@ -72,6 +72,7 @@ public class DistributionStockupVO extends DistributionStockupEntity { private Integer number; private String goodsAllocation; //货位 private String stockipAllocation; //货位 + private String pallet; //托盘位 private Integer reservationStockListNum; //数量 private String reservationId; //预约ID private String stockListId; //库存品ID 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 59111d0c7..9f74fbb14 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 @@ -102,11 +102,5 @@ public class TrunklineBillladingEntity extends TenantEntity { /** 结算人名称 */ @ApiModelProperty(name = "结算人名称",notes = "") private String settlementName ; - /** 备注 */ - @ApiModelProperty(name = "备注",notes = "") - private String remark ; - /** 创建用户名称 */ - @ApiModelProperty(name = "创建用户名称",notes = "") - private String createUserName ; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java new file mode 100644 index 000000000..c7b09f2e7 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java @@ -0,0 +1,56 @@ +package com.logpm.trunkline.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +@Data +@TableName("logpm_trunkline_billlading_line") +@ApiModel(value = "TrunklineBillladingLine对象", description = "干线提货线路表") +@EqualsAndHashCode(callSuper = true) +public class TrunklineBillladingLineEntity extends TenantEntity { + + /** 预留1 */ + @ApiModelProperty(name = "预留1",notes = "") + private String reserve1 ; + /** 预留2 */ + @ApiModelProperty(name = "预留2",notes = "") + private String reserve2 ; + /** 预留3 */ + @ApiModelProperty(name = "预留3",notes = "") + private String reserve3 ; + /** 预留4 */ + @ApiModelProperty(name = "预留4",notes = "") + private String reserve4 ; + /** 预留5 */ + @ApiModelProperty(name = "预留5",notes = "") + private String reserve5 ; + /** 仓库id */ + @ApiModelProperty(name = "仓库id",notes = "") + private Long warehouseId ; + /** 仓库名称 */ + @ApiModelProperty(name = "仓库名称",notes = "") + private String warehouseName ; + /** 提货单id */ + @ApiModelProperty(name = "提货单id",notes = "") + private Long billladingId ; + /** 客户类型 1 工厂 2 商场 3装饰 4个人 */ + @ApiModelProperty(name = "客户类型 1 工厂 2 商场 3装饰 4个人",notes = "") + private String clientType ; + /** 联系人 */ + @ApiModelProperty(name = "联系人",notes = "") + private String linkMan ; + /** 联系电话 */ + @ApiModelProperty(name = "联系电话",notes = "") + private String linkPhone ; + /** 联系人地址 */ + @ApiModelProperty(name = "联系人地址",notes = "") + private String linkAddress ; + /** 排序 */ + @ApiModelProperty(name = "排序",notes = "") + private Integer sort ; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java index 342ffba59..fdb0bfc92 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java @@ -37,5 +37,8 @@ public class TrunklineBillladingPackageEntity extends TenantEntity { /** 包件码 */ @ApiModelProperty(name = "包件码",notes = "") private String orderPackageCode ; + /** 提货单id */ + @ApiModelProperty(name = "提货单id",notes = "") + private Long billladingId ; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java index 36b631c8e..a4b2603e2 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java @@ -7,17 +7,12 @@ import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; -import java.math.BigDecimal; - @Data @TableName("logpm_trunkline_billlading_waybill") @ApiModel(value = "TrunklineBillladingWaybill对象", description = "提货运单关联表") @EqualsAndHashCode(callSuper = true) public class TrunklineBillladingWaybillEntity extends TenantEntity { - /** 预留1 */ - @ApiModelProperty(name = "预留1",notes = "") - private String reserve1 ; /** 预留2 */ @ApiModelProperty(name = "预留2",notes = "") private String reserve2 ; @@ -47,10 +42,10 @@ public class TrunklineBillladingWaybillEntity extends TenantEntity { private Integer realNum ; /** 提货重量 */ @ApiModelProperty(name = "提货重量",notes = "") - private BigDecimal realWeight ; + private Double realWeight ; /** 提货体积 */ @ApiModelProperty(name = "提货体积",notes = "") - private BigDecimal realVolume ; + private Double realVolume ; } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java new file mode 100644 index 000000000..c838d6de1 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java @@ -0,0 +1,11 @@ +package com.logpm.trunkline.vo; + +import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import lombok.Data; + +@Data +public class TrunklineBillladingLineVO extends TrunklineBillladingLineEntity { + + + +} diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java index 2669c6ad3..798fcaac4 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java @@ -16,6 +16,7 @@ */ package com.logpm.warehouse.entity; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -23,6 +24,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; +import java.util.List; + /** * 盘点明细 实体类 * @@ -120,6 +123,13 @@ public class QuestDetailEntity extends TenantEntity { */ @ApiModelProperty(value = "在库数量") private Integer stockNum; + + + /** + * 商场名称 + */ + @TableField(exist = false) + private List marketNames; /** * 仓库id */ @@ -146,12 +156,12 @@ public class QuestDetailEntity extends TenantEntity { * 托盘id */ @ApiModelProperty(value = "托盘id") - private Long trayId; + private String trayId; /** * 货位id */ @ApiModelProperty(value = "货位id") - private Long allocationId; + private String allocationId; /** * 是否是新增数据 diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionRecordEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionRecordEntity.java index 75751929e..0dfae3096 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionRecordEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionRecordEntity.java @@ -138,4 +138,16 @@ public class WarehouseRetentionRecordEntity extends TenantEntity { @ApiModelProperty(value = "取消滞留备注") private String cancelRemark; + /** + * 任务Id + */ + @ApiModelProperty(value = "任务Id") + private Long taskId; + + /** + * 滞留数量 + */ + @ApiModelProperty(value = "滞留数量") + private Integer retentionQuantity; + } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java index 9482f7773..6fafd5599 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java @@ -38,7 +38,7 @@ import java.io.Serializable; @Data @TableName("logpm_warehouse_retention_scan") @ApiModel(value = "WarehouseRetentionRecord对象", description = "滞留扫描记录") -public class WarehouseRetentionScanEntity extends TenantEntity implements Serializable { +public class WarehouseRetentionScanEntity extends TenantEntity { private static final long serialVersionUID = 1L; /** @@ -158,7 +158,7 @@ public class WarehouseRetentionScanEntity extends TenantEntity implements Serial * 滞留扫描操作人Id */ @ApiModelProperty(value = "滞留扫描操作人Id") - private String retentionScanUserId; + private Long retentionScanUserId; /** * 滞留操作备注 */ @@ -178,6 +178,12 @@ public class WarehouseRetentionScanEntity extends TenantEntity implements Serial * 配送任务ID */ @ApiModelProperty(value = "配送任务ID") - private Long deliveryListId; + private Long deliveryId; + + /** + * 配送任务ID + */ + @ApiModelProperty(value = "配送任务ID") + private Long refId; } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java index 17bf7aca0..11fc23016 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java @@ -19,8 +19,11 @@ package com.logpm.warehouse.feign; import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import org.springblade.core.mp.support.BladePage; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; /** @@ -47,4 +50,12 @@ public interface IWarehouseRetentionScanClient { @GetMapping(TOP) BladePage retentionScanTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + + /** + * 保存扫描记录 + * @return BladePage + */ + @PostMapping(TOP+"/saveRetentionScan") + R saveRetentionScan(@RequestBody WarehouseRetentionScanEntity warehouseRetentionScanEntity); + } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionRecordVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionRecordVO.java index d2da6d1a2..b18f4ac00 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionRecordVO.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionRecordVO.java @@ -20,6 +20,8 @@ import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.List; + /** * 滞留记录 视图实体类 * @@ -31,4 +33,9 @@ import lombok.EqualsAndHashCode; public class WarehouseRetentionRecordVO extends WarehouseRetentionRecordEntity { private static final long serialVersionUID = 1L; + + private List retentionScanVOList; + + private String retentionTypeName; + } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java index f2397a0df..c5bce739d 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java @@ -269,6 +269,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl data, Boolean isCovered) { log.info("客户导入数据"); List storeContactEntities = new ArrayList<>(); // 联系人 @@ -418,6 +419,9 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl map = new HashMap<>(); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java index 5a7b18122..f008f3534 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java @@ -244,12 +244,7 @@ public class DistributionDeliveryListController extends BladeController { @ApiOperationSupport(order = 9) @ApiOperation(value = "导出数据", notes = "传入distributionDeliveryList") public void exportDistributionDeliveryList(@ApiIgnore @RequestParam Map distributionDeliveryList, BladeUser bladeUser, HttpServletResponse response) { - QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionDeliveryList, DistributionDeliveryListEntity.class); - //if (!AuthUtil.isAdministrator()) { - // queryWrapper.lambda().eq(DistributionDeliveryList::getTenantId, bladeUser.getTenantId()); - //} - queryWrapper.lambda().eq(DistributionDeliveryListEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); - List list = distributionDeliveryListService.exportDistributionDeliveryList(queryWrapper); + List list = distributionDeliveryListService.exportDistributionDeliveryList(distributionDeliveryList); ExcelUtil.export(response, "配送管理数据" + DateUtil.time(), "配送管理数据表", list, DistributionDeliveryListExcel.class); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java index 7ca33b4aa..184ff88d9 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java @@ -163,10 +163,10 @@ public class DistributionParcelListController extends BladeController { /** * 修改零担在库数量 */ - @GetMapping("/zeroUpdateMaterial") + @PutMapping("/zeroUpdateMaterial") @ApiOperationSupport(order = 2) @ApiOperation(value = "修改零担在库数量", notes = "传入distributionParcelList") - public R> getZeroUpdateMaterial(@ApiIgnore @RequestParam Map distributionParcelList, Query query) { + public R> getZeroUpdateMaterial(@RequestBody Map distributionParcelList, Query query) { int a = distributionParcelListService.getZeroUpdateMaterial(distributionParcelList); return a > 0 ? R.success("修改成功!") : R.fail("修改失败!"); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java index 837dae2b5..4b4578a50 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java @@ -183,12 +183,8 @@ public class DistributionReservationController extends BladeController { @ApiOperationSupport(order = 9) @ApiOperation(value = "导出数据", notes = "传入distrbutionReservation") public void exportDistrbutionReservation(@ApiIgnore @RequestParam Map distrbutionReservation, BladeUser bladeUser, HttpServletResponse response) { - QueryWrapper queryWrapper = Condition.getQueryWrapper(distrbutionReservation, DistributionReservationEntity.class); - //if (!AuthUtil.isAdministrator()) { - // queryWrapper.lambda().eq(DistrbutionReservation::getTenantId, bladeUser.getTenantId()); - //} - queryWrapper.lambda().eq(DistributionReservationEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); - List list = reservationService.exportDistrbutionReservation(queryWrapper); + + List list = reservationService.exportDistrbutionReservation(distrbutionReservation); ExcelUtil.export(response, "预约列表数据" + DateUtil.time(), "预约列表数据表", list, DistributionReservationExcel.class); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java index 33ca15b5d..7405a4d1f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java @@ -255,13 +255,10 @@ public class DistributionSignforController extends BladeController { @PostMapping("/update") @ApiOperationSupport(order = 5) @ApiOperation(value = "修改", notes = "传入distributionSignfor") - public R update(@Valid @RequestBody DistributionSignforEntity distributionSignfor) { - distributionSignfor.setSigneeId(AuthUtil.getUser().getUserId()); - distributionSignfor.setSigneeName(AuthUtil.getUser().getUserName()); - Date date = new Date(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - distributionSignfor.setSigningTime(sdf.format(date)); - return R.status(distributionSignforService.updateById(distributionSignfor)); + public R update(@Valid @RequestBody DistributionSignforDTO distributionSignfor) { + R r = distributionSignforService.updateSign(distributionSignfor); +// return R.status(distributionSignforService.updateById(distributionSignfor)); + return r; } /** @@ -314,4 +311,19 @@ public class DistributionSignforController extends BladeController { } +// /** +// * 签收管理 修改签收照片信息 +// */ +// @PutMapping("/updatePCPicture") +// @ApiOperationSupport(order = 4) +// @ApiOperation(value = "修改签收照片信息", notes = "修改签收照片信息") +// public R updatePCPicture(@Valid @RequestBody DistributionSignforDTO distributionSignfor) { +// if(ObjectUtil.isNotEmpty(distributionSignfor.getReservationId())){ +// return R.data(distributionSignforService.updatePicture(distributionSignfor)); +// }else { +// return R.fail(3002,"参数不能为空不对!!"); +// } +// } + + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionRetentionScanDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionRetentionScanDTO.java new file mode 100644 index 000000000..53be07ca2 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionRetentionScanDTO.java @@ -0,0 +1,71 @@ +package com.logpm.distribution.dto; + + +import lombok.Data; + +/** + * 滞留扫描对象 + */ +@Data +//@EqualsAndHashCode(callSuper = true) +public class DistributionRetentionScanDTO { + + /** + * 预约Id + */ + private Long reservationId; + + /** + * 预约Id + */ + private String reservationCode; + + /** + * 订单Id + */ + private Long orderId; + + /** + * 订单自编码 + */ + private Long orderCode; + + /** + * 订单Id + */ + private Long inventoryId; + + + + /** + * 物料编码 + */ + private String materialNumber; + + /** + * 物料名称 + */ + private String materialName; + + /** + * 包件ID + */ + private Long orderPackageId; + + /** + * 包条码 + */ + private Long orderPackageCode; + + /** + * 滞留数量 + */ + private Long retentionQuantity; + + /** + * 类型 + */ + private Integer conditions; + + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java index da4d212ec..1ec1cb490 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java @@ -45,6 +45,12 @@ public class DistrilbutionloadingscanDTO { @ApiModelProperty(value = "预约Id") private Long orderId; + /** + * 订单自编码 + */ + @ApiModelProperty(value = "预约Id") + private String orderCode; + // /** // * 扫描类型 @@ -88,6 +94,13 @@ public class DistrilbutionloadingscanDTO { // @NotEmpty(message = "扫描物品不能为空") private Integer type; + /** + * 滞留扫描类型 + */ + @ApiModelProperty(value = "扫描物品(1-包条,2-订单,3-托盘)") +// @NotEmpty(message = "扫描物品不能为空") + private Integer retentionType; + /** * 是否库存品 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java index 3f03bdb3f..8c7ee8cdc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java @@ -41,71 +41,37 @@ public class DistributionDeliveryListExcel implements Serializable { private static final long serialVersionUID = 1L; + /** - * 租户号 - */ - @ColumnWidth(20) - @ExcelProperty("租户号") - private String tenantId; - /** - * 是否已删除 - */ - @ColumnWidth(20) - @ExcelProperty("是否已删除") - private Integer isDeleted; - /** - * 预留1 - */ - @ColumnWidth(20) - @ExcelProperty("预留1") - private String reserve1; - /** - * 预留2 - */ - @ColumnWidth(20) - @ExcelProperty("预留2") - private String reserve2; - /** - * 预留3 - */ - @ColumnWidth(20) - @ExcelProperty("预留3") - private String reserve3; - /** - * 预留4 - */ - @ColumnWidth(20) - @ExcelProperty("预留4") - private String reserve4; - /** - * 预留5 + * 车次 */ @ColumnWidth(20) - @ExcelProperty("预留5") - private String reserve5; + @ExcelProperty("车次") + private String trainNumber; /** * 车次 */ @ColumnWidth(20) - @ExcelProperty("车次") - private String trainNumber; + @ExcelProperty("配送日期") + private String taskTime; + /** * 仓库 */ @ColumnWidth(20) @ExcelProperty("仓库") - private String warehouse; + private String warehouseName; /** * 配送类型;1-自主配送,2-三方配送 */ @ColumnWidth(20) - @ExcelProperty("配送类型;1-自主配送,2-三方配送") + @ExcelProperty("配送类型") private String type; /** * 配送种类;1-市配,2-商配 */ @ColumnWidth(20) - @ExcelProperty("配送种类;1-市配,2-商配") + @ExcelProperty("配送种类") private String kind; /** * 配送车辆 @@ -123,13 +89,13 @@ public class DistributionDeliveryListExcel implements Serializable { * 配送公司;1-货拉拉,2-京东 */ @ColumnWidth(20) - @ExcelProperty("配送公司;1-货拉拉,2-京东") + @ExcelProperty("配送公司") private String distributionCompany; /** * 配送状态;1-配送中,2-已完成 */ @ColumnWidth(20) - @ExcelProperty("配送状态;1-配送中,2-已完成") + @ExcelProperty("配送状态") private String state; /** * 配送客户数 @@ -143,12 +109,12 @@ public class DistributionDeliveryListExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("配送价格") private BigDecimal price; - /** - * 增值服务表id - */ - @ColumnWidth(20) - @ExcelProperty("增值服务表id") - private Integer addedServicesId; +// /** +// * 增值服务表id +// */ +// @ColumnWidth(20) +// @ExcelProperty("增值服务表id") +// private Integer addedServicesId; /** * 订单总数 */ @@ -159,8 +125,14 @@ public class DistributionDeliveryListExcel implements Serializable { * 配送件数 */ @ColumnWidth(20) - @ExcelProperty("配送件数") + @ExcelProperty("配送包件数") private Integer deliveryNumber; + /** + * 配送件数 + */ + @ColumnWidth(20) + @ExcelProperty("配送库存品数") + private Integer inventoryNub; /** * 扫描件数 */ @@ -173,11 +145,11 @@ public class DistributionDeliveryListExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("装卸班组") private String loadingTeam; - /** - * 预约表id - */ - @ColumnWidth(20) - @ExcelProperty("预约表id") - private String reservationId; +// /** +// * 预约表id +// */ +// @ColumnWidth(20) +// @ExcelProperty("预约表id") +// private String reservationId; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationExcel.java index 813edddaa..94227f448 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationExcel.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationExcel.java @@ -42,24 +42,44 @@ public class DistributionReservationExcel implements Serializable { private static final long serialVersionUID = 1L; + + /** + * 订单自编号;订单自编号,关联订单表 + */ + @ColumnWidth(20) + @ExcelProperty("预约单编号") + private String reservationCode; + /** + * 订单自编号;订单自编号,关联订单表 + */ + @ColumnWidth(20) + @ExcelProperty("订单号") + private String orderCode; /** - * 租户号 + * 订单自编号;订单自编号,关联订单表 */ @ColumnWidth(20) - @ExcelProperty("租户号") - private String tenantId; + @ExcelProperty("服务号") + private String serviceNumber; /** - * 是否已删除 + * 订单自编号;订单自编号,关联订单表 */ @ColumnWidth(20) - @ExcelProperty("是否已删除") - private Integer isDeleted; + @ExcelProperty("仓库") + private String warehouseName; /** * 订单自编号;订单自编号,关联订单表 */ @ColumnWidth(20) - @ExcelProperty("订单自编号;订单自编号,关联订单表") - private String orderId; + @ExcelProperty("商场") + private String mallName; + /** + * 订单自编号;订单自编号,关联订单表 + */ + @ColumnWidth(20) + @ExcelProperty("门店") + private String storeName; + /** * 收货人 */ @@ -78,18 +98,43 @@ public class DistributionReservationExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("预约时间") private Date reservationData; + /** + * 预约时间 + */ + @ColumnWidth(20) + @ExcelProperty("预约包件数") + private Integer reservationNumber; + /** + * 预约时间 + */ + @ColumnWidth(20) + @ExcelProperty("预约库存品数") + private Integer stockListNumber; + /** + * 预约时间 + */ + @ColumnWidth(20) + @ExcelProperty("待收货款") + private BigDecimal dueSincere; + + /** + * 预约时间 + */ + @ColumnWidth(20) + @ExcelProperty("时段") + private String periodTimeName; /** * 服务类型;预约服务类型;1-上楼、2-超区、3-拆样、4-平移、5-分拣、6-搬运、7-返货; */ @ColumnWidth(20) - @ExcelProperty("服务类型;预约服务类型;1-上楼、2-超区、3-拆样、4-平移、5-分拣、6-搬运、7-返货;") - private String serveType; + @ExcelProperty("服务类型") + private String serveTypeName; /** * 配送方式;预约添加送货方式;1-送货(商配的唯一方式)、2-送货上楼、3-送装一体、4-装 */ @ColumnWidth(20) - @ExcelProperty("配送方式;预约添加送货方式;1-送货(商配的唯一方式)、2-送货上楼、3-送装一体、4-装") - private String deliveryType; + @ExcelProperty("配送方式") + private String deliveryTypeName; /** * 到付运费 */ @@ -107,66 +152,48 @@ public class DistributionReservationExcel implements Serializable { */ @ColumnWidth(20) @ExcelProperty("代付运费") - private String replaceFee; + private BigDecimal replaceFee; /** * 收件人电话 */ @ColumnWidth(20) @ExcelProperty("收件人电话") private String deliveryPhone; +// /** +// * 预约信息状态;预约列表信息状态;1-待确认、2-已确认 +// */ +// @ColumnWidth(20) +// @ExcelProperty("预约信息状态;预约列表信息状态;1-待确认、2-已确认") +// private String resvervationStatus; /** * 预约信息状态;预约列表信息状态;1-待确认、2-已确认 */ @ColumnWidth(20) - @ExcelProperty("预约信息状态;预约列表信息状态;1-待确认、2-已确认") - private String resvervationStatus; - /** - * 订单来源 - */ - @ColumnWidth(20) - @ExcelProperty("订单来源") - private String orderSource; + @ExcelProperty("预约信息状态") + private String resvervationStatusName; +// /** +// * 订单来源 +// */ +// @ColumnWidth(20) +// @ExcelProperty("订单来源") +// private String orderSource; +// /** +// * 备货状态;备货状态;1-未备货、2-待备货、3-已备货 +// */ +// @ColumnWidth(20) +// @ExcelProperty("备货状态") +// private String stockupStatus; /** * 备货状态;备货状态;1-未备货、2-待备货、3-已备货 */ @ColumnWidth(20) - @ExcelProperty("备货状态;备货状态;1-未备货、2-待备货、3-已备货") - private String stockupStatus; - /** - * 备货区编号 - */ - @ColumnWidth(20) - @ExcelProperty("备货区编号") - private String goodsShelfId; - /** - * 预留1 - */ - @ColumnWidth(20) - @ExcelProperty("预留1") - private String reserve1; - /** - * 预留2 - */ - @ColumnWidth(20) - @ExcelProperty("预留2") - private String reserve2; - /** - * 预留3 - */ - @ColumnWidth(20) - @ExcelProperty("预留3") - private String reserve3; - /** - * 预留4 - */ - @ColumnWidth(20) - @ExcelProperty("预留4") - private String reserve4; - /** - * 预留5 - */ - @ColumnWidth(20) - @ExcelProperty("预留5") - private String reserve5; + @ExcelProperty("备货状态") + private String stockupStatusName; +// /** +// * 备货区编号 +// */ +// @ColumnWidth(20) +// @ExcelProperty("备货区编号") +// private String goodsShelfId; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java index 18f4d6d18..7271c787b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java @@ -19,6 +19,8 @@ package com.logpm.distribution.feign; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.entity.DistributionDeliveryListEntity; import com.logpm.distribution.service.IDistributionDeliveryListService; +import com.logpm.distribution.vo.DistributionDeliveryListVO; +import com.logpm.distribution.vo.DistributionDeliverySelfVO; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; @@ -27,6 +29,8 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; +import java.util.List; + /** * 配送管理 Feign实现类 * @@ -42,7 +46,7 @@ public class DistributionDeliveryListClient implements IDistributionDeliveryList @Override @GetMapping(TOP) - public BladePage top(Integer current, Integer size) { + public BladePage deliveryListTop(Integer current, Integer size) { Query query = new Query(); query.setCurrent(current); query.setSize(size); @@ -50,4 +54,9 @@ public class DistributionDeliveryListClient implements IDistributionDeliveryList return BladePage.of(page); } + @Override + public DistributionDeliveryListVO getDeliveryDriverInfo(Long deliveryId) { + return distributionDeliveryListService.getDeliveryList(deliveryId); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java index 1d15ec402..e8a8bb27b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java @@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.service.IDistributionParcelListService; +import com.logpm.distribution.vo.DistributionParcelListVO; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; @@ -172,4 +173,10 @@ public class DistributionParcelListClient implements IDistributionParcelListClie .eq("order_code",orderCode); distributionParcelListService.update(updateWrapper); } + + @Override + @PostMapping(GETPARCELLISTINFO) + public List getParcelListInfo(DistributionParcelListVO parcelListVO) { + return distributionParcelListService.getParcelListInfo(parcelListVO); + } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java index 049aaf615..934f29137 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java @@ -19,6 +19,8 @@ package com.logpm.distribution.feign; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity; import com.logpm.distribution.service.IDistributionParcelListService; @@ -191,4 +193,22 @@ public class DistributionStockArticleClient implements IDistributionStockArticle distributionStockArticleService.submitHandleNumByOrderId(subNum,articleId); } + /** + * 查询订单数据 + * @param stockArticleEntity + * @return + */ + @Override + @PostMapping(GETSTOCKARTICLEINFO) + public List getStockArticleInfo(DistributionStockArticleEntity stockArticleEntity) { + return distributionStockArticleService.list(Wrappers.query().lambda() + .eq(DistributionStockArticleEntity::getWarehouseId,stockArticleEntity.getWarehouseId()) + .eq(ObjectUtils.isNotNull(stockArticleEntity.getMallId()),DistributionStockArticleEntity::getMallId,stockArticleEntity.getMallId()) + .eq(ObjectUtils.isNotNull(stockArticleEntity.getId()),DistributionStockArticleEntity::getId,stockArticleEntity.getId()) + .eq(ObjectUtils.isNotNull(stockArticleEntity.getGenre()),DistributionStockArticleEntity::getGenre,stockArticleEntity.getGenre()) + .eq(ObjectUtils.isNotNull(stockArticleEntity.getIsZero()),DistributionStockArticleEntity::getIsZero,stockArticleEntity.getIsZero()) + ); + + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java index 01ce2518f..a6713755a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java @@ -173,4 +173,16 @@ public class DistributionStockListClient implements IDistributionStockListClient return distributionStockListService.list(stockListEntityLambdaQueryWrapper); } + /** + * 查询商场库存平 + * + * @param distributionStockListEntity + * @return + */ + @Override + @PostMapping(GETSTOCKLISTINFO) + public List getStockListInfo(DistributionStockListEntity distributionStockListEntity) { + return distributionStockListService.getStockListInfo(distributionStockListEntity); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml index 03c6f6906..71ac1382b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml @@ -235,6 +235,8 @@ ldsa.customer_name, ldsa.customer_telephone, ldsa.customer_address, + ldsa.total_number, + ldsa.hand_quantity, ldrs.reservation_num AS deliveryNumber, ldsa.description_goods descriptionGoods, ( @@ -278,7 +280,7 @@ ( select sum(loaded_nub) FROM logpm_distribution_loadscan AS ldl WHERE ldl.order_id=ldrs.stock_article_id and ldl.scan_status != 1 and ldl.reservation_id = lds.reservation_id - ) AS loadingNumber , + ) AS loadingNumber, ( select count(*) FROM logpm_distribution_stock AS lstock WHERE lstock.stock_article=ldrs.stock_article_id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java index d82d96d15..e2de4c10c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java @@ -57,7 +57,7 @@ public interface DistributionDeliveryListMapper extends BaseMapper exportDistributionDeliveryList(@Param("ew") Wrapper queryWrapper); + List exportDistributionDeliveryList(@Param("ew") Wrapper queryWrapper); /** * 商配车次 * @@ -410,4 +410,22 @@ public interface DistributionDeliveryListMapper extends BaseMapper selectDeliveryZeroOrderDetail(@Param("orderId") Long orderId,@Param("deliveryListId") Long deliveryId); + + /** + * 查询滞留库存品包件 + * @param stockPackageCode + * @param deliveryId + * @return + */ + DistributionRetentionScanVo selectRetentionInventoryPackage(@Param("stockPackageCode") String stockPackageCode,@Param("deliveryId") Long deliveryId); + + /** + * 查询滞留包件细腻系 + * @param orderPackageCode + * @param deliveryId + * @return + */ + DistributionRetentionScanVo selectRetentionPackage(@Param("orderPackageCode")String orderPackageCode,@Param("deliveryId") Long deliveryId); + + List selectRetentionZeroPackage(@Param("deliveryId")Long deliveryId, @Param("orderCode")String barcode); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml index 45e9d0c85..e7d213a5a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml @@ -260,7 +260,7 @@ - SELECT * FROM logpm_distribution_delivery_list ${ew.customSqlSegment} + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java index 5d7876912..6128c9a4b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java @@ -67,4 +67,11 @@ public interface DistributionDeliveryTripartiteMapper extends BaseMapper select id id,driver_name driverName,vehicle_num vehicleNub FROM logpm_distribution_delivery_tripartite where delivery_id = #{deliveryId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java index 729bc5307..dad2f097c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java @@ -117,4 +117,6 @@ public interface DistributionParcelListMapper extends BaseMapper selectorderCodeByLike(@Param("condition") String condition,@Param("collect") List collect); List selectStockListByOderId(@Param("id")Long id,@Param("collect") List collect); + + List getParcelListInfo(@Param("param")DistributionParcelListVO parcelListVO); } 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 b478855fd..1392a7356 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 @@ -34,9 +34,79 @@ + + from logpm_distribution_stock_article ldsa + LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id + + ldsa.warehouse_id = #{param.warehouseId} and ldpl.order_package_status != '70' + and ldsa.mall_id = #{param.mallId} + and ldsa.genre = #{param.genre} + and ldsa.is_zero = #{param.isZero} + + + + - + SELECT * FROM logpm_distribution_reservation ${ew.customSqlSegment} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java index 4fb031d6f..a399d0cda 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java @@ -102,4 +102,11 @@ public interface DistributionStockListMapper extends BaseMapper selectAllStockList(@Param("par")DistributionStockListDTO stockListDTO); + + /** + * 查询库存平数据 + * @param distributionStockListEntity + * @return + */ + List getStockListInfo(@Param("par")DistributionStockListEntity distributionStockListEntity); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml index a2d8476ec..35360436c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml @@ -93,7 +93,29 @@ select * from logpm_distribution_stock_list where is_deleted = 0 + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml index d7c346bac..87ede2189 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml @@ -180,14 +180,15 @@ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml index 4057901cb..6d45ee5f1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml @@ -114,24 +114,27 @@ SELECT * FROM logpm_distrilbution_bill_stock ${ew.customSqlSegment} + + + + CREATE TABLE ${questNum} ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户号', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '更新人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `is_deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除', + `status` int(11) NULL DEFAULT NULL COMMENT '状态', + `reserve1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留1', + `reserve2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留2', + `reserve3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留3', + `reserve4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留4', + `reserve5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留5', + `quest_detail_id` bigint(20) NULL DEFAULT NULL COMMENT '盘点明细ID', + `cargo_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '货物状态;10 在库 20 破损 30丢失 40不可修复 50配送 60未入库', + `quest_num` int(10) NOT NULL DEFAULT 1 COMMENT '盘点数量', + `warehouse_id` bigint(20) NULL DEFAULT NULL COMMENT '仓库id', + PRIMARY KEY (`id`) USING BTREE, + INDEX `quest_detail_id_index`(`quest_detail_id`) USING BTREE COMMENT '盘点明细' + ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '${questNum}盘点明细子表' ROW_FORMAT = Dynamic; + + + CREATE TABLE ${questNum} ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户号', + `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(20) NULL DEFAULT NULL COMMENT '更新人', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `is_deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除', + `status` int(11) NULL DEFAULT NULL COMMENT '状态', + `reserve1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留1', + `reserve2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留2', + `reserve3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留3', + `reserve4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留4', + `reserve5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留5', + `order_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单号', + `quest_id` bigint(20) NULL DEFAULT NULL COMMENT '任务ID', + `order_id` bigint(20) NULL DEFAULT NULL COMMENT '订单ID', + `quest_type` int(11) NULL DEFAULT NULL COMMENT '盘点方式;1. 随机 2 库位3 订单 4 托盘', + `quest_target` int(11) NULL DEFAULT NULL COMMENT '盘点对象;1.定制品 2零担 3 库存品', + `orde_package_code` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '包条码;对应定制品', + `order_package_id` bigint(20) NULL DEFAULT NULL COMMENT '包条ID;对应定制品', + `category_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品类名称;对应零担', + `stock_id` bigint(20) NULL DEFAULT NULL COMMENT '库存品ID;对应库存品', + `quest_status` int(10) NOT NULL DEFAULT 0 COMMENT '盘点状态;0 待盘点 1. 已盘 2未盘点 3已排除', + `stock_num` int(10) NOT NULL DEFAULT 1 COMMENT '在库数量', + `warehouse_id` bigint(20) NULL DEFAULT NULL COMMENT '仓库id', + `position_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '完整货位(按库位)', + `tray_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '托盘码(按托盘)', + `tray_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '托盘id(按托盘)', + `allocation_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '货位id(按库位)', + `grounding_allocation_id` bigint(20) NULL DEFAULT NULL COMMENT '上架后的库位ID', + `is_new` int(20) NULL DEFAULT NULL COMMENT '是否是新增数据', + `grounding_position_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上架后的完整库位', + `material_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码(库存品)', + `market_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商场名称(库存品)', + `incoming_batch` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号(库存品)', + `material_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料名称(库存品)', + `waybill_number` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '运单号', + PRIMARY KEY (`id`) USING BTREE, + INDEX `quest_id_index`(`quest_id`) USING BTREE COMMENT '任务id', + INDEX `order_id_index`(`order_id`) USING BTREE COMMENT '订单id', + INDEX `tenant_id_index`(`tenant_id`) USING BTREE COMMENT '租户id' + ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '${questNum}盘点明细' ROW_FORMAT = Dynamic; + + + INSERT INTO ${questNum}(`id`, `tenant_id`, `create_user`, `create_time`, `update_user`, `update_time`, `create_dept`, + `is_deleted`, `status`, `reserve1`, `reserve2`, `reserve3`, `reserve4`, `reserve5`, `order_code`, `quest_id`, `order_id`, `quest_type`, `quest_target`, + `orde_package_code`, `order_package_id`, `category_name`, `stock_id`, `quest_status`, `stock_num`, `warehouse_id`, `position_code`, `tray_code`, `tray_id`, + `allocation_id`, `grounding_allocation_id`, `is_new`, `grounding_position_code`, `material_code`, `market_name`, `incoming_batch`, `material_name`, + `waybill_number`) VALUES + + (#{item.id}, #{item.tenantId}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime}, #{item.createDept}, #{item.isDeleted} + , #{item.status}, #{item.reserve1}, #{item.reserve2}, #{item.reserve3}, #{item.reserve4}, #{item.reserve5}, #{item.orderCode}, #{item.questId}, #{item.orderId} + , #{item.questType}, #{item.questTarget}, #{item.ordePackageCode}, #{item.orderPackageId}, #{item.categoryName}, #{item.stockId}, #{item.questStatus}, + #{item.stockNum}, #{item.warehouseId} , #{item.positionCode}, #{item.trayCode}, #{item.trayId}, #{item.allocationId}, #{item.groundingAllocationId}, + #{item.isNew}, #{item.groundingPositionCode}, #{item.materialCode}, #{item.marketName} , #{item.incomingBatch}, #{item.materialName}, #{item.waybillNumber} + ) + + + + + + + + + update ${questNum} set quest_status = #{param.questStatus} + WHERE `id` = #{ param.id } + + + + update ${questNum} + + grounding_allocation_id = #{item. groundingAllocationId}, + grounding_position_code = #{item.groundingPositionCode }, + quest_status = #{item.questStatus }, + + + WHERE `id` = #{ param.id } + + + + + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java index 483e0430c..446961598 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java @@ -83,10 +83,25 @@ public interface ITaskQuestService extends BaseService { */ R queryContract(TaskSearchDTO taskSearchDTO); + /** + * 盘点定制平数据 + * @param taskSearchDTO + * @return + */ List allocationDetailByPackage(TaskSearchDTO taskSearchDTO); + /** + * 盘点零担数据 + * @param taskSearchDTO + * @return + */ List allocationDetailByZero(TaskSearchDTO taskSearchDTO); + /** + * 盘点库存平数据 + * @param taskSearchDTO + * @return + */ List allocationDetailByStock(TaskSearchDTO taskSearchDTO); void updateQuestSetail(TaskSearchDTO taskSearchDTO); @@ -132,4 +147,12 @@ public interface ITaskQuestService extends BaseService { R questScanAllcation(TaskSearchDTO taskSearchDTO); R selectPackageInfo(TaskSearchDTO taskSearchDTO); + + /** + * 查询盘点任务数据任务 + * @param questNum + * @param questDetail + * @return + */ + List selectTaskInfo(String questNum, QuestDetailEntity questDetail); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java index bcd26b8b6..7c1ff8c94 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java @@ -62,4 +62,18 @@ public interface IWarehouseRetentionRecordService extends BaseService retentionPackageList(RetentionDTO retentionDTO); R retentionScanPackage(String orderPackageCode); + + /** + * PDA查询初始化滞留扫描页 + * @param deliveryId + * @return + */ + WarehouseRetentionRecordVO initRetentionList(Long deliveryId); + + /** + * 保存扫描记录 + * @param retentionDTO + * @return + */ + R saveRetentionList(RetentionDTO retentionDTO); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java index 1a6405871..12e5015fe 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java @@ -16,11 +16,12 @@ */ package com.logpm.warehouse.service.impl; -import cn.hutool.log.Log; +import com.alibaba.nacos.plugin.auth.constant.Constants; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.BeanUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.basicdata.entity.*; @@ -31,6 +32,7 @@ import com.logpm.distribution.entity.DistributionStockListEntity; import com.logpm.distribution.feign.IDistributionParcelListClient; import com.logpm.distribution.feign.IDistributionStockArticleClient; import com.logpm.distribution.feign.IDistributionStockListClient; +import com.logpm.distribution.vo.DistributionParcelListVO; import com.logpm.distribution.vo.DistributionStockListVO; import com.logpm.warehouse.bean.Resp; import com.logpm.warehouse.dto.QuestDetailDTO; @@ -45,13 +47,17 @@ import com.logpm.warehouse.service.*; import com.logpm.warehouse.vo.*; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; +import org.apache.ibatis.annotations.Param; import org.springblade.common.constant.common.IsOrNoConstant; import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant; import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.secure.BladeUser; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.AesUtil; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; import org.springframework.stereotype.Service; @@ -122,6 +128,358 @@ public class TaskQuestServiceImpl extends BaseServiceImpl refId,String questNum,Long taskQuest){ + //查询表存在么 + String s = baseMapper.selectExitsInfo(questNum); + if(ObjectUtils.isNotNull(s)){ + throw new ServiceException("任务表已存在!"); + }else{ + //创建任务明细表 + baseMapper.createdTable(questNum); + //创建任务明细盘点表 + baseMapper.createdTableChild(questNum + "_child"); + } + if(ObjectUtils.isNull(refId) || refId.isEmpty()){ + //全部 + DistributionParcelListVO stockArticleEntity = new DistributionParcelListVO(); + stockArticleEntity.setWarehouseId(warehouseId); + getParcelListNumber(stockArticleEntity,questNum,taskQuest); + }else{ + //部分 + for (Long l : refId) { + DistributionParcelListVO stockArticleEntity = new DistributionParcelListVO(); + stockArticleEntity.setWarehouseId(warehouseId); + stockArticleEntity.setMallId(l); + getParcelListNumber(stockArticleEntity,questNum,taskQuest); + } + + } + + } + + /** + * 查询盘点包件数据 + * @param stockArticleEntity + * @param questNum + * @param taskQuest + */ + public void getParcelListNumber(DistributionParcelListVO stockArticleEntity,String questNum,Long taskQuest){ + List parcelListInfo = distributionParcelListClient.getParcelListInfo(stockArticleEntity); + BladeUser user = AuthUtil.getUser(); + if(!parcelListInfo.isEmpty()){ + List detailEntityList = new ArrayList<>(); + parcelListInfo.stream().forEach( i ->{ + + QuestDetailEntity detailEntity = new QuestDetailEntity(); + detailEntity.setId(getTaskID()); + detailEntity.setCreateTime(new Date()); + detailEntity.setTenantId(user.getTenantId()); + detailEntity.setCreateUser(user.getUserId()); + detailEntity.setCreateDept(Long.valueOf(user.getDeptId())); + detailEntity.setIsDeleted(0); + detailEntity.setStatus(1); + detailEntity.setQuestId(taskQuest); + detailEntity.setOrderCode(i.getOrderCode()); + detailEntity.setOrderId(i.getStockArticleId()); +// detailEntity.setQuestType(); + //盘点对象;1.定制品 2零担 3 库存品 + detailEntity.setQuestTarget(1); + detailEntity.setOrdePackageCode(i.getOrderPackageCode()); + detailEntity.setWaybillNumber(i.getWaybillNumber()); + detailEntity.setOrderPackageId(i.getId()); + detailEntity.setCategoryName(i.getFirsts()); + detailEntity.setStockId(i.getStockId()); //库存品ID + detailEntity.setQuestStatus(0); + detailEntity.setStockNum(ObjectUtils.isNotNull(i.getQuantity()) ? i.getQuantity() : 0); + detailEntity.setWarehouseId(i.getWarehouseId()); + detailEntity.setPositionCode(i.getPositionCode()); + detailEntity.setTrayCode(i.getTrayCode()); +// detailEntity.setGroundingAllocationId(); +// detailEntity.setGroundingPositionCode(); + detailEntity.setTrayId(i.getTrayId()); + detailEntity.setAllocationId(i.getAllocationId()); + detailEntity.setIsNew(0); + + detailEntity.setMaterialCode(i.getMaterialCode()); + detailEntity.setMaterialName(i.getMaterialName()); + detailEntity.setMarketName(i.getMallName()); + detailEntity.setIncomingBatch(i.getOrderCode()); + detailEntityList.add(detailEntity); + + }); + //查询零担数据 + DistributionStockArticleEntity stockArticle = new DistributionStockArticleEntity(); + stockArticle.setWarehouseId(stockArticleEntity.getWarehouseId()); + stockArticle.setMallId(ObjectUtils.isNotNull(stockArticleEntity.getMallId()) ? stockArticleEntity.getMallId() : null); + stockArticle.setIsZero("1"); + List stockArticleInfo = distributionStockArticleClient.getStockArticleInfo(stockArticle); + if(!stockArticleInfo.isEmpty()){ + detailEntityList.addAll(handleIsZeroList(stockArticleInfo,taskQuest)); + } + + //查询库存平数据 + DistributionStockListEntity stockListEntity = new DistributionStockListEntity(); + stockListEntity.setWarehouseId(stockArticleEntity.getWarehouseId()); + stockListEntity.setMarketId(ObjectUtils.isNotNull(stockArticleEntity.getMallId()) ? stockArticleEntity.getMallId() : null); + List stockListInfo = distributionStockListClient.getStockListInfo(stockListEntity); + if(!stockListInfo.isEmpty()){ + detailEntityList.addAll(handleStockList(stockListInfo,taskQuest)); +// stockListInfo.stream().forEach( li ->{ +// QuestDetailEntity detailListEntity = new QuestDetailEntity(); +// detailListEntity.setCreateTime(new Date()); +// detailListEntity.setTenantId(user.getTenantId()); +// detailListEntity.setCreateUser(user.getUserId()); +// detailListEntity.setCreateDept(Long.valueOf(user.getDeptId())); +// detailListEntity.setIsDeleted(0); +// detailListEntity.setStatus(1); +// detailListEntity.setQuestId(taskQuest); +// detailListEntity.setOrderCode(li.getOrderCode()); +// //盘点对象;1.定制品 2零担 3 库存品 +// detailListEntity.setQuestTarget(3); +// detailListEntity.setWaybillNumber(li.getIncomingBatch()); +// detailListEntity.setStockId(li.getId()); //库存品ID +// detailListEntity.setQuestStatus(0); +// detailListEntity.setStockNum(li.getQuantityStock()); +// detailListEntity.setWarehouseId(li.getWarehouseId()); +// detailListEntity.setPositionCode(li.getPositionCode()); +// detailListEntity.setTrayCode(li.getTrayCode()); +// detailListEntity.setTrayId(li.getTrayId()); +// detailListEntity.setAllocationId(li.getAllocationId()); +// detailListEntity.setIsNew(0); +// +// detailListEntity.setMaterialCode(li.getCargoNumber()); +// detailListEntity.setMaterialName(li.getDescriptionGoods()); +// detailListEntity.setMarketName(li.getMallName()); +// detailListEntity.setIncomingBatch(li.getIncomingBatch()); +// detailEntityList.add(detailListEntity); +// }); + } + + if(!detailEntityList.isEmpty()){ + + int batchSize = 1000; // 设置批处理的大小 + int totalSize = detailEntityList.size(); // 获取总数据量 + + for (int i = 0; i < totalSize; i += batchSize) { + int endIndex = Math.min(i + batchSize, totalSize); + List subList = detailEntityList.subList(i, endIndex); + baseMapper.insertQuestDetail(questNum, subList); + } + + } + + } +} + + /** + * 生成Id + * @return + */ + public Long getTaskID(){ + Random random = new Random(); + long min = 100000000000000000L; // 最小值为10的18次方 + long max = 9223372036854775807L; // Long类型的最大值 + return min + (long) (random.nextDouble() * (max - min)); +} + + /** + * 查询零担数据 + */ + public List handleIsZeroList(List stockArticleInfo,Long taskQuest){ + List detailEntityList = new ArrayList<>(); + BladeUser user = AuthUtil.getUser(); + //处理库位,托盘 + stockArticleInfo.stream().forEach( i ->{ + QuestDetailEntity detailEntity = new QuestDetailEntity(); + detailEntity.setId(getTaskID()); + detailEntity.setCreateTime(new Date()); + detailEntity.setTenantId(user.getTenantId()); + detailEntity.setCreateUser(user.getUserId()); + detailEntity.setCreateDept(Long.valueOf(user.getDeptId())); + detailEntity.setIsDeleted(0); + detailEntity.setStatus(1); + detailEntity.setQuestId(taskQuest); + detailEntity.setOrderCode(i.getOrderCode()); + detailEntity.setOrderId(i.getId()); +// detailEntity.setQuestType(); + //盘点对象;1.定制品 2零担 3 库存品 + detailEntity.setQuestTarget(2); +// detailEntity.setOrdePackageCode(i.getOrderPackageCode()); + detailEntity.setWaybillNumber(i.getWaybillNumber()); +// detailEntity.setOrderPackageId(i.getId()); + detailEntity.setCategoryName(i.getDescriptionGoods()); +// detailEntity.setStockId(i.getStockId()); //库存品ID + detailEntity.setQuestStatus(0); + detailEntity.setMarketName(i.getMallName()); + detailEntity.setIncomingBatch(i.getOrderCode()); + detailEntity.setWarehouseId(i.getWarehouseId()); + detailEntity.setIsNew(0); + //查询货位 + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("warehouse_id",i.getWarehouseId()); + qw.eq("association_id",i.getId()); + qw.eq("incoming_batch",i.getOrderCode()); + qw.eq("market_id",i.getMallId()); + List updownGoodsList = warehouseUpdownGoodsMapper.selectList(qw); + if(!updownGoodsList.isEmpty()){ + updownGoodsList.stream().forEach( ii ->{ + QuestDetailEntity qq = new QuestDetailEntity(); + BeanUtil.copyProperties(detailEntity,qq); + qq.setId(getTaskID()); + qq.setPositionCode(ii.getPositionCode()); + qq.setAllocationId(String.valueOf(ii.getAllocationId())); + qq.setMaterialName(ii.getMarketName()); + BasicdataTrayEntity trayByAllocationId = taryAllocationService.getTrayByAllocationId(ii.getAllocationId()); + if(ObjectUtils.isNotNull(trayByAllocationId)){ + List tray = chuLiKuCun(i, trayByAllocationId.getId()); + if(!tray.isEmpty()){ + qq.setTrayCode(tray.get(0).getTrayCode()); + qq.setTrayId(String.valueOf(tray.get(0).getTrayId())); + qq.setStockNum(ObjectUtils.isNotNull(tray.get(0).getNum()) ? tray.get(0).getNum() : 0); + } + } + qq.setStockNum(ObjectUtils.isNotNull(ii.getNum()) ? ii.getNum() : 0); + detailEntityList.add(qq); + }); + }else{ + List warehouseTrayGoodsEntities = chuLiKuCun(i, null); + if(!warehouseTrayGoodsEntities.isEmpty()){ + warehouseTrayGoodsEntities.stream().forEach( ta ->{ + QuestDetailEntity aa = new QuestDetailEntity(); + BeanUtil.copyProperties(detailEntity,aa); + aa.setId(getTaskID()); + aa.setTrayCode(ta.getTrayCode()); + aa.setTrayId(String.valueOf(ta.getTrayId())); + aa.setStockNum(ObjectUtils.isNotNull(ta.getNum()) ? ta.getNum() : 0); + detailEntityList.add(aa); + }); + } + } + detailEntity.setStockNum(ObjectUtils.isNotNull(i.getHandQuantity()) ? i.getHandQuantity() : 0); + detailEntityList.add(detailEntity); + + }); + return detailEntityList; +} + + /** + * 查询库存平数据 + */ + public List handleStockList(List stockListInfo,Long taskQuest){ + List detailEntityList = new ArrayList<>(); + BladeUser user = AuthUtil.getUser(); + //处理库位,托盘 + stockListInfo.stream().forEach( i ->{ + QuestDetailEntity detailEntity = new QuestDetailEntity(); + detailEntity.setId(getTaskID()); + detailEntity.setCreateTime(new Date()); + detailEntity.setTenantId(user.getTenantId()); + detailEntity.setCreateUser(user.getUserId()); + detailEntity.setCreateDept(Long.valueOf(user.getDeptId())); + detailEntity.setIsDeleted(0); + detailEntity.setStatus(1); + detailEntity.setQuestId(taskQuest); + detailEntity.setOrderCode(i.getOrderCode()); + detailEntity.setOrderId(i.getId()); +// detailEntity.setQuestType(); + //盘点对象;1.定制品 2零担 3 库存品 + detailEntity.setQuestTarget(3); +// detailEntity.setOrdePackageCode(i.getOrderPackageCode()); + detailEntity.setWaybillNumber(i.getIncomingBatch()); +// detailEntity.setOrderPackageId(i.getId()); + detailEntity.setCategoryName(i.getDescriptionGoods()); + detailEntity.setStockId(i.getId()); //库存品ID + detailEntity.setQuestStatus(0); + detailEntity.setMarketName(i.getMallName()); + detailEntity.setIncomingBatch(i.getOrderCode()); + detailEntity.setWarehouseId(i.getWarehouseId()); + detailEntity.setIsNew(0); + //查询货位 + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("warehouse_id",i.getWarehouseId()); + qw.eq("association_id",i.getMaterialId()); + qw.eq("incoming_batch",i.getIncomingBatch()); + qw.eq("market_id",i.getMarketId()); + List updownGoodsList = warehouseUpdownGoodsMapper.selectList(qw); + if(!updownGoodsList.isEmpty()){ + updownGoodsList.stream().forEach( ii ->{ + QuestDetailEntity a = new QuestDetailEntity(); + BeanUtil.copyProperties(detailEntity,a); + a.setId(getTaskID()); + a.setPositionCode(ii.getPositionCode()); + a.setAllocationId(String.valueOf(ii.getAllocationId())); + a.setMaterialName(ii.getMarketName()); + BasicdataTrayEntity trayByAllocationId = taryAllocationService.getTrayByAllocationId(ii.getAllocationId()); + if(ObjectUtils.isNotNull(trayByAllocationId)){ + List tray = chuLiKuCunLing(i, trayByAllocationId.getId()); + if(!tray.isEmpty()){ + a.setTrayCode(tray.get(0).getTrayCode()); + a.setTrayId(String.valueOf(tray.get(0).getTrayId())); + a.setStockNum(ObjectUtils.isNotNull(tray.get(0).getNum()) ? tray.get(0).getNum() : 0); + } + } + a.setStockNum(ObjectUtils.isNotNull(ii.getNum()) ? ii.getNum() : 0); + detailEntityList.add(a); + }); + }else{ + List warehouseTrayGoodsEntities = chuLiKuCunLing(i, null); + if(!warehouseTrayGoodsEntities.isEmpty()){ + warehouseTrayGoodsEntities.stream().forEach( ta ->{ + QuestDetailEntity detailEntityTray = new QuestDetailEntity(); + BeanUtil.copyProperties(detailEntity,detailEntityTray); + detailEntityTray.setId(getTaskID()); + detailEntityTray.setTrayCode(ta.getTrayCode()); + detailEntityTray.setTrayId(String.valueOf(ta.getTrayId())); + detailEntityTray.setStockNum(ObjectUtils.isNotNull(ta.getNum() ) ? ta.getNum() : 0); + detailEntityList.add(detailEntityTray); + }); + } + } + detailEntity.setStockNum(ObjectUtils.isNotNull( i.getQuantityStock()) ? i.getQuantityStock() : 0); + detailEntityList.add(detailEntity); + + }); + return detailEntityList; +} + + /** + * 查询零担托盘数据 + * @param distributionStockArticle + * @return + */ + public List chuLiKuCun(DistributionStockArticleEntity distributionStockArticle ,Long id){ + + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("warehouse_id",distributionStockArticle.getWarehouseId()); + qw.eq("association_id",distributionStockArticle.getId()); + qw.eq("incoming_batch",distributionStockArticle.getOrderCode()); + qw.eq("market_id",distributionStockArticle.getMallId()); + if(ObjectUtils.isNotNull(id)){ + qw.eq("tray_id",id); + } + return warehouseTrayGoodsMapper.selectList(qw); + } + /** + * 查询库存托盘数据 + * @param distributionStockArticle + * @return + */ + public List chuLiKuCunLing(DistributionStockListEntity distributionStockArticle ,Long id){ + + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("warehouse_id",distributionStockArticle.getWarehouseId()); + qw.eq("association_id",distributionStockArticle.getMaterialId()); + qw.eq("incoming_batch",distributionStockArticle.getIncomingBatch()); + qw.eq("market_id",distributionStockArticle.getMarketId()); + if(ObjectUtils.isNotNull(id)){ + qw.eq("tray_id",id); + } + return warehouseTrayGoodsMapper.selectList(qw); + } + @Override public R saveCustom(TaskQuestDTO taskQuest) { BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); @@ -133,7 +491,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl 0) { @@ -141,9 +503,16 @@ public class TaskQuestServiceImpl extends BaseServiceImpl collect = list.stream().map(TaskQuestChildEntity::getRefId).collect(Collectors.toList()); + addQuestDetail(myCurrentWarehouse.getId(),collect,questNum,taskQuest.getId()); + }else{ + addQuestDetail(myCurrentWarehouse.getId(),null,questNum,taskQuest.getId()); } + return save ? R.success("添加成功") : R.fail("添加失败"); } @@ -214,7 +583,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl selectallocationList(TaskSearchDTO taskSearchDTO) { - List list = baseMapper.selectallocationList(taskSearchDTO); + try { + TaskQuestEntity taskQuestEntity = baseMapper.selectById(taskSearchDTO.getQuestId()); + List list = baseMapper.selectallocationList(taskQuestEntity.getQuestNum(),taskSearchDTO); + return list; + }catch (Exception e){ + log.debug(e.getMessage()); + return new ArrayList<>(); + } + // if (!list.isEmpty()) { // for (TaskallocationVO taskallocationVO : list) { // Long allocationId = taskallocationVO.getAllocationId(); @@ -222,7 +599,6 @@ public class TaskQuestServiceImpl extends BaseServiceImpl collect = this.getmyWarehouseList(); baseMapper.setSqlMode(); String goodsType = taskSearchDTO.getGoodsType(); - LambdaQueryWrapper queryWrapper = Wrappers.query().lambda() - .eq(QuestDetailEntity::getQuestType, 3) - .eq(QuestDetailEntity::getQuestId, taskSearchDTO.getTaskId()); +// LambdaQueryWrapper queryWrapper = Wrappers.query().lambda() +// .eq(QuestDetailEntity::getQuestType, 3) +// .eq(QuestDetailEntity::getQuestId, taskSearchDTO.getTaskId()); List list = new ArrayList<>(); - List questDetailEntityList = questDetailService.list(queryWrapper); + TaskQuestEntity taskQuestEntity = baseMapper.selectById(taskSearchDTO.getTaskId()); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setQuestId( taskSearchDTO.getTaskId()); + List questDetailEntityList = baseMapper.selectTaskInfo(taskQuestEntity.getQuestNum(),questDetail); if (Func.isEmpty(questDetailEntityList)){ return null; } @@ -335,7 +714,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl { TaskTrayVO taskTrayVO = new TaskTrayVO(); - taskTrayVO.setTrayId(k); + taskTrayVO.setTrayId(Long.valueOf(k)); AtomicReference num = new AtomicReference<>(0); //总数 AtomicReference unTotal = new AtomicReference<>(0); //盘点数 v.forEach( p ->{ @@ -452,18 +831,21 @@ public class TaskQuestServiceImpl extends BaseServiceImpl{ - taskTrayVO.setTrayId(k); + taskTrayVO.setTrayId(Long.valueOf(k)); AtomicReference num = new AtomicReference<>(0); //总数 AtomicReference unTotal = new AtomicReference<>(0); //盘点数 List detailVOS = new ArrayList<>(); + v.forEach( p ->{ + TaskQuestEntity taskQuestEntity = baseMapper.selectById(p.getQuestId()); + taskTrayVO.setTrayCode(p.getTrayCode()); num.set(num.get() + p.getStockNum()); if(p.getQuestStatus().equals(1) && p.getIsNew().equals(0)){ - List list = questDetailChildService.list(Wrappers.query().lambda() - .eq(QuestDetailChildEntity::getQuestDetailId, p.getId()) - .eq(QuestDetailChildEntity::getWarehouseId, warehouseId) - ); + QuestDetailChildEntity questDetailChildEntity = new QuestDetailChildEntity(); + questDetailChildEntity.setQuestDetailId(p.getId()); + questDetailChildEntity.setWarehouseId(warehouseId); + List list = getQuestDetailInfo(taskQuestEntity.getQuestNum()+"_child",questDetailChildEntity); if(!list.isEmpty()){ int sum = list.stream().mapToInt(QuestDetailChildEntity::getQuestNum).sum(); unTotal.set(unTotal.get() + sum); @@ -490,11 +872,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = questDetailChildService.list(Wrappers.query().lambda() - .eq(QuestDetailChildEntity::getQuestDetailId, p.getId()) - .eq(QuestDetailChildEntity::getWarehouseId, p.getWarehouseId()) - .eq(QuestDetailChildEntity::getWarehouseId, p.getWarehouseId()) - ); + QuestDetailChildEntity questDetailChildEntity = new QuestDetailChildEntity(); + questDetailChildEntity.setQuestDetailId(p.getId()); + questDetailChildEntity.setWarehouseId(p.getWarehouseId()); + + List list = getQuestDetailInfo(taskQuestEntity.getQuestNum()+"_child",questDetailChildEntity); questDetailVO.setList(list); detailVOS.add(questDetailVO); }); @@ -506,6 +888,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl getQuestDetailInfo(String questNum, QuestDetailChildEntity questDetailChildEntity){ + + return baseMapper.getQuestDetailInfo(questNum,questDetailChildEntity); + } + + + /** * 查询托盘里面的信息 * @@ -515,12 +904,19 @@ public class TaskQuestServiceImpl extends BaseServiceImpl getQuestDetailList(TaskSearchDTO taskSearchDTO,Long warehouseId,Long trayId){ - return questDetailService.list(Wrappers.query().lambda() - .eq(QuestDetailEntity::getWarehouseId, warehouseId) - .eq(QuestDetailEntity::getQuestId, taskSearchDTO.getTaskId()) - .eq(ObjectUtils.isNotNull(trayId),QuestDetailEntity::getTrayId, trayId) - .eq(QuestDetailEntity::getQuestType, 4) - ); + TaskQuestEntity taskQuestEntity = baseMapper.selectById(taskSearchDTO.getTaskId()); +// Wrappers.query().lambda() +// .eq(QuestDetailEntity::getWarehouseId, warehouseId) +// .eq(QuestDetailEntity::getQuestId, taskSearchDTO.getTaskId()) +// .eq(c,QuestDetailEntity::getTrayId, trayId) +// .eq(QuestDetailEntity::getQuestType, 4); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setWarehouseId(warehouseId); + questDetail.setQuestId(taskSearchDTO.getTaskId()); + if(ObjectUtils.isNotNull(trayId)){ + questDetail.setTrayId(String.valueOf(trayId)); + } + return baseMapper.selectTaskTrayInfo(taskQuestEntity.getQuestNum(),questDetail); } /** @@ -544,16 +940,16 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = taskQuestChildService.list(Wrappers.query().lambda() - .eq(TaskQuestChildEntity::getQuestId, taskId) + .eq(TaskQuestChildEntity::getQuestId, taskSearchDTO.getTaskId()) ); if (!list.isEmpty()) { boolean b = list.stream().anyMatch(t -> ObjectUtils.isNotNull(t.getRefId())); @@ -567,7 +963,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl queryData1 = Optional.ofNullable(queryData); if(queryData1.isPresent()){ @@ -653,14 +1049,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailEntityQueryWrapper = new QueryWrapper<>(); - questDetailEntityQueryWrapper.eq("quest_id", questId) - .eq("quest_type", 2) - .eq("quest_target", 1) - .eq("warehouse_id", warehouseId) - .eq("allocation_id", allocationId) - .eq("is_deleted", 0); - List questDetailEntities = questDetailService.list(questDetailEntityQueryWrapper); +// QueryWrapper questDetailEntityQueryWrapper = new QueryWrapper<>(); +// questDetailEntityQueryWrapper.eq("quest_id", questId) +// .eq("quest_type", 2) +// .eq("quest_target", 1) +// .eq("warehouse_id", warehouseId) +// .eq("allocation_id", allocationId) +// .eq("is_deleted", 0); + TaskQuestEntity byId = baseMapper.selectById(questId); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setQuestId(questId); +// questDetail.setQuestType(2); + questDetail.setQuestTarget(1); + questDetail.setWarehouseId(warehouseId); + questDetail.setAllocationId(String.valueOf(allocationId)); + List questDetailEntities = baseMapper.selectTaskInfo(byId.getQuestNum(),questDetail); +// List questDetailEntities = questDetailService.list(questDetailEntityQueryWrapper); if (!questDetailEntities.isEmpty()) { return questDetailEntities; } - + return new ArrayList<>(); //如果还没有存入 //查询货位上的所有包条 //然后存入detail表 - List list = warehouseUpdownGoodsMapper.allocationDetailByPackage(taskSearchDTO); +// List list = warehouseUpdownGoodsMapper.allocationDetailByPackage(taskSearchDTO); // if(list.isEmpty()){ // log.warn("###########allocationDetailByPackage: 未有数据在盘点计划中 questId={}",questId); // throw new CustomerException(403,"未有数据在盘点计划中"); // } - questDetailService.saveList(list, questId); - - return list; +// questDetailService.saveList(list, questId); +// +// return list; } @Override @@ -804,29 +1209,38 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailEntityQueryWrapper = new QueryWrapper<>(); - questDetailEntityQueryWrapper.eq("quest_id", questId) - .eq("quest_type", 2) - .eq("quest_target", 2) - .eq("warehouse_id", warehouseId) - .eq("allocation_id", allocationId) - .eq("is_deleted", 0); - List questDetailEntities = questDetailService.list(questDetailEntityQueryWrapper); +// QueryWrapper questDetailEntityQueryWrapper = new QueryWrapper<>(); +// questDetailEntityQueryWrapper.eq("quest_id", questId) +// .eq("quest_type", 2) +// .eq("quest_target", 2) +// .eq("warehouse_id", warehouseId) +// .eq("allocation_id", allocationId) +// .eq("is_deleted", 0); + TaskQuestEntity byId = baseMapper.selectById(questId); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setQuestId(questId); +// questDetail.setQuestType(2); + questDetail.setQuestTarget(2); + questDetail.setWarehouseId(warehouseId); + questDetail.setAllocationId(String.valueOf(allocationId)); + List questDetailEntities = baseMapper.selectTaskInfo(byId.getQuestNum(),questDetail); +// List questDetailEntities = questDetailService.list(questDetailEntityQueryWrapper); if (!questDetailEntities.isEmpty()) { return questDetailEntities; } - + return new ArrayList<>(); //如果还没有存入 //查询货位上的所有包条 //然后存入detail表 - List list = warehouseUpdownGoodsMapper.allocationDetailByZero(taskSearchDTO); +// List list = warehouseUpdownGoodsMapper.allocationDetailByZero(taskSearchDTO); + // if(list.isEmpty()){ // log.warn("###########allocationDetailByZero: 未有数据在盘点计划中 questId={}",questId); // throw new CustomerException(403,"未有数据在盘点计划中"); // } - questDetailService.saveList(list,questId); +// questDetailService.saveList(list,questId); - return list; +// return list; } @Override @@ -853,29 +1267,36 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailEntityQueryWrapper = new QueryWrapper<>(); - questDetailEntityQueryWrapper.eq("quest_id", questId) - .eq("quest_type", 2) - .eq("quest_target", 3) - .eq("warehouse_id", warehouseId) - .eq("allocation_id", allocationId) - .eq("is_deleted", 0); - List questDetailEntities = questDetailService.list(questDetailEntityQueryWrapper); +// QueryWrapper questDetailEntityQueryWrapper = new QueryWrapper<>(); +// questDetailEntityQueryWrapper.eq("quest_id", questId) +// .eq("quest_type", 2) +// .eq("quest_target", 3) +// .eq("warehouse_id", warehouseId) +// .eq("allocation_id", allocationId) +// .eq("is_deleted", 0); + TaskQuestEntity byId = baseMapper.selectById(questId); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setQuestId(questId); +// questDetail.setQuestType(2); + questDetail.setQuestTarget(3); + questDetail.setWarehouseId(warehouseId); + questDetail.setAllocationId(String.valueOf(allocationId)); + List questDetailEntities = baseMapper.selectTaskInfo(byId.getQuestNum(),questDetail); if (!questDetailEntities.isEmpty()) { return questDetailEntities; } - + return new ArrayList<>(); //如果还没有存入 //查询货位上的所有包条 //然后存入detail表 - List list = warehouseUpdownGoodsMapper.allocationDetailByStock(taskSearchDTO); +// List list = warehouseUpdownGoodsMapper.allocationDetailByStock(taskSearchDTO); // if(list.isEmpty()){ // log.warn("###########allocationDetailByStock: 未有数据在盘点计划中 questId={}",questId); // throw new CustomerException(403,"未有数据在盘点计划中"); // } - questDetailService.saveList(list,questId); +// questDetailService.saveList(list,questId); - return list; +// return list; } @Transactional @@ -883,14 +1304,17 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailList = taskSearchDTO.getQuestDetailList(); for (QuestDetailDTO questDetailDTO : questDetailList) { Long questDetaiId = questDetailDTO.getId();//明细id - QuestDetailEntity detailEntity = questDetailService.getById(questDetaiId); +// QuestDetailEntity detailEntity = questDetailService.getById(questDetaiId); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setId(questDetaiId); + QuestDetailEntity detailEntity = baseMapper.selectOneTaskInfo(taskQuestEntity.getQuestNum(),questDetail); if(Objects.isNull(detailEntity)){ log.warn("###########updateQuestSetail: 盘点明细不存在 questDetaiId={}",questDetaiId); throw new CustomerException(403,"盘点明细不存在"); @@ -910,7 +1334,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl ls = new ArrayList<>(); for (QuestDetailDTO questDetailDTO : questDetailList) { Long questDetaiId = questDetailDTO.getId();//明细id - QuestDetailEntity detailEntity = questDetailService.getById(questDetaiId); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setId(questDetaiId); + QuestDetailEntity detailEntity = baseMapper.selectOneTaskInfo(taskSearchDTO.getQuestNum(),questDetail); if (Objects.isNull(detailEntity)) { log.warn("###########updateQuestSetail: 存在不在盘点计划中的数据 questDetaiId={}", questDetaiId); throw new CustomerException(403, "存在不在盘点计划中的数据"); } detailEntity.setGroundingAllocationId(allocationId); detailEntity.setGroundingPositionCode(goodsAreaEntity.getHeadline() + "-" + basicdataGoodsShelfEntity.getGoodsShelfName() + "-" + goodsAllocationEntity.getGoodsAllocationName()); + detailEntity.setId(questDetaiId); ls.add(detailEntity); } - questDetailService.updateBatchById(ls); +// questDetailService.updateBatchById(ls); + baseMapper.updatePositionCodeList(taskSearchDTO.getQuestNum(),ls); } @@ -981,15 +1413,19 @@ public class TaskQuestServiceImpl extends BaseServiceImpl ls = new ArrayList<>(); for (QuestDetailDTO questDetailDTO : questDetailList) { Long questDetaiId = questDetailDTO.getId();//明细id - QuestDetailEntity detailEntity = questDetailService.getById(questDetaiId); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setId(questDetaiId); + QuestDetailEntity detailEntity = baseMapper.selectOneTaskInfo(taskSearchDTO.getQuestNum(),questDetail); +// QuestDetailEntity detailEntity = questDetailService.getById(,detailEntity); if (Objects.isNull(detailEntity)) { log.warn("###########deleteQuestDetail: 存在不在盘点计划中的数据 questDetaiId={}", questDetaiId); throw new CustomerException(403, "存在不在盘点计划中的数据"); } detailEntity.setQuestStatus(3); + detailEntity.setId(questDetaiId); ls.add(detailEntity); } - questDetailService.updateBatchById(ls); + baseMapper.updatePositionCodeList(taskSearchDTO.getQuestNum(),ls); } @Override @@ -1121,12 +1557,14 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = new ArrayList<>(); + list.add(questDetailEntity); + baseMapper.insertQuestDetail(taskSearchDTO.getQuestNum(),list); Long questDetailId = questDetailEntity.getId(); Integer stockNum = questDetailEntity.getStockNum(); Integer lossNum = 0; @@ -1164,17 +1602,21 @@ public class TaskQuestServiceImpl extends BaseServiceImpl queryWrapper = Wrappers.query().lambda() - .eq(QuestDetailEntity::getQuestId, taskSearchDTO.getTaskId()) - .eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId()) - .eq(QuestDetailEntity::getQuestType, 3); + QuestDetailEntity detailEntity = new QuestDetailEntity(); + detailEntity.setQuestId(taskSearchDTO.getTaskId()); + detailEntity.setWarehouseId(taskSearchDTO.getWarehouseId()); + detailEntity.setQuestType(3); + +// LambdaQueryWrapper queryWrapper = Wrappers.query().lambda() +// .eq(QuestDetailEntity::getQuestId, taskSearchDTO.getTaskId()) +// .eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId()) +// .eq(QuestDetailEntity::getQuestType, 3); if (Func.equals(isInventory,1)){ - queryWrapper - .eq(QuestDetailEntity::getIncomingBatch, taskSearchDTO.getOrderCode()); + detailEntity.setIncomingBatch(taskSearchDTO.getOrderCode()); }else { - queryWrapper.eq(QuestDetailEntity::getOrderCode, taskSearchDTO.getOrderCode()); + detailEntity.setOrderCode(taskSearchDTO.getOrderCode()); } - List questDetailEntities = questDetailService.list(queryWrapper); + List questDetailEntities = baseMapper.selectTaskInfo(taskSearchDTO.getQuestNum(),detailEntity); List type = questDetailEntities.stream().filter(f -> Func.isNotEmpty(f.getQuestTarget())).map(QuestDetailEntity::getQuestTarget).distinct().collect(Collectors.toList()); if (Func.isEmpty(type)){ return null; @@ -1254,6 +1696,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = questDetailChildService.list(new QueryWrapper().lambda() .eq(QuestDetailChildEntity::getIsDeleted,0) .eq(QuestDetailChildEntity::getQuestDetailId,questDetailVO.getId()) @@ -1358,15 +1801,31 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailEntity = baseMapper.selectQuestDetailList(taskSearchDTO.getQuestNum(), questDetail); +// if(Objects.isNull(questDetailEntity)){ +// questDetailEntity = new QuestDetailEntity(); +// questDetailEntity.setOrdePackageCode(orderPackageCode); +// } return R.data(questDetailEntity); } + /** + * 查询盘点任务数据 + * @param questNum + * @param questDetail + * @return + */ + @Override + public List selectTaskInfo(String questNum, QuestDetailEntity questDetail) { + return baseMapper.selectTaskInfo(questNum,questDetail); + } + private QuestDetailChildEntity addQuestDetailChild(Integer num,String cargoName,Long questDetaiId,Long warehouseId){ @@ -1457,12 +1916,21 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailEntityList = questDetailService.list(Wrappers.query().lambda() - .eq(QuestDetailEntity::getQuestId, taskQuestId) - .like(QuestDetailEntity::getOrderCode, incomingBatch) - .eq(QuestDetailEntity::getQuestType, 3) - .in(QuestDetailEntity::getQuestTarget, 1,2) - .eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId())); +// List questDetailEntityList = questDetailService.list(Wrappers.query().lambda() +// .eq(QuestDetailEntity::getQuestId, taskQuestId) +// .like(QuestDetailEntity::getOrderCode, incomingBatch) +// .eq(QuestDetailEntity::getQuestType, 3) +// .in(QuestDetailEntity::getQuestTarget, 1,2) +// .eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId())); + + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setQuestId(taskQuestId); + questDetail.setQuestType(3); + questDetail.setWarehouseId(taskSearchDTO.getWarehouseId()); + questDetail.setOrderCode(incomingBatch); + List questDetailEntityList = baseMapper.selectTaskInfo(taskSearchDTO.getQuestNum(),questDetail); + + if (Func.isNotEmpty(questDetailEntityList) && questDetailEntityList.size()>0){ TaskContractVO taskContractVO = new TaskContractVO(); Map> orderMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getOrderCode)); @@ -1491,12 +1959,24 @@ public class TaskQuestServiceImpl extends BaseServiceImplquery().lambda() - .eq(QuestDetailEntity::getOrderId, distributionStockArticleEntity.getId()) - .eq(QuestDetailEntity::getQuestId, taskQuestId) - .eq(QuestDetailEntity::getQuestType, 3) - .eq(QuestDetailEntity::getQuestStatus, 1)); - taskContractVO.setUnTotal(count.intValue()); + QuestDetailEntity questDetai = new QuestDetailEntity(); + questDetai.setOrderId(distributionStockArticleEntity.getId()); + questDetai.setQuestId(taskQuestId); + questDetai.setQuestType(3); + questDetai.setQuestStatus(1); + List questDetailEntities = baseMapper.selectQuestDetailList(taskSearchDTO.getQuestNum(), questDetai); + if(questDetailEntities.isEmpty()){ + taskContractVO.setUnTotal(0); + }else{ + long count = questDetailEntities.stream().filter(w -> w.getQuestStatus().equals(1)).count(); + taskContractVO.setUnTotal((int) count); + } +// Long count = questDetailService.count(Wrappers.query().lambda() +// .eq(QuestDetailEntity::getOrderId, distributionStockArticleEntity.getId()) +// .eq(QuestDetailEntity::getQuestId, taskQuestId) +// .eq(QuestDetailEntity::getQuestType, 3) +// .eq(QuestDetailEntity::getQuestStatus, 1)); +// taskContractVO.setUnTotal(count.intValue()); taskContractVOS.add(taskContractVO); List parcelList = distributionParcelListClient.getParcelListByStockArticleId(distributionStockArticleEntity.getId()); if (Func.isEmpty(parcelList)) { @@ -1511,10 +1991,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl detailEntities = new ArrayList<>(); + detailEntities.add(questDetailEntity); + baseMapper.insertQuestDetail(taskSearchDTO.getQuestNum(),detailEntities); +// questDetailService.save(questDetailEntity); } }); taskContractVO.setZktotal(libNum.get()); @@ -1536,12 +2019,20 @@ public class TaskQuestServiceImpl extends BaseServiceImpl zeroQuestDetailEntityList = questDetailService.list(Wrappers.query().lambda() - .eq(QuestDetailEntity::getQuestId, taskQuestId) - .like(QuestDetailEntity::getOrderCode, incomingBatch) - .eq(QuestDetailEntity::getQuestType, 3) - .eq(QuestDetailEntity::getQuestTarget, 2) - .eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId())); +// List zeroQuestDetailEntityList = questDetailService.list(Wrappers.query().lambda() +// .eq(QuestDetailEntity::getQuestId, taskQuestId) +// .like(QuestDetailEntity::getOrderCode, incomingBatch) +// .eq(QuestDetailEntity::getQuestType, 3) +// .eq(QuestDetailEntity::getQuestTarget, 2) +// .eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId())); + QuestDetailEntity detail = new QuestDetailEntity(); + detail.setQuestId(taskQuestId); + detail.setOrderCode(incomingBatch); + detail.setQuestType(3); + detail.setQuestTarget(2); + detail.setWarehouseId(taskSearchDTO.getWarehouseId()); + List zeroQuestDetailEntityList = baseMapper.selectQuestDetailList(taskSearchDTO.getQuestNum(),detail); + if (Func.isNotEmpty(zeroQuestDetailEntityList)){ for (QuestDetailEntity questDetailEntity : zeroQuestDetailEntityList) { TaskContractVO contractVO = new TaskContractVO(); @@ -1571,7 +2062,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl detailEntities = new ArrayList<>(); + detailEntities.add(questDetailEntity); + baseMapper.insertQuestDetail(taskSearchDTO.getQuestNum(),detailEntities); +// questDetailService.save(questDetailEntity); taskContractVO.setIsZero(1); taskContractVO.setIsInventory(0); taskContractVOS.add(taskContractVO); @@ -1596,12 +2090,23 @@ public class TaskQuestServiceImpl extends BaseServiceImpl inventoryQuestDetailEntityList = questDetailService.list(Wrappers.query().lambda() + /*List inventoryQuestDetailEntityList = questDetailService.list(Wrappers.query().lambda() .eq(QuestDetailEntity::getQuestId, taskQuestId) .eq(QuestDetailEntity::getIncomingBatch,incomingBatch) .eq(QuestDetailEntity::getQuestType, 3) .eq(QuestDetailEntity::getQuestTarget, 3) - .eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId())); + .eq(QuestDetailEntity::getWarehouseId, taskSearchDTO.getWarehouseId()));*/ + + QuestDetailEntity detail = new QuestDetailEntity(); + detail.setQuestId(taskQuestId); + detail.setOrderCode(incomingBatch); + detail.setQuestType(3); + detail.setQuestTarget(3); + detail.setWarehouseId(taskSearchDTO.getWarehouseId()); + List inventoryQuestDetailEntityList = baseMapper.selectQuestDetailList(taskSearchDTO.getQuestNum(),detail); + + + if (Func.isNotEmpty(inventoryQuestDetailEntityList) && inventoryQuestDetailEntityList.size()>0){ int sum = inventoryQuestDetailEntityList.stream().filter(iqd -> Func.equals(iqd.getQuestStatus(), 1)).mapToInt(QuestDetailEntity::getStockNum).sum(); inventoryQuestDetailEntityList.forEach(iqd->{ @@ -1636,7 +2141,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl detailEntities = new ArrayList<>(); + detailEntities.add(questDetailEntity); + baseMapper.insertQuestDetail(taskSearchDTO.getQuestNum(),detailEntities); + +// questDetailService.save(questDetailEntity); TaskContractVO taskContractVO = new TaskContractVO(); taskContractVO.setOrderId(questDetailEntity.getStockId()); taskContractVO.setOrderCode(questDetailEntity.getOrderCode()); @@ -1657,7 +2166,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl implements IWarehouseRetentionRecordService { private final IDistributionLoadscanClient distributionLoadscanClient; private final IDistributionParcelListClient distributionParcelListClient; + private final IWarehouseRetentionScanService warehouseRetentionScanService; + private final IDistributionDeliveryListClient deliveryListClient; + private final IBasicdataWarehouseClient warehouseClient; @Override public IPage selectWarehouseRetentionRecordPage(IPage page, WarehouseRetentionRecordVO warehouseRetentionRecord) { @@ -117,4 +143,103 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImplquery().lambda() + .eq(WarehouseRetentionRecordEntity::getRetentionType, RetentionTypeConstant.peisongzhiliu.getValue()) + .eq(WarehouseRetentionRecordEntity::getTaskId, deliveryId)); + if (Func.isEmpty(retentionRecordEntity)){ + return null; + } + WarehouseRetentionRecordVO warehouseRetentionRecordVO = WarehouseRetentionRecordWrapper.build().entityVO(retentionRecordEntity); + //查询是否存在有对应的扫描列表 + List retentionScanEntityList = warehouseRetentionScanService.list(Wrappers.query().lambda() + .eq(WarehouseRetentionScanEntity::getDeliveryId, retentionRecordEntity.getTaskId()) + .eq(WarehouseRetentionScanEntity::getRefId, retentionRecordEntity.getId())); + if (Func.isNotEmpty(retentionScanEntityList)){ + warehouseRetentionRecordVO.setRetentionScanVOList(WarehouseRetentionScanWrapper.build().listVO(retentionScanEntityList)); + } + return warehouseRetentionRecordVO; + } + + @Override + public R saveRetentionList(RetentionDTO retentionDTO) { + DistributionDeliveryListVO deliveryDriverInfo = deliveryListClient.getDeliveryDriverInfo(retentionDTO.getDeliveryId()); + if (Func.isEmpty(deliveryDriverInfo)){ + //查询配送任务 + log.error("##############查询配送任务失败,deliveryId:{}",retentionDTO.getDeliveryId()); + } + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if (Objects.isNull(myCurrentWarehouse)) { + throw new CustomerException(403, "仓库信息不能为空"); + } + if (Func.isEmpty(deliveryDriverInfo.getDeliverySelfVO())){ + log.error("##############查询配送任务司机失败"); + } + List deliverySelfVO = deliveryDriverInfo.getDeliverySelfVO(); + DistributionDeliverySelfVO distributionDeliverySelfVO = null; + if (deliveryDriverInfo.getKind().equals("1")){ + distributionDeliverySelfVO = deliverySelfVO.stream().filter(d -> d.getIsMaster() == 2).collect(Collectors.toList()).get(0); + }else if (deliveryDriverInfo.getKind().equals("2")){ + distributionDeliverySelfVO = deliverySelfVO.get(0); + + } + WarehouseRetentionRecordEntity warehouseRetentionRecordEntity = new WarehouseRetentionRecordEntity(); + warehouseRetentionRecordEntity.setRetentionType(RetentionTypeConstant.peisongzhiliu.getValue()); + warehouseRetentionRecordEntity.setRetentionWarehouseId(myCurrentWarehouse.getId()); + warehouseRetentionRecordEntity.setRetentionWarehouseName(myCurrentWarehouse.getName()); + warehouseRetentionRecordEntity.setRemark(retentionDTO.getRemarks()); + warehouseRetentionRecordEntity.setTaskId(retentionDTO.getDeliveryId()); + warehouseRetentionRecordEntity.setRetentionCarId(distributionDeliverySelfVO.getId()); + warehouseRetentionRecordEntity.setRetentionCarNo(deliveryDriverInfo.getTrainNumber()); + warehouseRetentionRecordEntity.setAssembleCarPersonId(distributionDeliverySelfVO.getDeliveryId()); + warehouseRetentionRecordEntity.setAssembleCarPersonName(distributionDeliverySelfVO.getDriverName()); + //统计数量 + AtomicInteger retentionQuantity = new AtomicInteger(); + List parcelListEntityList = retentionDTO.getParcelListEntityList(); + if (Func.isNotEmpty(parcelListEntityList)){ + parcelListEntityList.forEach(p->{ + WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity(); + warehouseRetentionScanEntity.setConditions(1); + warehouseRetentionScanEntity.setDeliveryId(deliveryDriverInfo.getId()); + warehouseRetentionScanEntity.setOrderCode(p.getOrderCode()); + warehouseRetentionScanEntity.setOrderPackageCode(p.getOrderPackageCode()); + warehouseRetentionScanEntity.setOrderId(p.getStockArticleId()); + warehouseRetentionScanEntity.setOrderPackageId(p.getId()); + warehouseRetentionScanService.save(warehouseRetentionScanEntity); + retentionQuantity.getAndAdd(p.getQuantity()); + //缺少一个进行解绑的远程 + }); + } + List parcelNumberEntityList = retentionDTO.getParcelNumberEntityList(); + if (Func.isNotEmpty(parcelNumberEntityList)){ + parcelNumberEntityList.forEach(pn->{ + WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity(); + warehouseRetentionScanEntity.setConditions(2); + warehouseRetentionScanEntity.setDeliveryId(deliveryDriverInfo.getId()); + warehouseRetentionScanEntity.setOrderId(pn.getStockArticleId()); + warehouseRetentionScanEntity.setOrderPackageId(pn.getParcelListId()); + warehouseRetentionScanService.save(warehouseRetentionScanEntity); + retentionQuantity.getAndAdd(pn.getQuantity()); + }); + } + List detailEntityList = retentionDTO.getDetailEntityList(); + if (Func.isNotEmpty(detailEntityList)){ + detailEntityList.forEach(d->{ + WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity(); + warehouseRetentionScanEntity.setConditions(3); + warehouseRetentionScanEntity.setDeliveryId(deliveryDriverInfo.getId()); + warehouseRetentionScanEntity.setInventoryId(d.getStockListId()); + warehouseRetentionScanEntity.setMaterialName(d.getMaterialName()); + warehouseRetentionScanEntity.setMaterialNumber(d.getMaterialNumber()); + warehouseRetentionScanEntity.setOrderPackageCode(d.getStockPackageCode()); + warehouseRetentionScanEntity.setOrderPackageId(d.getId()); + warehouseRetentionScanService.save(warehouseRetentionScanEntity); + retentionQuantity.getAndAdd(d.getNum()); + }); + } + + this.save(warehouseRetentionRecordEntity); + return Resp.scanSuccess("操作成功","操作成功"); + } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java index 4f3dfcea2..dda16518b 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java @@ -18,8 +18,10 @@ package com.logpm.warehouse.wrapper; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; +import org.springblade.common.constant.DictBizConstant; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.system.cache.DictBizCache; import java.util.Objects; @@ -38,7 +40,7 @@ public class WarehouseRetentionRecordWrapper extends BaseEntityWrapper { + + public static WarehouseRetentionScanWrapper build() { + return new WarehouseRetentionScanWrapper(); + } + + @Override + public WarehouseRetentionScanVO entityVO(WarehouseRetentionScanEntity warehouseRetentionScanEntity) { + WarehouseRetentionScanVO warehouseRetentionScanVO = Objects.requireNonNull(BeanUtil.copy(warehouseRetentionScanEntity, WarehouseRetentionScanVO.class)); +// warehouseRetentionRecordVO.setRetentionTypeName(DictBizCache.getValue(DictBizConstant.WAREHOUSE_TRAY_BINDING_TYPE, warehouseRetentionRecord.getRetentionType())); + //User createUser = UserCache.getUser(warehouseRetentionRecord.getCreateUser()); + //User updateUser = UserCache.getUser(warehouseRetentionRecord.getUpdateUser()); + //warehouseRetentionRecordVO.setCreateUserName(createUser.getName()); + //warehouseRetentionRecordVO.setUpdateUserName(updateUser.getName()); + + return warehouseRetentionScanVO; + } + + +}