Commit 9f5748a0 authored by hongguangwu's avatar hongguangwu

合同-导出[历史]

parent d290d0b3
......@@ -374,7 +374,7 @@
<!--tEmployeeContractInfo简单分页查询-->
<select id="getTEmployeeContractInfoPage" resultMap="tEmployeeContrctInfoMap">
SELECT
<include refid="Base_Column_List"/>
<include refid="Base_Column_List"/>
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
......@@ -386,7 +386,7 @@
<!--list-->
<select id="getTEmployeeContractList" resultMap="tEmployeeContrctInfoMap">
SELECT
<include refid="Base_Column_List"/>
<include refid="Base_Column_List"/>
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
......@@ -398,7 +398,7 @@
<!--导出-->
<select id="getTEmployeeContractExport" resultMap="tEmployeeContrctInfoExportMap">
SELECT
<include refid="Base_Export_Column_List"/>
<include refid="Base_Export_Column_List"/>
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
......@@ -410,12 +410,17 @@
<!--导出历史合并-->
<select id="getTEmployeeContractExportHistory" resultMap="tEmployeeContrctInfoExportMap">
SELECT
<include refid="Base_Export_Column_List"/>
<include refid="Base_Export_Column_List"/>
,count(1) CREATE_NUM,
min(a.CONTRACT_START) START_DATE,
max(a.CONTRACT_END) END_DATE,
GROUP_CONCAT(concat(a.CONTRACT_START,'~',ifnull(a.CONTRACT_END,'')) ORDER BY a.CONTRACT_START asc) HISTORY
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0 and a.AUDIT_TIME_LAST is not null
<include refid="tEmployeeContractInfo_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SETTLE_DOMAIN
order by a.CREATE_TIME desc
</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