<?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.yifu.cloud.plus.v1.ekp.mapper.EkpFundInfoMapper">

  <resultMap id="ekpSocialInfoMap" type="com.yifu.cloud.plus.v1.ekp.entity.EkpFundInfo">
		<id property="fd_id" column="fd_id"/>
		<result property="fd_3add9dd7833db8" column="fd_3add9dd7833db8"/>
		<result property="fd_3add9de0be85e4" column="fd_3add9de0be85e4"/>
		<result property="fd_3add9e1a670144" column="fd_3add9e1a670144"/>
		<result property="fd_3adfe8c70d3fd4" column="fd_3adfe8c70d3fd4"/>
		<result property="fd_3adfe8c8468e54" column="fd_3adfe8c8468e54"/>
		<result property="fd_3adfe95c169c48" column="fd_3adfe95c169c48"/>
		<result property="fd_3adfe8c73cb5a4" column="fd_3adfe8c73cb5a4"/>
		<result property="fd_3adfe8c81a0e42" column="fd_3adfe8c81a0e42"/>
		<result property="fd_3adfe8c79989d4" column="fd_3adfe8c79989d4"/>
		<result property="fd_3adfe8c7e4cf7a" column="fd_3adfe8c7e4cf7a"/>
		<result property="fd_3adfe8cb96c41e" column="fd_3adfe8cb96c41e"/>
		<result property="fd_3adfe8cf632700" column="fd_3adfe8cf632700"/>
		<result property="fd_3adfe8cff746bc" column="fd_3adfe8cff746bc"/>
		<result property="fd_3adfeb4e8064a8" column="fd_3adfeb4e8064a8"/>
		<result property="fd_3adfeb52a4d2e2" column="fd_3adfeb52a4d2e2"/>
		<result property="fd_3adfeb52fbe966" column="fd_3adfeb52fbe966"/>
		<result property="fd_3adfeb5366dd82" column="fd_3adfeb5366dd82"/>
		<result property="fd_3adfeb53c70f72" column="fd_3adfeb53c70f72"/>
		<result property="fd_3adfeb5413fb44" column="fd_3adfeb5413fb44"/>
		<result property="fd_3adfeb7b624f06" column="fd_3adfeb7b624f06"/>
		<result property="fd_3add9ea428879a" column="fd_3add9ea428879a"/>
		<result property="fd_3add9eaeed2560" column="fd_3add9eaeed2560"/>
		<result property="fd_3adfeb830523b6" column="fd_3adfeb830523b6"/>
		<result property="fd_3adfeb8489e6c2" column="fd_3adfeb8489e6c2"/>
		<result property="fd_3adfeb7bd97464" column="fd_3adfeb7bd97464"/>
		<result property="fd_3add9edfbc6f7e" column="fd_3add9edfbc6f7e"/>
		<result property="fd_3add9eed23894a" column="fd_3add9eed23894a"/>
		<result property="fd_3adfeb83a704c8" column="fd_3adfeb83a704c8"/>
		<result property="fd_3adfeb84175f28" column="fd_3adfeb84175f28"/>
		<result property="fd_3aeafa8cc144bc" column="fd_3aeafa8cc144bc"/>
		<result property="fd_3b13afd1ef7798" column="fd_3b13afd1ef7798"/>
		<result property="fd_3b13d8f8fdfb76" column="fd_3b13d8f8fdfb76"/>
		<result property="fd_3b16e37baa5650_text" column="fd_3b16e37baa5650_text"/>
		<result property="fd_3b16e37baa5650" column="fd_3b16e37baa5650"/>
		<result property="fd_3b178ec510bf48" column="fd_3b178ec510bf48"/>
		<result property="fd_3b35a6989dfde8" column="fd_3b35a6989dfde8"/>
		<result property="fd_3b35a6518b73b2" column="fd_3b35a6518b73b2"/>
		<result property="fd_3b35a6992a20a4" column="fd_3b35a6992a20a4"/>
		<result property="fd_3b35a65138a7fc" column="fd_3b35a65138a7fc"/>
		<result property="fd_3b3cabbf094f1a" column="fd_3b3cabbf094f1a"/>
		<result property="fd_3b3e41ef8db782" column="fd_3b3e41ef8db782"/>
		<result property="fd_3b439246fcdc7c" column="fd_3b439246fcdc7c"/>
		<result property="fd_3b5cc4b2aae22a" column="fd_3b5cc4b2aae22a"/>
		<result property="fd_3b10b38f90d138" column="fd_3b10b38f90d138"/>
		<result property="fd_3b01956c77864c" column="fd_3b01956c77864c"/>
		<result property="createTime" column="create_time"/>
	</resultMap>

	<!--查询项目信息-->
	<select id="getAllEkpDeptInfo" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo">
		SELECT
			a.fd_id as fdId,
			a.fd_3b1480cd9dcb60 as settleType,
			a.fd_3b15f64dd59a28 as isBpo,
			a.fd_3b13b25ea90966 as socialType,
			a.fd_3a2b38c61ef9aa as deptName,
			a.fd_3a37fe508071fe as deptNo
		from ekp_24a8e6a7fc143bb8c48a a
		group by fd_3a37fe508071fe
	</select>

	<!--查询公积金明细信息-->
	<select id="getCostSumInfo" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo">
		SELECT
			round(sum(ifnull(fd_3adfeb52a4d2e2,0)),2) as ygPersonSum,
			round(sum(ifnull(fd_3adfeb4e8064a8,0)),2) as ygDwSum,
			round(sum(ifnull(fd_3adfeb52fbe966,0)),2) as sjDwSum,
			round(sum(ifnull(fd_3adfeb5366dd82,0)),2) as sjPersonSum,
			round(sum(ifnull(fd_3adfeb7b624f06,0)),2) as ys,
			round(sum(ifnull(fd_3b35a65138a7fc,0)),2) as personYs,
			round(sum(ifnull(fd_3b35a6518b73b2,0)),2) as dwYs
		from ekp_fund_info
		where fd_3adfe8c7e4cf7a = #{card} and fd_3adfe8cb96c41e = #{month}
	</select>

	<select id="getFundCount" resultType="java.lang.Long">
		SELECT
			count(1)
		from ekp_fund_info
		where fd_3b10b38f90d138 = #{fundId}
	</select>
</mapper>
