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 8e5f94f3d..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 @@ -104,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/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/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-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/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-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java index fbccbe226..86d98ec88 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java @@ -5,9 +5,11 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.distribution.bean.Resp; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO; +import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.service.IDistributionDeliveryInfoService; import com.logpm.distribution.service.IDistributionDeliveryListService; import com.logpm.distribution.vo.DisStockListDetailVO; +import com.logpm.distribution.vo.DistributionParcelListVO; import com.logpm.distribution.vo.app.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -267,4 +269,37 @@ public class DistributionDeliveryAppController { } + + /** + * 扫描查询配送任务下的包件信息 + */ + @PostMapping("/retentionScan") + @ApiOperationSupport(order = 11) + public R retentionScan(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { + R r = distributionDeliveryListService.retentionScan(distrilbutionloadingscanDTO); + return r; + } + + + /** + * 扫描查询配送任务下的包件信息 + */ + @PostMapping("/getZeroPackageInfo") + @ApiOperationSupport(order = 11) + public R getZeroPackageInfo(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { + R distributionParcelListVOS = distributionDeliveryListService.getZeroPackageInfo(distrilbutionloadingscanDTO); + return R.data(distributionParcelListVOS); + } + + + /** + * 扫描查询配送任务下的包件信息 + */ + @PostMapping("/getInventoryInfo") + @ApiOperationSupport(order = 11) + public R getInventoryInfo(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { + R r = distributionDeliveryListService.getInventoryInfo(distrilbutionloadingscanDTO); + return R.data(r); + } + } 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 e75a8034a..bffd7e65b 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 @@ -253,13 +253,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; } /** @@ -308,4 +305,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/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/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 25423c17f..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 @@ -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 61b5fad6e..b2a1e5d05 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 @@ -1590,5 +1590,77 @@ WHERE ldrs.stock_article_id = #{orderId} AND lddl.id=#{deliveryListId} and ldrs.stock_article_status in ('1','3') AND ldrzp.zero_package_status IN ( '1', '3' ) + + + 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/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index c694c6f13..178d25b4d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -931,6 +931,6 @@ ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java index 06f39f4b2..25b838b5e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java @@ -289,4 +289,31 @@ public interface IDistributionDeliveryListService extends BaseService getDriverInfo(Long deliveryId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java index bd5a3e383..b1984739e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java @@ -193,4 +193,6 @@ public interface IDistributionSignforService extends BaseService selectDistributionDeliveryorder(IPage page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO) { List distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryOrderPage(page, distributionDeliveryInfoDTO); - for (DistributionStockArticleVO distributionDeliveryInfoVO : distributionDeliveryInfoVOS) { - //查询签收数量 - //查询装车数量 -// distributionDeliveryInfoVO.get -// distributionDeliveryInfoVO.setLoadingNumber(); -// distributionLoadscanService.list(Wrappers.query().lambda().eq()) -// DistributionStockArticleWrapper.build().buildVoInfor(distributionDeliveryInfoVO); - } +// for (DistributionStockArticleVO distributionDeliveryInfoVO : distributionDeliveryInfoVOS) { +// //查询签收数量 +// //查询装车数量 +//// distributionDeliveryInfoVO.get +//// distributionDeliveryInfoVO.setLoadingNumber(); +//// distributionLoadscanService.list(Wrappers.query().lambda().eq()) +//// DistributionStockArticleWrapper.build().buildVoInfor(distributionDeliveryInfoVO); +// } return page.setRecords(distributionDeliveryInfoVOS); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index d9e434d28..bb7fd3a13 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -42,7 +42,9 @@ import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.app.*; import com.logpm.distribution.vo.print.PrintPreviewVO; import com.logpm.distribution.wrapper.*; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity; +import com.logpm.warehouse.feign.IWarehouseRetentionScanClient; import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient; import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; @@ -151,6 +153,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.query().lambda() .eq(DistributionReservationStockarticleEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())); @@ -1314,7 +1319,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl { - List parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), ord.getStockArticleId()); for (DistributionParcelListEntity parcelListEntity : parcelListEntities) { DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity(); @@ -5153,6 +5157,127 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl retentionScanVos = new ArrayList<>(); + switch (retentionType){ + case 1: + //包件--库存品 和包件 + List parcelListEntities = baseMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); +// List detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isNotEmpty(parcelListEntities)){ + List packageInfo = parcelListEntities.stream().filter(p -> Func.equals(p.getOrderPackageCode(),distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList()); + if (packageInfo.size()>1){ + log.error("################包条码重复:{}",distrilbutionloadingscanDTO.getBarcode()); + return Resp.scanFail("操作失败","操作失败"); + } + if (packageInfo.size() == 1){ +// DistributionRetentionScanVo distributionRetentionScanVo = new DistributionRetentionScanVo(); + //此时才是满足条件的包件,能够进行滞留 + //通过配送任务和包件确定预约信息 + DistributionParcelListEntity parcelListEntity = packageInfo.get(0); + DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(parcelListEntity.getOrderPackageCode(), distrilbutionloadingscanDTO.getDeliveryId()); + retentionScanVos.add(retentionScanVo); + } + } else { + List detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isNotEmpty(detailEntities)){ + List stockListDetailEntities = detailEntities.stream().filter(i -> Func.isNotEmpty(i.getStockPackageCode()) && Func.equals(i.getStockPackageCode(), distrilbutionloadingscanDTO.getDeliveryId())).collect(Collectors.toList()); + if (stockListDetailEntities.size()> 1){ + log.error("################库存品条码重复:{}",distrilbutionloadingscanDTO.getBarcode()); + return Resp.scanFail("操作失败","操作失败"); + } + if (stockListDetailEntities.size() == 1){ + DisStockListDetailEntity disStockListDetailEntity = stockListDetailEntities.get(0); + DistributionRetentionScanVo inventoryPackage = baseMapper.selectRetentionInventoryPackage(disStockListDetailEntity.getStockPackageCode(), distrilbutionloadingscanDTO.getDeliveryId()); + retentionScanVos.add(inventoryPackage); + } + }else { + log.error("################查询包件和库存品为空:{}",distrilbutionloadingscanDTO.getDeliveryId()); + return Resp.scanFail("操作失败","不属于该配送任务!!!"); + } + } + List distributionRetentionScanVos = baseMapper.selectRetentionZeroPackage(distrilbutionloadingscanDTO.getDeliveryId(),distrilbutionloadingscanDTO.getBarcode()); + if (Func.isNotEmpty(distributionRetentionScanVos)){ + retentionScanVos.addAll(distributionRetentionScanVos); + } + break; + case 2: + //托盘 + break; + default: + log.info("################无满足滞留扫描类型"); + break; + } +// warehouseRetentionScanClient.saveRetentionScan(); + if (Func.isEmpty(retentionScanVos)){ + return Resp.scanFail("操作失败","无该信息!!!"); + } + return R.data(retentionScanVos); + } + + @Override + public R getZeroPackageInfo(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { + List reservationStockarticleEntityList = baseMapper.selectReservationStockByDeliveryId(distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isEmpty(reservationStockarticleEntityList)){ + log.error("#############配送任务查询订单错误,deliveryId:{}",distrilbutionloadingscanDTO.getDeliveryId()); + return null; + } + List orderIds = reservationStockarticleEntityList.stream().filter(rs -> Func.isNotEmpty(rs.getIsZero()) && rs.getIsZero().equals(IsOrNoConstant.yes.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); + if (Func.isEmpty(orderIds)){ + log.error("####################配送任务下无零担信息:{}"); + return Resp.scanFail("查询错误","该任务无零担订单"); + } + List parcelNumberVOS = new ArrayList<>(); + orderIds.forEach(o->{ + List parcelNumberVOList = baseMapper.selectDeliveryZeroOrderDetail(o, distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isNotEmpty(parcelNumberVOList)){ + parcelNumberVOS.addAll(parcelNumberVOList); + } + }); + if (Func.isEmpty(parcelNumberVOS)){ + return Resp.scanFail("查询失败","该配送任务无该零担订单"); + } + return R.data(parcelNumberVOS); + } + + @Override + public R getInventoryInfo(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { + List detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); + if (Func.isEmpty(detailEntities)){ + log.error("######################查询配送任务零担信息错误,deliveryId:{},",distrilbutionloadingscanDTO.getDeliveryId()); + return null; + } + List stockListDetailEntities = detailEntities.stream().filter(d -> Func.isNotEmpty(d.getStockPackageCode())).filter(d -> d.getStockPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList()); + List disStockListDetailVOS = DistributionDisStockListWrapper.build().listVO(stockListDetailEntities); + List inventoryIds = disStockListDetailVOS.stream().map(DisStockListDetailVO::getStockListId).distinct().collect(Collectors.toList()); + DistributionStockListEntity distributionStockListEntity = distributionStockListService.listByIds(inventoryIds).get(0); + disStockListDetailVOS.stream().forEach(d->{d.setMarketName(distributionStockListEntity.getMarketName());d.setCargoNumber(distributionStockListEntity.getCargoNumber());}); + if (Func.isEmpty(stockListDetailEntities)){ + return Resp.scanFail("查询失败","不属于该配送任务"); + } + return R.data(stockListDetailEntities); + } + + @Override + public List getDriverInfo(Long deliveryId) { + DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(deliveryId); + if (Func.isEmpty(distributionDeliveryListEntity)) { + log.error("############################# 配送任务查询为空,deliveryId为:{}", distributionDeliveryListEntity); + } + //零担订单进行装车 + //这里需要进行判定是进行编辑还是进行的装车 + DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity(); + if (distributionDeliveryListEntity.getKind().equals("1")) { + distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectById(deliveryId); + } else { + DistributionDeliveryTripartiteEntity distributionDeliveryTripartiteEntity = distributionDeliveryTripartiteMapper.selectTripartiteInfo(deliveryId); + BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity); + } + return null; + } + public Map getDriverCar(String kind, Long deliveryListEntityId) { Map map = new HashMap<>(); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index a1a234c57..9dd9557c4 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -2238,7 +2238,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionSignPrintList = new ArrayList<>(); distributionSignfor.getMap().forEach((k, v) -> { - List list = iDistributionSignPrintService.list(Wrappers.query().lambda() .eq(DistributionSignPrintEntity::getReservationId, distributionSignfor.getReservationId()) .eq(DistributionSignPrintEntity::getType, k) @@ -2508,5 +2507,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<>(); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java index 48cef8aa1..d6626b8c7 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java @@ -219,10 +219,8 @@ public class OrderServiceImpl implements IOrderService { declared.setAccessible(true); //抑制java语言访问检查,反射访问private访问权限的属性值 Object valueTemp = declared.get(responseStationOrderInfoVo); // 获取实体类中属性的值 Class t = f.getType(); - logger.info(">>>>>>>>>>>>>>>>> {}",t.getName()); // 基本数据类型 包含String if (t.getName().equals("java.lang.Integer") || t.getName().equals("java.lang.String") ) { - logger.info(">>> fieldName {} valueTemp {}",fieldName,valueTemp); if (!ObjectUtils.isEmpty(valueTemp)) { // 包含下划线 if (fieldName.indexOf("_") != -1) { @@ -239,7 +237,6 @@ public class OrderServiceImpl implements IOrderService { Field field = c.getDeclaredField(fieldName); field.setAccessible(true); //抑制java语言访问检查,反射访问private访问权限的属性值 field.set(stationOrderEntity, value); - logger.info(">>> fieldName {} valueTemp {}",fieldName,value); } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java new file mode 100644 index 000000000..8e7b5fcab --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java @@ -0,0 +1,9 @@ +package com.logpm.trunkline.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TrunklineBillladingLineMapper extends BaseMapper { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml new file mode 100644 index 000000000..b9de6ea86 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml new file mode 100644 index 000000000..4d08ed327 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.xml new file mode 100644 index 000000000..a82c370dc --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java new file mode 100644 index 000000000..a402f8ca1 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java @@ -0,0 +1,7 @@ +package com.logpm.trunkline.service; + +import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import org.springblade.core.mp.base.BaseService; + +public interface ITrunklineBillladingLineService extends BaseService { +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java new file mode 100644 index 000000000..f99f463c6 --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java @@ -0,0 +1,15 @@ +package com.logpm.trunkline.service.impl; + +import com.logpm.trunkline.entity.TrunklineBillladingLineEntity; +import com.logpm.trunkline.mapper.TrunklineBillladingLineMapper; +import com.logpm.trunkline.service.ITrunklineBillladingLineService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Slf4j +@AllArgsConstructor +@Service +public class TrunklineBillladingLineServiceImpl extends BaseServiceImpl implements ITrunklineBillladingLineService { +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java index 3999338ab..e917464d8 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java @@ -1,9 +1,14 @@ package com.logpm.warehouse.api; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.warehouse.dto.RetentionDTO; +import com.logpm.warehouse.dto.WarehouseRetentionRecordDTO; +import com.logpm.warehouse.dto.WarehouseRetentionScanDTO; +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.service.IWarehouseRetentionRecordService; +import com.logpm.warehouse.service.IWarehouseRetentionScanService; import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -11,9 +16,11 @@ import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springblade.common.exception.CustomerException; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.StringUtil; import org.springframework.web.bind.annotation.*; +import java.util.List; import java.util.Objects; @Log4j2 @@ -25,38 +32,69 @@ public class WarehouseRetentionApiController { private final IWarehouseRetentionRecordService warehouseRetentionRecordService; - - - -// @ResponseBody -// @PostMapping("/retentionPackageList") + private final IWarehouseRetentionScanService warehouseRetentionScanService; + + + @ResponseBody + @PostMapping("/retentionPackageList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "滞留包件列表", notes = "传入trayTypeDTO") + public R> retentionPackageList(@RequestBody RetentionDTO retentionDTO) { + String method = "###########retentionPackageList: "; + log.info(method + "滞留包件列表 retentionDTO={}", retentionDTO); + Integer pageNum = retentionDTO.getPageNum(); + Integer pageSize = retentionDTO.getPageSize(); + + if (Objects.isNull(pageNum)) { + retentionDTO.setPageNum(1); + } + if (Objects.isNull(pageSize)) { + retentionDTO.setPageSize(10); + } + + try { + //查询订制品打托列表 + IPage pages = warehouseRetentionRecordService.retentionPackageList(retentionDTO); + return R.data(pages); + } catch (CustomerException e) { + log.warn(e.message); + return R.fail(e.code, e.message); + } catch (Exception e) { + log.error(method + "系统异常,联系管理员", e); + return R.fail(500, "系统异常,联系管理员"); + } + } + + + // @GetMapping + @GetMapping("/initRetentionList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "初始化滞留车次信息", notes = "传入trayTypeDTO") + public R initRetentionList(@RequestParam Long deliveryId) { + WarehouseRetentionRecordVO warehouseRetentionRecordVO = warehouseRetentionRecordService.initRetentionList(deliveryId); + return R.data(warehouseRetentionRecordVO); + } + + @PostMapping("/saveRetentionList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "保存滞留扫描列表", notes = "传入trayTypeDTO") + public R saveRetentionList(@RequestBody WarehouseRetentionRecordDTO warehouseRetentionScanDTOS) { +// R r = warehouseRetentionRecordService.saveRetentionList(warehouseRetentionScanDTOS); + R r = warehouseRetentionScanService.saveRetentionList(warehouseRetentionScanDTOS); + return r; + } + + + +// @GetMapping("/initRetentionList") // @ApiOperationSupport(order = 1) -// @ApiOperation(value = "滞留包件列表", notes = "传入trayTypeDTO") -// public R> retentionPackageList(@RequestBody RetentionDTO retentionDTO) { -// String method = "###########retentionPackageList: "; -// log.info(method+"滞留包件列表 retentionDTO={}",retentionDTO); -// Integer pageNum = retentionDTO.getPageNum(); -// Integer pageSize = retentionDTO.getPageSize(); -// -// if(Objects.isNull(pageNum)){ -// retentionDTO.setPageNum(1); -// } -// if(Objects.isNull(pageSize)){ -// retentionDTO.setPageSize(10); -// } -// -// try{ -// //查询订制品打托列表 -// IPage pages = warehouseRetentionRecordService.retentionPackageList(retentionDTO); -// return R.data(pages); -// }catch (CustomerException e){ -// log.warn(e.message); -// return R.fail(e.code,e.message); -// }catch (Exception e){ -// log.error(method+"系统异常,联系管理员",e); -// return R.fail(500,"系统异常,联系管理员"); -// } +// @ApiOperation(value = "初始化滞留车次信息", notes = "传入trayTypeDTO") +// public R initRetentionList(@RequestParam Long deliveryId) { +// WarehouseRetentionRecordVO warehouseRetentionRecordVO = warehouseRetentionRecordService.initRetentionList(deliveryId); +// return R.data(warehouseRetentionRecordVO); // } + + // // // @ResponseBody @@ -85,8 +123,6 @@ public class WarehouseRetentionApiController { // } - - // @ResponseBody // @PostMapping("/retentionScanPackage") // @ApiOperationSupport(order = 1) @@ -113,6 +149,4 @@ public class WarehouseRetentionApiController { // } - - } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java index d21f0962c..eeef525c9 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java @@ -1,8 +1,13 @@ package com.logpm.warehouse.dto; +import com.logpm.distribution.entity.DisStockListDetailEntity; +import com.logpm.distribution.entity.DistributionParcelListEntity; +import com.logpm.distribution.entity.DistributionParcelNumberEntity; +import com.logpm.distribution.vo.DistributionParcelListVO; import lombok.Data; import java.io.Serializable; +import java.util.List; @Data public class RetentionDTO implements Serializable { @@ -14,4 +19,22 @@ public class RetentionDTO implements Serializable { private String endDate; private String orderPackageCode; + + /** + * 配送任务ID + */ + private Long deliveryId; + + /** + * 配送任务ID + */ + private String remarks; + + + private List parcelListEntityList; + + private List parcelNumberEntityList; + + private List detailEntityList; + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDistributionListDetailDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDistributionListDetailDTO.java new file mode 100644 index 000000000..3be7d0ec1 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDistributionListDetailDTO.java @@ -0,0 +1,14 @@ +package com.logpm.warehouse.dto; + +import com.logpm.distribution.entity.DisStockListDetailEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +public class RetentionDistributionListDetailDTO extends DisStockListDetailEntity { + + private String MaterialName; + + private String materialNumber; +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionParcelListDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionParcelListDTO.java new file mode 100644 index 000000000..d6ddbdfae --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionParcelListDTO.java @@ -0,0 +1,11 @@ +package com.logpm.warehouse.dto; + +import com.logpm.distribution.entity.DistributionParcelListEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +@Data +@EqualsAndHashCode(callSuper = true) +public class RetentionParcelListDTO extends DistributionParcelListEntity { +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionZeroParcelDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionZeroParcelDTO.java new file mode 100644 index 000000000..3d13caac6 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionZeroParcelDTO.java @@ -0,0 +1,10 @@ +package com.logpm.warehouse.dto; + +import com.logpm.distribution.entity.DistributionParcelNumberEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +public class RetentionZeroParcelDTO extends DistributionParcelNumberEntity { +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionRecordDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionRecordDTO.java index 764faada2..49b398b15 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionRecordDTO.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionRecordDTO.java @@ -20,6 +20,8 @@ import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.List; + /** * 滞留记录 数据传输对象实体类 * @@ -31,4 +33,17 @@ import lombok.EqualsAndHashCode; public class WarehouseRetentionRecordDTO extends WarehouseRetentionRecordEntity { private static final long serialVersionUID = 1L; + + private Long deliveryId; + + private String remarks; + + private String trainNumber; + + private Long loadingId; + + + + private List warehouseRetentionScanDTOS; + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java index d7972a750..730cd1f55 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java @@ -25,6 +25,7 @@ import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.service.IWarehouseRetentionRecordService; +import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; @@ -52,4 +53,9 @@ public class WarehouseRetentionScanClient implements IWarehouseRetentionScanClie return BladePage.of(page); } + @Override + public R saveRetentionScan(WarehouseRetentionScanEntity warehouseRetentionScanEntity) { + return R.status(warehouseRetentionScanService.save(warehouseRetentionScanEntity)); + } + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java index 4093e7224..27206b781 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java @@ -62,4 +62,5 @@ public interface WarehouseRetentionRecordMapper extends BaseMapper retentionPackageList(IPage page, @Param("param") RetentionDTO retentionDTO); + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml index 079120755..de5790d85 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml @@ -61,4 +61,5 @@ order by update_time desc + 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..9e2b006ce 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 @@ -19,6 +19,7 @@ package com.logpm.warehouse.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.warehouse.dto.RetentionDTO; +import com.logpm.warehouse.dto.WarehouseRetentionScanDTO; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; @@ -62,4 +63,12 @@ public interface IWarehouseRetentionRecordService extends BaseService retentionPackageList(RetentionDTO retentionDTO); R retentionScanPackage(String orderPackageCode); + + /** + * PDA查询初始化滞留扫描页 + * @param deliveryId + * @return + */ + WarehouseRetentionRecordVO initRetentionList(Long deliveryId); + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java index 5c43e2950..dae41a843 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java @@ -17,6 +17,8 @@ package com.logpm.warehouse.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.logpm.warehouse.dto.WarehouseRetentionRecordDTO; +import com.logpm.warehouse.dto.WarehouseRetentionScanDTO; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; @@ -24,6 +26,7 @@ import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.logpm.warehouse.vo.WarehouseRetentionScanVO; +import org.springblade.core.tool.api.R; import java.util.List; @@ -52,4 +55,6 @@ public interface IWarehouseRetentionScanService extends IService exportWarehouseRetentionRecord(Wrapper queryWrapper); + R saveRetentionList(WarehouseRetentionRecordDTO warehouseRetentionRecordEntity); + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java index 1e353048a..2fa38976e 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java @@ -18,26 +18,45 @@ package com.logpm.warehouse.service.impl; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.logpm.basicdata.entity.BasicdataWarehouseEntity; +import com.logpm.basicdata.feign.IBasicdataWarehouseClient; +import com.logpm.distribution.entity.DisStockListDetailEntity; import com.logpm.distribution.entity.DistributionLoadscanEntity; import com.logpm.distribution.entity.DistributionParcelListEntity; +import com.logpm.distribution.entity.DistributionParcelNumberEntity; +import com.logpm.distribution.feign.IDistributionDeliveryListClient; import com.logpm.distribution.feign.IDistributionLoadscanClient; import com.logpm.distribution.feign.IDistributionParcelListClient; -import com.logpm.warehouse.dto.RetentionDTO; +import com.logpm.distribution.vo.DistributionDeliveryListVO; +import com.logpm.distribution.vo.DistributionDeliverySelfVO; +import com.logpm.oldproject.feign.IWarehouseClient; +import com.logpm.warehouse.bean.Resp; +import com.logpm.warehouse.dto.*; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; import com.logpm.warehouse.mapper.WarehouseRetentionRecordMapper; import com.logpm.warehouse.service.IWarehouseRetentionRecordService; +import com.logpm.warehouse.service.IWarehouseRetentionScanService; import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; import com.logpm.warehouse.vo.WarehouseWaybillDetentionVO; import com.logpm.warehouse.wrapper.WarehouseRetentionRecordWrapper; +import com.logpm.warehouse.wrapper.WarehouseRetentionScanWrapper; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.common.constant.retention.RetentionTypeConstant; +import org.springblade.common.exception.CustomerException; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; import org.springframework.stereotype.Service; import java.util.List; import java.util.Objects; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; /** * 滞留记录 服务实现类 @@ -47,10 +66,14 @@ import java.util.Objects; */ @AllArgsConstructor @Service +@Slf4j public class WarehouseRetentionRecordServiceImpl 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 +140,23 @@ 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; + } + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java index 5b1e2265d..25ca4f822 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java @@ -16,6 +16,11 @@ */ package com.logpm.warehouse.service.impl; +import com.logpm.basicdata.entity.BasicdataWarehouseEntity; +import com.logpm.basicdata.feign.IBasicdataWarehouseClient; +import com.logpm.warehouse.bean.Resp; +import com.logpm.warehouse.dto.WarehouseRetentionRecordDTO; +import com.logpm.warehouse.dto.WarehouseRetentionScanDTO; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; @@ -25,6 +30,8 @@ import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; import com.logpm.warehouse.vo.WarehouseRetentionScanVO; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -39,6 +46,9 @@ import java.util.List; @Service public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl implements IWarehouseRetentionScanService { + + private IBasicdataWarehouseClient warehouseClient; + @Override public IPage selectWarehouseRetentionRecordPage(IPage page, WarehouseRetentionScanVO warehouseRetentionScanVO) { return page.setRecords(baseMapper.selectWarehouseRetentionRecordPage(page, warehouseRetentionScanVO)); @@ -54,4 +64,28 @@ public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl warehouseRetentionScanDTOS = warehouseRetentionRecordDTO.getWarehouseRetentionScanDTOS(); + if (Func.isEmpty(warehouseRetentionScanDTOS)){ + log.error("############用户提交空滞留列表"); + return Resp.scanFail("操作失败","无滞留包件信息"); + } + //TODO 保存车次数据还需要处理 + WarehouseRetentionRecordEntity warehouseRetentionRecordEntity = new WarehouseRetentionRecordEntity(); + warehouseRetentionRecordEntity.setTaskId(warehouseRetentionRecordDTO.getDeliveryId()); + warehouseRetentionRecordEntity.setRemark(warehouseRetentionRecordDTO.getRemark()); + warehouseRetentionRecordEntity.setRetentionCarNo(warehouseRetentionRecordDTO.getTrainNumber()); + warehouseRetentionRecordEntity.setRetentionCarId(warehouseRetentionRecordDTO.getLoadingId()); + warehouseRetentionRecordEntity.setRetentionWarehouseId(myCurrentWarehouse.getId()); + warehouseRetentionRecordEntity.setRetentionWarehouseName(myCurrentWarehouse.getName()); + warehouseRetentionScanDTOS.forEach(r->{ + this.save(Func.copy(r,WarehouseRetentionScanEntity.class)); + }); + 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; + } + + +} diff --git a/blade-service/pom.xml b/blade-service/pom.xml index 37f463927..274758e79 100644 --- a/blade-service/pom.xml +++ b/blade-service/pom.xml @@ -47,6 +47,11 @@ blade-biz-common ${bladex.project.version} + + + org.springblade + blade-starter-metrics + org.springblade blade-starter-tenant