|
|
@ -48,48 +48,46 @@ |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="pageCondition" resultType="com.hnac.hzims.operational.access.vo.OperAccessTaskVO"> |
|
|
|
<select id="pageCondition" resultType="com.hnac.hzims.operational.access.vo.OperAccessTaskVO"> |
|
|
|
SELECT |
|
|
|
SELECT t.*,p.name as planName |
|
|
|
t1.*, t3.`NAME` as planName |
|
|
|
FROM hzims_oper_access_task t |
|
|
|
FROM |
|
|
|
left join hzims_oper_access_plan p |
|
|
|
hzims_oper_access_task t1 LEFT JOIN hzims_oper_access_content t2 ON t1.ID = t2.ID |
|
|
|
on t.plan_id = p.id |
|
|
|
AND t2.IS_DELETED = 0 LEFT JOIN hzims_oper_access_plan t3 ON t2.PLAN_ID = t3.ID |
|
|
|
|
|
|
|
AND t3.IS_DELETED = 0 |
|
|
|
|
|
|
|
WHERE |
|
|
|
WHERE |
|
|
|
t1.IS_DELETED =0 |
|
|
|
t1.IS_DELETED =0 |
|
|
|
<if test="req.id != null"> |
|
|
|
<if test="req.id != null"> |
|
|
|
and t1.id = #{req.id} |
|
|
|
and t.id = #{req.id} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="req.code != null and req.code != ''"> |
|
|
|
<if test="req.code != null and req.code != ''"> |
|
|
|
AND t1.`CODE` LIKE CONCAT('%',#{req.code},'%') |
|
|
|
AND t.`CODE` LIKE CONCAT('%',#{req.code},'%') |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="req.handler != null"> |
|
|
|
<if test="req.handler != null"> |
|
|
|
AND t1.`HANDLER`=#{req.handler} |
|
|
|
AND t.`HANDLER`=#{req.handler} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="req.status != null"> |
|
|
|
<if test="req.status != null"> |
|
|
|
AND t1.`STATUS`=#{req.status} |
|
|
|
AND t.`STATUS`=#{req.status} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="req.planId != null"> |
|
|
|
<if test="req.planId != null"> |
|
|
|
AND t3.ID =#{req.planId} |
|
|
|
AND p.ID =#{req.planId} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="req.name != null and req.name != ''"> |
|
|
|
<if test="req.name != null and req.name != ''"> |
|
|
|
AND t1.`NAME` LIKE CONCAT('%',#{req.name},'%') |
|
|
|
AND t.`NAME` LIKE CONCAT('%',#{req.name},'%') |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="req.excludeNullTicket != null and req.excludeNullTicket == 1"> |
|
|
|
<if test="req.excludeNullTicket != null and req.excludeNullTicket == 1"> |
|
|
|
and t1.`TICKET_ID` is null |
|
|
|
and t.`TICKET_ID` is null |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="req.startTime != null and req.startTime != ''"> |
|
|
|
<if test="req.startTime != null and req.startTime != ''"> |
|
|
|
and t1.`PLAN_START_TIME` > #{req.startTime} |
|
|
|
and t.`PLAN_START_TIME` > #{req.startTime} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="req.endTime != null and req.startTime != '' "> |
|
|
|
<if test="req.endTime != null and req.startTime != '' "> |
|
|
|
and t1.`PLAN_START_TIME` < #{req.endTime} |
|
|
|
and t.`PLAN_START_TIME` < #{req.endTime} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<if test="req.deptIds != null"> |
|
|
|
<if test="req.deptIds != null"> |
|
|
|
and t1.create_dept in |
|
|
|
and t.create_dept in |
|
|
|
<foreach collection="req.deptIds" item="item" index="index" open="(" close=")" separator=","> |
|
|
|
<foreach collection="req.deptIds" item="item" index="index" open="(" close=")" separator=","> |
|
|
|
#{item} |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
ORDER BY t1.ID DESC |
|
|
|
ORDER BY t.ID DESC |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectByEmCode" resultType="com.hnac.hzims.operational.access.entity.OperAccessTaskEntity" parameterType="list"> |
|
|
|
<select id="selectByEmCode" resultType="com.hnac.hzims.operational.access.entity.OperAccessTaskEntity" parameterType="list"> |
|
|
|