|
|
|
@ -1225,9 +1225,7 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
|
Map<String, Object> result = new HashMap<String, Object>();
|
|
|
|
|
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<Map<String, Object>> {
|
|
|
|
|
" 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 " +
|
|
|
|
|