|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
<select id="selectStatistics" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
|
|
|
SELECT u.checked_person AS user_id , u.checked_dept AS dept_id ,u.parent_id AS item_id ,sum(u.score) AS score ,s.name FROM (
|
|
|
- SELECT t.checked_person , t.checked_dept,ci.parent_id, ci.score FROM check_score t
|
|
|
+ SELECT t.checked_person , t.checked_dept,ci.parent_id, t.check_item_score AS score FROM check_score t
|
|
|
LEFT JOIN check_item ci ON t.check_item_id = ci.id
|
|
|
LEFT JOIN check_task ct ON ct.id = t.task_id
|
|
|
WHERE 1=1 and ct.check_status!=22
|
|
|
@@ -48,7 +48,7 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectFeeStationCheckedScore" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
|
|
|
- SELECT sum(c.score) AS score ,t.checked_dept AS dept_id
|
|
|
+ SELECT sum(t.check_item_score) AS score ,t.checked_dept AS dept_id
|
|
|
FROM check_score t
|
|
|
LEFT JOIN check_item c ON t.check_item_id = c.id
|
|
|
LEFT JOIN check_task ct ON ct.id = t.task_id
|
|
|
@@ -61,11 +61,11 @@
|
|
|
|
|
|
<select id="selectFeeStationCheckedPersonScoreDetail" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
|
|
|
SELECT u.checked_dept AS dept_id ,u.parent_id AS item_id ,sum(u.score) AS score ,s.name,s.id FROM (
|
|
|
- SELECT t.checked_dept,ci.parent_id, ci.score FROM check_score t
|
|
|
+ SELECT t.checked_dept,ci.parent_id, t.check_item_score AS score FROM check_score t
|
|
|
LEFT JOIN check_item ci ON t.check_item_id = ci.id
|
|
|
LEFT JOIN check_task ct ON ct.id = t.task_id
|
|
|
LEFT JOIN t_sys_users uu on t.checked_person = uu.id
|
|
|
- WHERE 1=1 and ct.check_status!=22 and ci.score is not null
|
|
|
+ WHERE 1=1 AND ct.check_status!=22 AND t.check_item_score is not null
|
|
|
<if test="start_date!=null and end_date != null">
|
|
|
AND ct.start_time >= #{start_date} AND ct.end_time < #{end_date}
|
|
|
</if>
|