Commit 820d61aa authored by hkl's avatar hkl

feat:1.统计分析bug

parent 6e66c914
......@@ -14,14 +14,8 @@
ON t1.movement_master_id = t2.id
WHERE
t1.project_name = '总计'
AND t2.check_time >= STR_TO_DATE( CONCAT( #{year}
, '-01-01' )
, '%Y-%m-%d' )
AND t2.check_time
< DATE_ADD( STR_TO_DATE(CONCAT(#{year}
, '-01-01')
, '%Y-%m-%d')
, INTERVAL 1 YEAR)) t
AND t2.check_time >= STR_TO_DATE(CONCAT( #{year},'-01-01'),'%Y-%m-%d')
AND t2.check_time < DATE_ADD(STR_TO_DATE(CONCAT(#{year},'-01-01'),'%Y-%m-%d'),INTERVAL 1 YEAR)) t
GROUP BY t.light_rail_id,
t.check_month
ORDER BY t.check_month ASC
......@@ -33,6 +27,9 @@
COUNT(1) AS checkNum
FROM t_ek_rail_wear_record t1
INNER JOIN t_ek_records_master_check t2 ON t1.records_master_check_id = t2.id
WHERE
t2.check_time >= STR_TO_DATE(CONCAT( #{startMonth},'-01'),'%Y-%m-%d')
AND t2.check_time < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth}, '-01'), '%Y-%m-%d'), INTERVAL 1 MONTH)
GROUP BY t2.light_rail_name,
t1.damage_type,
t1.damage_degree
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment