Browse Source

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

pre-production
zhenghaoyu 4 days ago
parent
commit
2d1390788f
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java
  3. 119
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
  4. 5
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeStartTimeVO.java
  5. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeTransferTimeVO.java
  6. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

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

@ -9,7 +9,7 @@ public interface ModuleNameConstant {
/**
* 如果不需要 ""
*/
public static final String DEVAUTH ="";
public static final String DEVAUTH ="-zhy";
/**
* 工厂对接服务名称

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

@ -143,6 +143,8 @@ public class DeliverFinishReportListener implements ReportService {
QualityDeliverEntity entity = new QualityDeliverEntity();
entity.setId(qualityDeliverEntity.getId());
entity.setCarComplateTime(new Date());
entity.setOrderCode(qualityDeliverEntity.getOrderCode());
entity.setWaybillNumber(qualityDeliverEntity.getWaybillNumber());
entity.setConditions(qualityDeliverEntity.getConditions());
entity.setSignNum(qualityDeliverEntity.getSignNum());
// 查询品类

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

@ -231,6 +231,8 @@
count(DISTINCT lta.waybill_id) waybillNum,
count(lta.waybill_id) openNum,
count(ltcls.id) startNum,
count(lta.id)-count(ltcls.id) noOutNum,
sum(if( ltcls.id is null and now() <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) noOutOverNum,
sum(if(ltcll.start_date <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) onTimeNum,
IFNULL(round(sum(if(ltcll.start_date <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/count(ltcls.id)*100,2),'0.00') onTimeRate,
round(sum(TIMESTAMPDIFF(SECOND, lta.create_time, ltcll.start_date))/count(ltcls.id)/3600,1) avgTime
@ -287,6 +289,8 @@
count(DISTINCT lta.waybill_id) waybillNum,
count(lta.waybill_id) openNum,
count(ltcls.id) startNum,
count(lta.id)-count(ltcls.id) noOutNum,
sum(if( ltcls.id is null and now() <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) noOutOverNum,
sum(if(ltcll.start_date <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) onTimeNum,
IFNULL(concat(round(sum(if(ltcll.start_date <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/count(ltcls.id)*100,2),'%'),'0.00%') onTimeRate,
round(sum(TIMESTAMPDIFF(SECOND, lta.create_time, ltcll.start_date))/count(ltcls.id)/3600,1) avgTime
@ -346,7 +350,7 @@
sum(IFNULL(t.njgNum,0))+sum(IFNULL(t.jgNum,0)) startNum,
sum(IFNULL(t.jgNum,0)) onTimeNum,
IFNULL(round(sum(IFNULL(t.jgNum,0))/sum(lww.total_count)*100,2),'0.00') onTimeRate,
round(sum(TIMESTAMPDIFF(SECOND, lww.create_time, t.startTime))/(sum(IFNULL(t.njgNum,0))+sum(IFNULL(t.jgNum,0)))/3600,1) '平均发运时效'
round(sum(TIMESTAMPDIFF(SECOND, lww.create_time, t.startTime))/(sum(IFNULL(t.njgNum,0))+sum(IFNULL(t.jgNum,0)))/3600,1) avgTime
from logpm_warehouse_waybill lww
left join logpm_warehouse_warehouse waw on waw.id = lww.departure_warehouse_id
left join (
@ -551,8 +555,10 @@
ldpl.brand_name brand,
sum(ldpl.quantity) incomingNum,
count(ltcls.id) outNum,
sum(if(ltcll.start_date <= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) outOnTimeNum,
IFNULL(round(sum(if(ltcll.start_date <= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/count(ltcls.id)*100,2),'0.00') outOnTimeRate,
sum(ldpl.quantity)-count(ltcls.id) noOutNum,
sum(if(ldpl.order_package_status='20' and now() < DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0 )) noOutOverNum,
sum(if(ltcll.start_date < DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) outOnTimeNum,
IFNULL(round(sum(if(ltcll.start_date < DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/count(ltcls.id)*100,2),'0.00') outOnTimeRate,
round(sum(TIMESTAMPDIFF(SECOND, ldpl.create_time, ltcll.start_date))/count(ltcls.id)/3600,1) avgTime
from logpm_distribution_parcel_list ldpl
left join logpm_warehouse_warehouse waw on waw.id = ldpl.warehouse_id
@ -563,6 +569,7 @@
and ldpl.conditions != 3
and ldpl.waybill_id is not null
and ldpl.warehouse_id != ldpl.send_warehouse_id
and ldpl.warehouse_id != ldpl.accept_warehouse_id
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
and waw.business_line in
<foreach collection="param.businessLineList" item="item" open="(" separator="," close=")">
@ -614,6 +621,8 @@
ldpl.brand_name brand,
sum(ldpl.quantity) incomingNum,
count(ltcls.id) outNum,
sum(ldpl.quantity)-count(ltcls.id) noOutNum,
sum(if(ldpl.order_package_status='20' and now() &lt; DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0 )) noOutOverNum,
sum(if(ltcll.start_date &lt;= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) outOnTimeNum,
IFNULL(concat(round(sum(if(ltcll.start_date &lt;= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/count(ltcls.id)*100,2),'%'),'0.00%') outOnTimeRate,
round(sum(TIMESTAMPDIFF(SECOND, ldpl.create_time, ltcll.start_date))/count(ltcls.id)/3600,1) avgTime
@ -1088,27 +1097,29 @@
sum(IFNULL(t.onTimeNum,0)) onTimeArriveNum,
IFNULL(round(sum(IFNULL(t.onTimeNum,0))/sum(lww.total_count)*100,2),'0.00') onTimeArriveRate,
sum(IFNULL(t.oneNum,0)) oneArriveNum,
IFNULL(round(sum(IFNULL(t.oneNum,0))/sum(lww.total_count)*100,2),'0.00') oneArriveRate,
IFNULL(round(sum(IFNULL(t.oneNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'0.00') oneArriveRate,
sum(IFNULL(t.twoNum,0)) twoArriveNum,
IFNULL(round(sum(IFNULL(t.twoNum,0))/sum(lww.total_count)*100,2),'0.00') twoArriveRate,
IFNULL(round(sum(IFNULL(t.twoNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'0.00') twoArriveRate,
sum(IFNULL(t.threeNum,0)) threeArriveNum,
IFNULL(round(sum(IFNULL(t.threeNum,0))/sum(lww.total_count)*100,2),'0.00') threeArriveRate,
IFNULL(round(sum(IFNULL(t.threeNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'0.00') threeArriveRate,
sum(IFNULL(t.fourNum,0)) fourArriveNum,
IFNULL(round(sum(IFNULL(t.fourNum,0))/sum(lww.total_count)*100,2),'0.00') fourArriveRate,
IFNULL(round(sum(IFNULL(t.fourNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'0.00') fourArriveRate,
sum(IFNULL(t.fiveNum,0)) fiveArriveNum,
IFNULL(round(sum(IFNULL(t.fiveNum,0))/sum(lww.total_count)*100,2),'0.00') fiveArriveRate,
IFNULL(round(sum(IFNULL(t.fiveNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'0.00') fiveArriveRate,
sum(IFNULL(t.sixNum,0)) sixArriveNum,
IFNULL(round(sum(IFNULL(t.sixNum,0))/sum(lww.total_count)*100,2),'0.00') sixArriveRate,
IFNULL(round(sum(IFNULL(t.sixNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'0.00') sixArriveRate,
sum(IFNULL(t.sevenNum,0)) sevenArriveNum,
IFNULL(round(sum(IFNULL(t.sevenNum,0))/sum(lww.total_count)*100,2),'0.00') sevenArriveRate,
IFNULL(round(sum(IFNULL(t.sevenNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'0.00') sevenArriveRate,
sum(IFNULL(t.sevenToTenNum,0)) sevenToTenArriveNum,
IFNULL(round(sum(IFNULL(t.sevenToTenNum,0))/sum(lww.total_count)*100,2),'0.00') sevenToTenArriveRate,
IFNULL(round(sum(IFNULL(t.sevenToTenNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'0.00') sevenToTenArriveRate,
sum(IFNULL(t.moreTenNum,0)) moreTenArriveNum,
IFNULL(round(sum(IFNULL(t.moreTenNum,0))/sum(lww.total_count)*100,2),'0.00') moreTenArriveRate
from (select lw.id waybillId,
IFNULL(round(sum(IFNULL(t.moreTenNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'0.00') moreTenArriveRate
from logpm_warehouse_waybill lww
left join logpm_warehouse_warehouse waw on waw.id = lww.departure_warehouse_id
left join (select lw.id waybillId,
lrat.hours_time,
sum(ltcls.unload_num) totalNum,
sum(TIMESTAMPDIFF(SECOND,lw.create_time,ltcls.unload_time )) timeSecond,
sum(TIMESTAMPDIFF(SECOND,lw.create_time,ltcls.unload_time )*ltcls.unload_num) timeSecond,
sum(if(ltcls.unload_time &lt;= DATE_ADD( lw.create_time, INTERVAL IFNULL(lrat.hours_time,#{param.hoursTime}) HOUR ),ltcls.unload_num,0)) onTimeNum,
sum(if(ltcls.unload_time &lt;= DATE_ADD( lw.create_time, INTERVAL 24 HOUR ),ltcls.unload_num,0)) oneNum,
sum(if(DATE_ADD( lw.create_time, INTERVAL 24 HOUR )&lt;ltcls.unload_time and ltcls.unload_time &lt;= DATE_ADD( lw.create_time, INTERVAL 48 HOUR ),ltcls.unload_num,0)) twoNum,
@ -1152,9 +1163,7 @@
<if test="param.endTime != null ">
and lw.create_time &lt;= #{param.endTime}
</if>
group by lw.id,lrat.hours_time) t
left join logpm_warehouse_waybill lww on lww.id = t.waybillId
left join logpm_warehouse_warehouse waw on waw.id = lww.departure_warehouse_id
group by lw.id,lrat.hours_time) t on lww.id = t.waybillId
where 1=1
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
and waw.business_line in
@ -1162,6 +1171,30 @@
#{item}
</foreach>
</if>
<if test="param.brandList != null and param.brandList.size() > 0">
and lww.brand in
<foreach collection="param.brandList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.departureWarehouseIds != null and param.departureWarehouseIds.size() > 0">
and lww.departure_warehouse_id in
<foreach collection="param.departureWarehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0">
and lww.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.startTime != null ">
and lww.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and lww.create_time &lt;= #{param.endTime}
</if>
group by waw.business_line,
lww.departure_warehouse_name,
lww.destination_warehouse_name,
@ -1183,27 +1216,29 @@
sum(IFNULL(t.onTimeNum,0)) onTimeArriveNum,
IFNULL(concat(round(sum(IFNULL(t.onTimeNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') onTimeArriveRate,
sum(IFNULL(t.oneNum,0)) oneArriveNum,
IFNULL(concat(round(sum(IFNULL(t.oneNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') oneArriveRate,
IFNULL(concat(round(sum(IFNULL(t.oneNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'%'),'0.00%') oneArriveRate,
sum(IFNULL(t.twoNum,0)) twoArriveNum,
IFNULL(concat(round(sum(IFNULL(t.twoNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') twoArriveRate,
IFNULL(concat(round(sum(IFNULL(t.twoNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'%'),'0.00%') twoArriveRate,
sum(IFNULL(t.threeNum,0)) threeArriveNum,
IFNULL(concat(round(sum(IFNULL(t.threeNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') threeArriveRate,
IFNULL(concat(round(sum(IFNULL(t.threeNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'%'),'0.00%') threeArriveRate,
sum(IFNULL(t.fourNum,0)) fourArriveNum,
IFNULL(concat(round(sum(IFNULL(t.fourNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') fourArriveRate,
IFNULL(concat(round(sum(IFNULL(t.fourNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'%'),'0.00%') fourArriveRate,
sum(IFNULL(t.fiveNum,0)) fiveArriveNum,
IFNULL(concat(round(sum(IFNULL(t.fiveNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') fiveArriveRate,
IFNULL(concat(round(sum(IFNULL(t.fiveNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'%'),'0.00%') fiveArriveRate,
sum(IFNULL(t.sixNum,0)) sixArriveNum,
IFNULL(concat(round(sum(IFNULL(t.sixNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') sixArriveRate,
IFNULL(concat(round(sum(IFNULL(t.sixNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'%'),'0.00%') sixArriveRate,
sum(IFNULL(t.sevenNum,0)) sevenArriveNum,
IFNULL(concat(round(sum(IFNULL(t.sevenNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') sevenArriveRate,
IFNULL(concat(round(sum(IFNULL(t.sevenNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'%'),'0.00%') sevenArriveRate,
sum(IFNULL(t.sevenToTenNum,0)) sevenToTenArriveNum,
IFNULL(concat(round(sum(IFNULL(t.sevenToTenNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') sevenToTenArriveRate,
IFNULL(concat(round(sum(IFNULL(t.sevenToTenNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'%'),'0.00%') sevenToTenArriveRate,
sum(IFNULL(t.moreTenNum,0)) moreTenArriveNum,
IFNULL(concat(round(sum(IFNULL(t.moreTenNum,0))/sum(lww.total_count)*100,2),'%'),'0.00%') moreTenArriveRate
from (select lw.id waybillId,
IFNULL(concat(round(sum(IFNULL(t.moreTenNum,0))/sum(IFNULL(t.totalNum,0))*100,2),'%'),'0.00%') moreTenArriveRate
from logpm_warehouse_waybill lww
left join logpm_warehouse_warehouse waw on waw.id = lww.departure_warehouse_id
left join (select lw.id waybillId,
lrat.hours_time,
sum(ltcls.unload_num) totalNum,
sum(TIMESTAMPDIFF(SECOND,lw.create_time,ltcls.unload_time )) timeSecond,
sum(TIMESTAMPDIFF(SECOND,lw.create_time,ltcls.unload_time )*ltcls.unload_num) timeSecond,
sum(if(ltcls.unload_time &lt;= DATE_ADD( lw.create_time, INTERVAL IFNULL(lrat.hours_time,#{param.hoursTime}) HOUR ),ltcls.unload_num,0)) onTimeNum,
sum(if(ltcls.unload_time &lt;= DATE_ADD( lw.create_time, INTERVAL 24 HOUR ),ltcls.unload_num,0)) oneNum,
sum(if(DATE_ADD( lw.create_time, INTERVAL 24 HOUR )&lt;ltcls.unload_time and ltcls.unload_time &lt;= DATE_ADD( lw.create_time, INTERVAL 48 HOUR ),ltcls.unload_num,0)) twoNum,
@ -1247,9 +1282,7 @@
<if test="param.endTime != null ">
and lw.create_time &lt;= #{param.endTime}
</if>
group by lw.id,lrat.hours_time) t
left join logpm_warehouse_waybill lww on lww.id = t.waybillId
left join logpm_warehouse_warehouse waw on waw.id = lww.departure_warehouse_id
group by lw.id,lrat.hours_time) t on lww.id = t.waybillId
where 1=1
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
and waw.business_line in
@ -1257,6 +1290,30 @@
#{item}
</foreach>
</if>
<if test="param.brandList != null and param.brandList.size() > 0">
and lww.brand in
<foreach collection="param.brandList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.departureWarehouseIds != null and param.departureWarehouseIds.size() > 0">
and lww.departure_warehouse_id in
<foreach collection="param.departureWarehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0">
and lww.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.startTime != null ">
and lww.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and lww.create_time &lt;= #{param.endTime}
</if>
group by waw.business_line,
lww.departure_warehouse_name,
lww.destination_warehouse_name,

5
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeStartTimeVO.java

@ -26,6 +26,11 @@ public class ReportPackgeStartTimeVO implements Serializable {
@ExcelProperty(value = "发运件数")
private Integer startNum;
@ExcelProperty(value = "未发运件数")
private Integer noOutNum;
@ExcelProperty(value = "为发运超时件数")
private Integer noOutOverNum;
@ExcelProperty(value = "准时发运件数")
private Integer onTimeNum;
@ExcelProperty(value = "准时发运率")

6
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeTransferTimeVO.java

@ -25,6 +25,12 @@ public class ReportPackgeTransferTimeVO implements Serializable {
@ExcelProperty(value = "中转出库件数")
private Integer outNum;
@ExcelProperty(value = "未出库件数")
private Integer noOutNum;
@ExcelProperty(value = "未出库超时件数")
private Integer noOutOverNum;
@ExcelProperty(value = "中转准时出库件数")
private Integer outOnTimeNum;

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -992,7 +992,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
map.put("备注", warehouseWaybillEntity.getRemark());
map.put("填票人", warehouseWaybillEntity.getAgent());
map.put("托运日期", DateUtil.format(warehouseWaybillEntity.getCreateTime(), "yyyy-MM-dd"));
map.put("托运日期", DateUtil.format(warehouseWaybillEntity.getDocumentMakingTime(), "yyyy-MM-dd"));
// 格式化费用 保留2位小数
map.put("运费总计", formatToTwoDecimalPlaces(sumFreight(warehouseWaybillEntity)));

Loading…
Cancel
Save