From 5b8d5f40c4341c47b011e676de75198511f85817 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Wed, 19 Jul 2023 18:12:48 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8E=9F=E5=9E=8B=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/DistributionDeliveryListVO.java | 8 + ...DistributionReservationStockarticleVO.java | 5 + .../vo/DistributionStockArticleVO.java | 32 +++- .../DistributionDeliveryListController.java | 36 ++-- ...tionReservationStockarticleController.java | 2 +- .../dto/DistrilbutionloadingscanDTO.java | 2 +- .../DistributionDeliveryInfoMapper.java | 7 + .../mapper/DistributionDeliveryInfoMapper.xml | 54 +++++- .../DistributionDeliveryListMapper.java | 7 + .../mapper/DistributionDeliveryListMapper.xml | 34 ++-- ...ributionReservationStockarticleMapper.java | 2 +- ...tributionReservationStockarticleMapper.xml | 24 ++- .../mapper/DistributionSignforMapper.java | 6 + .../mapper/DistributionSignforMapper.xml | 37 ++-- .../IDistributionDeliveryInfoService.java | 9 + .../DistributionDeliveryInfoServiceImpl.java | 7 + .../DistributionDeliveryListServiceImpl.java | 169 ++++++++++++------ 17 files changed, 342 insertions(+), 99 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java index f7ef88d89..54b65535a 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java @@ -34,6 +34,14 @@ import java.util.List; @EqualsAndHashCode(callSuper = true) public class DistributionDeliveryListVO extends DistributionDeliveryListEntity { private static final long serialVersionUID = 1L; + + /** + * 装车件数 + */ + @ApiModelProperty(value = "装车件数") + private Integer loadNub; + + /** * 包条数据 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStockarticleVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStockarticleVO.java index c9366fdb5..6a77fbae5 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStockarticleVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationStockarticleVO.java @@ -42,5 +42,10 @@ public class DistributionReservationStockarticleVO extends DistributionReservati */ @ApiModelProperty(value = "运单号") private String waybillNumber; + /** + * 数量 + */ + @ApiModelProperty(value = "数量") + private Integer signinQuantity; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java index 6ac5d0de9..641f9b5c5 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java @@ -17,6 +17,7 @@ package com.logpm.distribution.vo; import com.logpm.distribution.entity.DistributionStockArticleEntity; +import io.swagger.annotations.ApiModelProperty; import org.springblade.core.tool.node.INode; import lombok.Data; import lombok.EqualsAndHashCode; @@ -31,6 +32,35 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) public class DistributionStockArticleVO extends DistributionStockArticleEntity { private static final long serialVersionUID = 1L; - + /** + * 物料名称 + */ + @ApiModelProperty(value = "物料名称") + private String materialName; + /** + * 已备货数量 + */ + @ApiModelProperty(value = "已备货数量") + private String readyStock; + /** + * 备货数量 + */ + @ApiModelProperty(value = "备货数量") + private String deliveryNumber; + /** + * 托盘 + */ + @ApiModelProperty(value = "托盘") + private String pallet; + /** + * 或为信息 + */ + @ApiModelProperty(value = "或为信息") + private String goodsAllocation; + /** + * 订单状态 + */ + @ApiModelProperty(value = "订单状态") + private String stockArticleState; } 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 141c51446..7f3a543d3 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 @@ -114,6 +114,20 @@ public class DistributionDeliveryListController extends BladeController { IPage pages = distributionDeliveryInfoService.selectDistributionDeliveryinventory(Condition.getPage(query), distributionDeliveryInfoDTO); return R.data(pages); } + + + /** + * 查看订单 + */ + @GetMapping("/order") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "查看包件详情", notes = "传入distributionDeliveryList") + public R> order(DistributionDeliveryInfoDTO distributionDeliveryInfoDTO, Query query) { + IPage pages = distributionDeliveryInfoService.selectDistributionDeliveryorder(Condition.getPage(query), distributionDeliveryInfoDTO); + return R.data(pages); + } + + /** * 配送管理 分页 */ @@ -170,20 +184,20 @@ public class DistributionDeliveryListController extends BladeController { return msg; } - /** - * 配送管理 装车扫描(单件装车) - */ - @GetMapping("/singleloading") - @ApiOperationSupport(order = 2) - public R singleloading(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { - R msg = distributionDeliveryListService.singleloading(distrilbutionloadingscanDTO); - return msg; - } +// /** +// * 配送管理 装车扫描(单件装车) +// */ +// @GetMapping("/singleloading") +// @ApiOperationSupport(order = 2) +// public R singleloading(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { +// R msg = distributionDeliveryListService.singleloading(distrilbutionloadingscanDTO); +// return msg; +// } /** - * 配送管理 装车扫描(单件确认) + * 配送管理 装车扫描(一键装车) */ - @GetMapping("/oneloading") + @PostMapping("/oneloading") @ApiOperationSupport(order = 2) public R oneloading(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { R msg = distributionDeliveryListService.oneloading(distrilbutionloadingscanDTO); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStockarticleController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStockarticleController.java index 72979cc47..2e7fdcdd8 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStockarticleController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationStockarticleController.java @@ -52,7 +52,7 @@ import javax.servlet.http.HttpServletResponse; */ @RestController @AllArgsConstructor -@RequestMapping("reservationStockarticle/distributionReservationStockarticle") +@RequestMapping("/reservationStockarticle") @Api(value = "预约订单中间表", tags = "预约订单中间表接口") public class DistributionReservationStockarticleController extends BladeController { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java index ecf0b674e..06a172924 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java @@ -44,7 +44,7 @@ public class DistrilbutionloadingscanDTO { * 车辆信息Id */ @ApiModelProperty(value = "车辆信息Id") - @NotEmpty(message = "车辆信息Id不能为空") +// @NotEmpty(message = "车辆信息Id不能为空") private String loadingId; // /** diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java index 3dcca67d7..325fc2383 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java @@ -23,6 +23,7 @@ import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; 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.DistributionStockArticleVO; import com.logpm.distribution.vo.DistributionStockListVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -101,4 +102,10 @@ public interface DistributionDeliveryInfoMapper extends BaseMapper selectDistributionDeliveryinventoryPage(IPage page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO); + /** + * 通过配送查询订单 + * + * @return + */ + List selectDistributionDeliveryOrderPage(IPage page,@Param("param") DistributionDeliveryInfoDTO distributionDeliveryInfoDTO); } 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 1b6e1eca5..ab5e2745f 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 @@ -57,7 +57,7 @@ JOIN logpm_distribution_delivery_list lddl on lddl.id = lds.delivery_id join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id - ldrs.is_have_data = '2' and lds.is_deleted =0 and lds.id = #{id} + lds.is_deleted =0 and lds.id = #{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 a07253358..ccef0fda3 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 @@ -27,6 +27,7 @@ import com.logpm.distribution.excel.DistributionDeliveryListExcel; 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.DistributionLoadscaninvnVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -153,4 +154,10 @@ public interface DistributionDeliveryListMapper extends BaseMapper selectdeliveryworkVnId(@Param("inventoryId") Integer inventoryId,@Param("deliveryId") Long deliveryId); + /** + * 通过预约查询库存 + * + * @return + */ + List selectdeliverOnevn(Long reservationId, Long deliveryId); } 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 9a576226f..a060169e1 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 @@ -165,11 +165,9 @@ @@ -360,7 +357,7 @@ join logpm_distribution_reservation_stockarticle ldrs on lds.reservation_id = ldrs.reservation_id JOIN logpm_distribution_delivery_list lddl on lddl.id = lds.delivery_id join logpm_distribution_stock_article ldsa on ldsa.id = ldrs.stock_article_id - WHERE ldrs.is_have_data = '1' and ldsa.is_deleted =0 and lddl.id = #{deliveryId} and ldsa.id =#{barcode} + WHERE ldsa.is_deleted =0 and lddl.id = #{deliveryId} and ldsa.id =#{barcode} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.java index 1027f3ab7..538e9539d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.java @@ -64,5 +64,5 @@ public interface DistributionReservationStockarticleMapper extends BaseMapper selectDistributionReservationStockarticleorderPage(IPage page, DistributionReservationStockarticleVO distributionReservationStockarticle); + List selectDistributionReservationStockarticleorderPage(IPage page,@Param("param") DistributionReservationStockarticleVO distributionReservationStockarticle); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.xml index e7e7a3870..3b65ec579 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStockarticleMapper.xml @@ -37,7 +37,29 @@ SELECT * FROM logpm_distribution_reservation_stockarticle ${ew.customSqlSegment} 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 0618b3fd4..39638ae29 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 @@ -109,4 +109,10 @@ public interface DistributionSignforMapper extends BaseMapper + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java index ef0ef86fc..826c2b411 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java @@ -22,6 +22,7 @@ import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; import com.logpm.distribution.vo.DistributionDeliveryInfoVO; import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.vo.DistributionStockArticleVO; import com.logpm.distribution.vo.DistributionStockListVO; import org.springblade.core.mp.base.BaseService; import java.util.List; @@ -74,4 +75,12 @@ public interface IDistributionDeliveryInfoService extends BaseService selectDistributionDeliveryinventory(IPage page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO); + /** + * 从配送查看订单 + * + * @param page + * @param distributionDeliveryInfoDTO + * @return + */ + IPage selectDistributionDeliveryorder(IPage page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO); } 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 b0f7a4f42..84dbc2b47 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 @@ -22,6 +22,7 @@ import com.logpm.distribution.vo.DistributionDeliveryInfoVO; import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; import com.logpm.distribution.mapper.DistributionDeliveryInfoMapper; import com.logpm.distribution.service.IDistributionDeliveryInfoService; +import com.logpm.distribution.vo.DistributionStockArticleVO; import com.logpm.distribution.vo.DistributionStockListVO; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; @@ -72,4 +73,10 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl selectDistributionDeliveryorder(IPage page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO) { + List distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryOrderPage(page, distributionDeliveryInfoDTO); + return page.setRecords(distributionDeliveryInfoVOS); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index c3935e3bb..c1894b3d9 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -78,6 +78,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl stripList = distributionDeliveryInfoMapper.selectStripList(detail.getId()); //distributionDeliveryListVO.setPackadeList(stripList); - if (detail.getSource() == 1) { + //装车件数 + Integer sum = distributionSignforMapper.selectloadNub(distributionDeliveryListVO.getId()); + distributionDeliveryListVO.setLoadNub(sum); + // if (detail.getSource() == 1) { //查询客户信息 List customList = distributionDeliveryInfoMapper.selectcustomList(detail.getId()); distributionDeliveryListVO.setReservationList(customList); - } else if (detail.getSource() == 2) { - //查询订单信息 - List customList = distributionDeliveryInfoMapper.selectcustomListByOrderId(detail.getOrderId()); - distributionDeliveryListVO.setReservationList(customList); - } +// } else if (detail.getSource() == 2) { +// //查询订单信息 +// List customList = distributionDeliveryInfoMapper.selectcustomListByOrderId(detail.getOrderId()); +// distributionDeliveryListVO.setReservationList(customList); +// } return distributionDeliveryListVO; } @@ -132,13 +136,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl().lambda() + .eq(DistributionDeliverySelfEntity::getIsMaster,2) + .eq(DistributionDeliverySelfEntity::getDeliveryId,distrilbutionloadingscanDTO.getDeliveryId()) + ); + }else { + distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectById(distrilbutionloadingscanDTO.getLoadingId()); + } //先查询有数据的 List distributionLoadscanEntities = baseMapper.selectdeliverOne(distrilbutionloadingscanDTO.getReservationId(), distrilbutionloadingscanDTO.getDeliveryId()); //无数据的 - List distributionLoadscanEntitiesno = baseMapper.selectdeliverOneNo(distrilbutionloadingscanDTO.getReservationId(), distrilbutionloadingscanDTO.getDeliveryId()); + // List distributionLoadscanEntitiesno = baseMapper.selectdeliverOneNo(distrilbutionloadingscanDTO.getReservationId(), distrilbutionloadingscanDTO.getDeliveryId()); + //查询库存品 + List distributionLoadscanvnEntities = baseMapper.selectdeliverOnevn(distrilbutionloadingscanDTO.getReservationId(), distrilbutionloadingscanDTO.getDeliveryId()); //将该客户所有的物品上该车辆 if (distributionLoadscanEntities.size() > 0) { for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { @@ -591,16 +639,18 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl 0) { - for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntitiesno) { - //查询是否重复扫码 - List distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper().lambda() - .eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getReservationId()) - .eq(DistributionLoadscanEntity::getPacketBarCode, distributionLoadscanEntity.getPacketBarCode()) - .ne(DistributionLoadscanEntity::getScanStatus, 1) - ); - if (distributionLoadscanEntitiesflag.size() > 0) { - continue; - } - //依次插入该装车记录,设置车辆 - distributionLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); - distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); - distributionLoadscanEntity.setScanStatus(2); - distributionLoadscanEntity.setScanType("3"); - distributionLoadscanEntity.setScanTime(new Date()); - distributionLoadscanEntity.setScanState(1); - distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); - distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); - if (null != distributionDeliverySelfEntity.getDriverPhone()) { - distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); - } - distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); - //查询本车次是否第一次扫码,没有则更新上车时间 - Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); - //更新签收表的装车数量 - Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); - } - distributionLoadscanService.saveBatch(distributionLoadscanEntities); + //库存品装车 - } +// if (distributionLoadscanEntitiesno.size() > 0) { +// for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntitiesno) { +// //查询是否重复扫码 +// List distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper().lambda() +// .eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getReservationId()) +// .eq(DistributionLoadscanEntity::getPacketBarCode, distributionLoadscanEntity.getPacketBarCode()) +// .ne(DistributionLoadscanEntity::getScanStatus, 1) +// ); +// if (distributionLoadscanEntitiesflag.size() > 0) { +// continue; +// } +// //依次插入该装车记录,设置车辆 +// if (null != distributionDeliverySelfEntity.getDriverId()){ +// distributionLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); +// } +// distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName()); +// distributionLoadscanEntity.setScanStatus(2); +// distributionLoadscanEntity.setScanType("3"); +// distributionLoadscanEntity.setScanTime(new Date()); +// distributionLoadscanEntity.setScanState(1); +// distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); +// distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); +// if (null != distributionDeliverySelfEntity.getDriverPhone()) { +// distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); +// } +// if (null !=distributionDeliverySelfEntity.getVehicleId()){ +// distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());} +// //查询本车次是否第一次扫码,没有则更新上车时间 +// Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); +// //更新签收表的装车数量 +// Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); +// } +// distributionLoadscanService.saveBatch(distributionLoadscanEntities); +// } return R.success("成功"); } @Override public R oneack(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { //获取当前用户司机 - DistributionDeliverySelfEntity distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectById(distrilbutionloadingscanDTO.getLoadingId()); + //DistributionDeliverySelfEntity distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectById(distrilbutionloadingscanDTO.getLoadingId()); //将当前车次的所有信息装车 boolean update = distributionLoadscanService.update(new UpdateWrapper().lambda() .eq(DistributionLoadscanEntity::getDeliveryId,distrilbutionloadingscanDTO.getDeliveryId()) @@ -753,7 +807,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVnId(distrilbutionloadingscanDTO.getInventoryId(), distrilbutionloadingscanDTO.getDeliveryId()); if (distributionLoadscanvnEntities.size() <= 0) { return R.fail(3001, "窜货"); @@ -769,7 +830,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl