From a5b61c0ac3f5261b43af7b1a896ea74cdb9bff46 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Sat, 28 Dec 2024 23:51:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8A=A5=E8=A1=A8bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/report/mapper/ReportTimeMapper.xml | 34 ++++++++++--------- .../com/logpm/report/vo/ReportOpenTimeVO.java | 2 ++ 2 files changed, 20 insertions(+), 16 deletions(-) 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 2247ad8f6..95b5c6570 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 @@ -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 diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java index 30f4dac86..70dd2f9c8 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java +++ b/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 = "未开单数")