From 609a3d22f81d1b4e12d088baff027600a8d34be3 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Fri, 28 Jul 2023 18:04:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E7=AD=BE=E6=94=B6=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionDeliveryListEntity.java | 10 ++ .../vo/app/DistributionAppDeliveryListVO.java | 11 ++ .../vo/app/DistributionAppParcelListVO.java | 10 ++ .../vo/app/DistributionAppSignforVO.java | 6 + .../vo/app/DistributionAppStockArticleVO.java | 15 ++ .../DistributionDeliveryAppController.java | 1 - .../DistributionSignforAppController.java | 73 ++++++-- .../app/DistributionAppDeliveryListDTO.java | 17 ++ .../mapper/DistributionDeliveryInfoMapper.xml | 8 +- .../DistributionDeliveryListMapper.java | 12 ++ .../mapper/DistributionDeliveryListMapper.xml | 34 +++- .../mapper/DistributionSignforMapper.java | 28 ++++ .../mapper/DistributionSignforMapper.xml | 132 +++++++++++++++ .../service/IDistributionSignforService.java | 27 ++- .../DistributionDeliveryInfoServiceImpl.java | 6 +- .../DistributionDeliveryListServiceImpl.java | 21 +-- .../impl/DistributionSignforServiceImpl.java | 156 +++++++++++++++++- 17 files changed, 521 insertions(+), 46 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java index b483fde24..4602d8159 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java @@ -236,6 +236,16 @@ public class DistributionDeliveryListEntity extends TenantEntity { */ @ApiModelProperty(value = "数据来源") private Integer source; + /** + * 定位打卡 + */ + @ApiModelProperty(value = "定位打卡") + private String positioning; + /** + * 定位打卡地址 + */ + @ApiModelProperty(value = "定位打卡地址") + private String positioningAdr; diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java index 77f299109..bce985be5 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java @@ -52,6 +52,11 @@ public class DistributionAppDeliveryListVO extends DistributionDeliveryListEntit */ @ApiModelProperty(value = "签收件数") private Integer signNub; + /** + * 签收完成件数 + */ + @ApiModelProperty(value = "签收完成件数") + private Integer signNubSr; /** * 装车客户数 */ @@ -64,6 +69,12 @@ public class DistributionAppDeliveryListVO extends DistributionDeliveryListEntit @ApiModelProperty(value = "配车状态") private String vehicleStatus_name; + /** + * 配送状态 + */ + @ApiModelProperty(value = "配送状态") + private String DeliStatus_name; + /** * 配送种类;1-自主配送,2-三方配送 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppParcelListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppParcelListVO.java index bbd8efa99..e08c97486 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppParcelListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppParcelListVO.java @@ -45,12 +45,22 @@ public class DistributionAppParcelListVO extends DistributionParcelListEntity { */ @ApiModelProperty(value = "是否扫描") private String isScan; + /** + * 物品名称 + */ + @ApiModelProperty(value = "物品名称") + private String materialName; /** * 是否扫描 */ @ApiModelProperty(value = "是否扫描") private Integer scanStatus; + /** + * 签收状态 + */ + @ApiModelProperty(value = "签收状态") + private Integer signforState; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppSignforVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppSignforVO.java index 309abf716..616e4c3a4 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppSignforVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppSignforVO.java @@ -54,4 +54,10 @@ public class DistributionAppSignforVO extends DistributionSignforEntity { @ApiModelProperty(value = "扫描件数") private Integer signNub; + /** + * 配送状态 + */ + @ApiModelProperty(value = "配送状态") + private String deliveryStatus; + } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java index 954380394..ef49ac8b7 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java @@ -37,12 +37,27 @@ public class DistributionAppStockArticleVO extends DistributionStockArticleEntit */ @ApiModelProperty(value = "扫描数") private Integer loadingNub; + /** + * 签收数 + */ + @ApiModelProperty(value = "签收(订单)") + private Integer signforNub; + /** + * 签收完成数 + */ + @ApiModelProperty(value = "签收完成数(客户)") + private Integer signNub; /** * 是否齐全 */ @ApiModelProperty(value = "是否齐全") private String complete; + /** + * 是否齐全 + */ + @ApiModelProperty(value = "是否齐全") + private Integer completecode; /** * 库存品包条 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java index 96f04b98f..c76db39b7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java @@ -71,7 +71,6 @@ public class DistributionDeliveryAppController { @ApiOperationSupport(order = 3) @ApiOperation(value = "详情", notes = "传入DistributionDeliveryListDTO") public R> detail(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) { - //DistributionDeliveryListEntity detail = distributionDeliveryListService.getOne(Condition.getQueryWrapper(distributionDeliveryList)); IPage pages = distributionDeliveryListService.getAppDeliveryreservationListPage(Condition.getPage(query),distributionDeliveryList); return R.data(pages); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java index 91852814a..3916c54b3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java @@ -8,18 +8,14 @@ import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.service.IDistributionDeliveryListService; import com.logpm.distribution.service.IDistributionReservationService; import com.logpm.distribution.service.IDistributionSignforService; -import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; -import com.logpm.distribution.vo.app.DistributionAppSignforVO; +import com.logpm.distribution.vo.app.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @@ -48,7 +44,7 @@ public class DistributionSignforAppController { @ApiOperationSupport(order = 1) @ApiOperation(value = "列表", notes = "DistributionAppDeliveryListDTO") public R> list(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) { - IPage pages = distributionDeliveryListService.selectDistributionAppDeliveryListPage(Condition.getPage(query), distributionDeliveryList); + IPage pages = distributionSignforService.selectDistributionAppDeliveryListPage(Condition.getPage(query), distributionDeliveryList); return R.data(pages); } @@ -63,20 +59,75 @@ public class DistributionSignforAppController { return R.data(pages); } + + /** + * 签收管理 订单列表 + */ + @GetMapping("/order") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "列表", notes = "DistributionAppDeliveryListDTO") + public R> order(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) { + IPage pages = distributionSignforService.getAppDeliveryorderListPage(Condition.getPage(query), distributionDeliveryList); + return R.data(pages); + } + + /** + * 签收 客户查看库存品 + */ + @GetMapping("/inventory") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "客户查看库存品", notes = "DistributionAppDeliveryListDTO") + public R> inventory(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO, Query query) { + IPage pages = distributionSignforService.selectAppDeliveryInventory(Condition.getPage(query), distributionAppDeliveryListDTO); + return R.data(pages); + } + + /** + * 签收管理 签收明细 + */ + @GetMapping("/wrap") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "签收明细列表", notes = "DistributionAppDeliveryListDTO") + public R> wrap(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) { + IPage pages = distributionSignforService.getAppDeliverywrapListPage(Condition.getPage(query), distributionDeliveryList); + return R.data(pages); + } + /** - * 司机扫描签收管理 客户签收 + * 查看签收库存品明细 */ - @GetMapping("/signfor") + @GetMapping("/wrapIn") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "查看签收库存品明细", notes = "DistributionAppDeliveryListDTO") + public R> wrapIn(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO, Query query) { + IPage page = distributionSignforService.selectDistributionAppDeliverywrapIn(Condition.getPage(query), distributionAppDeliveryListDTO); + return R.data(page); + } + + /** + * 司机扫描签收管理 包条客户签收 + */ + @PostMapping("/signfor") @ApiOperationSupport(order = 2) public R signfor(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) { R msg = distributionSignforService.signfor(distrilbutionloadingscanDTO); return msg; } + /** + * 司机扫描签收管理 库存品客户签收 + */ + @PostMapping("/signforIn") + @ApiOperationSupport(order = 2) + public R signforIn(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) { + R msg = distributionSignforService.signforIn(distrilbutionloadingscanDTO); + return msg; + } + /** * 司机扫描签收管理 不在配送单签收 */ - @GetMapping("/signforcontinue") + @PostMapping("/signforcontinue") @ApiOperationSupport(order = 2) public R signforcontinue(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) { R msg = distributionSignforService.signforcontinue(distrilbutionloadingscanDTO); @@ -85,7 +136,7 @@ public class DistributionSignforAppController { /** * 司机签收管理 确认签收 */ - @GetMapping("/signforack") + @PostMapping("/signforack") @ApiOperationSupport(order = 2) public R signforack(@Valid @RequestBody DistributionSignforEntity distributionSignfor) { R msg = distributionSignforService.signforack(distributionSignfor); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionAppDeliveryListDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionAppDeliveryListDTO.java index a1a201cac..bf5a27f3e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionAppDeliveryListDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionAppDeliveryListDTO.java @@ -44,5 +44,22 @@ public class DistributionAppDeliveryListDTO extends DistributionDeliveryListEnti */ @ApiModelProperty(value = "是否扫描") private String isScan; + /** + * 配车开始时间 + */ + @ApiModelProperty(value = "配车开始时间") + private String taskTime_start; + /** + * 配车结束时间 + */ + @ApiModelProperty(value = "配车结束时间") + private String taskTime_end; + + + /** + * 是否齐全(1-未扫,2-部分扫,3-齐套) + */ + @ApiModelProperty(value = "是否齐全(1-未扫,2-部分扫,3-齐套)") + private Integer completecode; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml index 8358c2dbb..cb922dff4 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml @@ -271,14 +271,14 @@ FROM logpm_distribution_reservation ldr join logpm_distribution_reservation_stockarticle ldrs on ldr.id = ldrs.reservation_id - join logpm_distribution_stock_article ldsa on ldsa.id =ldr.stock_article_id + join logpm_distribution_stock_article ldsa on ldsa.id =ldrs.stock_article_id ldr.is_deleted = 0 and ldsa.state = #{param.state} - - and ldsa.id = #{param.orderId} + + and ldsa.order_self_numbering = #{param.orderSelfNumbering} AND ldr.id = #{param.reservationId} @@ -290,7 +290,7 @@ ldr.reservation_num reservationNum, lds.loaded_number loadingNub, (SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub, - COALESCE(lds.received_quantity + lds.receivedin_quantity, 0) signNub + COALESCE(lds.loaded_number + lds.loadedin_number, 0) signNub FROM logpm_distribution_signfor lds JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java index 2b1ccef9a..ab7680b3d 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 @@ -236,4 +236,16 @@ public interface DistributionDeliveryListMapper extends BaseMapper selectListbyink(IPage page,Long id); + /** + * 签收完成数 + * + * @return + */ + Integer selectCompletecusInCount(Long id); + /** + * 签收完成数 + * + * @return + */ + List selectDistributionAppDeliveryOrderOIn( @Param("param") DistributionAppDeliveryListVO distributionAppDeliveryListVO); } 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 fe65f3037..3215a888f 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 @@ -548,7 +548,7 @@ + + 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 ff34413e0..bcf21609c 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 @@ -17,13 +17,17 @@ package com.logpm.distribution.mapper; import com.logpm.distribution.dto.DistributionSignforDTO; +import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.vo.DistributionSignforVO; import com.logpm.distribution.excel.DistributionSignforExcel; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; +import com.logpm.distribution.vo.app.DistributionAppParcelListVO; import com.logpm.distribution.vo.app.DistributionAppSignforVO; +import com.logpm.distribution.vo.app.DistributionAppStockArticleVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -124,4 +128,28 @@ public interface DistributionSignforMapper extends BaseMapper selectAppcustomListPage(IPage page, Long id); + /** + * 根据客户查询订单 + * + * @return + */ + List selectord(IPage page,@Param("param") DistributionAppDeliveryListDTO distributionDeliveryList); + /** + * 根据客户查询详情 + * + * @return + */ + List selectListbyInpack(IPage page, DistributionAppDeliveryListDTO distributionDeliveryList); + /** + * 查询签收列表 + * + * @return + */ + List selectDistributionAppDeliveryInListPage(IPage page,@Param("param") DistributionAppDeliveryListDTO distributionAppDeliveryListDTO); + /** + * 客户查询库存品 + * + * @return + */ + List selectAppDeliveryInventoryPage(IPage page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO); } 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 af376c0c4..bb4aaabb6 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 @@ -490,6 +490,7 @@ ldr.id id, ldr.consignee consignee, ldr.reservation_num reservationNum, + lds.driver_signing driverSigning, lds.loaded_number loadingNub, (SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub, COALESCE(lds.received_quantity + lds.receivedin_quantity, 0) signNub @@ -500,5 +501,136 @@ lds.is_deleted = 0 AND lds.delivery_id = #{id} + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java index 23c28b8a1..29caf3487 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java @@ -26,8 +26,7 @@ import com.logpm.distribution.excel.DistributionSignforExcel; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.vo.DistributionSignforsnmbVO; import com.logpm.distribution.vo.DistributionstatisticsnmbVO; -import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; -import com.logpm.distribution.vo.app.DistributionAppSignforVO; +import com.logpm.distribution.vo.app.*; import org.springblade.core.mp.base.BaseService; import org.springblade.core.tool.api.R; @@ -90,4 +89,28 @@ public interface IDistributionSignforService extends BaseService getAppDeliveryreservationListPage(IPage page, DistributionAppDeliveryListDTO distributionDeliveryList); + /** + * App-司机扫描签收管理 库存品客户签收 + */ + R signforIn(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO); + /** + * App-签收管理 查看订单 + */ + IPage getAppDeliveryorderListPage(IPage page, DistributionAppDeliveryListDTO distributionDeliveryList); + /** + * App-签收管理 查看包条 + */ + IPage getAppDeliverywrapListPage(IPage page, DistributionAppDeliveryListDTO distributionDeliveryList); + /** + * App-签收管理 查看列表 + */ + IPage selectDistributionAppDeliveryListPage(IPage page, DistributionAppDeliveryListDTO distributionDeliveryList); + /** + * App-签收管理 客户查看库存品 + */ + IPage selectAppDeliveryInventory(IPage page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO); + /** + * App-签收管理 查看详情库存品 + */ + IPage selectDistributionAppDeliverywrapIn(IPage page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java index 16c52cc81..cd93d0726 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java @@ -92,9 +92,9 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl distributionAppStockArticleVOS = baseMapper.selectDistributionAppDeliveryOrderPage(page, distributionAppDeliveryListDTO); //转换字典 distributionAppStockArticleVOS.forEach(e->{ - if (e.getLoadingNub() ==0){e.setComplete("未齐全");} - else if (e.getLoadingNub() selectDistributionAppDeliveryListPage(IPage page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) { - //转换创建时间 - if (null != distributionAppDeliveryListDTO.getCreateTime()) { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); - distributionAppDeliveryListDTO.setCreateTime_query(sdf.format(distributionAppDeliveryListDTO.getCreateTime())); - } + //获取当前登录人 BladeUser user = AuthUtil.getUser(); String roleId = user.getRoleId(); @@ -1013,7 +1009,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl=distributionAppStockArticleVO.getReservationNum()) {ordCount +=1;} } distributionAppDeliveryListVO.setLoadCusNub(cusCount); - distributionAppDeliveryListVO.setOrderNumber(ordCount); + distributionAppDeliveryListVO.setLoadOrdNub(ordCount); //查询下面的预约单 List distributionSignforEntityList = distributionSignforMapper.selectList(new QueryWrapper().lambda() .eq(DistributionSignforEntity::getDeliveryId,distributionAppDeliveryListVO.getId()) @@ -1025,6 +1021,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl().lambda() .eq(DistributionDeliverySelfEntity::getDeliveryId, distributionAppDeliveryListVO.getId()) @@ -1118,6 +1116,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl getAppDeliveryreservationListPage(IPage page, DistributionAppDeliveryListDTO distributionDeliveryList) { //查询客户 List customList = distributionDeliveryInfoMapper.selectAppcustomListPage(page,distributionDeliveryList.getId()); + for (DistributionAppReservationVO distributionAppReservationVO : customList) { //查询备货是否完成 Integer aLong = distributionStockMapper.selectCount(new QueryWrapper().lambda() @@ -1176,15 +1175,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl parcelListVOS =baseMapper.selectListbypack(page,distributionAppDeliveryListDTO); -// for (DistributionAppParcelListVO parcelListVO : parcelListVOS) { -// if (null ==parcelListVO.getScanStatus() || parcelListVO.getScanStatus() ==1){parcelListVO.setIsScan("已扫描");} -// } -// //查询所有库存信息 -// List distributionAppStockListVOS = baseMapper.selectListbyink(page,distributionAppDeliveryListDTO.getId()); -//// distributionAppDeliveryListVO.setLoadOrdNub(ordCount); -//// distributionAppDeliveryListVO.setLoadCusNub(cusCount); -// distributionAppDeliveryListVO.setParcelListVOS(parcelListVOS); -// distributionAppDeliveryListVO.setInventorylListVOS(distributionAppStockListVOS); + return page.setRecords(parcelListVOS); } } 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 8d6a9ccc7..024f93419 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 @@ -31,12 +31,13 @@ import com.logpm.distribution.excel.DistributionSignforExcel; import com.logpm.distribution.service.IDistributionSignforService; import com.logpm.distribution.vo.DistributionSignforsnmbVO; import com.logpm.distribution.vo.DistributionstatisticsnmbVO; -import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; -import com.logpm.distribution.vo.app.DistributionAppReservationVO; -import com.logpm.distribution.vo.app.DistributionAppSignforVO; +import com.logpm.distribution.vo.app.*; import lombok.AllArgsConstructor; import org.apache.commons.lang.StringUtils; +import org.springblade.core.secure.BladeUser; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; +import org.springblade.system.feign.IDictBizClient; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; @@ -47,6 +48,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.stream.Collectors; /** * 签收管理 服务实现类 @@ -65,6 +67,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl selectDistributionSignforPage(IPage page, DistributionSignforVO distributionSignfor) { @@ -110,8 +114,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper().lambda() .ne(DistributionLoadscanEntity::getScanStatus, 1) + .eq(DistributionLoadscanEntity::getReservationId,distrilbutionloadingscanDTO.getReservationId()) .eq(DistributionLoadscanEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode()) ); +// List distributionLoadscaninvnEntities = distributionLoadscaninvnMapper.selectList(new QueryWrapper().lambda() +// .ne(DistributionLoadscaninvnEntity::getScanStatus, 1) +// .eq(DistributionLoadscaninvnEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode()) +// ); if (distributionLoadscanEntities.size() < 0) { //TODO 查询库存品 //无拆包 @@ -139,7 +148,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl customList = baseMapper.selectAppcustomListPage(page,distributionDeliveryList.getId()); for (DistributionAppSignforVO distributionAppReservationVO : customList) { - //查询备货是否完成 + //查询配送状态 + distributionAppReservationVO.setDeliveryStatus("配送中"); + if (distributionAppReservationVO.getDriverSigning().equals("2")){distributionAppReservationVO.setDeliveryStatus("完成配送");} } return page.setRecords(customList); } + @Override + public R signforIn(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); +// //查询该物品是否有所装车 +// List distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper().lambda() +// .ne(DistributionLoadscanEntity::getScanStatus, 1) +// .eq(DistributionLoadscanEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode()) +// ); + List distributionLoadscaninvnEntities = distributionLoadscaninvnMapper.selectList(new QueryWrapper().lambda() + .ne(DistributionLoadscaninvnEntity::getScanStatus, 1) + .eq(DistributionLoadscaninvnEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode()) + ); + if (distributionLoadscaninvnEntities.size()<0) { + + return R.fail(3006, "该货物并未装车处理"); + } + //修改装车表状态 + boolean b = false; + for (DistributionLoadscaninvnEntity distributionLoadscaninvnEntity : distributionLoadscaninvnEntities) { + distributionLoadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date())); + distributionLoadscaninvnEntity.setSignforState(2); + distributionLoadscaninvnEntity.setReceivedQuantity(distributionLoadscaninvnEntity.getLoadedNub()); + b = distributionLoadscaninvnService.updateById(distributionLoadscaninvnEntity); + //修改签收表司机签收数量 + this.update(new UpdateWrapper().lambda() + .eq(DistributionSignforEntity::getReservationId, distributionLoadscaninvnEntity.getReservationId()) + .setSql("receivedin_quantity = receivedin_quantity + " + distributionLoadscaninvnEntity.getLoadedNub()) + ); + } + + return R.status(b); + } + + @Override + public IPage getAppDeliveryorderListPage(IPage page, DistributionAppDeliveryListDTO distributionDeliveryList) { + List selectord = baseMapper.selectord(page, distributionDeliveryList); + return page.setRecords(selectord); + + } + + @Override + public IPage getAppDeliverywrapListPage(IPage page, DistributionAppDeliveryListDTO distributionDeliveryList) { + //查询该配送所有签收包条 + List parcelListVOS =baseMapper.selectListbyInpack(page,distributionDeliveryList); + return page.setRecords(parcelListVOS); + } + + @Override + public IPage selectDistributionAppDeliveryListPage(IPage page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) { + + //获取当前登录人 + BladeUser user = AuthUtil.getUser(); + String roleId = user.getRoleId(); + List distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryInListPage(page, distributionAppDeliveryListDTO); + //转换字典字段 + for (DistributionAppDeliveryListVO distributionAppDeliveryListVO : distributionAppDeliveryListVOS) { + //查询包件签收件数 + Integer lad = distributionLoadscanMapper.selectCount(new QueryWrapper().lambda() + .eq(DistributionLoadscanEntity::getDeliveryId,distributionAppDeliveryListVO.getId()) + .eq(DistributionLoadscanEntity::getSignforState,2) + ).intValue(); + + //查询库存品签收件数 + Integer nad = distributionLoadscaninvnMapper.selectCount(new QueryWrapper().lambda() + .eq(DistributionLoadscaninvnEntity::getDeliveryId,distributionAppDeliveryListVO.getId()) + .eq(DistributionLoadscaninvnEntity::getSignforState,2) + ).intValue(); + distributionAppDeliveryListVO.setSignNub(lad+nad); + //查询完成客户数 + Integer cusCount =distributionDeliveryListMapper.selectCompletecusInCount(distributionAppDeliveryListVO.getId()); + //查询完成订单数 + Integer ordCount = 0; + List distributionAppStockArticleVOS = distributionDeliveryListMapper.selectDistributionAppDeliveryOrderOIn(distributionAppDeliveryListVO); + for (DistributionAppStockArticleVO distributionAppStockArticleVO : distributionAppStockArticleVOS) { + if (distributionAppStockArticleVO.getSignNub() >=distributionAppStockArticleVO.getReservationNum()) {ordCount +=1;} + } + distributionAppDeliveryListVO.setLoadCusNub(cusCount); + distributionAppDeliveryListVO.setLoadOrdNub(ordCount); + //查询下面的预约单 + List distributionSignforEntityList = distributionSignforMapper.selectList(new QueryWrapper().lambda() + .eq(DistributionSignforEntity::getDeliveryId,distributionAppDeliveryListVO.getId()) + ); + //提取id + List reList = distributionSignforEntityList.stream().map(DistributionSignforEntity::getId).collect(Collectors.toList()); + distributionAppDeliveryListVO.setType_name(dictBizClient.getValue("distribution_type", distributionAppDeliveryListVO.getType() ).getData()); + //查询是否配车 + Integer aLong = 0; + Integer aLong2 = 0; + distributionAppDeliveryListVO.setVehicleStatus_name("已配车"); + distributionAppDeliveryListVO.setDeliStatus_name("配送中"); + if (distributionAppDeliveryListVO.getState().equals("4")){distributionAppDeliveryListVO.setDeliStatus_name("完成");} + if (distributionAppDeliveryListVO.getKind().equals("1")){ + aLong = distributionDeliverySelfMapper.selectCount(new QueryWrapper().lambda() + .eq(DistributionDeliverySelfEntity::getDeliveryId, distributionAppDeliveryListVO.getId()) + ).intValue(); + }else { + aLong2=distributionDeliveryTripartiteMapper.selectCount(new QueryWrapper().lambda() + .eq(DistributionDeliveryTripartiteEntity::getDeliveryId, distributionAppDeliveryListVO.getId())).intValue(); + } + if (aLong ==0 && aLong2 ==0){distributionAppDeliveryListVO.setVehicleStatus_name("未配车");} + //查询是否备货 + distributionAppDeliveryListVO.setIsstock("备货完成"); + Integer reNub = distributionStockMapper.selectCount(new QueryWrapper().lambda() + .in(DistributionStockEntity::getReservationId,reList) + ).intValue(); + Integer deliveryNumber = distributionAppDeliveryListVO.getDeliveryNumber(); + if(reNub distributionAppDeliverySelfVOS = distributionDeliverySelfMapper.selectListcustom(distributionAppDeliveryListVO.getId()); + if (distributionAppDeliverySelfVOS.size()>0){ + StringBuilder stringBuilder = new StringBuilder(); + distributionAppDeliverySelfVOS.forEach(e->{ + if (e.getIsMaster() ==2){ + stringBuilder.append(e.getDriverName()).append("(主)"); + }else { stringBuilder.append(e.getDriverName()).append("(副)");} + }); + distributionAppDeliveryListVO.setDriverName(stringBuilder.toString()); + } + + } + + return page.setRecords(distributionAppDeliveryListVOS); + } + + @Override + public IPage selectAppDeliveryInventory(IPage page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) { + List distributionAppStockArticleVOS = baseMapper.selectAppDeliveryInventoryPage(page, distributionAppDeliveryListDTO); + return page.setRecords(distributionAppStockArticleVOS); + } + + @Override + public IPage selectDistributionAppDeliverywrapIn(IPage page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) { + return null; + } + } From d44d35f4ce880373e81c8ba37f8c00b583e093c4 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Fri, 28 Jul 2023 18:05:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E6=8F=90?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/serviceConstant/ServiceConstant.java | 10 +++++----- .../DistributionBillLadingAppController.java | 2 +- .../DistributionStockupAppController.java | 4 ++-- .../mapper/DistrilbutionBillLadingMapper.xml | 4 ++-- .../service/impl/DistributionAsyncServiceImpl.java | 6 ++++-- .../impl/DistributionReservationServiceImpl.java | 4 ++-- .../service/impl/DistributionStockServiceImpl.java | 4 ++-- .../impl/DistrilbutionBillLadingServiceImpl.java | 8 +++----- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/blade-biz-common/src/main/java/org/springblade/common/serviceConstant/ServiceConstant.java b/blade-biz-common/src/main/java/org/springblade/common/serviceConstant/ServiceConstant.java index 8800f0e51..c71ff830a 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/serviceConstant/ServiceConstant.java +++ b/blade-biz-common/src/main/java/org/springblade/common/serviceConstant/ServiceConstant.java @@ -76,26 +76,26 @@ public interface ServiceConstant { /** * 订单状态 -- 未预约 */ - Integer ORDER_STATE_NOT_RESERVATION =1; + String ORDER_STATE_NOT_RESERVATION ="1"; /** * 订单状态 -- 已预约 */ - Integer ORDER_STATE_ALREADY_RESERVATION =2; + String ORDER_STATE_ALREADY_RESERVATION ="2"; /** * 订单状态 -- 待配送 */ - Integer ORDER_STATE_WAIT_DELIVERY =3; + String ORDER_STATE_WAIT_DELIVERY ="3"; /** * 订单状态 -- 配送中 */ - Integer ORDER_STATE_EXECUTION_DELIVERY =4; + String ORDER_STATE_EXECUTION_DELIVERY ="4"; /** * 订单状态 -- 完成配送 */ - Integer ORDER_STATE_COMPLETE_DELIVERY =5; + String ORDER_STATE_COMPLETE_DELIVERY ="5"; /** * 订单数据 -- 无数据源 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java index fa3856690..92874bdb5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java @@ -98,7 +98,7 @@ public class DistributionBillLadingAppController extends BladeController { } @ApiOperation(value = "自提订单列表库存品详细包件",notes = "自提订单列表库存品详细包件") - @GetMapping("/getInventory") + @GetMapping("/getInventoryNum") @ApiOperationSupport(order = 1) public R> getInventoryNum(@ApiIgnore @RequestParam Map distrilbutionBillLading, Query query){ IPage ladingAppVOIPage = distrilbutionBillLadingService.getInventoryNum(Condition.getPage(query),distrilbutionBillLading); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java index 24d3cc1c8..72078d567 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java @@ -244,7 +244,7 @@ public class DistributionStockupAppController extends BladeController { entity.setCoding(packetBarCode); entity.setStockupArea(stockupArea); entity.setReservationId(reservationId); - entity.setConditions(0); + entity.setConditions("0"); entity.setType(2); distributionStockService.save(entity); @@ -289,7 +289,7 @@ public class DistributionStockupAppController extends BladeController { entity.setStockupArea(stockupArea); entity.setReservationId(reservationId); entity.setStockListId(stockListId); - entity.setConditions(0); + entity.setConditions("0"); entity.setType(2); distributionStockService.save(entity); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml index 127fb22fc..3acc8f0d1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml @@ -139,8 +139,8 @@ select ldsa.id,ldsa.order_self_numbering orderSelfNumbering,ldsa.description_goods descriptionGoods,ldsa.total_number totalNumber, ldbl.stockup_status stockupStatus,ldbl.stockip_allocation stockipAllocation, ( select count(*) - from logpm_distribution_stockup_scan ldss - where ldss.parcel_list_id in ( + from logpm_distribution_stock lds + where lds.parcel_list_id in ( select ldpi.id from logpm_distribution_parcel_list ldpi where ldpi.stock_article_id in ( diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java index 22fc1379b..104e2bd43 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java @@ -7,6 +7,7 @@ import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO; import com.logpm.distribution.entity.*; import com.logpm.distribution.mapper.DistributionLoadscanMapper; import com.logpm.distribution.mapper.DistributionParcelListMapper; +import com.logpm.distribution.mapper.DistributionStockMapper; import com.logpm.distribution.service.*; import com.logpm.distribution.vo.DistributionStockupVO; import com.logpm.distribution.vo.DistrilbutionBillStockVO; @@ -30,7 +31,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { private final DistributionLoadscanMapper distributionLoadscanMapper; private final IDistributionStockArticleService distributionStockArticleService; - private final IDistributionStockService distributionStockService; + private final DistributionStockMapper distributionStockService; private final IDistrilbutionBillStockService distrilbutionBillStockService; private final IDistributionDeliveryDetailsService distributionDeliveryDetailsService; @@ -101,7 +102,8 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { DistributionStockEntity distributionStock = new DistributionStockEntity(); distributionStock.setId(id); distributionStock.setConditions("3"); - return distributionStockService.updateById(distributionStock); + int i = distributionStockService.updateById(distributionStock); + return i > 0 ? true : false; } @Override diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index 7d49c7d45..2befb7dfc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -536,9 +536,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl r.getReservationNum()) { //这里表示订单下的包件没有进行全部配送 //修改订单状态为部分配送 - stockArticleEntity.setState(4); + stockArticleEntity.setState("4"); //修改订单的在库数量 - stockArticleEntity.setState(stockArticleEntity.getHandQuantity() - r.getReservationNum()); + stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity() - r.getReservationNum()); //对订单进行修改 distributionStockArticleService.updateById(stockArticleEntity); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java index b9e1e74ae..d0e6f306e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java @@ -98,7 +98,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl 0){ addPrint(distrilbutionBillLading); @@ -217,6 +214,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl