From 7024436e24313ccc8ccc4920c35377c8345a8cb7 Mon Sep 17 00:00:00 2001 From: chenwei <3291673014@qq.com> Date: Thu, 9 May 2024 23:53:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E7=A6=BB=E8=81=8C=E5=B7=A5=E6=97=B6?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E8=80=83=E5=8B=A4=E6=8A=A5=E8=A1=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/kq/cmd/report/ExportExcelCmd.java | 4 ++-- src/com/engine/kq/cmd/report/GetKQReportCmd.java | 6 ++---- src/weaver/interfaces/sskj/action/OverTimeBatchAction.java | 6 ++++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/com/engine/kq/cmd/report/ExportExcelCmd.java b/src/com/engine/kq/cmd/report/ExportExcelCmd.java index 3ec7804..5e8889d 100644 --- a/src/com/engine/kq/cmd/report/ExportExcelCmd.java +++ b/src/com/engine/kq/cmd/report/ExportExcelCmd.java @@ -993,7 +993,7 @@ public class ExportExcelCmd extends AbstractCommonCommand> { " a.resourceid, " + " SUM(tiaoxiuamount) AS tiaoxiuamounts, " + " SUM(usedamount) AS usedamounts, " + - " GREATEST( sum(extraamount) + SUM(tiaoxiuamount) - SUM(usedamount), 0.00000) AS difference_amounts, " + + " GREATEST( SUM(COALESCE(extraamount, 0)) + SUM(COALESCE(tiaoxiuamount, 0)) - SUM(COALESCE(usedamount, 0)), 0.00000) AS difference_amounts, " + " COALESCE(datetype, b.changetype) AS grouping_date, " + " CASE " + " WHEN datetype IS NOT NULL THEN datetype " + @@ -1051,7 +1051,7 @@ public class ExportExcelCmd extends AbstractCommonCommand> { " a.resourceid, " + " SUM(tiaoxiuamount) AS tiaoxiuamounts, " + " SUM(usedamount) AS usedamounts, " + - " GREATEST( sum(extraamount) + SUM(tiaoxiuamount) - SUM(usedamount), 0.00000) AS difference_amounts, " + + " GREATEST( SUM(COALESCE(extraamount, 0)) + SUM(COALESCE(tiaoxiuamount, 0)) - SUM(COALESCE(usedamount, 0)), 0.00000) AS difference_amounts, " + " COALESCE(datetype, b.changetype) AS grouping_date, " + " CASE " + " WHEN datetype IS NOT NULL THEN datetype " + diff --git a/src/com/engine/kq/cmd/report/GetKQReportCmd.java b/src/com/engine/kq/cmd/report/GetKQReportCmd.java index 7245f1c..aa571b3 100644 --- a/src/com/engine/kq/cmd/report/GetKQReportCmd.java +++ b/src/com/engine/kq/cmd/report/GetKQReportCmd.java @@ -1225,9 +1225,7 @@ public class GetKQReportCmd extends AbstractCommonCommand> { Map result = new HashMap(); String acqSql = "SELECT " + " a.resourceid, " + - " SUM(tiaoxiuamount) AS tiaoxiuamounts, " + - " SUM(usedamount) AS usedamounts, " + - " GREATEST( sum(extraamount) + SUM(tiaoxiuamount) - SUM(usedamount), 0.00000) AS difference_amounts, " + + " GREATEST( SUM(COALESCE(extraamount, 0)) + SUM(COALESCE(tiaoxiuamount, 0)) - SUM(COALESCE(usedamount, 0)), 0.00000) AS difference_amounts, " + " COALESCE(datetype, b.changetype) AS grouping_date, " + " CASE " + " WHEN datetype IS NOT NULL THEN datetype " + @@ -1288,7 +1286,7 @@ public class GetKQReportCmd extends AbstractCommonCommand> { " a.resourceid, " + " SUM(tiaoxiuamount) AS tiaoxiuamounts, " + " SUM(usedamount) AS usedamounts, " + - " GREATEST( sum(extraamount) + SUM(tiaoxiuamount) - SUM(usedamount), 0.00000) AS difference_amounts, " + + " GREATEST( SUM(COALESCE(extraamount, 0)) + SUM(COALESCE(tiaoxiuamount, 0)) - SUM(COALESCE(usedamount, 0)), 0.00000) AS difference_amounts, " + " COALESCE(datetype, b.changetype) AS grouping_date, " + " CASE " + " WHEN datetype IS NOT NULL THEN datetype " + diff --git a/src/weaver/interfaces/sskj/action/OverTimeBatchAction.java b/src/weaver/interfaces/sskj/action/OverTimeBatchAction.java index c6ac8c4..b892c51 100644 --- a/src/weaver/interfaces/sskj/action/OverTimeBatchAction.java +++ b/src/weaver/interfaces/sskj/action/OverTimeBatchAction.java @@ -70,6 +70,12 @@ public class OverTimeBatchAction implements Action { bb.writeLog("detailInfos: " + detailInfos); + String sql = "select tiaoxiuid from kq_flow_overtime where requetsid = ?"; + rs.executeQuery(sql); + + int flag = 0; + //1 + for ( Map di: detailInfos) { Integer res = Util.getIntValue( Util.null2String( di.get("resourceId"))); String fromDate = Util.null2String( di.get("fromDate"));