luoyb
2021-03-08 bfeab0c9d94480f4e742d311d168c79572b78745
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.mrbird.febs.server.hr.mapper.EmpAccessoryMapper">
 
    <select id="getQuerySql" resultType="java.lang.String">
        select CONCAT(',',(SELECT
  GROUP_CONCAT(DISTINCT
    CONCAT(
      '(SELECT  COUNT(1) FROM  t_emp_accessory accessory inner join t_label label where label.labelId=accessory.labelId and accessory.delFlag = 0 and label.delFlag = 0 and a.empId = accessory.empId  and label.labelCode = ''',label.labelCode,''') AS ''',
      label.labelCode, ''''
    )
  )
FROM t_label label where label.delFlag = 0 order by label.sort)) as querySql
    </select>
    <select id="selectPageVo" resultType="java.util.Map">
        select a.delFlag,a.empName,a.empStatus,a.empId,a.empNumb,a.age,a.archivesStatus,a.sex,a.insuranceType,a.politics,a.education,a.entryDate,a.certificateNumb,
               (select dept_Name from t_dept as dept where dept.dept_Id= a.deptId) as deptName,a.jobName ${sql} from t_emp_baseinfo a  
                inner join t_dept c on a.deptId = c.DEPT_ID
                ${ew.customSqlSegment}
    </select>
 
    <select id="getDictType" resultType="cc.mrbird.febs.common.core.entity.system.DicItem">
        select * from t_dicitem where dicCode=#{type}
    </select>
</mapper>