|
@@ -23,7 +23,7 @@
|
|
|
<result column="class_type" property="class_type" jdbcType="INTEGER" />
|
|
<result column="class_type" property="class_type" jdbcType="INTEGER" />
|
|
|
<result column="period_id" property="period_id" jdbcType="INTEGER" />
|
|
<result column="period_id" property="period_id" jdbcType="INTEGER" />
|
|
|
<result column="monitor_user_id" property="monitor_user_id" jdbcType="INTEGER" />
|
|
<result column="monitor_user_id" property="monitor_user_id" jdbcType="INTEGER" />
|
|
|
-
|
|
|
|
|
|
|
+ <result column="appeal_result" property="appeal_result" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<resultMap id="taskStatusMap" type="com.xintong.visualinspection.bean.TaskStatus">
|
|
<resultMap id="taskStatusMap" type="com.xintong.visualinspection.bean.TaskStatus">
|
|
|
<id property="id" column="ID"/>
|
|
<id property="id" column="ID"/>
|
|
@@ -63,8 +63,10 @@
|
|
|
<select id="getList" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
|
|
<select id="getList" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
|
|
|
SELECT t.*,
|
|
SELECT t.*,
|
|
|
CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,12,5)) as check_period,
|
|
CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,12,5)) as check_period,
|
|
|
- (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=t.check_status) as check_status_name
|
|
|
|
|
|
|
+ (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=t.check_status) as check_status_name,
|
|
|
|
|
+ ca.appeal_result as appeal_result
|
|
|
FROM check_task t left join t_sys_users u on t.checked_person=u.id
|
|
FROM check_task t left join t_sys_users u on t.checked_person=u.id
|
|
|
|
|
+ left join check_appeal ca on t.id=ca.task_id
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
<if test="check_status != null">AND t.check_status = #{check_status}</if>
|
|
<if test="check_status != null">AND t.check_status = #{check_status}</if>
|
|
|
<if test="check_status_end != null">AND t.check_status <= #{check_status_end}</if>
|
|
<if test="check_status_end != null">AND t.check_status <= #{check_status_end}</if>
|
|
@@ -75,6 +77,7 @@
|
|
|
<if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
|
|
<if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
|
|
|
<if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
|
|
<if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
|
|
|
<if test="position_id != null">AND u.positionid = #{position_id}</if>
|
|
<if test="position_id != null">AND u.positionid = #{position_id}</if>
|
|
|
|
|
+ <if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
|
|
|
<if test="hasScore == 1">AND
|
|
<if test="hasScore == 1">AND
|
|
|
t.id in (select task_id from check_score)
|
|
t.id in (select task_id from check_score)
|
|
|
</if>
|
|
</if>
|
|
@@ -93,8 +96,10 @@
|
|
|
<select id="getListInStatus" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
|
|
<select id="getListInStatus" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
|
|
|
SELECT t.*,
|
|
SELECT t.*,
|
|
|
CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,12,5)) as check_period,
|
|
CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,12,5)) as check_period,
|
|
|
- (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=t.check_status) as check_status_name
|
|
|
|
|
|
|
+ (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=t.check_status) as check_status_name,
|
|
|
|
|
+ ca.appeal_result as appeal_result
|
|
|
FROM check_task t left join t_sys_users u on t.checked_person=u.id
|
|
FROM check_task t left join t_sys_users u on t.checked_person=u.id
|
|
|
|
|
+ left join check_appeal ca on t.id=ca.task_id
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
<if test="check_status_arr != null and check_status_arr.length > 0">AND
|
|
<if test="check_status_arr != null and check_status_arr.length > 0">AND
|
|
|
t.check_status in
|
|
t.check_status in
|
|
@@ -110,6 +115,7 @@
|
|
|
<if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
|
|
<if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
|
|
|
<if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
|
|
<if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
|
|
|
<if test="position_id != null">AND u.positionid = #{position_id}</if>
|
|
<if test="position_id != null">AND u.positionid = #{position_id}</if>
|
|
|
|
|
+ <if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
|
|
|
<if test="hasScore == 1">AND
|
|
<if test="hasScore == 1">AND
|
|
|
t.id in (select task_id from check_score)
|
|
t.id in (select task_id from check_score)
|
|
|
</if>
|
|
</if>
|
|
@@ -127,8 +133,10 @@
|
|
|
<select id="getListByChecked" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
|
|
<select id="getListByChecked" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
|
|
|
SELECT t.*,
|
|
SELECT t.*,
|
|
|
CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,11,6)) as check_period,
|
|
CONCAT(substr(t.start_time,1,16),'-',substr(t.end_time,11,6)) as check_period,
|
|
|
- (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=t.check_status) as check_status_name
|
|
|
|
|
|
|
+ (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=t.check_status) as check_status_name,
|
|
|
|
|
+ ca.appeal_result as appeal_result
|
|
|
FROM check_task t left join t_sys_users u on t.checked_person=u.id
|
|
FROM check_task t left join t_sys_users u on t.checked_person=u.id
|
|
|
|
|
+ left join check_appeal ca on t.id=ca.task_id
|
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
|
<if test="check_status != null">AND t.check_status >= #{check_status}</if>
|
|
<if test="check_status != null">AND t.check_status >= #{check_status}</if>
|
|
|
<if test="start_time != null">AND t.start_time >= #{start_time}</if>
|
|
<if test="start_time != null">AND t.start_time >= #{start_time}</if>
|
|
@@ -138,6 +146,7 @@
|
|
|
<if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
|
|
<if test="recheckman != null">AND t.recheckman = #{recheckman}</if>
|
|
|
<if test="period_id != null">AND t.period_id = #{period_id}</if>
|
|
<if test="period_id != null">AND t.period_id = #{period_id}</if>
|
|
|
<if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
|
|
<if test="checked_person != null">AND t.checked_person = #{checked_person}</if>
|
|
|
|
|
+ <if test="appeal_result != null">AND ca.appeal_result = #{appeal_result}</if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getListBySubmited" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
|
|
<select id="getListBySubmited" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
|