| | |
| | | <result column="publisher" property="publisher"/> |
| | | <result column="fid" property="fid"/> |
| | | <result column="fname" property="fname"/> |
| | | <result column="gather" property="gather"/> |
| | | <result column="gathername" property="gathername"/> |
| | | <result column="tasktype" property="tasktype"/> |
| | | <result column="phone" property="phone"/> |
| | | <result column="train" property="train"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | </if> |
| | | where id = #{id} |
| | | </update> |
| | | <update id="updateRtype"> |
| | | update sys_taskqd |
| | | SET rtype=#{type} |
| | | where id = #{rid} |
| | | </update> |
| | | |
| | | |
| | | <!--日常任务列表--> |
| | |
| | | </select> |
| | | |
| | | <select id="queryReceiver" resultType="java.util.HashMap"> |
| | | SELECT * |
| | | SELECT u.* , |
| | | r.role_name |
| | | FROM blade_user |
| | | WHERE id in (${serid}) |
| | | LEFT JOIN ( SELECT id, role_name FROM blade_role ) r on u.role_id = r.id |
| | | WHERE u.id in (${serid}) |
| | | </select> |
| | | |
| | | <select id="selectLi" resultMap="taskResultMap"> |
| | | SELECT A.*,IFNULL(B.num,0) as nums FROM ( |
| | | select qd.* from sys_taskqd qd LEFT JOIN sys_jurisdiction j ON j.id = qd.jurisdiction where 1=1 AND |
| | | qd.jnum!=qd.num |
| | | <if test="type==0"> |
| | | and find_in_set(#{serid}, serid)) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid FROM sys_taskfk WHERE |
| | | find_in_set(#{serid}, serid)) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid FROM sys_taskfk WHERE |
| | | serid=#{serid} GROUP BY hdid,serid) B ON A.id=B.hdid |
| | | </if> |
| | | <if test="type==1"> |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'"> |
| | | and !find_in_set(#{serid} |
| | | , serid) and (j.id =#{jurisdiction} or |
| | | <if test="jurisdiction!='1372091709474910209'"> |
| | | qd.jnum!=qd.num AND qd.rtype = "2" |
| | | and (!find_in_set(#{serid}, serid) OR serid IS NULL ) |
| | | and (j.id =#{jurisdiction} or |
| | | j.parent_id = #{jurisdiction}) |
| | | </if> |
| | | ) A LEFT JOIN (SELECT |
| | |
| | | as num,hdid FROM sys_taskfk GROUP BY hdid) B ON A.id=B.hdid |
| | | </if> |
| | | </select> |
| | | <select id="selectNum" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) as num |
| | | |
| | | <select id="selectNum" resultType="java.util.HashMap"> |
| | | SELECT COUNT(*) as num,tasktype |
| | | FROM sys_taskqd qd |
| | | LEFT JOIN sys_jurisdiction j ON j.id = qd.jurisdiction |
| | | WHERE !find_in_set(#{serid} |
| | | , serid) |
| | | AND jnum!=num |
| | | and (j.id =#{jurisdiction} |
| | | or |
| | | j.parent_id = #{jurisdiction}) |
| | | WHERE jnum!=num AND qd.rtype = "2" AND |
| | | (!find_in_set(#{serid}, serid) OR serid IS NULL ) |
| | | and (j.id =#{jurisdiction} or j.parent_id = #{jurisdiction}) |
| | | or (j.id =#{workjurisdiction} or j.parent_id = #{workjurisdiction}) |
| | | GROUP BY tasktype |
| | | </select> |
| | | |
| | | <select id="querySerid" resultType="java.lang.String"> |
| | | SELECT serid from sys_taskqd where id = #{rid} |
| | | </select> |
| | | </mapper> |