Commit e4bbf5c0 authored by fangxinjiang's avatar fangxinjiang

人员花名册

parent 731fee49
...@@ -337,12 +337,13 @@ ...@@ -337,12 +337,13 @@
c1.CONTRACT_NO as 'CONTRACT_CODE',c1.CREATE_NAME as 'CONTRACT_CREATER',c1.CREATE_TIME as 'CONTRACT_CREATE_TIME', c1.CONTRACT_NO as 'CONTRACT_CODE',c1.CREATE_NAME as 'CONTRACT_CREATER',c1.CREATE_TIME as 'CONTRACT_CREATE_TIME',
d.id as "SETTLE_DOMAIN" d.id as "SETTLE_DOMAIN"
from from
(select MAX(c.CREATE_TIME),c.id,c.EMP_IDCARD,c.DEPT_NO from t_employee_contract_info c WHERE c.IN_USE = 0 and c.DELETE_FLAG='0' (select MAX(c.CREATE_TIME) as "CREATE_TIME",c.id,c.EMP_IDCARD,c.DEPT_NO from t_employee_contract_info c WHERE c.IN_USE = 0 and c.DELETE_FLAG='0'
GROUP BY c.DEPT_NO,c.EMP_IDCARD) t GROUP BY c.DEPT_NO,c.EMP_IDCARD) t
LEFT JOIN t_employee_info e on e.EMP_IDCARD=t.EMP_IDCARD LEFT JOIN t_employee_info e on e.EMP_IDCARD=t.EMP_IDCARD
LEFT JOIN t_employee_project p on p.EMP_IDCARD=t.EMP_IDCARD and p.DEPT_NO=t.DEPT_NO LEFT JOIN t_employee_project p on p.EMP_IDCARD=t.EMP_IDCARD and p.DEPT_NO=t.DEPT_NO
LEFT JOIN t_settle_domain d on d.DEPART_NO=t.DEPT_NO LEFT JOIN t_settle_domain d on d.DEPART_NO=t.DEPT_NO
INNER JOIN t_employee_contract_info c1 on c1.id=t.id GROUP BY t.DEPT_NO,t.EMP_IDCARD INNER JOIN t_employee_contract_info c1 on c1.EMP_IDCARD=t.EMP_IDCARD and c1.DEPT_NO=t.DEPT_NO and c1.CREATE_TIME=t.CREATE_TIME
GROUP BY t.DEPT_NO,t.EMP_IDCARD
<if test="tPersonnelRoster != null"> <if test="tPersonnelRoster != null">
<if test="tPersonnelRoster.limitStart != null"> <if test="tPersonnelRoster.limitStart != null">
limit #{tPersonnelRoster.limitStart},#{tPersonnelRoster.limitEnd} limit #{tPersonnelRoster.limitStart},#{tPersonnelRoster.limitEnd}
...@@ -353,7 +354,7 @@ ...@@ -353,7 +354,7 @@
select count(1) select count(1)
from ( from (
select count(1) select count(1)
from (select MAX(c.CREATE_TIME), c.id, c.EMP_IDCARD, c.DEPT_NO from (select MAX(c.CREATE_TIME) as "CREATE_TIME", c.id, c.EMP_IDCARD, c.DEPT_NO
from t_employee_contract_info c from t_employee_contract_info c
WHERE c.IN_USE = 0 WHERE c.IN_USE = 0
and c.DELETE_FLAG = '0' and c.DELETE_FLAG = '0'
...@@ -361,7 +362,7 @@ ...@@ -361,7 +362,7 @@
LEFT JOIN t_employee_info e on e.EMP_IDCARD = t.EMP_IDCARD LEFT JOIN t_employee_info e on e.EMP_IDCARD = t.EMP_IDCARD
LEFT JOIN t_employee_project p on p.EMP_IDCARD = t.EMP_IDCARD and p.DEPT_NO = t.DEPT_NO LEFT JOIN t_employee_project p on p.EMP_IDCARD = t.EMP_IDCARD and p.DEPT_NO = t.DEPT_NO
LEFT JOIN t_settle_domain d on d.DEPART_NO = t.DEPT_NO LEFT JOIN t_settle_domain d on d.DEPART_NO = t.DEPT_NO
INNER JOIN t_employee_contract_info c1 on c1.id = t.id INNER JOIN t_employee_contract_info c1 on c1.EMP_IDCARD=t.EMP_IDCARD and c1.DEPT_NO=t.DEPT_NO and c1.CREATE_TIME=t.CREATE_TIME
GROUP BY t.DEPT_NO, t.EMP_IDCARD GROUP BY t.DEPT_NO, t.EMP_IDCARD
) a ) a
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment