| | |
| | | and is_deleted = 0 |
| | | and role_id = '1412226235153731586' |
| | | AND status=1 |
| | | AND dispatch=0 |
| | | AND dispatch='0' |
| | | GROUP BY dept_id |
| | | ) C |
| | | ON C.dept_id = i.departmentid |
| | |
| | | <if test="information.createDeptId!=null and information.createDeptId!=''"> |
| | | and bu.dept_id =#{information.createDeptId} |
| | | </if> |
| | | order by i.id desc |
| | | order by i.establishTime asc |
| | | </select> |
| | | |
| | | <delete id="deleteIn"> |
| | |
| | | and status = 1 |
| | | and is_deleted = 0 |
| | | and role_id = "1412226235153731586" |
| | | and dispatch = 0 |
| | | and dispatch = '0' |
| | | GROUP BY |
| | | dept_id |
| | | ) F |
| | |
| | | bu.`status` = 1 |
| | | AND bu.is_deleted = 0 |
| | | AND bu.role_id = '1412226235153731586' |
| | | AND bu.dispatch = 0 |
| | | AND bu.dispatch = '0' |
| | | GROUP BY |
| | | bu.dept_id |
| | | ) C ON C.dept_id = A.departmentid |
| | |
| | | bu.`status` = 1 |
| | | AND bu.is_deleted = 0 |
| | | AND bu.role_id = '1412226235153731586' |
| | | AND bu.dispatch = 1 |
| | | AND (bu.dispatch = '1' or bu.dispatch is null or bu.dispatch = '') |
| | | GROUP BY |
| | | bu.dept_id |
| | | ) D ON D.dept_id = A.departmentid |
| | |
| | | bu.`status` = 1 |
| | | AND bu.is_deleted = 0 |
| | | AND bu.role_id = '1412226235153731586' |
| | | AND bu.dispatch = 0 |
| | | AND bu.dispatch = '0' |
| | | GROUP BY |
| | | bu.dept_id |
| | | ) C ON C.dept_id = A.departmentid |
| | |
| | | bu.`status` = 1 |
| | | AND bu.is_deleted = 0 |
| | | AND bu.role_id = '1412226235153731586' |
| | | AND bu.dispatch = 1 |
| | | AND (bu.dispatch = '1' or bu.dispatch is null or dispatch='') |
| | | GROUP BY |
| | | bu.dept_id |
| | | ) D ON D.dept_id = A.departmentid |
| | |
| | | and status = 1 |
| | | and is_deleted = 0 |
| | | and role_id = "1412226235153731586" |
| | | and dispatch = 0 |
| | | and dispatch = '0' |
| | | GROUP BY |
| | | dept_id |
| | | ) F |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--查询学历统计信息--> |
| | | <select id="getEducationStatistics" resultType="java.util.HashMap"> |
| | | SELECT |
| | | ifnull(b.num,0) value,a.dict_value name |
| | | FROM |
| | | ( SELECT dict_key, dict_value FROM blade_dict_biz WHERE CODE = "educationType" AND parent_id = 1442114073897521153 ) a |
| | | LEFT JOIN ( |
| | | SELECT |
| | | count( * ) num, |
| | | education |
| | | FROM |
| | | blade_user bu |
| | | left join blade_dept bd on bu.dept_id = bd.id |
| | | left join sys_information si on si.departmentid = bd.id |
| | | left join sys_jurisdiction sj on sj.id = si.jurisdiction |
| | | where 1=1 |
| | | and bu.role_id = 1412226235153731586 |
| | | and bu.status = 1 |
| | | and bu.is_deleted = 0 |
| | | <if test="jurisdiction!=null and jurisdiction != '' and jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{jurisdiction} or sj.parent_id = #{jurisdiction}) |
| | | </if> |
| | | <if test="deptId!=null and deptId != ''"> |
| | | and bu.dept_id = #{deptId} |
| | | </if> |
| | | GROUP BY |
| | | education ) b ON a.dict_key = b.education |
| | | </select> |
| | | |
| | | <!--更具部门id 查询所有的父级部门id包含本身--> |
| | | <select id="getDeptDetails" resultType="java.lang.String"> |
| | | SELECT |
| | | T1._id |
| | | FROM |
| | | ( |
| | | SELECT |
| | | @r AS _id, |
| | | ( SELECT @r := parent_id FROM blade_dept WHERE id = _id ) AS parent_id, |
| | | @l := @l + 1 AS lvl |
| | | FROM |
| | | ( SELECT @r := #{information.departmentid}, @l := 0 ) vars, |
| | | blade_dept h |
| | | ) T1 |
| | | where T1._id!=0 |
| | | AND T1._id != 1413470343230877697 |
| | | AND T1._id != 1418458374477549569 |
| | | AND T1._id != 1420222768149966850 |
| | | AND T1._id != 1425366663452196865 |
| | | order by T1._id |
| | | </select> |
| | | |
| | | <!--根据部门id 查询公司信息--> |
| | | <select id="getInformationDetails" resultType="org.springblade.modules.information.vo.InformationVO"> |
| | | select si.*,sj.dept_name jurisdictionName from sys_information si |
| | | left join sys_jurisdiction sj on sj.id = si.jurisdiction |
| | | where si.departmentid = #{deptId} |
| | | </select> |
| | | |
| | | </mapper> |