Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
陈龙 2 days ago
parent
commit
2ad864dca8
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java
  2. 1
      blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java
  3. 48
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
  4. 17
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  5. 13
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java

@ -424,7 +424,7 @@ public abstract class FanoutConstants {
/**
* 异常审核
* @see org.springblade.common.model.ReservationVO
* @see org.springblade.common.model.AbnormalPackageVO
*/
interface DeliveryAbnormalReview {

1
blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java

@ -162,6 +162,7 @@ public class PackageData implements Serializable {
private Long finalNodeId;
private String finalNodeName;
private Integer examine;
}

48
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml

@ -246,11 +246,14 @@
left join logpm_warehouse_waybill lww on lww.id = lta.waybill_id
left join logpm_warehouse_warehouse waw on waw.id = lta.warehouse_id
left join (
SELECT
t1.*
FROM logpm_trunkline_cars_load_scan t1
LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code AND t1.create_time < t2.create_time
WHERE t2.scan_code IS NULL
SELECT
t1.*
FROM logpm_trunkline_cars_load_scan t1
LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code
AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL)
OR(t1.warehouse_id IS NOT NULL and t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time))
WHERE
t2.scan_code IS NULL
) ltcls on ltcls.scan_code = lta.order_package_code and ltcls.warehouse_id = lta.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4
left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id
where lta.create_time > '2024-10-22 00:00:00'
@ -316,8 +319,11 @@
SELECT
t1.*
FROM logpm_trunkline_cars_load_scan t1
LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code AND t1.create_time < t2.create_time
WHERE t2.scan_code IS NULL
LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code
AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL)
OR(t1.warehouse_id IS NOT NULL and t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time))
WHERE
t2.scan_code IS NULL
) ltcls on ltcls.scan_code = lta.order_package_code and ltcls.warehouse_id = lta.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4
left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id
where lta.create_time > '2024-10-22 00:00:00'
@ -2775,10 +2781,19 @@
else '未知' end isOverTime
from logpm_trunkline_advance_detail ltad
left join logpm_trunkline_advance lta on lta.id = ltad.advance_id
left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id
left join logpm_warehouse_warehouse waw on waw.id = ltad.warehouse_id
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4
left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id
left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id
left join logpm_warehouse_warehouse waw on waw.id = ltad.warehouse_id
left join (
SELECT
t1.*
FROM logpm_trunkline_cars_load_scan t1
LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code
AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL)
OR(t1.warehouse_id IS NOT NULL and t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time))
WHERE
t2.scan_code IS NULL
) ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4
left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id
where ltad.create_time > '2024-10-22 00:00:00'
and lww.document_making_time > '2024-10-22 00:00:00'
and lww.departure_warehouse_id != lww.destination_warehouse_id
@ -2879,7 +2894,16 @@
left join logpm_trunkline_advance lta on lta.id = ltad.advance_id
left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id
left join logpm_warehouse_warehouse waw on waw.id = ltad.warehouse_id
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4
left join (
SELECT
t1.*
FROM logpm_trunkline_cars_load_scan t1
LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code
AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL)
OR(t1.warehouse_id IS NOT NULL and t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time))
WHERE
t2.scan_code IS NULL
) ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4
left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id
where ltad.create_time > '2024-10-22 00:00:00'
and lww.document_making_time > '2024-10-22 00:00:00'

17
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java

@ -547,17 +547,20 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
Map<String, DistributionParcelListEntity> parcelMap = new HashMap<>();
List<AftersalesAbnormalRecordEntity> addList = new ArrayList<>();
List<TrunklineCarsLoadScanEntity> noUnloadList = trunklineCarsLoadScanService.findUnloadCheckAbnormalNoUnloadList(loadId, warehouseId);
//把noUnloadList中所有元素的scanCode放入一个List
List<String> scanCodeList = noUnloadList.stream().map(TrunklineCarsLoadScanEntity::getScanCode).collect(Collectors.toList());
FindParamterDTO findParamterDTO = new FindParamterDTO();
findParamterDTO.setOrderPackageCodeList(scanCodeList);
findParamterDTO.setWarehouseId(warehouseId);
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findListByOrderPackageCodeList(findParamterDTO);
//把parcelListEntityList转化成以orderPackageCode作为key的Map
Map<String, DistributionParcelListEntity> parcelMap = parcelListEntityList.stream()
.collect(Collectors.toMap(DistributionParcelListEntity::getOrderPackageCode, Function.identity()));
if(CollUtil.isNotEmpty(scanCodeList)){
FindParamterDTO findParamterDTO = new FindParamterDTO();
findParamterDTO.setOrderPackageCodeList(scanCodeList);
findParamterDTO.setWarehouseId(warehouseId);
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findListByOrderPackageCodeList(findParamterDTO);
//把parcelListEntityList转化成以orderPackageCode作为key的Map
parcelMap = parcelListEntityList.stream()
.collect(Collectors.toMap(DistributionParcelListEntity::getOrderPackageCode, Function.identity()));
}
for (TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity : noUnloadList) {
String loadCode = trunklineCarsLoadScanEntity.getLoadCode();

13
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -13570,11 +13570,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
allAdvanceDetailList.addAll(advanceDetailEntityList);
});
Map<Long, TrunklineAdvanceEntity> advanceMap = new HashMap<>();
//把allAdvanceDetailList中所有advanceId放入一个Set集合
Set<Long> advanceIdSet = allAdvanceDetailList.stream().map(TrunklineAdvanceDetailEntity::getAdvanceId).collect(Collectors.toSet());
List<TrunklineAdvanceEntity> advanceEntities = advanceService.findListByIds(new ArrayList<>(advanceIdSet));
//把advanceEntities转化成id为key的Map
Map<Long, TrunklineAdvanceEntity> advanceMap = advanceEntities.stream().collect(Collectors.toMap(TrunklineAdvanceEntity::getId, Function.identity()));
if(CollUtil.isNotEmpty(advanceIdSet)){
List<TrunklineAdvanceEntity> advanceEntities = advanceService.findListByIds(new ArrayList<>(advanceIdSet));
//把advanceEntities转化成id为key的Map
advanceMap = advanceEntities.stream().collect(Collectors.toMap(TrunklineAdvanceEntity::getId, Function.identity()));
}
//把allAdvanceDetailList转化成orderPackageCode为key的Map
@ -13586,6 +13590,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
List<String> orderPackageCodeList = new ArrayList<>();
Set<String> orderPackageCodeSet = new HashSet<>();
Map<Long, TrunklineAdvanceEntity> finalAdvanceMap = advanceMap;
carsLoadScanEntities.forEach(carsLoadScanEntity -> {
String orderPackageCode = carsLoadScanEntity.getScanCode();
Date unloadTime = carsLoadScanEntity.getUnloadTime();
@ -13610,7 +13615,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
updateScanEntity.setOrderCode(trunklineAdvanceDetailEntity.getOrderCode());
updateScanEntity.setWaybillId(trunklineAdvanceDetailEntity.getWaybillId());
updateScanEntity.setWaybillNo(trunklineAdvanceDetailEntity.getWaybillNo());
TrunklineAdvanceEntity advanceEntity = advanceMap.get(advanceId);
TrunklineAdvanceEntity advanceEntity = finalAdvanceMap.get(advanceId);
if(!Objects.isNull(advanceEntity)){
updateScanEntity.setCustomerName(advanceEntity.getCustomerName());
updateScanEntity.setCustomerTelephone(advanceEntity.getCustomerPhone());

Loading…
Cancel
Save