|
@@ -8,7 +8,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<id column="id" property="id"/>
|
|
|
<collection property="details" select="getEmployees" column="id" />
|
|
|
</resultMap>
|
|
|
-
|
|
|
+ <resultMap type="cn.ezhizao.project.business.salary.domain.BizFinancialSalary" id="BizFinancialSalaryResult2">
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <result column="company_id" jdbcType="BIGINT" property="companyId"/>
|
|
|
+ <!-- <association property="socialCreditCode" select="getSocialCreditCode" column="company_id"></association>-->
|
|
|
+ </resultMap>
|
|
|
|
|
|
<resultMap id="EmployeeResult" type="cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee">
|
|
|
<id column="id" jdbcType="INTEGER" property="id"/>
|
|
@@ -48,4 +52,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<!-- 删除条件为其他外键可以在这里加 -->
|
|
|
</trim>
|
|
|
</delete>
|
|
|
+ <select id="selectBySalaryId" resultType="cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail">
|
|
|
+ select * from biz_financial_salary_detail detail
|
|
|
+ left join biz_financial_salary salary on salary.deleted = 0
|
|
|
+ AND salary.is_stop = 0
|
|
|
+ and detail.financial_salary_id = salary.id
|
|
|
+ where year = #{year} and month = #{month} and detail.deleted = 0
|
|
|
+ AND EXISTS (SELECT 1
|
|
|
+ FROM biz_entrust eb
|
|
|
+ WHERE eb.deleted = 0
|
|
|
+ AND (eb.to_tenant_id = #{tenantId} OR eb.from_tenant_id = #{tenantId})
|
|
|
+ AND date_format(eb.current_month, '%Y%m') = concat(#{year},#{month})
|
|
|
+ AND eb.work_order_id = salary.work_order_id);
|
|
|
+ </select>
|
|
|
</mapper>
|