This commit is contained in:
pengjie 2023-07-19 16:40:32 +08:00
parent b00a543d16
commit 49d213e988
2 changed files with 5 additions and 4 deletions

View File

@ -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 ")
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 ")

View File

@ -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())