| | |
| | | </where> |
| | | limit 1 |
| | | </select> |
| | | <select id="salaryStatistic" parameterType="doumeemes.dao.ext.dto.QuerySalaryStatisticDTO" resultType="doumeemes.dao.ext.vo.SalaryStatisticsListVO"> |
| | | select `CREATE_USER` ,sum(CASE WHEN salary_type=0 THEN salary ELSE 0 END ) as jijiaSalry |
| | | ,sum(CASE WHEN salary_type=0 THEN 0 ELSE salary END ) as jishiSalary |
| | | ,count(id) as num |
| | | ,sum(salary) as totalSalary |
| | | from `workorder_record` |
| | | where `DELETED` =0 and `SALARY` >0 |
| | | <if test="rootDepartId != null"> |
| | | AND `ROOT_DEPART_ID` = #{rootDepartId} |
| | | </if> |
| | | <if test="userId != null"> |
| | | AND `CREATE_USER` = #{userId} |
| | | </if> |
| | | group by `CREATE_USER` |
| | | |
| | | </select> |
| | | <select id="selectListNew" parameterType="doumeemes.dao.ext.dto.QueryWorkorderRecordExtDTO" resultMap="WorkorderRecordExtListVO"> |
| | | SELECT |
| | | `a`.`ID`, |
| | |
| | | RELOBJ_TYPE, |
| | | `DURATION`, |
| | | `SALARY`, |
| | | `SALARY_PRICE`, |
| | | `SALARY_NUM`, |
| | | `SALARY_TIMES`, |
| | | `SALARY_UNQUALIFIED`, |
| | |
| | | #{item.relobjType}, |
| | | #{item.duration}, |
| | | #{item.salary}, |
| | | #{item.salaryPrice}, |
| | | #{item.salaryNum}, |
| | | #{item.salaryTimes}, |
| | | #{item.salaryUnqualified}, |