Browse Source

1.报表bug修复

pre-production
zhenghaoyu 3 weeks ago
parent
commit
a5b61c0ac3
  1. 34
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
  2. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java

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

@ -8,18 +8,19 @@
lta.warehouse_name warehouseName,
lta.brand brand,
count(lta.id) totalNum,
count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) needOpenNum,
sum(if(lta.waybill_status='1',1,0)) hasOpenNum,
sum(if(lta.waybill_status = '0',1,0)) noOpenNum,
IFNULL(round(sum(if(lta.waybill_status = '0',1,0))/count(lta.id)*100,2),'0.00') noOpenRate,
sum(if(lta.waybill_status = '0',1,0))-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) noOpenNum,
IFNULL(round((sum(if(lta.waybill_status = '0',1,0))-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))/(count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))*100,2),'0.00') noOpenRate,
sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) noOpenHasFreezeNum,
IFNULL(round(sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0))/count(lta.id)*100,2),'0.00') noOpenHasFreezeRate,
IFNULL(round(sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'0.00') noOpenHasFreezeRate,
sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenNoChaoNum,
IFNULL(round(sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/count(lta.id)*100,2),'0.00') noOpenNoChaoRate,
sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenChaoNum,
IFNULL(round(sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/count(lta.id)*100,2),'0.00') noOpenChaoRate,
IFNULL(round(sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'0.00') noOpenNoChaoRate,
sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenChaoNum,
IFNULL(round(sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'0.00') noOpenChaoRate,
sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) onTimeNum,
sum(IF( lta.waybill_status='1' and lww.create_time > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) overTimeNum,
IFNULL(round(sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 ))/sum(if(lta.waybill_status='1',1,0))*100,2),'0.00') onTimeRate,
sum(IF( lta.waybill_status='1' and lww.create_time > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) overTimeNum,
IFNULL(round(sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 ))/(count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))*100,2),'0.00') onTimeRate,
IFNULL(round(sum(TIMESTAMPDIFF(SECOND, lta.create_time, lww.create_time))/sum(if(lta.waybill_status='1',1,0))/3600,1),'0.0') avgTime
from logpm_trunkline_advance lta
left join logpm_warehouse_warehouse waw on waw.id = lta.warehouse_id
@ -62,18 +63,19 @@
lta.warehouse_name warehouseName,
lta.brand brand,
count(lta.id) totalNum,
count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) needOpenNum,
sum(if(lta.waybill_status='1',1,0)) hasOpenNum,
sum(if(lta.waybill_status = '0',1,0)) noOpenNum,
IFNULL(concat(round(sum(if(lta.waybill_status = '0',1,0))/count(lta.id)*100,2),'%'),'0.00%') noOpenRate,
sum(if(lta.waybill_status = '0',1,0))-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) noOpenNum,
IFNULL(concat(round((sum(if(lta.waybill_status = '0',1,0))-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))/(count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))*100,2),'%'),'0.00%') noOpenRate,
sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) noOpenHasFreezeNum,
IFNULL(concat(round(sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0))/count(lta.id)*100,2),'%'),'0.00%') noOpenHasFreezeRate,
IFNULL(concat(round(sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'%'),'0.00%') noOpenHasFreezeRate,
sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenNoChaoNum,
IFNULL(concat(round(sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/count(lta.id)*100,2),'%'),'0.00%') noOpenNoChaoRate,
sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenChaoNum,
IFNULL(concat(round(sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/count(lta.id)*100,2),'%'),'0.00%') noOpenChaoRate,
IFNULL(concat(round(sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'%'),'0.00%') noOpenNoChaoRate,
sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenChaoNum,
IFNULL(concat(round(sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'%'),'0.00%') noOpenChaoRate,
sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) onTimeNum,
sum(IF( lta.waybill_status='1' and lww.create_time > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) overTimeNum,
IFNULL(concat(round(sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 ))/sum(if(lta.waybill_status='1',1,0))*100,2),'%'),'0.00%') onTimeRate,
sum(IF( lta.waybill_status='1' and lww.create_time > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) overTimeNum,
IFNULL(concat(round(sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 ))/(count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))*100,2),'%'),'0.00%') onTimeRate,
IFNULL(round(sum(TIMESTAMPDIFF(SECOND, lta.create_time, lww.create_time))/sum(if(lta.waybill_status='1',1,0))/3600,1),'0.0') avgTime
from logpm_trunkline_advance lta
left join logpm_warehouse_warehouse waw on waw.id = lta.warehouse_id

2
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java

@ -19,6 +19,8 @@ public class ReportOpenTimeVO implements Serializable {
private String brand;
@ExcelProperty(value = "总单数")
private Integer totalNum;
@ExcelProperty(value = "应开单数")
private Integer needOpenNum;
@ExcelProperty(value = "已开单数")
private Integer hasOpenNum;
@ExcelProperty(value = "未开单数")

Loading…
Cancel
Save