diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java index ff9f81986..5ee4695b2 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java +++ b/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"; /** * 工厂对接服务名称 diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml index 8cc8de6ab..82bc17487 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml +++ b/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 and waw.business_line in @@ -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() < 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(concat(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 @@ -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 <= DATE_ADD( lw.create_time, INTERVAL IFNULL(lrat.hours_time,#{param.hoursTime}) HOUR ),ltcls.unload_num,0)) onTimeNum, sum(if(ltcls.unload_time <= DATE_ADD( lw.create_time, INTERVAL 24 HOUR ),ltcls.unload_num,0)) oneNum, sum(if(DATE_ADD( lw.create_time, INTERVAL 24 HOUR )<ltcls.unload_time and ltcls.unload_time <= DATE_ADD( lw.create_time, INTERVAL 48 HOUR ),ltcls.unload_num,0)) twoNum, @@ -1152,9 +1163,7 @@ and lw.create_time <= #{param.endTime} - 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 and waw.business_line in @@ -1162,6 +1171,30 @@ #{item} + + and lww.brand in + + #{item} + + + + and lww.departure_warehouse_id in + + #{item} + + + + and lww.destination_warehouse_id in + + #{item} + + + + and lww.create_time >= #{param.startTime} + + + and lww.create_time <= #{param.endTime} + 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 <= DATE_ADD( lw.create_time, INTERVAL IFNULL(lrat.hours_time,#{param.hoursTime}) HOUR ),ltcls.unload_num,0)) onTimeNum, sum(if(ltcls.unload_time <= DATE_ADD( lw.create_time, INTERVAL 24 HOUR ),ltcls.unload_num,0)) oneNum, sum(if(DATE_ADD( lw.create_time, INTERVAL 24 HOUR )<ltcls.unload_time and ltcls.unload_time <= DATE_ADD( lw.create_time, INTERVAL 48 HOUR ),ltcls.unload_num,0)) twoNum, @@ -1247,9 +1282,7 @@ and lw.create_time <= #{param.endTime} - 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 and waw.business_line in @@ -1257,6 +1290,30 @@ #{item} + + and lww.brand in + + #{item} + + + + and lww.departure_warehouse_id in + + #{item} + + + + and lww.destination_warehouse_id in + + #{item} + + + + and lww.create_time >= #{param.startTime} + + + and lww.create_time <= #{param.endTime} + group by waw.business_line, lww.departure_warehouse_name, lww.destination_warehouse_name, diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeStartTimeVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeStartTimeVO.java index c951df671..78f4824f2 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeStartTimeVO.java +++ b/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 = "准时发运率") diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeTransferTimeVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeTransferTimeVO.java index 57fe77e91..a307f03c1 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeTransferTimeVO.java +++ b/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;