From be45a36bbcee8689798e4ca2b231cb08c4a3f28b Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Sat, 19 Aug 2023 16:25:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E6=8F=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistrilbutionBillLadingServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java index 3412f2204..7a86fb52a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java @@ -401,6 +401,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl Date: Sat, 19 Aug 2023 16:29:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=87=E8=B4=A7?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B51?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/stockup/StockupTypeConstant.java | 49 ++++++++++++ .../feign/IBasicdataWarehouseClient.java | 29 ++++++++ .../DistributionDeliveryTripartiteEntity.java | 6 ++ .../BasicdataWarehouseController.java | 4 +- .../feign/BasicdataWarehouseClient.java | 26 +++++++ .../service/IBasicdataWarehouseService.java | 5 +- .../impl/BasicdataWarehouseServiceImpl.java | 5 +- .../DistributionDeliveryListController.java | 2 - .../DistributionReservationController.java | 13 ++++ .../DistributionStockArticleController.java | 2 + .../DistributionDeliveryAllocationDTO.java | 2 +- .../DistributionDeliveryListMapper.java | 7 ++ .../mapper/DistributionDeliveryListMapper.xml | 15 ++++ .../mapper/DistributionReservationMapper.xml | 4 - .../DistributionStockArticleMapper.java | 2 +- .../mapper/DistributionStockArticleMapper.xml | 3 +- .../IDistributionReservationService.java | 7 ++ .../DistributionDeliveryListServiceImpl.java | 23 ++++-- .../DistributionReservationServiceImpl.java | 74 +++++++++++++++++-- 19 files changed, 249 insertions(+), 29 deletions(-) create mode 100644 blade-biz-common/src/main/java/org/springblade/common/constant/stockup/StockupTypeConstant.java diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/stockup/StockupTypeConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/stockup/StockupTypeConstant.java new file mode 100644 index 000000000..b08a7edb2 --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/stockup/StockupTypeConstant.java @@ -0,0 +1,49 @@ +package org.springblade.common.constant.stockup; + +/** + * 备货任务指派状态枚举 + * 对应码表 + * stock_assign_status + * @author pref + */ +public enum StockupTypeConstant { + + shangpei("商配","1"), + shipei("市配","2"), + ziti("自提","3"); + + + + + /** + * 状态 + */ + private String name; + + /** + * 值 + */ + private String value; + + + private StockupTypeConstant(String name, String value) { + this.name = name; + this.value = value; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java index e4883faf4..e6a799dc9 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java @@ -18,6 +18,7 @@ package com.logpm.basicdata.feign; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; +import com.logpm.basicdata.vo.BasicdataWarehouseVO; import org.springblade.common.constant.ModuleNameConstant; import org.springblade.core.mp.support.BladePage; import org.springframework.cloud.openfeign.FeignClient; @@ -26,6 +27,8 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; +import java.util.List; + /** * 仓库 Feign接口类 * @@ -72,7 +75,33 @@ public interface IBasicdataWarehouseClient { @GetMapping(API_PREFIX+"/getWarehouseEntityByWarehouseCode") BasicdataWarehouseEntity getWarehouseEntityByWarehouseCode(@RequestParam String warehouseCode); + @GetMapping(API_PREFIX+"/getWarehouseByDepartment") BasicdataWarehouseEntity getWarehouseByDepartment(@RequestParam String deptId); + + /** + * 查询当前登录人仓库信息 + * @return + */ + @GetMapping(API_PREFIX+"/getMyWarehouseList") + List getMyWarehouseList(); + + /** + * 将当前登录人选择仓库存至缓存 + */ + @PostMapping(API_PREFIX+"/preserveCurrentWarehouse") + BasicdataWarehouseEntity preserveCurrentWarehouse(@RequestBody BasicdataWarehouseEntity warehouseEntity); + + + /** + * 根据当前用户查询缓存中仓库信息 + * @return + */ + @GetMapping(API_PREFIX+"/getMyCurrentWarehouse") + Object getMyCurrentWarehouse(); + + + + } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryTripartiteEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryTripartiteEntity.java index 55d9d7160..24ce59c33 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryTripartiteEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryTripartiteEntity.java @@ -62,6 +62,12 @@ public class DistributionDeliveryTripartiteEntity extends TenantEntity { */ @ApiModelProperty(value = "预约信息编号") private String reservationIds; + + /** + * 预约信息编号 + */ + @ApiModelProperty(value = "预约信息编号") + private String company; /** * 预留1 */ diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java index cbabb5604..cec1410a1 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java @@ -250,8 +250,8 @@ BasicdataWarehouseController extends BladeController { @ApiOperationSupport(order = 3) @ApiOperation(value = "分页", notes = "传入BasicdataGoodsShelf") public R preserveCurrentWarehouse(@RequestBody BasicdataWarehouseDTO warehouseDTO) { - warehouseService.preserveCurrentMyWarehouse(warehouseDTO); - return null; + R r = warehouseService.preserveCurrentMyWarehouse(warehouseDTO); + return r; } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java index 60a518478..27a6de911 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java @@ -20,13 +20,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.logpm.basicdata.dto.BasicdataWarehouseDTO; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.service.IBasicdataWarehouseService; +import com.logpm.basicdata.vo.BasicdataWarehouseVO; 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 org.springblade.core.tool.utils.Func; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; @@ -110,6 +114,28 @@ public class BasicdataWarehouseClient implements IBasicdataWarehouseClient { } } + + @GetMapping(API_PREFIX+"/getMyWarehouseList") + @Override + public List getMyWarehouseList() { + List myWarehouseList = warehouseWarehouseService.getMyWarehouseList(); + return myWarehouseList; + } + + @PostMapping(API_PREFIX+"/preserveCurrentWarehouse") + @Override + public BasicdataWarehouseEntity preserveCurrentWarehouse(BasicdataWarehouseEntity warehouseEntity) { + warehouseWarehouseService.preserveCurrentMyWarehouse( warehouseEntity); + return null; + } + + @GetMapping(API_PREFIX+"/getMyCurrentWarehouse") + @Override + public Object getMyCurrentWarehouse() { + Object myCurrentWarehouse = warehouseWarehouseService.getMyCurrentWarehouse(); + return myCurrentWarehouse; + } + @Override public BasicdataWarehouseEntity getWarehouseByDepartment(String deptId) { QueryWrapper queryWrapper = new QueryWrapper<>(); diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java index dc7039d44..d648f0fc3 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java @@ -26,6 +26,7 @@ import com.logpm.basicdata.excel.BasicdataWarehouseExcel; import com.logpm.basicdata.vo.BasicdataGoodsShelfVO; import com.logpm.basicdata.vo.BasicdataWarehouseVO; import org.springblade.core.mp.base.BaseService; +import org.springblade.core.tool.api.R; import java.util.List; import java.util.Map; @@ -98,9 +99,9 @@ public interface IBasicdataWarehouseService extends BaseService preserveCurrentMyWarehouse(BasicdataWarehouseEntity warehouseEntity); /** * 根据当前登录用户查询Redis缓存中选择的仓库信息 diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java index 07b3f5dff..705f693ae 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java @@ -183,12 +183,13 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl preserveCurrentMyWarehouse(BasicdataWarehouseEntity warehouseEntity) { // 2、存放用户选择的仓库id // key 租户Id + 用户id BladeUser user = AuthUtil.getUser(); String str = user.getTenantId() +"--"+ user.getUserId(); - redis.set(str,warehouseDTO); + redis.set(str,warehouseEntity); + return R.status(true); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java index d5d0db45b..cb48aaf76 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java @@ -316,8 +316,6 @@ public class DistributionDeliveryListController extends BladeController { List atlasInfo= distributionDeliveryListService.getStockArticleAtlasInfo(id); return R.data(atlasInfo); } - - /** * 修改市配配送计划 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java index 47fa02348..eb0b16237 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java @@ -26,6 +26,7 @@ import com.logpm.distribution.entity.DistributionReservationEntity; import com.logpm.distribution.excel.DistributionReservationExcel; import com.logpm.distribution.service.IDistributionReservationService; import com.logpm.distribution.vo.DistributionReservationVO; +import com.logpm.distribution.vo.DistributionStockArticleVO; import com.logpm.distribution.wrapper.DistributionReservationWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -289,4 +290,16 @@ public class DistributionReservationController extends BladeController { R reservationPackage = reservationService.getReservationStockListInfo(reservationId); return reservationPackage; } + + + /** + * 预约列表 详情 + */ + @GetMapping("/selectUpdateAvailableStockArticle") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入distrbutionReservation") + public R selectUpdateAvailableStockArticle(@RequestParam Long id) { + List stockArticleVOS = reservationService.selectUpdateAvailableStockArticle(id); + return R.data(stockArticleVOS); + } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java index 905840d4f..6231f0027 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java @@ -114,6 +114,7 @@ public class DistributionStockArticleController extends BladeController { } /** * 配送在库订单 分页 */ + @GetMapping("/selectStockArticleInfoList") @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入distributionStockArticle") @@ -127,6 +128,7 @@ public class DistributionStockArticleController extends BladeController { distributionStockArticle.remove("startDate"); distributionStockArticle.remove("entDate"); QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionStockArticle, DistributionStockArticleEntity.class); + queryWrapper.ne("reservation_status","30"); if(Func.isNotEmpty(o)){ queryWrapper.in("order_self_numbering",String.valueOf(o).split(",")); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryAllocationDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryAllocationDTO.java index c0dee23e3..1d2649e75 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryAllocationDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryAllocationDTO.java @@ -80,7 +80,7 @@ public class DistributionDeliveryAllocationDTO { * 任务时间 */ @ApiModelProperty(value = "任务时间") - private Date taskTime; + private String taskTime; } 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 e2f21b77a..d3a8f03e6 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 @@ -277,4 +277,11 @@ public interface DistributionDeliveryListMapper extends BaseMapper selectReservationByDeliveryListId(@Param("deliveryListId")Long id); + + /** + * + * @param id + * @return + */ + List getDeliveryDisuccStockArticleInfo(Long id); } 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 efe354780..97ff88a3b 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 @@ -1093,5 +1093,20 @@ + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index 8d3bbc25b..e862db596 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -244,10 +244,6 @@ SELECT DISTINCT ldr.tenant_id, ldr.is_deleted, - ldr.mall_id, - ldr.mall_name, - ldr.store_id, - ldr.store_name, ldr.serve_type, ldr.delivery_way, ldr.delivery_type, diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java index 018a03614..3d962093f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java @@ -77,7 +77,7 @@ public interface DistributionStockArticleMapper extends BaseMapper getStockArticleByReservationId(Long id); + List getStockArticleByReservationId(Long id); /** * 查询二维码包件数据 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 33e91fba2..fb3d4e7bc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -194,7 +194,7 @@