From 49d213e9881cea7e1168e8901d888cbf9bcea06b Mon Sep 17 00:00:00 2001 From: pengjie <17373303529@163.com> Date: Wed, 19 Jul 2023 16:40:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/magic/api/惠州项目管理政务版/在建项目指标.ms | 4 ++-- src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/resources/magic/api/惠州项目管理政务版/在建项目指标.ms b/src/main/resources/magic/api/惠州项目管理政务版/在建项目指标.ms index 76e4e43..e229bfd 100644 --- a/src/main/resources/magic/api/惠州项目管理政务版/在建项目指标.ms +++ b/src/main/resources/magic/api/惠州项目管理政务版/在建项目指标.ms @@ -5,7 +5,7 @@ "groupId" : "1f3d3e5b9fe340bab84de67b0de08f44", "name" : "在建项目指标", "createTime" : null, - "updateTime" : 1688352901714, + "updateTime" : 1689678565388, "lock" : null, "createBy" : null, "updateBy" : "admin", @@ -34,4 +34,4 @@ "responseBodyDefinition" : null } ================================ -return db.selectOne("SELECT IFNULL(SUM(IF(major_project_type = 1, 1, 0)), 0) importance, IFNULL(SUM(IF(project_type = 1 AND state = 1, 1, 0)), 0) bridge, IFNULL(SUM(IF(project_type = 2 AND state = 1, 1, 0)), 0) tunnel, IFNULL(SUM(IF(project_type = 3 AND state = 1, 1, 0)), 0) station, IFNULL(SUM(IF(build_status in (0,1), 1, 0)), 0) newBuild, IFNULL(SUM(IF(build_status = 5, 1, 0)), 0) reBuild, IFNULL(SUM(IF(build_status = 6, 1, 0)), 0) extension, IFNULL(SUM(IF(build_status in (1, 5, 6), 1, 0)), 0) total, IFNULL(SUM(IF(build_status = 4, 1, 0)), 0) finished, IFNULL(SUM(IF(build_status = 2, 1, 0)), 0) shutdown, IFNULL(SUM(IF(build_status in (1, 2, 4), 1, 0)), 0) total1 FROM project WHERE #project ") \ No newline at end of file +return db.selectOne("SELECT IFNULL(SUM(IF(major_project_type = 1 AND state = 1, 1, 0)), 0) importance, IFNULL(SUM(IF(project_type = 1 AND state = 1, 1, 0)), 0) bridge, IFNULL(SUM(IF(project_type = 2 AND state = 1, 1, 0)), 0) tunnel, IFNULL(SUM(IF(project_type = 3 AND state = 1, 1, 0)), 0) station, IFNULL(SUM(IF(build_status in (0,1) AND state = 1, 1, 0)), 0) newBuild, IFNULL(SUM(IF(build_status = 5, 1, 0)), 0) reBuild, IFNULL(SUM(IF(build_status = 6, 1, 0)), 0) extension, IFNULL(SUM(IF(build_status in (0, 1, 5, 6) AND state = 1, 1, 0)), 0) total, IFNULL(SUM(IF(build_status = 4, 1, 0)), 0) finished, IFNULL(SUM(IF(build_status = 2, 1, 0)), 0) shutdown, IFNULL(SUM(IF(build_status in (1, 2, 4), 1, 0)), 0) total1 FROM project WHERE #project ") \ No newline at end of file diff --git a/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms b/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms index f3fd151..242c729 100644 --- a/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms +++ b/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms @@ -5,7 +5,7 @@ "groupId" : "1f3d3e5b9fe340bab84de67b0de08f44", "name" : "投资管理", "createTime" : null, - "updateTime" : 1688970096225, + "updateTime" : 1689561440845, "lock" : null, "createBy" : "admin", "updateBy" : "admin", @@ -39,7 +39,8 @@ BigDecimal big = new BigDecimal(10000); result.put("paymentByMonth", paymentByMonth.divide(big)) result.put("applyAmountByMonth", applyAmountByMonth.divide(big)) result.put("realPayAmountByMonth", realPayAmountByMonth.divide(big)) -result.put("unPayAmountByMonth", applyAmountByMonth.subtract(realPayAmountByMonth).divide(big)) +var unPayAmountByMonth = applyAmountByMonth.subtract(realPayAmountByMonth); +result.put("unPayAmountByMonth", unPayAmountByMonth > 0 ? unPayAmountByMonth.divide(big) : 0) result.put("totalAmount", totalAmount.divide(big)) result.put("payRatio", realPayAmountTotal == 0 ? 0 : realPayAmountTotal.divide(totalAmount, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")).doubleValue())