From 5140c60b8cd1910501aafe362f93ddd8bbce8dea Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Mon, 19 Feb 2024 16:13:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E8=B4=A7=E5=BA=93=E4=BD=8D=E9=9B=B6?= =?UTF-8?q?=E6=8B=85=E6=89=AB=E6=8F=8F=E6=95=B0=E9=87=8F=E9=99=90=E5=88=B6?= =?UTF-8?q?=E3=80=81=E5=BC=82=E5=B8=B8=E5=B7=A5=E5=8D=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/AftersalesWorkOrderMapper.xml | 2 +- ...ftersalesProcessingResultsServiceImpl.java | 3 ++ .../impl/AftersalesWorkOrderServiceImpl.java | 2 +- .../mapper/WarehouseTrayTypeMapper.java | 8 +++++ .../mapper/WarehouseTrayTypeMapper.xml | 11 ++++++ .../service/IWarehouseTrayTypeService.java | 9 +++++ .../IWarehouseUpdownStockupAreaService.java | 9 +++++ .../impl/WarehouseTrayTypeServiceImpl.java | 34 +++++++++++++++++++ ...WarehouseUpdownStockupAreaServiceImpl.java | 27 ++++++++++++++- 9 files changed, 102 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml index 804ea476a..b8a8cb4b4 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml @@ -397,7 +397,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d las.work_order_type workOrderType,las.result_type resultType,las.laprId, las.discovery_node discoveryNode, las.result_description resultDescription, las.vehicle_route vehicleRoute,las.indemnitor,las.reason,las.money,las.lawoId,las.create_time createTime,las.process_number processNumber, las.work_order_status workOrderStatus - from logpm_aftersales_settlement las + from logpm_aftersales_settlement las las.processing_status = '4' and las.is_deleted = 0 and las.business_id LIKE CONCAT('%', #{param.businessId}, '%') diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java index 311d2ff7a..c30d7c640 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java @@ -45,6 +45,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -150,9 +151,11 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl processingMoneyEntityList = new ArrayList<>(); list.forEach( i ->{ + BigDecimal bigDecimal = i.getMoney().setScale(2); String value = DictBizCache.getValue(DictBizConstant.RESULT_HANDLING, i.getResultType()); AftersalesProcessingMoneyVO processingMoneyVO = new AftersalesProcessingMoneyVO(); BeanUtil.copyProperties(i,processingMoneyVO); + processingMoneyVO.setMoney(bigDecimal); processingMoneyVO.setResultTypeName(value); processingMoneyEntityList.add(processingMoneyVO); }); diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java index 95ea2478e..4f1a30afe 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java @@ -1102,7 +1102,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl findOrderPackageList(@Param("list")List orderPackageList); + + /** + * 查询零担订单 + * @param orderId + * @param warehouseId + * @return + */ + TrayTypeDataListVO getZeroOrderByOrderId(@Param("orderId")Long orderId,@Param("warehouseId") Long warehouseId); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml index 26fa1b24a..415fa412e 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml @@ -102,6 +102,17 @@ #{item} + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java index e849c00c5..77f1927cb 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayTypeService.java @@ -104,4 +104,13 @@ public interface IWarehouseTrayTypeService extends BaseService orderPackageCodes, Long warehouseId); R findTrayData(String trayCode, Long warehouseId); + + /** + * 查询零担订单库内使用情况 + * @param orderId + * @param warehouseId + * @return + */ + Integer getZeroOrderByOrderId(Long orderId, Long warehouseId); + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java index 06bfbc55d..40ade3ef9 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java @@ -22,6 +22,7 @@ import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.vo.UpDownStockupAreaVO; import com.logpm.warehouse.dto.UpShelfPackageDTO; import com.logpm.warehouse.dto.UpShelfStockDTO; +import com.logpm.warehouse.dto.UpShelfZeroOrderDTO; import com.logpm.warehouse.dto.UpStockupAreaPackageDTO; import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; import com.logpm.warehouse.entity.WarehouseUpdownStockupAreaEntity; @@ -101,4 +102,12 @@ public interface IWarehouseUpdownStockupAreaService extends BaseService upShelfZeroOrderDTOS, Long allocationId, Long id); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java index 08060c9bd..beaab38c6 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java @@ -3130,6 +3130,40 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl updownGoodsEntities = warehouseUpdownGoodsService.getUpdownGoodsByZeroOrderId(orderId,warehouseId); + //查询在托盘上还未进行上架的零担订单信息 + List trayGoodsEntities = warehouseTrayGoodsService.getTrayGoodsByZeroOrderIdNoAllocationId(orderId,warehouseId); + updownGoodsEntities.addAll(trayGoodsEntities); + for (PositionVO positionVO:updownGoodsEntities){ + Integer num = positionVO.getNum(); + residueNum = residueNum - num; + } + if (residueNum == 0){ + //无可用数量,说明该零担订单此时处于上架和在托的情况 + return 0; + }else if (residueNum > 0){ + return residueNum; + }else { + //出现脏数据的情况 + log.error("此零担订单数据错误,需要维护数据,订单ID:{}",orderId); + return -1; + } + } + private void saveOrderInfo(String orderCode, Integer oldWarehouseId, Long newWarehouseId) { diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java index d978efd0e..88f588e9d 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java @@ -33,6 +33,7 @@ import com.logpm.distribution.feign.IDistributionStockArticleClient; import com.logpm.distribution.feign.IDistributionStockListClient; import com.logpm.distribution.vo.UpDownStockupAreaVO; import com.logpm.warehouse.bean.Resp; +import com.logpm.warehouse.dto.*; import com.logpm.warehouse.dto.UpShelfPackageDTO; import com.logpm.warehouse.dto.UpShelfStockDTO; import com.logpm.warehouse.dto.UpStockupAreaPackageDTO; @@ -529,7 +530,31 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl 0){ + return R.data(upDownStockupZeroByOrderCodeAndWarehouseId); + }else if (a == 0){ + return R.fail(403,"请先对该订单进行下架操作"); + }else { + log.error(method+"此订单数量异常"); + return R.fail(403,"数据异常"); + } + + + } + + /** + * @param upShelfZeroOrderDTOS + * @param allocationId + * @param id + * @return + */ + @Override + public R upShelfZeroOrder(List upShelfZeroOrderDTOS, Long allocationId, Long id) { + //这里目前的上架方式仅仅是进行订单自编码的上架方式和托盘暂时没有绑定关系 + //这里进行上架需要进行上架 + return null; } private WarehouseUpdownStockupAreaEntity createdNewUpShelfInventory(Long allocationId, Long warehouseId, UpShelfStockDTO upShelfStockDTO, WarehouseUpdownStockupAreaEntity updownTypeEntity, Long goodsAreaId, BasicdataGoodsAreaEntity goodsAreaEntity, Long goodsShelfId, BasicdataGoodsShelfEntity goodsShelfEntity, BasicdataGoodsAllocationEntity goodsAllocationEntity) {