diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java b/blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java index f9780a1df..48d4d5077 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java @@ -78,6 +78,11 @@ public class OldSystemDataPushConfig { // 攀枝花 warehourseIds.add("32"); + // 万州仓 + warehourseIds.add("50"); + + //广元仓 + warehourseIds.add("40"); } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java index 40f944836..f81731ed7 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java @@ -134,6 +134,11 @@ public class DistributionParcelListVO extends DistributionParcelListEntity { * 签收数量 */ private String loadingTime; + + /** + * 配送车次号 + */ + private String deliveryTrainNumber; /** * 实际装车人 */ 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 5b37b61c9..aebfc01c2 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 @@ -170,6 +170,11 @@ public class DistributionStockArticleVO extends DistributionStockArticleEntity { */ private String isZeroString; + /** + * 是否零担显示 + */ + private String reservationCode; + private Integer unreceivedQuantity; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java index 9eeaa1d32..1d80793c7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java @@ -39,6 +39,20 @@ public class DistributionDeliveryPackageExcel implements Serializable { private static final long serialVersionUID = 1L; + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("配送车次号") + private String deliveryTrainNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("预约单号") + private String reservationCode; + /** * 租户号 */ 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 4918a1739..b3937b3cb 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 @@ -372,7 +372,7 @@ LEFT JOIN logpm_distribution_delivery_tripartite AS lddt ON ldds.delivery_id = lddl.id AND lddt.is_deleted = 0 lddl.is_deleted = 0 - + AND lddl.id in #{item} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java index 144a2f312..a1f3f5734 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java @@ -241,10 +241,10 @@ public interface DistributionReservationMapper extends BaseMapper selectOrderInfoByReservationId(Long parseLong); + List selectOrderInfoByReservationId(@Param("reservationId") Long reservationId); /** * 查询预约零担订单详情 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 d328268e0..90c473006 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 @@ -1242,6 +1242,7 @@ ldrs.is_have_data, ldsa.id AS id, ldsa.waybill_number AS waybillNumber, + lds.reservation_code AS reservationCode, ldrs.is_zero FROM logpm_distribution_reservation AS lds @@ -1821,7 +1822,8 @@ ldrzp.reservation_id = #{param.reservationId} AND ldrzp.zero_package_status in ('1','3') - + GROUP BY + ldrzp.parcel_list_id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml index b5df4d2ba..e5187fbaf 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml @@ -387,6 +387,7 @@ LEFT JOIN logpm_warehouse_updown_goods lwug on ldsi.material_id = lwug.association_id and ldsi.incoming_batch = lwug.incoming_batch and ldsi.market_id = lwug.market_id and lwug.association_type = '4' and lwug.warehouse_id = ldsi.warehouse_id + lwug.id is not null and ldsi.material_id = #{param.materialId} and ldsi.market_id = #{param.marketId} and ldsi.warehouse_id = #{param.warehouseId} @@ -414,6 +415,7 @@ AND ldsi.market_id = ldsli.market_id and ldsli.incoming_batch = ldsi.incoming_batch LEFT JOIN logpm_warehouse_updown_goods lwug ON ldsli.parcel_list_id = lwug.association_id and lwug.association_type = '3' + lwug.id is not null and ldsi.id = #{param.id} group by lwug.allocation_id 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 dbf42eb3a..4a693961a 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 @@ -89,7 +89,7 @@ and dsa.consignee_unit like concat('%',#{param.consigneeUnit},'%') - and dsa.customer_name like + and dbl.customer_name like concat('%',#{param.customerName},'%') and dsa.customer_telephone like diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml index d3839e21f..712d37788 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml @@ -150,7 +150,7 @@ from logpm_distribution_parcel_list ldpl LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id and lwug.association_type = '3' where ldpl.stock_article_id = ldbs.stock_article_id) goodsAllocation, - ldsa.service_number serviceNumber,ldsa.waybill_number waybillNumber,ldsa.train_number trainNumber,ldsa.send_warehouse_name sendWarehouseName + ldsa.service_number serviceNumber,ldsa.waybill_number waybillNumber,ldsa.train_number trainNumber,ldsa.send_warehouse_name sendWarehouseName, GROUP_CONCAT(DISTINCT ldbls.scan_user) AS scanUser ,MAX(ldbls.create_time) AS signingTime from logpm_distrilbution_bill_lading AS ldbl 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 7038e1b2b..426830bd0 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 @@ -264,7 +264,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl deliveryId = Func.toLongList((String) distributionDeliveryList.get("ids")); - distributionDeliveryList.put("ids",deliveryId); + if (!deliveryId.isEmpty()){ + distributionDeliveryList.put("ids",deliveryId); + } + }else { + distributionDeliveryList.remove("ids"); } BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); if (Func.isEmpty(myCurrentWarehouse)){ @@ -296,8 +300,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl info = new HashMap<>(); + info.put("orderPackageCode",parcelListEntity.getOrderPackageCode()); + info.put("warehouseId",myCurrentWarehouse.getId()); + warehouseUpdownTypeClient.downDeliveryPackage(info); Map map = new HashMap(); String distrilbutionloadingscanDTOJson = JSONObject.toJSONString(distrilbutionloadingscanDTO); @@ -730,6 +740,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl parcelNumberVOS = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId()); List deliveryStockArticleInfo = baseMapper.getDeliveryStockArticleInfo(deliveryId); @@ -4370,6 +4383,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionParcelListVOS = new ArrayList<>(); if (Func.isNotEmpty(reservationStockarticleEntityList)) { List orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); + List reservationId = reservationStockarticleEntityList.stream().map(DistributionReservationStockarticleEntity::getReservationId).collect(Collectors.toList()); + Map map = new HashMap<>(); + if (!reservationId.isEmpty()) { + for (Long l : reservationId) { + List distributionStockArticleVOS = distributionReservationMapper.selectOrderInfoByReservationId(l); + distributionStockArticleVOS.forEach(s->{ + map.put(s.getId(),s.getReservationCode()); + }); + } + } if (Func.isNotEmpty(orderIds)) { //查询该客户的非零但订单包间 IPage parcelListEntityList = distributionReservationMapper.getReservationPackage(page, orderIds, distributionDeliveryInfoDTO); @@ -4379,6 +4402,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList.getRecords()); for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) { // log.info(">>>>>> distributionParcelListVO {}", distributionParcelListVO); + distributionParcelListVO.setDeliveryTrainNumber(deliveryListEntity.getTrainNumber()); + if (!map.isEmpty()){ + distributionParcelListVO.setReservationCode(map.get(distributionParcelListVO.getStockArticleId())); + } if (Func.isNotEmpty(loadingDataMap)) { DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId()); // log.info(">>>>>> loadscanEntity {}", loadscanEntity); @@ -4602,6 +4629,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl parcelNumberVOS = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId()); + DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId); + List deliveryStockArticleInfo = baseMapper.getDeliveryStockArticleInfo(deliveryId); if (Func.isEmpty(deliveryStockArticleInfo)) { log.error("配送任务订单查询异常:{}", deliveryStockArticleInfo); @@ -4622,6 +4651,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionParcelListVOS = new ArrayList<>(); if (Func.isNotEmpty(reservationStockarticleEntityList)) { List orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); + List reservationId = reservationStockarticleEntityList.stream().map(DistributionReservationStockarticleEntity::getReservationId).collect(Collectors.toList()); + Map map = new HashMap<>(); + if (!reservationId.isEmpty()) { + for (Long l : reservationId) { + List distributionStockArticleVOS = distributionReservationMapper.selectOrderInfoByReservationId(l); + distributionStockArticleVOS.forEach(s->{ + map.put(s.getId(),s.getReservationCode()); + }); + } + } if (Func.isNotEmpty(orderIds)) { //查询该客户的非零但订单包间 List parcelListEntityList = distributionReservationMapper.getReservationPackageByDeliveryId(orderIds, deliveryId); @@ -4631,6 +4670,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList); for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) { log.info(">>>>>> distributionParcelListVO {}", distributionParcelListVO); + distributionParcelListVO.setDeliveryTrainNumber(deliveryListEntity.getTrainNumber()); + if (!map.isEmpty()){ + distributionParcelListVO.setReservationCode(map.get(distributionParcelListVO.getStockArticleId())); + } if (Func.isNotEmpty(loadingDataMap)) { DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId()); log.info(">>>>>> loadscanEntity {}", loadscanEntity); 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 be6d48f19..52cc51a4e 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 @@ -5672,6 +5672,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImplupdate().lambda() + .eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId()) + .set(DistributionSignforEntity::getDriverSigning, "2") + .set(!Objects.isNull(distributionSignfor.getDriverRemarks()),DistributionSignforEntity::getDriverRemarks, "2") + ); } return false; 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 02c38752e..03d80f041 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 @@ -165,20 +165,29 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl warehouseList = warehouseClient.getMyWarehouseList(); + if (!warehouseList.isEmpty()){ + List warehouseListIds = warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); + paramMap.put("warehouseIds", warehouseListIds); + } + }else { + paramMap.put("warehouseId", myCurrentWarehouse.getId()); } // 用户勾选数据的ids Object ids = paramMap.get("ids"); - List idArr = null; + List idArr = null; if (null != ids && !"".equals(ids.toString())) { - idArr = Arrays.asList(paramMap.get("ids").toString().split(",")); +// idArr = Arrays.asList(paramMap.get("ids").toString().split(",")); + idArr = Func.toLongList((String) paramMap.get("ids")); + } String tenantId = AuthUtil.getTenantId(); - paramMap.put("warehouseId", myCurrentWarehouse.getId()); paramMap.put("tenantId", tenantId); + paramMap.put("orderIds", idArr); - List list = baseMapper.exportDistributionStockArticle(paramMap, idArr); + List list = baseMapper.exportDistributionStockArticle(paramMap); List excelList = new ArrayList<>(); // list.forEach(li -> {