| | |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SysDeptDataResult" type="com.gkhy.system.domain.vo.DeptVo" extends="SysDeptResult"> |
| | | <result property="checkCount" column="check_count" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDeptVo"> |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time |
| | |
| | | ${params.dataScope} |
| | | order by d.parent_id, d.order_num |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="selectDeptData" parameterType="Date" resultMap="SysDeptDataResult"> |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, |
| | | d.email, d.status, d.del_flag, d.create_by, d.create_time , |
| | | ( select count(*) from daily_safety_inspection where del_flag = 0 and research_group = dept_id and date_format(check_date,'%Y%m') = date_format(#{beginDate},'%Y%m')) check_count |
| | | from sys_dept d |
| | | where d.del_flag = '0' |
| | | order by d.parent_id, d.order_num |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="selectDeptListByRoleId" resultType="Long"> |
| | | select d.dept_id |
| | |
| | | update sys_dept set del_flag = '2' where dept_id = #{deptId} |
| | | </delete> |
| | | |
| | | </mapper> |
| | | </mapper> |