Browse Source

Merge remote-tracking branch 'origin/pre-production'

master
zhenghaoyu 5 days ago
parent
commit
9adf010abd
  1. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverAddListener.java
  3. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  4. 21
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
  5. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java

@ -160,6 +160,9 @@ public class DeliverFinishReportListener implements ReportService {
entity.setWaybillNumber(qualityDeliverEntity.getWaybillNumber());
entity.setConditions(qualityDeliverEntity.getConditions());
entity.setSignNum(qualityDeliverEntity.getSignNum());
entity.setArriveProvince(qualityDeliverEntity.getArriveProvince());
entity.setArriveCity(qualityDeliverEntity.getArriveCity());
entity.setArriveDistrict(qualityDeliverEntity.getArriveDistrict());
// 查询品类
BasicdataFactoryCategoryEntity param = new BasicdataFactoryCategoryEntity();
param.setBrand(qualityDeliverEntity.getBrandName());
@ -770,7 +773,9 @@ public class DeliverFinishReportListener implements ReportService {
Collection<QualityDeliverEntity> values = valueMap.values();
// 按省市区分组后的数量 arriveProvince arriveCity arriveDistrict
if(CollUtil.isNotEmpty(values)){
Set<String> collect1 = values.stream().map(v -> {
Set<String> collect1 = values.stream()
.filter(v -> StrUtil.isNotEmpty(v.getArriveProvince() + v.getArriveCity() + v.getArriveDistrict()))
.map(v -> {
return v.getArriveProvince() + v.getArriveCity() + v.getArriveDistrict();
}).collect(Collectors.toSet());
if(CollUtil.isNotEmpty(collect1)){

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/QualityDeliverAddListener.java

@ -335,11 +335,11 @@ public class QualityDeliverAddListener implements ReportService {
TrunklineWaybillOrderEntity entityByWaybillNoAndOrderCode = waybillOrderClient.findEntityByWaybillNoAndOrderCode(waybillNumber, orderCode);
if (ObjectUtil.isNotEmpty(entityByWaybillNoAndOrderCode)) {
qualityDeliverEntity.setOrderWaybillNumber(entityByWaybillNoAndOrderCode.getTotalNumber());
}
redisCache.setEx(key, entityByWaybillNoAndOrderCode.getTotalNumber(), 60L);
}
}
}
}
private void buildOrderInfo(QualityDeliverEntity qualityDeliverEntity, Long warehouseId, String orderCode) {
DistributionStockArticleEntity stockArticleEntity = getDistributionStockArticleEntity(warehouseId, orderCode);

23
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -3984,6 +3984,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanService.save(distributionLoadscanEntity);
pushList.add(distributionLoadscanEntity);
loadingId = distributionLoadscanEntity.getId();
content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getSigningUser() + "扫描异常签收,装车方式:补录装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
pushList.add(distributionLoadscanEntity);
} else {
loadingId = distributionLoadscanEntity.getId();
@ -6090,13 +6092,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
jsonObject.put("num", 1);
jsonObject.put("remark", "批量签收下架");
jsonObjects.add(jsonObject);
content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getSigningUser() + "司机批量签收,装车方式:扫描装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntities.getSigningUser() + "司机批量签收,装车方式:补录装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), distributionDeliveryListEntity.getTrainNumber(), parcelListEntity.getWarehouseEntryTimeEnd());
//distributionAsyncService.sendFactory(parcelListEntity, loadscanEntity.getSigningTime(), reservationEntity.getId(), reservationEntity.getReservationCode(), myCurrentWarehouse.getName(), user.getNickName());
sendNodeWorkDataBroadcast(parcelListEntity, reservationEntity, loadscanEntity.getSigningTime(), myCurrentWarehouse);
} else {
loadscanEntities.setMsg("司机一键签收数据补录");
if (!loadscanEntities.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) {
//已经进行过装车 这里不需要进行订制品订单在库数量扣减
@ -6110,11 +6110,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntities.setReceivedQuantity(parcelListEntity.getQuantity());
loadscanEntities.setSigningTime(signingTime);
DistributionLoadscanEntity update = getDistributionLoadscanEntity(loadscanEntities);
content = "包件在" + myCurrentWarehouse.getName() + "由" + update.getSigningUser() + "司机批量签收,装车方式:扫描装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
distributionLoadscanService.updateById(update);
distributionLoadscanEntityLists.add(loadscanEntities);
packageLockIds.add(loadscanEntities.getPackageId());
content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntities.getSigningUser() + "司机批量签收,装车方式:补录装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), distributionDeliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd());
// 节点作业推送
sendNodeWorkDataBroadcast(parcelListEntity, reservationEntity, loadscanEntities.getSigningTime(), myCurrentWarehouse);
@ -6131,21 +6130,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isNotEmpty(packageIds)) {
distributionAsyncService.handlPakcage(packageIds, myCurrentWarehouse.getId());
}
// if (Func.isNotEmpty(packageCodes)) {
//批量下架
// String collected = packageCodes.stream().distinct().collect(Collectors.joining(","));
// log.info(method + "司机批量签收进行包件下架:{}", collected);
// Map<String, Object> map = new HashMap<>();
// map.put("orderPackageCode", collected);
// map.put("warehouseId", myCurrentWarehouse.getId());
// warehouseUpdownTypeClient.downDeliveryPackage(map);
// trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
// }
}
//维护客户信息状态
// reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
// reservationEntity.setSigningStatus(ReservationSigningStatusConstant.yiqianshou.getValue());
// distributionReservationMapper.updateById(reservationEntity);
//更新配送装车时间
distributionDeliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.peisongzhong.getValue());
distributionDeliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.yizhuangche.getValue());

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

