|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
|
|
<select id="selectStatistics" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
|
|
<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 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, t.score FROM check_score t
|
|
|
|
|
|
|
+ SELECT t.checked_person , t.checked_dept,ci.parent_id, ci.score FROM check_score t
|
|
|
LEFT JOIN check_item ci ON t.check_item_id = ci.id
|
|
LEFT JOIN check_item ci ON t.check_item_id = ci.id
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
<if test="start_date!=null and end_date != null">
|
|
<if test="start_date!=null and end_date != null">
|
|
@@ -39,8 +39,8 @@
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectFeeStationCheckedScore" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
|
|
<select id="selectFeeStationCheckedScore" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
|
|
|
- SELECT sum(t.score) AS score ,t.checked_dept AS dept_id
|
|
|
|
|
- FROM check_score t
|
|
|
|
|
|
|
+ SELECT sum(c.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
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
<if test="start_date!=null and end_date != null">
|
|
<if test="start_date!=null and end_date != null">
|
|
|
AND t.update_time >= #{start_date} AND t.update_time <= #{end_date}
|
|
AND t.update_time >= #{start_date} AND t.update_time <= #{end_date}
|
|
@@ -50,7 +50,7 @@
|
|
|
|
|
|
|
|
<select id="selectFeeStationCheckedPersonScoreDetail" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
|
|
<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 FROM (
|
|
SELECT u.checked_dept AS dept_id ,u.parent_id AS item_id ,sum(u.score) AS score ,s.name FROM (
|
|
|
- SELECT t.checked_dept,ci.parent_id, t.score FROM check_score t
|
|
|
|
|
|
|
+ SELECT t.checked_dept,ci.parent_id, ci.score FROM check_score t
|
|
|
LEFT JOIN check_item ci ON t.check_item_id = ci.id
|
|
LEFT JOIN check_item ci ON t.check_item_id = ci.id
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
<if test="start_date!=null and end_date != null">
|
|
<if test="start_date!=null and end_date != null">
|