diff --git a/src/main/resources/mybatis/wisdom/RkStatisticsMapper.xml b/src/main/resources/mybatis/wisdom/RkStatisticsMapper.xml index 905d981..ff62595 100644 --- a/src/main/resources/mybatis/wisdom/RkStatisticsMapper.xml +++ b/src/main/resources/mybatis/wisdom/RkStatisticsMapper.xml @@ -233,49 +233,21 @@ UNION ALL - SELECT - '应到未到[全部未到]' AS type, - COUNT(DISTINCT g.xm_no) AS projectCnt, - ROUND( - COALESCE( - SUM(g.jh_qty), - 0 - ), - 3 - ) AS totalQty, - ROUND( - COALESCE( - SUM(g.jh_qty * g.ht_dj), - 0 - ), - 3 - ) AS totalAmt - FROM gys_jh g - WHERE g.is_delete = '0' - AND g.status = '0' - - UNION ALL - SELECT '应出未出[全部未出]' AS type, - COUNT(DISTINCT g.xm_no) AS projectCnt, + COUNT(DISTINCT ri.xm_no) AS projectCnt, ROUND( - COALESCE( - SUM(g.real_qty), - 0 - ), + COALESCE(SUM(ri.real_qty), 0), 3 ) AS totalQty, ROUND( - COALESCE( - SUM(g.real_qty * g.ht_dj), - 0 - ), + COALESCE(SUM(ri.real_qty * ri.ht_dj), 0), 3 ) AS totalAmt - FROM gys_jh g - WHERE g.is_delete = '0' - AND g.status = '1'; + FROM rk_info ri + WHERE ri.is_delete = '0' + AND ri.is_chuku = '0' + AND TIMESTAMPDIFF(DAY, ri.operation_time, NOW()) > 30; ]]>