weaver-hrm-salary/src/com/engine/salary/mapper/InsuranceExportMapper.xml

35 lines
1.8 KiB
XML

<?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">
SELECT
a.*,e.username AS userName,e.MOBILE AS telephone,d.`NAME` AS departmentName,e.`STATUS` AS userStatus
FROM(
SELECT * from hrsa_bill_detail
WHERE delete_type = 0 AND bill_month = #{billMonth} AND payment_status = #{paymentStatus}
)a
LEFT JOIN {$publicdb}.employee e ON e.ID = a.employee_id
LEFT JOIN {$publicdb}.department d ON d.id = e.department
</select>
<select id="exportAccount" resultType="com.weaver.hrm.salary.entity.siexport.po.AccountExportPO" databaseId="oracle">
SELECT
a.*,e.username AS userName,e.MOBILE AS telephone,d.NAME AS departmentName,e.STATUS AS userStatus
FROM(
SELECT * from hrsa_bill_detail
WHERE delete_type = 0 AND bill_month = #{billMonth} AND payment_status = #{paymentStatus}
)a
LEFT JOIN {$publicdb}.employee e ON e.ID = a.employee_id
LEFT JOIN {$publicdb}.department d ON d.id = e.department
</select>
<select id="exportAccount" resultType="com.weaver.hrm.salary.entity.siexport.po.AccountExportPO" databaseId="sqlserver">
SELECT
a.*,e.username AS userName,e.MOBILE AS telephone,d.NAME AS departmentName,e.STATUS AS userStatus
FROM(
SELECT * from hrsa_bill_detail
WHERE delete_type = 0 AND bill_month = #{billMonth} AND payment_status = #{paymentStatus}
)a
LEFT JOIN {$publicdb}.employee e ON e.ID = a.employee_id
LEFT JOIN {$publicdb}.department d ON d.id = e.department
</select>
</mapper>