2022-04-18 20:24:43 +08:00
<?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= "com.engine.salary.mapper.InsuranceExportMapper" >
<select id= "exportAccount" resultType= "com.engine.salary.entity.siexport.po.AccountExportPO" >
2022-09-27 10:19:09 +08:00
SELECT a.*,
e.lastname AS userName,
e.MOBILE AS telephone,
d.departmentname AS departmentName,
2022-09-29 11:29:17 +08:00
e.STATUS AS userStatus,
e.workcode AS workcode
2022-09-27 10:19:09 +08:00
FROM (
SELECT *
from hrsa_bill_detail
WHERE delete_type = 0
AND bill_month = #{param.billMonth}
AND payment_status = #{paymentStatus}
AND payment_organization = #{param.paymentOrganization}
) a
LEFT JOIN hrmresource e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
where e.status not in (7)
2022-06-06 10:19:11 +08:00
and (e.accounttype is null or e.accounttype = 0)
2022-09-27 10:19:09 +08:00
<!-- 排序 -->
<if test= "param.orderRule != null" >
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
</if>
2022-04-18 20:24:43 +08:00
</select>
2022-04-22 16:42:06 +08:00
<select id= "exportAccount" resultType= "com.engine.salary.entity.siexport.po.AccountExportPO" databaseId= "oracle" >
2022-09-27 10:19:09 +08:00
SELECT a.*,
e.lastname AS userName,
e.MOBILE AS telephone,
d.departmentname AS departmentName,
2022-09-29 11:29:17 +08:00
e.STATUS AS userStatus,
e.workcode AS workcode
2022-09-27 10:19:09 +08:00
FROM (
SELECT *
from hrsa_bill_detail
WHERE delete_type = 0
AND bill_month = #{param.billMonth}
AND payment_status = #{paymentStatus}
AND payment_organization = #{param.paymentOrganization}
) a
LEFT JOIN hrmresource e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
where e.status not in (7)
2022-06-06 10:19:11 +08:00
and (e.accounttype is null or e.accounttype = 0)
2022-09-27 10:19:09 +08:00
<!-- 排序 -->
<if test= "param.orderRule != null" >
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
</if>
</select>
2022-04-22 16:42:06 +08:00
<select id= "exportAccount" resultType= "com.engine.salary.entity.siexport.po.AccountExportPO" databaseId= "sqlserver" >
2022-09-27 10:19:09 +08:00
SELECT a.*,
e.lastname AS userName,
e.MOBILE AS telephone,
d.departmentname AS departmentName,
2022-09-29 11:29:17 +08:00
e.STATUS AS userStatus,
e.workcode AS workcode
2022-09-27 10:19:09 +08:00
FROM (
SELECT *
from hrsa_bill_detail
WHERE delete_type = 0
AND bill_month = #{param.billMonth}
AND payment_status = #{paymentStatus}
AND payment_organization = #{param.paymentOrganization}
) a
LEFT JOIN hrmresource e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
where e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
<!-- 排序 -->
<if test= "param.orderRule != null" >
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
</if>
</select>
2022-09-29 11:13:49 +08:00
<select id= "exportExcelAccount" resultType= "com.engine.salary.entity.siexport.po.ExcelAccountExportPO" >
SELECT
a.*,e.lastname AS userName,e.MOBILE AS telephone,d.departmentname AS departmentName,e.STATUS AS userStatus,e.workcode AS workcode
FROM(
SELECT * from hrsa_excel_bill_detail
2022-09-30 10:55:46 +08:00
WHERE delete_type = 0 AND bill_month = #{param.billMonth} AND payment_status = #{param.paymentStatus} AND payment_organization = #{param.paymentOrganization}
2022-09-29 11:13:49 +08:00
)a
LEFT JOIN hrmresource e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
where e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
</select>
<select id= "exportExcelAccount" resultType= "com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId= "oracle" >
SELECT
a.*,e.lastname AS userName,e.MOBILE AS telephone,d.departmentname AS departmentName,e.STATUS AS userStatus,e.workcode AS workcode
FROM(
SELECT * from hrsa_excel_bill_detail
2022-09-30 10:55:46 +08:00
WHERE delete_type = 0 AND bill_month = #{param.billMonth} AND payment_status = #{param.paymentStatus} AND payment_organization = #{param.paymentOrganization}
2022-09-29 11:13:49 +08:00
)a
LEFT JOIN hrmresource e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
where e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
</select>
<select id= "exportExcelAccount" resultType= "com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId= "sqlserver" >
SELECT
a.*,e.lastname AS userName,e.MOBILE AS telephone,d.departmentname AS departmentName,e.STATUS AS userStatus,e.workcode AS workcode
FROM(
SELECT * from hrsa_excel_bill_detail
2022-09-30 10:55:46 +08:00
WHERE delete_type = 0 AND bill_month = #{param.billMonth} AND payment_status = #{param.paymentStatus} AND payment_organization = #{param.paymentOrganization}
2022-09-29 11:13:49 +08:00
)a
LEFT JOIN hrmresource e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
2022-09-30 10:55:46 +08:00
where e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
2022-09-29 11:13:49 +08:00
</select>
2022-04-18 20:24:43 +08:00
</mapper>