From cb259e5befb47a2b729668283fb274a300f84440 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Sat, 16 Dec 2023 13:07:04 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF-=E9=9B=B6=E6=8B=85?= =?UTF-8?q?=E8=A1=A5=E5=BD=95=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IDistributionStockArticleClient.java | 5 ++ .../com/logpm/trunkline/dto/LoadCarsDTO.java | 4 ++ .../com/logpm/trunkline/vo/ZeroOrderVO.java | 30 +++++++++++ .../feign/DistributionStockArticleClient.java | 6 +++ .../DistributionStockArticleMapper.java | 3 ++ .../mapper/DistributionStockArticleMapper.xml | 24 +++++++++ .../IDistributionStockArticleService.java | 3 ++ .../DistributionStockArticleServiceImpl.java | 10 ++++ .../controller/CarsLoadController.java | 53 +++++++++++++++++++ .../service/ITrunklineCarsLoadService.java | 2 + .../impl/TrunklineCarsLoadServiceImpl.java | 13 +++++ 11 files changed, 153 insertions(+) create mode 100644 blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroOrderVO.java diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java index d77cd01d9..e8edd5d0d 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java @@ -16,6 +16,8 @@ */ package com.logpm.distribution.feign; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.entity.DistributionStockArticleEntity; import org.springblade.common.constant.ModuleNameConstant; import org.springblade.core.mp.support.BladePage; @@ -127,4 +129,7 @@ public interface IDistributionStockArticleClient { @GetMapping(API_PREFIX + "/updateOrderInfo") void updateOrderInfo(@RequestParam String orderCode, @RequestParam Long warehouseId); + + @GetMapping(API_PREFIX + "/findZeroListByWarehouseId") + IPage findZeroListByWarehouseId(@RequestParam Long warehouseId, @RequestParam Integer pageNum, @RequestParam Integer pageSize); } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java index 382a18217..d5f7e030d 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java @@ -1,5 +1,6 @@ package com.logpm.trunkline.dto; +import com.logpm.trunkline.vo.ZeroOrderVO; import lombok.Data; import java.io.Serializable; @@ -61,4 +62,7 @@ public class LoadCarsDTO implements Serializable { private Integer enterNum; + + private List zeroOrderList = new ArrayList<>(); + } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroOrderVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroOrderVO.java new file mode 100644 index 000000000..d03cff2a7 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroOrderVO.java @@ -0,0 +1,30 @@ +package com.logpm.trunkline.vo; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class ZeroOrderVO implements Serializable { + + private String waybillNo; + private String orderCode; + private Date createTime; + private String destination; + private String destinationWarehouseName; + private String shipper; + private String shipperName; + private String consignee; + private String consigneeName; + private String goodsName; + private Integer totalNum; + private Integer stockNum; + private BigDecimal price; + private BigDecimal weight; + private BigDecimal volume; + private String customerTrain; + private String remark; + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java index 348ebb357..85c4cced8 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java @@ -16,6 +16,7 @@ */ package com.logpm.distribution.feign; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; @@ -262,4 +263,9 @@ public class DistributionStockArticleClient implements IDistributionStockArticle distributionStockArticleService.updateOrderInfo(orderCode,warehouseId); } + @Override + public IPage findZeroListByWarehouseId(Long warehouseId,Integer pageNum,Integer pageSize) { + return distributionStockArticleService.findZeroListByWarehouseId(warehouseId,pageNum,pageSize); + } + } 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 618f0adad..2ec4e3d6c 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 @@ -16,6 +16,7 @@ */ package com.logpm.distribution.mapper; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.dto.DistributionStockArticleOweDTO; @@ -137,4 +138,6 @@ public interface DistributionStockArticleMapper extends BaseMapper findZeroListByWarehouseId(IPage page,@Param("warehouseId") Long warehouseId); } 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 1c0bba7c0..d54fce9f9 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 @@ -850,4 +850,28 @@ where id = #{orderId} and incoming_num + #{num} <= total_number + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java index 09e4369e7..54e6d3255 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java @@ -16,6 +16,7 @@ */ package com.logpm.distribution.service; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.dto.DistributionStockArticleDTO; import com.logpm.distribution.dto.app.queryOrderDTO; @@ -192,4 +193,6 @@ public interface IDistributionStockArticleService extends BaseService findZeroListByWarehouseId(Long warehouseId,Integer pageNum,Integer pageSize); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index 95099a7fe..595d04b61 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.logpm.basic.entity.BasicMaterialEntity; import com.logpm.basic.entity.BasicPrintTemplateEntity; import com.logpm.basic.feign.IBasicMaterialClient; @@ -1373,6 +1374,15 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl findZeroListByWarehouseId(Long warehouseId,Integer pageNum,Integer pageSize) { + IPage page = new Page<>(); + page.setCurrent(pageNum); + page.setSize(pageSize); + + return baseMapper.findZeroListByWarehouseId(page,warehouseId); + } + @Override public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) { diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java index f86ba053c..d3aa88a18 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java @@ -1215,5 +1215,58 @@ public class CarsLoadController { } + @ResponseBody + @PostMapping("/zeroSuppleList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "零担补录列表", notes = "传入loadCarsDTO") + public R zeroSuppleList(@RequestBody LoadCarsDTO loadCarsDTO) { + String method = "############zeroSuppleList: "; + log.info(method+"请求参数{}",loadCarsDTO); + try{ + + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); + return R.fail(400,"仓库信息为空"); + } + loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); + + return carsLoadService.zeroSuppleList(loadCarsDTO); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error(method+"系统异常",e); + return R.fail(500,"系统异常"); + } + } + + @ResponseBody + @PostMapping("/addZeroSupple") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "增加零担补录", notes = "传入loadCarsDTO") + public R addZeroSupple(@RequestBody LoadCarsDTO loadCarsDTO) { + String method = "############addZeroSupple: "; + log.info(method+"请求参数{}",loadCarsDTO); + try{ + + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse); + return R.fail(400,"仓库信息为空"); + } + loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); + + return carsLoadService.zeroSuppleList(loadCarsDTO); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error(method+"系统异常",e); + return R.fail(500,"系统异常"); + } + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java index 3881a35ea..11dbd3d33 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java @@ -115,4 +115,6 @@ public interface ITrunklineCarsLoadService extends BaseService pageList = distributionStockArticleClient.findZeroListByWarehouseId(warehouseId,pageNum,pageSize); + + return R.data(pageList); + } + @Override public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) { log.info("##############loadingTrayInfo: 查询托盘的货物信息");