@ -245,9 +245,10 @@
from logpm_trunkline_advance_detail lta
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 logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = lta.order_package_code and ltcls.warehouse_id = lta.warehouse_id and ltcls.type = 1
left join logpm_trunkline_cars_load_scan 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 &gt; '2024-10-22 00:00:00'
and lww.document_making_time &gt; '2024-10-22 00:00:00'
and lww.departure_warehouse_id != lww.destination_warehouse_id
and waw.business_line is not null
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
@ -305,9 +306,10 @@
from logpm_trunkline_advance_detail lta
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 logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = lta.order_package_code and ltcls.warehouse_id = lta.warehouse_id and ltcls.type = 1
left join logpm_trunkline_cars_load_scan 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 &gt; '2024-10-22 00:00:00'
and lww.document_making_time &gt; '2024-10-22 00:00:00'
and lww.departure_warehouse_id != lww.destination_warehouse_id
and waw.business_line is not null
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
@ -579,7 +581,7 @@
round(sum(TIMESTAMPDIFF(SECOND, ldpl.create_time, ltcll.start_date))/sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0))/3600,1) avgTime
from logpm_distribution_parcel_list ldpl
left join logpm_warehouse_warehouse waw on waw.id = ldpl.warehouse_id
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.warehouse_id and ltcls.type = 1
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.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 ldpl.is_transfer = 1
and ldpl.create_time &gt; '2024-10-22 00:00:00'
@ -648,7 +650,7 @@
round(sum(TIMESTAMPDIFF(SECOND, ldpl.create_time, ltcll.start_date))/sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0))/3600,1) avgTime
from logpm_distribution_parcel_list ldpl
left join logpm_warehouse_warehouse waw on waw.id = ldpl.warehouse_id
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.warehouse_id and ltcls.type = 1
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.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 ldpl.is_transfer = 1
and ldpl.create_time &gt; '2024-10-22 00:00:00'
@ -1405,6 +1407,7 @@
left join logpm_reportconfig_order_all oat on oat.departure_warehouse_id = lww.departure_warehouse_id and oat.destination_warehouse_id = lww.destination_warehouse_id and oat.is_deleted = 0
where ltad.waybill_id is not null
and 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
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
and waw.business_line in
@ -2762,9 +2765,10 @@
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
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
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
and waw.business_line is not null
and waw.business_line = #{param.businessLine}
@ -2863,9 +2867,10 @@
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
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
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
and waw.business_line is not null
and waw.business_line = #{param.businessLine}
@ -2963,7 +2968,7 @@
from logpm_distribution_parcel_list ldpl
left join logpm_trunkline_advance lta on lta.id = ldpl.advance_id
left join logpm_warehouse_warehouse waw on waw.id = ldpl.warehouse_id
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.warehouse_id and ltcls.type = 1
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.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 ldpl.is_transfer = 1
and ldpl.create_time > '2024-10-22 00:00:00'
@ -3064,7 +3069,7 @@
from logpm_distribution_parcel_list ldpl
left join logpm_trunkline_advance lta on lta.id = ldpl.advance_id
left join logpm_warehouse_warehouse waw on waw.id = ldpl.warehouse_id
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.warehouse_id and ltcls.type = 1
left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.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 ldpl.is_transfer = 1
and ldpl.create_time > '2024-10-22 00:00:00'

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -1027,6 +1027,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
});
if (CollUtil.isNotEmpty(updateStockArticleList)) {
log.info("###############openWaybill: 更新订单列表, {}", updateStockArticleList);
distributionStockArticleClient.updateByBatchId(updateStockArticleList);
}
}

Loading…
Cancel
Save