Browse Source

1.报表代码优化

2.干线bug修复
dev
zhenghaoyu 2 months ago
parent
commit
aa9d0c1bff
  1. 12
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
  2. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/AdvanceOrderMqServiceImpl.java
  3. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  4. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  5. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

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

@ -1169,6 +1169,8 @@
</if>
group by lw.id,lrat.hours_time) t on lww.id = t.waybillId
where 1=1
and lww.departure_warehouse_id != lww.destination_warehouse_id
and lww.create_time > '2024-10-22 00:00:00'
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
and waw.business_line in
<foreach collection="param.businessLineList" item="item" open="(" separator="," close=")">
@ -1288,6 +1290,8 @@
</if>
group by lw.id,lrat.hours_time) t on lww.id = t.waybillId
where 1=1
and lww.departure_warehouse_id != lww.destination_warehouse_id
and lww.create_time > '2024-10-22 00:00:00'
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
and waw.business_line in
<foreach collection="param.businessLineList" item="item" open="(" separator="," close=")">
@ -1357,7 +1361,7 @@
when count(ltad.id) = sum(if(ldplm.order_package_status='70',1,0)) then '已签收'
else '未知' end signStatus,
sum(if(ldplm.order_package_status='70',1,0)) signNum
from logpm_trunkline_advance_detail ltad
from logpm_trunkline_advance_detail ltad FORCE INDEX (idx_createtime_count_1)
left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id
left join logpm_warehouse_warehouse waw on waw.id = lww.destination_warehouse_id
left join logpm_distribution_parcel_list ldpls on ldpls.warehouse_id = lww.departure_warehouse_id and ldpls.order_package_code = ltad.order_package_code
@ -1366,7 +1370,7 @@
left join logpm_distribution_parcel_list ldplm on ldplm.warehouse_id = lww.destination_warehouse_id and ldplm.order_package_code = ltad.order_package_code
left join logpm_trunkline_cars_load_scan ltclsm on ltclsm.scan_code = ldplm.order_package_code and ltclsm.unload_node_id = ldplm.warehouse_id
left join logpm_trunkline_cars_load_line ltcllm on ltcllm.load_id = ltclsm.load_id and ltcllm.node_id = ltclsm.unload_node_id
left join logpm_quality_deliver lqd on lqd.order_package_code = ltad.order_package_code and lqd.retention_time is null
left join logpm_quality_deliver lqd on lqd.order_package_code = ltad.order_package_code and lqd.biz_status &lt;= 100
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'
@ -1487,7 +1491,7 @@
when count(ltad.id) = sum(if(ldplm.order_package_status='70',1,0)) then '已签收'
else '未知' end signStatus,
sum(if(ldplm.order_package_status='70',1,0)) signNum
from logpm_trunkline_advance_detail ltad
from logpm_trunkline_advance_detail ltad FORCE INDEX (idx_createtime_count_1)
left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id
left join logpm_warehouse_warehouse waw on waw.id = lww.destination_warehouse_id
left join logpm_distribution_parcel_list ldpls on ldpls.warehouse_id = lww.departure_warehouse_id and ldpls.order_package_code = ltad.order_package_code
@ -1496,7 +1500,7 @@
left join logpm_distribution_parcel_list ldplm on ldplm.warehouse_id = lww.destination_warehouse_id and ldplm.order_package_code = ltad.order_package_code
left join logpm_trunkline_cars_load_scan ltclsm on ltclsm.scan_code = ldplm.order_package_code and ltclsm.unload_node_id = ldplm.warehouse_id
left join logpm_trunkline_cars_load_line ltcllm on ltcllm.load_id = ltclsm.load_id and ltcllm.node_id = ltclsm.unload_node_id
left join logpm_quality_deliver lqd on lqd.order_package_code = ltad.order_package_code and lqd.retention_time is null
left join logpm_quality_deliver lqd on lqd.order_package_code = ltad.order_package_code and lqd.biz_status &lt;= 100
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'

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

@ -146,6 +146,7 @@ public class AdvanceOrderMqServiceImpl implements IAdvanceOrderMqService {
if (StrUtil.isEmpty(advanceDetailEntity.getSendDateStr())) {
advanceDetailEntity.setSendDateStr(DateUtil.today());
}
advanceDetailEntity.setWaybillNo(null);
advanceDetailEntityList.add(advanceDetailEntity);
JSONArray items = detail.getJSONArray("items");
if (CollUtil.isNotEmpty(items)) {

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

@ -135,7 +135,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
String driverMobile = carsLoadEntity.getDriverMobile();
String carsLineName = carsLoadEntity.getCarsLineName();
String now = CommonUtil.dateToString(new Date());
String now = CommonUtil.dateToStringGeneral(new Date());
TrunklineCarsLoadLogEntity carsLoadLogEntity = new TrunklineCarsLoadLogEntity();
carsLoadLogEntity.setNodeId(nodeId);
carsLoadLogEntity.setNodeName(nodeName);

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -696,7 +696,11 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
advanceDetailEntity.setPackageStatus("1");
advanceDetailEntity.setIncomingType(incomingType);
if(!Objects.isNull(waybillEntity)){
advanceDetailEntity.setWaybillNo(waybillEntity.getWaybillNo());
}else{
advanceDetailEntity.setWaybillNo(waybillNo);
}
advanceDetailEntity.setIncomingWarehouseId(warehouseId);
advanceDetailEntity.setIncomingWarehouseName(warehouseName);
advanceDetailEntity.setIncomingTime(date);

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

@ -681,7 +681,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
// nextCarsLoadLineEntity.setArriveUserId(AuthUtil.getUserId());
// nextCarsLoadLineEntity.setArriveUserName(AuthUtil.getNickName());
// trunklineCarsLoadLineService.updateById(nextCarsLoadLineEntity);
trunklineCarsLoadLineService.updateArriveTime(nextCarsLoadLineEntity.getId(), date,"10",AuthUtil.getUserId(),AuthUtil.getUserName());
trunklineCarsLoadLineService.updateArriveTime(nextCarsLoadLineEntity.getId(), date,"10",AuthUtil.getUserId(),AuthUtil.getNickName());
// carsLoadEntity.setLoadStatus("40");
// carsLoadEntity.setArriveTime(date);
@ -1012,6 +1012,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
throw new CustomerException(400, "仓库信息不存在");
}
String warehouseName = warehouseEntity.getName();
//先查询车辆配载计划
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
if (Objects.isNull(carsLoadEntity)) {
@ -1118,7 +1120,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
openOrderAsyncService.saveCancelArriveCarLog(currentCarsLoadLineEntity, AuthUtil.getNickName(), AuthUtil.getUserId());
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId);
String content = "包件在 " + warehouseId + "取消到车";
String content = "包件在 " + warehouseName + "取消到车";
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseEntity.getName(), workNode, content);
} catch (Exception e) {
log.warn("#############cancelArriveCarByLoadId: 存入日志失败");

Loading…
Cancel
Save