From 14f74973a431ddb1634fb251ddf44b0aadf1b5db Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 3 Nov 2023 18:01:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=BB=9E=E7=95=99=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E5=8C=85=E4=BB=B6=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionRetentionScanEntity.java | 181 ++++++++++++++++ .../vo/DistributionSignforVO.java | 7 + .../entity/WarehouseRetentionScanEntity.java | 183 ++++++++++++++++ .../feign/IWarehouseRetentionScanClient.java | 50 +++++ .../vo/WarehouseRetentionScanVO.java | 34 +++ .../mapper/DistributionSignforMapper.java | 13 +- .../mapper/DistributionSignforMapper.xml | 3 + .../impl/DistributionSignforServiceImpl.java | 2 + .../api/WarehouseRetentionApiController.java | 144 ++++++++----- .../WarehouseRetentionScanController.java | 154 ++++++++++++++ .../com/logpm/warehouse/dto/RetentionDTO.java | 1 - .../dto/WarehouseRetentionScanDTO.java | 34 +++ .../excel/WarehouseRetentionScanExcel.java | 201 ++++++++++++++++++ .../feign/WarehouseRetentionScanClient.java | 55 +++++ .../mapper/WarehouseRetentionScanMapper.java | 57 +++++ .../mapper/WarehouseRetentionScanMapper.xml | 52 +++++ .../IWarehouseRetentionScanService.java | 55 +++++ .../WarehouseRetentionScanServiceImpl.java | 57 +++++ 18 files changed, 1223 insertions(+), 60 deletions(-) create mode 100644 blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java create mode 100644 blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java create mode 100644 blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java create mode 100644 blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseRetentionScanController.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionScanDTO.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehouseRetentionScanExcel.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java new file mode 100644 index 000000000..f5b0202b8 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import java.io.Serializable; + +/** + * 滞留扫描操作表 实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@TableName("logpm_distribution_retention_scan") +@ApiModel(value = "DistributionRetentionScan对象", description = "滞留扫描操作表") +public class DistributionRetentionScanEntity implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 租户号 + */ + @ApiModelProperty(value = "租户号") + private String tenantId; + /** + * 是否已删除 + */ + @ApiModelProperty(value = "是否已删除") + private Integer isDeleted; + /** + * 预留1 + */ + @ApiModelProperty(value = "预留1") + private String reserve1; + /** + * 预留2 + */ + @ApiModelProperty(value = "预留2") + private String reserve2; + /** + * 预留3 + */ + @ApiModelProperty(value = "预留3") + private String reserve3; + /** + * 预留4 + */ + @ApiModelProperty(value = "预留4") + private String reserve4; + /** + * 预留5 + */ + @ApiModelProperty(value = "预留5") + private String reserve5; + /** + * 配送车次号 + */ + @ApiModelProperty(value = "配送车次号") + private String trainNumber; + /** + * 订单ID + */ + @ApiModelProperty(value = "订单ID") + private Long orderId; + /** + * 库存品ID + */ + @ApiModelProperty(value = "库存品ID") + private Long inventoryId; + /** + * 滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品 + */ + @ApiModelProperty(value = "滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品") + private Integer conditions; + /** + * 物料编码(库存品) + */ + @ApiModelProperty(value = "物料编码(库存品)") + private String materialNumber; + /** + * 物料名称(库存品) + */ + @ApiModelProperty(value = "物料名称(库存品)") + private String materialName; + /** + * 预约客户ID + */ + @ApiModelProperty(value = "预约客户ID") + private Long reservationId; + /** + * 订单自编号(库存品没有) + */ + @ApiModelProperty(value = "订单自编号(库存品没有)") + private String orderCode; + /** + * 预约单号 + */ + @ApiModelProperty(value = "预约单号") + private String reservationCode; + /** + * 扫描类型:1-包件、2-订单、3-托盘、4... + */ + @ApiModelProperty(value = "扫描类型:1-包件、2-订单、3-托盘、4...") + private Integer scanType; + /** + * 包件ID + */ + @ApiModelProperty(value = "包件ID") + private Long orderPackageId; + /** + * 包条码 + */ + @ApiModelProperty(value = "包条码") + private String orderPackageCode; + /** + * 滞留数量 + */ + @ApiModelProperty(value = "滞留数量") + private Integer retentionQuantity; + /** + * 滞留扫描操作人名称 + */ + @ApiModelProperty(value = "滞留扫描操作人名称") + private String retentionScanUsername; + /** + * 滞留扫描操作人Id + */ + @ApiModelProperty(value = "滞留扫描操作人Id") + private String retentionScanUserId; + /** + * 滞留操作备注 + */ + @ApiModelProperty(value = "滞留操作备注") + private String remarks; + /** + * 滞留扫描时间 + */ + @ApiModelProperty(value = "滞留扫描时间") + private Date retentionScanTime; + /** + * 滞留方式 1-PDA、2-PC + */ + @ApiModelProperty(value = "滞留方式 1-PDA、2-PC") + private Integer retentionWay; + /** + * 配送任务ID + */ + @ApiModelProperty(value = "配送任务ID") + private Long deliveryListId; + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java index bc17283f5..aaedc946d 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java @@ -16,6 +16,7 @@ */ package com.logpm.distribution.vo; +import com.logpm.distribution.entity.DistributionSignPrintEntity; import com.logpm.distribution.entity.DistributionSignforEntity; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -150,6 +151,12 @@ public class DistributionSignforVO extends DistributionSignforEntity { @ApiModelProperty(value = "卸车班组") private String sijiSigningStatus; + /** + * 签收图片路径,多个 + */ + @ApiModelProperty(value = "卸车班组") + private List printVOList; + /** * 客户订单列表 */ 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 new file mode 100644 index 000000000..9482f7773 --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serializable; + +/** + * 滞留扫描记录 实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@TableName("logpm_warehouse_retention_scan") +@ApiModel(value = "WarehouseRetentionRecord对象", description = "滞留扫描记录") +public class WarehouseRetentionScanEntity extends TenantEntity implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 租户号 + */ + @ApiModelProperty(value = "租户号") + private String tenantId; + /** + * 是否已删除 + */ + @ApiModelProperty(value = "是否已删除") + private Integer isDeleted; + /** + * 预留1 + */ + @ApiModelProperty(value = "预留1") + private String reserve1; + /** + * 预留2 + */ + @ApiModelProperty(value = "预留2") + private String reserve2; + /** + * 预留3 + */ + @ApiModelProperty(value = "预留3") + private String reserve3; + /** + * 预留4 + */ + @ApiModelProperty(value = "预留4") + private String reserve4; + /** + * 预留5 + */ + @ApiModelProperty(value = "预留5") + private String reserve5; + /** + * 配送车次号 + */ + @ApiModelProperty(value = "配送车次号") + private String trainNumber; + /** + * 订单ID + */ + @ApiModelProperty(value = "订单ID") + private Long orderId; + /** + * 库存品ID + */ + @ApiModelProperty(value = "库存品ID") + private Long inventoryId; + /** + * 滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品 + */ + @ApiModelProperty(value = "滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品") + private Integer conditions; + /** + * 物料编码(库存品) + */ + @ApiModelProperty(value = "物料编码(库存品)") + private String materialNumber; + /** + * 物料名称(库存品) + */ + @ApiModelProperty(value = "物料名称(库存品)") + private String materialName; + /** + * 预约客户ID + */ + @ApiModelProperty(value = "预约客户ID") + private Long reservationId; + /** + * 订单自编号(库存品没有) + */ + @ApiModelProperty(value = "订单自编号(库存品没有)") + private String orderCode; + /** + * 预约单号 + */ + @ApiModelProperty(value = "预约单号") + private String reservationCode; + /** + * 扫描类型:1-包件、2-订单、3-托盘、4... + */ + @ApiModelProperty(value = "扫描类型:1-包件、2-订单、3-托盘、4...") + private Integer scanType; + /** + * 包件ID + */ + @ApiModelProperty(value = "包件ID") + private Long orderPackageId; + /** + * 包条码 + */ + @ApiModelProperty(value = "包条码") + private String orderPackageCode; + /** + * 滞留数量 + */ + @ApiModelProperty(value = "滞留数量") + private Integer retentionQuantity; + /** + * 滞留扫描操作人名称 + */ + @ApiModelProperty(value = "滞留扫描操作人名称") + private String retentionScanUsername; + /** + * 滞留扫描操作人Id + */ + @ApiModelProperty(value = "滞留扫描操作人Id") + private String retentionScanUserId; + /** + * 滞留操作备注 + */ + @ApiModelProperty(value = "滞留操作备注") + private String remarks; + /** + * 滞留扫描时间 + */ + @ApiModelProperty(value = "滞留扫描时间") + private Date retentionScanTime; + /** + * 滞留方式 1-PDA、2-PC + */ + @ApiModelProperty(value = "滞留方式 1-PDA、2-PC") + private Integer retentionWay; + /** + * 配送任务ID + */ + @ApiModelProperty(value = "配送任务ID") + private Long deliveryListId; + +} 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 new file mode 100644 index 000000000..17bf7aca0 --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +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.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * 滞留扫描记录 Feign接口类 + * + * @author BladeX + * @since 2023-11-03 + */ +@FeignClient( + value = "warehouseRetentionScan" +) +public interface IWarehouseRetentionScanClient { + + String API_PREFIX = "retentionScan/client"; + String TOP = API_PREFIX + "/top"; + + /** + * 获取滞留扫描记录列表 + * + * @param current 页号 + * @param size 页数 + * @return BladePage + */ + @GetMapping(TOP) + BladePage retentionScanTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + +} diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java new file mode 100644 index 000000000..2fdb632da --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.vo; + +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 滞留扫描记录 视图实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WarehouseRetentionScanVO extends WarehouseRetentionScanEntity { + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java index 1c6364847..2bff9844d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java @@ -24,10 +24,7 @@ import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.excel.DistributionSignforExcel; -import com.logpm.distribution.vo.DistributionLoadscanAbnormalVO; -import com.logpm.distribution.vo.DistributionReservationStocklistVO; -import com.logpm.distribution.vo.DistributionSignforVO; -import com.logpm.distribution.vo.DistributionStockArticleVO; +import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; import com.logpm.distribution.vo.app.DistributionAppParcelListVO; import com.logpm.distribution.vo.app.DistributionAppSignforVO; @@ -227,4 +224,12 @@ public interface DistributionSignforMapper extends BaseMapper selectAbnormalPackageList(@Param("reservationId")Long reservationId,@Param("deliveryListId") Long deliveryId); + + + /** + * 查询签收图片 + * @param reservationId + * @return + */ + List selectSignImgsUrl(@Param("reservationId")Long reservationId); } 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 5f8c92620..896b546f1 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 @@ -930,4 +930,7 @@ WHERE ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId} + 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 df8280f52..9e2c73021 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 @@ -401,6 +401,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl orderIds = reservationStockarticleEntityList.stream().map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); List stockArticleEntities = distributionStockArticleService.listByIds(orderIds); + List printEntities = baseMapper.selectSignImgsUrl(distributionSignforVO.getReservationId()); + distributionSignforVO.setPrintVOList(printEntities); if (Func.isNotEmpty(stockArticleEntities)){ distributionSignforVO.setOrderInfo(DistributionStockArticleWrapper.build().listVO(stockArticleEntities)); } 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 46a924e3c..3999338ab 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 @@ -25,60 +25,94 @@ public class WarehouseRetentionApiController { private final IWarehouseRetentionRecordService warehouseRetentionRecordService; - @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,"系统异常,联系管理员"); - } - } - - - @ResponseBody - @PostMapping("/retentionScanPackage") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "滞留扫描包件码", notes = "传入trayTypeDTO") - public R retentionScanPackage(@RequestBody RetentionDTO retentionDTO) { - String method = "###########retentionScanPackage: "; - log.info(method + "滞留扫描包件码 retentionDTO={}", retentionDTO); - String orderPackageCode = retentionDTO.getOrderPackageCode();//包件码 - try{ - if(StringUtil.isBlank(orderPackageCode)){ - log.warn("############retentionScanPackage: 包件码不能为空 orderPackageCode={}",orderPackageCode); - return R.fail(403,"包件码不能为空"); - } - - //查询订制品打托列表 - return warehouseRetentionRecordService.retentionScanPackage(orderPackageCode); - }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,"系统异常,联系管理员"); - } - } + + + +// @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,"系统异常,联系管理员"); +// } +// } +// +// +// @ResponseBody +// @PostMapping("/retentionScanPackage") +// @ApiOperationSupport(order = 1) +// @ApiOperation(value = "滞留扫描包件码", notes = "传入trayTypeDTO") +// public R retentionScanPackage(@RequestBody RetentionDTO retentionDTO) { +// String method = "###########retentionScanPackage: "; +// log.info(method + "滞留扫描包件码 retentionDTO={}", retentionDTO); +// String orderPackageCode = retentionDTO.getOrderPackageCode();//包件码 +// try{ +// if(StringUtil.isBlank(orderPackageCode)){ +// log.warn("############retentionScanPackage: 包件码不能为空 orderPackageCode={}",orderPackageCode); +// return R.fail(403,"包件码不能为空"); +// } +// +// //查询订制品打托列表 +// return warehouseRetentionRecordService.retentionScanPackage(orderPackageCode); +// }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,"系统异常,联系管理员"); +// } +// } + + + + +// @ResponseBody +// @PostMapping("/retentionScanPackage") +// @ApiOperationSupport(order = 1) +// @ApiOperation(value = "滞留扫描包件码", notes = "传入trayTypeDTO") +// public R retentionScanPackage(@RequestBody RetentionDTO retentionDTO) { +// String method = "###########retentionScanPackage: "; +// log.info(method + "滞留扫描包件码 retentionDTO={}", retentionDTO); +// String orderPackageCode = retentionDTO.getOrderPackageCode();//包件码 +// try{ +// if(StringUtil.isBlank(orderPackageCode)){ +// log.warn("############retentionScanPackage: 包件码不能为空 orderPackageCode={}",orderPackageCode); +// return R.fail(403,"包件码不能为空"); +// } +// +// //查询订制品打托列表 +// return warehouseRetentionRecordService.retentionScanPackage(orderPackageCode); +// }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,"系统异常,联系管理员"); +// } +// } + + + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseRetentionScanController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseRetentionScanController.java new file mode 100644 index 000000000..7a8fc93aa --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseRetentionScanController.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.controller; + +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; +import com.logpm.warehouse.service.IWarehouseRetentionScanService; +import com.logpm.warehouse.vo.WarehouseRetentionScanVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import lombok.AllArgsConstructor; +import javax.validation.Valid; + +import org.springblade.core.secure.BladeUser; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; +import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; +import com.logpm.warehouse.service.IWarehouseRetentionRecordService; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.excel.util.ExcelUtil; +import org.springblade.core.tool.constant.BladeConstant; +import springfox.documentation.annotations.ApiIgnore; +import java.util.Map; +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +/** + * 滞留扫描记录 控制器 + * + * @author BladeX + * @since 2023-11-03 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/warehouseRetentionScan") +@Api(value = "滞留扫描记录", tags = "滞留扫描记录接口") +public class WarehouseRetentionScanController extends BladeController { + + private final IWarehouseRetentionScanService warehouseRetentionScanService; + + /** + * 滞留扫描记录 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入warehouseRetentionScan") + public R detail(WarehouseRetentionScanEntity warehouseRetentionScan) { + WarehouseRetentionScanEntity detail = warehouseRetentionScanService.getOne(Condition.getQueryWrapper(warehouseRetentionScan)); + return R.data(detail); + } + /** + * 滞留扫描记录 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入warehouseRetentionScan") + public R> list(@ApiIgnore @RequestParam Map warehouseRetentionScan, Query query) { + IPage pages = warehouseRetentionScanService.page(Condition.getPage(query), Condition.getQueryWrapper(warehouseRetentionScan, WarehouseRetentionScanEntity.class)); + return R.data(pages); + } + + /** + * 滞留扫描记录 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入warehouseRetentionScan") + public R> page(WarehouseRetentionScanVO warehouseRetentionScan, Query query) { + IPage pages = warehouseRetentionScanService.selectWarehouseRetentionRecordPage(Condition.getPage(query), warehouseRetentionScan); + return R.data(pages); + } + + /** + * 滞留扫描记录 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入warehouseRetentionScan") + public R save(@Valid @RequestBody WarehouseRetentionScanEntity warehouseRetentionScan) { + return R.status(warehouseRetentionScanService.save(warehouseRetentionScan)); + } + + /** + * 滞留扫描记录 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入warehouseRetentionScan") + public R update(@Valid @RequestBody WarehouseRetentionScanEntity warehouseRetentionScan) { + return R.status(warehouseRetentionScanService.updateById(warehouseRetentionScan)); + } + + /** + * 滞留扫描记录 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入warehouseRetentionScan") + public R submit(@Valid @RequestBody WarehouseRetentionScanEntity warehouseRetentionScan) { + return R.status(warehouseRetentionScanService.saveOrUpdate(warehouseRetentionScan)); + } + + /** + * 滞留扫描记录 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(warehouseRetentionScanService.removeByIds(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @GetMapping("/export-warehouseRetentionScan") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "导出数据", notes = "传入warehouseRetentionScan") + public void exportWarehouseRetentionScan(@ApiIgnore @RequestParam Map warehouseRetentionScan, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(warehouseRetentionScan, WarehouseRetentionScanEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(WarehouseRetentionScan::getTenantId, bladeUser.getTenantId()); + //} + queryWrapper.lambda().eq(WarehouseRetentionScanEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = warehouseRetentionScanService.exportWarehouseRetentionRecord(queryWrapper); + ExcelUtil.export(response, "滞留扫描记录数据" + DateUtil.time(), "滞留扫描记录数据表", list, WarehouseRetentionScanExcel.class); + } + +} 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 d1ed25541..d21f0962c 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 @@ -14,5 +14,4 @@ public class RetentionDTO implements Serializable { private String endDate; private String orderPackageCode; - } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionScanDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionScanDTO.java new file mode 100644 index 000000000..e3347140f --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseRetentionScanDTO.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.dto; + +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 滞留扫描记录 数据传输对象实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WarehouseRetentionScanDTO extends WarehouseRetentionScanEntity { + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehouseRetentionScanExcel.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehouseRetentionScanExcel.java new file mode 100644 index 000000000..953bed997 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehouseRetentionScanExcel.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.excel; + + +import lombok.Data; + +import java.util.Date; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import java.io.Serializable; + + +/** + * 滞留扫描记录 Excel实体类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class WarehouseRetentionScanExcel 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; + /** + * 配送车次号 + */ + @ColumnWidth(20) + @ExcelProperty("配送车次号") + private String trainNumber; + /** + * 订单ID + */ + @ColumnWidth(20) + @ExcelProperty("订单ID") + private Long orderId; + /** + * 库存品ID + */ + @ColumnWidth(20) + @ExcelProperty("库存品ID") + private Long inventoryId; + /** + * 滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品 + */ + @ColumnWidth(20) + @ExcelProperty("滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品") + private Integer conditions; + /** + * 物料编码(库存品) + */ + @ColumnWidth(20) + @ExcelProperty("物料编码(库存品)") + private String materialNumber; + /** + * 物料名称(库存品) + */ + @ColumnWidth(20) + @ExcelProperty("物料名称(库存品)") + private String materialName; + /** + * 预约客户ID + */ + @ColumnWidth(20) + @ExcelProperty("预约客户ID") + private Long reservationId; + /** + * 订单自编号(库存品没有) + */ + @ColumnWidth(20) + @ExcelProperty("订单自编号(库存品没有)") + private String orderCode; + /** + * 预约单号 + */ + @ColumnWidth(20) + @ExcelProperty("预约单号") + private String reservationCode; + /** + * 扫描类型:1-包件、2-订单、3-托盘、4... + */ + @ColumnWidth(20) + @ExcelProperty("扫描类型:1-包件、2-订单、3-托盘、4...") + private Integer scanType; + /** + * 包件ID + */ + @ColumnWidth(20) + @ExcelProperty("包件ID") + private Long orderPackageId; + /** + * 包条码 + */ + @ColumnWidth(20) + @ExcelProperty("包条码") + private String orderPackageCode; + /** + * 滞留数量 + */ + @ColumnWidth(20) + @ExcelProperty("滞留数量") + private Integer retentionQuantity; + /** + * 滞留扫描操作人名称 + */ + @ColumnWidth(20) + @ExcelProperty("滞留扫描操作人名称") + private String retentionScanUsername; + /** + * 滞留扫描操作人Id + */ + @ColumnWidth(20) + @ExcelProperty("滞留扫描操作人Id") + private String retentionScanUserId; + /** + * 滞留操作备注 + */ + @ColumnWidth(20) + @ExcelProperty("滞留操作备注") + private String remarks; + /** + * 滞留扫描时间 + */ + @ColumnWidth(20) + @ExcelProperty("滞留扫描时间") + private Date retentionScanTime; + /** + * 滞留方式 1-PDA、2-PC + */ + @ColumnWidth(20) + @ExcelProperty("滞留方式 1-PDA、2-PC") + private Integer retentionWay; + /** + * 配送任务ID + */ + @ColumnWidth(20) + @ExcelProperty("配送任务ID") + private Long deliveryListId; + +} 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 new file mode 100644 index 000000000..d7972a750 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.feign; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.service.IWarehouseRetentionScanService; +import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.BladePage; +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.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +/** + * 滞留扫描记录 Feign实现类 + * + * @author BladeX + * @since 2023-11-03 + */ +@ApiIgnore() +@RestController +@AllArgsConstructor +public class WarehouseRetentionScanClient implements IWarehouseRetentionScanClient { + + private final IWarehouseRetentionScanService warehouseRetentionScanService; + + @Override + @GetMapping(TOP) + public BladePage retentionScanTop(Integer current, Integer size) { + Query query = new Query(); + query.setCurrent(current); + query.setSize(size); + IPage page = warehouseRetentionScanService.page(Condition.getPage(query)); + return BladePage.of(page); + } + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java new file mode 100644 index 000000000..b3334d03c --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.mapper; + +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; +import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; +import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.warehouse.vo.WarehouseRetentionScanVO; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * 滞留扫描记录 Mapper 接口 + * + * @author BladeX + * @since 2023-11-03 + */ +public interface WarehouseRetentionScanMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param warehouseRetentionScanVO + * @return + */ + List selectWarehouseRetentionRecordPage(IPage page, WarehouseRetentionScanVO warehouseRetentionScanVO); + + + /** + * 获取导出数据 + * + * @param queryWrapper + * @return + */ + List exportWarehouseRetentionRecord(@Param("ew") Wrapper queryWrapper); + +} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml new file mode 100644 index 000000000..7330ce208 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..5c43e2950 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionScanService.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; +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 java.util.List; + +/** + * 滞留扫描记录 服务类 + * + * @author BladeX + * @since 2023-11-03 + */ +public interface IWarehouseRetentionScanService extends IService { + /** + * 自定义分页 + * + * @param page + * @param warehouseRetentionScanVO + * @return + */ + IPage selectWarehouseRetentionRecordPage(IPage page, WarehouseRetentionScanVO warehouseRetentionScanVO); + + + /** + * 导出数据 + * + * @param queryWrapper + * @return + */ + List exportWarehouseRetentionRecord(Wrapper queryWrapper); + +} 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 new file mode 100644 index 000000000..5b1e2265d --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionScanServiceImpl.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.warehouse.service.impl; + +import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; +import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; +import com.logpm.warehouse.excel.WarehouseRetentionScanExcel; +import com.logpm.warehouse.mapper.WarehouseRetentionScanMapper; +import com.logpm.warehouse.service.IWarehouseRetentionScanService; +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.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 滞留扫描记录 服务实现类 + * + * @author BladeX + * @since 2023-11-03 + */ +@Service +public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl implements IWarehouseRetentionScanService { + + @Override + public IPage selectWarehouseRetentionRecordPage(IPage page, WarehouseRetentionScanVO warehouseRetentionScanVO) { + return page.setRecords(baseMapper.selectWarehouseRetentionRecordPage(page, warehouseRetentionScanVO)); + } + + + @Override + public List exportWarehouseRetentionRecord(Wrapper queryWrapper) { + List warehouseRetentionRecordList = baseMapper.exportWarehouseRetentionRecord(queryWrapper); + //warehouseRetentionRecordList.forEach(warehouseRetentionRecord -> { + // warehouseRetentionRecord.setTypeName(DictCache.getValue(DictEnum.YES_NO, WarehouseRetentionRecord.getType())); + //}); + return warehouseRetentionRecordList; + } + +} From b4c4c0112840d25c0f86d047f48ea5203409e760 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Sat, 4 Nov 2023 15:31:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPan=20=E5=BC=80=E5=8D=95?= =?UTF-8?q?=E4=BC=9A=E6=8E=A8=E7=9A=84=E6=97=B6=E5=80=99=20=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oldproject/feign/IAdvanceClient.java | 10 +++++ .../impl/PanFactoryDataServiceImpl.java | 1 + .../factory/receiver/OpenOrderHandler.java | 45 +++++++++++-------- .../logpm/oldproject/feign/AdvanceClient.java | 6 ++- .../oldproject/mapper/AdvanceMapper.java | 1 + .../logpm/oldproject/mapper/AdvanceMapper.xml | 4 ++ .../oldproject/service/IAdvanceService.java | 7 +++ .../service/impl/AdvanceServiceImpl.java | 5 +++ 8 files changed, 59 insertions(+), 20 deletions(-) diff --git a/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java b/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java index b3810e619..f66963354 100644 --- a/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java +++ b/blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java @@ -85,6 +85,16 @@ public interface IAdvanceClient { AdvanceEntity fingById(@RequestParam Integer advanceId); + /** + * 根据运单号和订单号查询老系统的开单对应的订单 + * @param logiBillNo + * @param orderCode + * @return + */ + @GetMapping(API_PREFIX + "/findAdvanceEntityByLogiBillNoAndOrderCode") + List findAdvanceEntityByLogiBillNoAndOrderCode(@RequestParam String logiBillNo,@RequestParam String orderCode); + + diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java index 3da84f752..515ea55bf 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java @@ -148,6 +148,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService { //根据客户订单号去查询WMS装车清单号 QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("order_no", orderNo); + queryWrapper.eq("delivery_number", orderInfoDTO.getDeliveryNumber()); PanFactoryOrder panFactoryOrder = factoryOrderService.getOne(queryWrapper); if (Objects.isNull(panFactoryOrder)) { logger.info("#############handleData: 未找到订单数据 合同自编码orderNo={}", orderNo); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java index 2cffa1d31..9fdddf4ab 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OpenOrderHandler.java @@ -18,6 +18,7 @@ import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import java.util.List; import java.util.Map; import java.util.Objects; @@ -57,34 +58,40 @@ public class OpenOrderHandler { } //通过订单自编号去查询该条订单是属于哪个工厂 String orderSelfNum =orderNo; - AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderSelfNum); - if(Objects.isNull(advanceEntity)){ + // 汇通运单号 + String logiBillNo = orderInfoDTO.getLogiBillNo(); + List advanceEntitys = advanceClient.findAdvanceEntityByLogiBillNoAndOrderCode(logiBillNo,orderSelfNum); + if(Objects.isNull(advanceEntitys)){ log.info("##################openOrderStatusHandler: 未找到对应订单 orderNo={}",orderNo); -// channel.basicAck(deliveryTag,true); return; } - String type = advanceEntity.getType();//品牌 + for (AdvanceEntity advanceEntity : advanceEntitys) { + String type = advanceEntity.getType();//品牌 - orderInfoDTO.setOrderNo(orderNo); - R r = null; - switch (type){ - case FactoryConstant.PIANO: - r = panFactoryDataService.handleData(orderInfoDTO); - int code = r.getCode(); - if(code == 400 || code == 200){ - log.info("##################openOrderStatusHandler: 该条数据不用处理 orderNo={}",orderNo); -// channel.basicAck(deliveryTag,true); - }else{ - throw new CustomerException(code,r.getMsg()); - } - break; + orderInfoDTO.setOrderNo(orderNo); + orderInfoDTO.setDeliveryNumber(advanceEntity.getMctsTruckNo()); + R r = null; + switch (type){ + case FactoryConstant.PIANO: + r = panFactoryDataService.handleData(orderInfoDTO); + int code = r.getCode(); + if(code == 400 || code == 200){ + log.info("##################openOrderStatusHandler: 该条数据不用处理 orderNo={}",orderNo); + }else{ + throw new CustomerException(code,r.getMsg()); + } + break; // case FactoryConstant.MENGT: // r = mtFactoryDataService.handleData(orderInfoDTO); // break; - default: - log.info("##################openOrderStatusHandler: 未知品牌 type={}",type); + default: + log.info("##################openOrderStatusHandler: 未知品牌 type={}",type); // channel.basicAck(deliveryTag,true); + } } + + + } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceClient.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceClient.java index 994cf3caf..d88dd8c1f 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceClient.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceClient.java @@ -85,5 +85,9 @@ public class AdvanceClient implements IAdvanceClient { public AdvanceEntity fingById(Integer advanceId) { return service.fingById(advanceId); } - + @GetMapping(API_PREFIX + "/findAdvanceEntityByLogiBillNoAndOrderCode") + @Override + public List findAdvanceEntityByLogiBillNoAndOrderCode(String logiBillNo, String orderCode) { + return service.findAdvanceEntityByLogiBillNoAndOrderCode(logiBillNo,orderCode); + } } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java index 890abb543..5ce389720 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.java @@ -49,4 +49,5 @@ public interface AdvanceMapper { List getEntityByMctsTruck(@Param("orderSelfNum") String orderSelfNum, @Param("mctsTruck") String mctsTruck); + List findAdvanceEntityByLogiBillNoAndOrderCode(@Param("logiBillNo") String logiBillNo, @Param("orderCode")String orderCode); } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml index 0b531157f..3666b0b22 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml @@ -57,5 +57,9 @@ and delete_time = 0 + + diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceService.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceService.java index da72ac72e..fa3053f58 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceService.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceService.java @@ -43,4 +43,11 @@ public interface IAdvanceService { List getEntityByMctsTruck(String orderSelfNum, String mctsTruck); + /** + * 根据订单编号和运单号查询老信息的订单信息 + * @param logiBillNo + * @param orderCode + * @return + */ + List findAdvanceEntityByLogiBillNoAndOrderCode(String logiBillNo, String orderCode); } diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java index e7a4f153a..2371f9481 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceServiceImpl.java @@ -69,4 +69,9 @@ public class AdvanceServiceImpl implements IAdvanceService { public List getEntityByMctsTruck(String orderSelfNum, String mctsTruck) { return advanceMapper.getEntityByMctsTruck(orderSelfNum,mctsTruck); } + + @Override + public List findAdvanceEntityByLogiBillNoAndOrderCode(String logiBillNo, String orderCode) { + return advanceMapper.findAdvanceEntityByLogiBillNoAndOrderCode(logiBillNo,orderCode); + } } From 7c946bf4e8ea6802a065e3d87173687bc9632122 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Sat, 4 Nov 2023 15:32:05 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPan=20=E5=BC=80=E5=8D=95?= =?UTF-8?q?=E4=BC=9A=E6=8E=A8=E7=9A=84=E6=97=B6=E5=80=99=20=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/RabbitMqConfiguration.java | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java index c736abbd6..353ebe67c 100644 --- a/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java +++ b/blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java @@ -1,3 +1,4 @@ +/* package com.logpm.oldproject.config; import com.alibaba.nacos.shaded.com.google.common.collect.Maps; @@ -14,11 +15,13 @@ import org.springframework.context.annotation.Configuration; import java.util.Map; +*/ /** * RabbitMQ配置,主要是配置队列,如果提前存在该队列,可以省略本配置类 * * @author yangkai.shen - */ + *//* + @Slf4j @Configuration public class RabbitMqConfiguration { @@ -76,28 +79,34 @@ public class RabbitMqConfiguration { return BindingBuilder.bind(errorQueue).to(errorMessageExchange).with(RabbitConstant.ERROR_ROUTING); } - /** + */ +/** * 消费失败队列 * @param rabbitTemplate * @return - */ + *//* + @Bean public MessageRecoverer republishMessageRecoverer(RabbitTemplate rabbitTemplate){ return new RepublishMessageRecoverer(rabbitTemplate, RabbitConstant.ERROR_EXCHANGE, RabbitConstant.ERROR_ROUTING); } - /** + */ +/** * 延迟队列 - */ + *//* + @Bean public Queue orderStatusQueue() { return new Queue(RabbitConstant.ORDER_STATUS_QUEUE, true); } - /** + */ +/** * 延迟队列交换器, x-delayed-type 和 x-delayed-message 固定 - */ + *//* + @Bean public CustomExchange orderStatusExchange() { Map args = Maps.newHashMap(); @@ -105,12 +114,14 @@ public class RabbitMqConfiguration { return new CustomExchange(RabbitConstant.ORDER_STATUS_EXCHANGE, "x-delayed-message", true, false, args); } - /** + */ +/** * 延迟队列绑定自定义交换器 * * @param orderStatusQueue 队列 * @param orderStatusExchange 延迟交换器 - */ + *//* + @Bean public Binding orderStatusBinding(Queue orderStatusQueue, CustomExchange orderStatusExchange) { return BindingBuilder.bind(orderStatusQueue).to(orderStatusExchange).with(RabbitConstant.ORDER_STATUS_ROUTING).noargs(); @@ -123,3 +134,4 @@ public class RabbitMqConfiguration { } +*/