TSalaryAccountItemMapper.xml 20.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510
<?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.yifu.salary.mapper.TSalaryAccountItemMapper">

    <resultMap id="tSalaryAccountItemMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem">
        <id property="id" column="ID"/>
        <result property="salaryAccountId" column="SALARY_ACCOUNT_ID"/>
        <result property="cnName" column="CN_NAME"/>
        <result property="javaFiedName" column="JAVA_FIED_NAME"/>
        <result property="salaryMoney" column="SALARY_MONEY"/>
        <result property="textValue" column="TEXT_VALUE"/>
        <result property="isTax" column="IS_TAX"/>
    </resultMap>

    <!-- 工资导入优化使用的vo -->
    <resultMap id="itemVoMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem">
        <id property="id" column="ID"/>
        <result property="salaryAccountId" column="SALARY_ACCOUNT_ID"/>
        <result property="cnName" column="CN_NAME"/>
        <result property="javaFiedName" column="JAVA_FIED_NAME"/>
        <result property="salaryMoney" column="SALARY_MONEY"/>
        <result property="textValue" column="TEXT_VALUE"/>
        <result property="isTax" column="IS_TAX"/>
        <result property="empIdcard" column="EMP_IDCARD"/>
        <result property="settlementMonth" column="SETTLEMENT_MONTH"/>
        <result property="formType" column="FORM_TYPE"/>
        <result property="annualBonusType" column="ANNUAL_BONUS_TYPE"/>
    </resultMap>

    <!--tSalaryAccountItem简单分页查询-->
    <select id="getTSalaryAccountItemPage" resultMap="tSalaryAccountItemMap">
		SELECT
		ID,
		SALARY_ACCOUNT_ID,
		CN_NAME,
		JAVA_FIED_NAME,
		SUM(SALARY_MONEY)SALARY_MONEY,
		TEXT_VALUE,
		IS_TAX
		FROM
			<if test="tSalaryAccountItem.salaryMonth == null or tSalaryAccountItem.salaryMonth.trim() >= '202201'">
				t_salary_account_item a

			</if>
			<if test="tSalaryAccountItem.salaryMonth != null and tSalaryAccountItem.salaryMonth.trim() &lt; '202201' ">
				t_salary_account_item_hro_2021 a
			</if>
        <where>
            <if test="tSalaryAccountItem.id != null and tSalaryAccountItem.id.trim() != ''">
                AND ID = #{tSalaryAccountItem.id}
            </if>
            <if test="tSalaryAccountItem.salaryAccountId != null and tSalaryAccountItem.salaryAccountId.trim() != ''">
                AND SALARY_ACCOUNT_ID = #{tSalaryAccountItem.salaryAccountId}
            </if>
            <if test="tSalaryAccountItem.cnName != null and tSalaryAccountItem.cnName.trim() != ''">
                AND CN_NAME = #{tSalaryAccountItem.cnName}
            </if>
            <if test="tSalaryAccountItem.javaFiedName != null and tSalaryAccountItem.javaFiedName.trim() != ''">
                AND JAVA_FIED_NAME = #{tSalaryAccountItem.javaFiedName}
            </if>
            <if test="tSalaryAccountItem.salaryMoney != null and tSalaryAccountItem.salaryMoney.trim() != ''">
                AND SALARY_MONEY = #{tSalaryAccountItem.salaryMoney}
            </if>
        </where>
		GROUP BY CN_NAME
    </select>

    <select id="getAllTSalaryAccountItem" resultMap="tSalaryAccountItemMap">
        SELECT
        i.ID,
        i.SALARY_ACCOUNT_ID,
        i.CN_NAME,
        i.JAVA_FIED_NAME,
        i.SALARY_MONEY,
        i.TEXT_VALUE,
        i.IS_TAX
        FROM
        t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
        <where>
            a.DELETE_FLAG = 0
            <if test="deptId != null and deptId.trim() != ''">
                AND a.DEPT_ID = #{deptId}
            </if>
            <if test="settleMonth != null and settleMonth.trim() != ''">
                AND a.SETTLEMENT_MONTH = #{settleMonth}
            </if>
            <if test="javaFiedName != null and javaFiedName.trim() != ''">
                AND i.JAVA_FIED_NAME = #{javaFiedName}
            </if>
            <if test="finallyYear != null and finallyYear.trim() != ''">
                AND a.SETTLEMENT_MONTH like concat(#{finallyYear}, '%')
            </if>
            <if test="empIdcard != null and empIdcard.trim() != ''">
                AND a.EMP_IDCARD = #{empIdcard}
            </if>
            <if test="accountId != null and accountId.trim() != ''">
                AND a.id != #{accountId}
            </if>
        </where>
    </select>

    <select id="getEmpAllSalaryAccountItem" resultMap="tSalaryAccountItemMap">
        SELECT
        i.ID,
        i.SALARY_ACCOUNT_ID,
        i.CN_NAME,
        i.JAVA_FIED_NAME,
        i.SALARY_MONEY,
        i.TEXT_VALUE,
        i.IS_TAX
        FROM
        t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
        <where>
            a.DELETE_FLAG = 0 and a.FORM_TYPE != 7
            <if test="idCard != null and idCard.trim() != ''">
                AND a.EMP_IDCARD = #{idCard}
            </if>
            <if test="maxYearMonth != null and maxYearMonth.trim() != ''">
                AND a.SETTLEMENT_MONTH >= #{maxYearMonth}
            </if>
            <if test="invoiceTitle != null and invoiceTitle.trim() != ''">
                AND a.INVOICE_TITLE = #{invoiceTitle}
            </if>
        </where>
    </select>

    <select id="getAllMoney" resultType="java.math.BigDecimal">
        SELECT
        sum(i.SALARY_MONEY)
        FROM
        t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
        <where>
            a.DELETE_FLAG = 0
            <if test="deptId != null and deptId.trim() != ''">
                AND a.DEPT_ID = #{deptId}
            </if>
            <if test="javaFiedName != null and javaFiedName.trim() != ''">
                AND i.JAVA_FIED_NAME = #{javaFiedName}
            </if>
            <if test="salaryMonth != null and salaryMonth.trim() != ''">
                AND a.SALARY_MONTH > #{salaryMonth}
            </if>
            <if test="empIdcard != null and empIdcard.trim() != ''">
                AND a.EMP_IDCARD = #{empIdcard}
            </if>
        </where>
    </select>
    <select id="getAllMoneyByAccountIdAndFiedName" resultType="java.math.BigDecimal">
        SELECT
        sum(i.SALARY_MONEY)
        FROM
        t_salary_account_item i
         where
            i.SALARY_ACCOUNT_ID in (${accountId})
            AND i.JAVA_FIED_NAME = '${javaFiedName}'
    </select>

    <select id="getAverageSalaryItemMonthCount" resultType="Integer">
        SELECT
        count(DISTINCT a.SALARY_MONTH)
        FROM
        t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
        <where>
            a.DELETE_FLAG = 0
            <if test="deptId != null and deptId.trim() != ''">
                AND a.DEPT_ID = #{deptId}
            </if>
            <if test="javaFiedName != null and javaFiedName.trim() != ''">
                AND i.JAVA_FIED_NAME = #{javaFiedName}
            </if>
            <if test="salaryMonth != null and salaryMonth.trim() != ''">
                AND a.SALARY_MONTH > #{salaryMonth}
            </if>
            <if test="empIdcard != null and empIdcard.trim() != ''">
                AND a.EMP_IDCARD = #{empIdcard}
            </if>
        </where>

    </select>

    <select id="getEngineerAllMoney" resultType="java.math.BigDecimal">
        SELECT
        sum(i.SALARY_MONEY)
        FROM
        t_engineer_account_item i left join t_engineer_account a on i.SALARY_ACCOUNT_ID = a.ID
        <where>
            a.DELETE_FLAG = 0
            <if test="deptId != null and deptId.trim() != ''">
                AND a.DEPT_ID = #{deptId}
            </if>
            <if test="javaFiedName != null and javaFiedName.trim() != ''">
                AND i.JAVA_FIED_NAME = #{javaFiedName}
            </if>
            <if test="salaryMonth != null and salaryMonth.trim() != ''">
                AND a.SALARY_MONTH > #{salaryMonth}
            </if>
            <if test="empIdcard != null and empIdcard.trim() != ''">
                AND a.EMP_IDCARD = #{empIdcard}
            </if>
        </where>
    </select>

    <select id="getEngineerAverageSalaryItemMonthCount" resultType="Integer">
        SELECT
        count(DISTINCT a.SALARY_MONTH)
        FROM
        t_engineer_account_item i left join t_engineer_account a on i.SALARY_ACCOUNT_ID = a.ID
        <where>
            a.DELETE_FLAG = 0
            <if test="deptId != null and deptId.trim() != ''">
                AND a.DEPT_ID = #{deptId}
            </if>
            <if test="javaFiedName != null and javaFiedName.trim() != ''">
                AND i.JAVA_FIED_NAME = #{javaFiedName}
            </if>
            <if test="salaryMonth != null and salaryMonth.trim() != ''">
                AND a.SALARY_MONTH > #{salaryMonth}
            </if>
            <if test="empIdcard != null and empIdcard.trim() != ''">
                AND a.EMP_IDCARD = #{empIdcard}
            </if>
        </where>
    </select>

    <!--获取报账表金额-->
    <select id="getMoneyByAccountIdAndJavaFiedName" resultType="java.math.BigDecimal">
        SELECT
        i.SALARY_MONEY
        FROM
        t_salary_account_item i
         where
         i.SALARY_ACCOUNT_ID = #{accountId}
        AND i.JAVA_FIED_NAME = '${javaFiedName}'
    </select>

    <!--报账明细-->
    <select id="getAccountItemList" resultMap="tSalaryAccountItemMap">
        SELECT
        i.ID,
        i.SALARY_ACCOUNT_ID,
        i.CN_NAME,
        i.JAVA_FIED_NAME,
        i.SALARY_MONEY,
        i.TEXT_VALUE,
        i.IS_TAX
        FROM t_salary_account_item i
        left join t_salary_account a on a.id=i.SALARY_ACCOUNT_ID
        left join t_salary_standard s on s.id = a.SALARY_FORM_ID
        <if test="unitName != null">
            left join view_dept_unit d on d.id = s.DEPART_ID
        </if>
        <if test="userDeptId != null">
            left join view_sys_user u on u.user_id = s.CREATE_USER
        </if>
        <where>
            a.DELETE_FLAG = 0
            <if test="idStr != null and idStr.trim() != ''">
                AND a.id in (${idStr})
            </if>
            <if test="idStr == null or idStr.trim() == ''">
                <if test="tSalaryAccount.invoiceTitle != null and tSalaryAccount.invoiceTitle.trim() != ''">
                    AND a.INVOICE_TITLE = #{tSalaryAccount.invoiceTitle}
                </if>
                <if test="tSalaryAccount.province != null">
                    AND a.PROVINCE = #{tEngineerAccount.province}
                </if>
                <if test="tSalaryAccount.city != null">
                    AND a.CITY = #{tEngineerAccount.city}
                </if>
                <if test="tSalaryAccount.town != null">
                    AND a.TOWN = #{tEngineerAccount.town}
                </if>
                <if test="tSalaryAccount.taxMonth != null and tSalaryAccount.taxMonth.trim() != ''">
                    AND a.TAX_MONTH = #{tSalaryAccount.taxMonth}
                </if>
                <if test="tSalaryAccount.id != null and tSalaryAccount.id.trim() != ''">
                    AND a.ID = #{tSalaryAccount.id}
                </if>
                <if test="tSalaryAccount.salaryFormId != null and tSalaryAccount.salaryFormId.trim() != ''">
                    AND a.SALARY_FORM_ID = #{tSalaryAccount.salaryFormId}
                </if>
                <if test="tSalaryAccount.salaryMonth != null and tSalaryAccount.salaryMonth.trim() != ''">
                    AND a.SALARY_MONTH = #{tSalaryAccount.salaryMonth}
                </if>
                <if test="tSalaryAccount.empId != null and tSalaryAccount.empId.trim() != ''">
                    AND a.EMP_ID = #{tSalaryAccount.empId}
                </if>
                <if test="tSalaryAccount.empName != null and tSalaryAccount.empName.trim() != ''">
                    AND a.EMP_NAME like '%${tSalaryAccount.empName}%'
                </if>
                <if test="tSalaryAccount.empNo != null and tSalaryAccount.empNo.trim() != ''">
                    AND a.EMP_NO = #{tSalaryAccount.empNo}
                </if>
                <if test="tSalaryAccount.deptId != null and tSalaryAccount.deptId.trim() != ''">
                    AND a.BELONG_DEPART = #{tSalaryAccount.deptId}
                </if>
                <if test="tSalaryAccount.deptNo != null and tSalaryAccount.deptNo.trim() != ''">
                    AND a.DEPT_NO like '%${tSalaryAccount.deptNo}%'
                </if>
                <if test="tSalaryAccount.deptName != null and tSalaryAccount.deptName.trim() != ''">
                    AND a.DEPT_NAME like '%${tSalaryAccount.deptName}%'
                </if>
                <if test="tSalaryAccount.empIdcard != null and tSalaryAccount.empIdcard.trim() != ''">
                    AND a.EMP_IDCARD like '%${tSalaryAccount.empIdcard}%'
                </if>
                <if test="tSalaryAccount.bankNo != null and tSalaryAccount.bankNo.trim() != ''">
                    AND a.BANK_NO like '%${tSalaryAccount.bankNo}%'
                </if>
                <if test="tSalaryAccount.bankName != null and tSalaryAccount.bankName.trim() != ''">
                    AND a.BANK_NAME = #{tSalaryAccount.bankName}
                </if>
                <if test="tSalaryAccount.salaryCount != null and tSalaryAccount.salaryCount.trim() != ''">
                    AND a.SALARY_COUNT = #{tSalaryAccount.salaryCount}
                </if>
                <if test="tSalaryAccount.salaryStyle != null and tSalaryAccount.salaryStyle.trim() != ''">
                    AND a.SALARY_STYLE = #{tSalaryAccount.salaryStyle}
                </if>
                <if test="tSalaryAccount.salaryGiveTime != null and tSalaryAccount.salaryGiveTime.trim() != ''">
                    AND a.SALARY_GIVE_TIME = #{tSalaryAccount.salaryGiveTime}
                </if>
                <if test="tSalaryAccount.distributionFlag != null and tSalaryAccount.distributionFlag.trim() != ''">
                    AND a.DISTRIBUTION_FLAG = #{tSalaryAccount.distributionFlag}
                </if>
                <if test="tSalaryAccount.deduSocialMonth != null and tSalaryAccount.deduSocialMonth.trim() != ''">
                    AND a.DEDU_SOCIAL_MONTH = #{tSalaryAccount.deduSocialMonth}
                </if>
                <if test="tSalaryAccount.deduProvidentMonth != null and tSalaryAccount.deduProvidentMonth.trim() != ''">
                    AND a.DEDU_PROVIDENT_MONTH = #{tSalaryAccount.deduProvidentMonth}
                </if>
                <if test="tSalaryAccount.formType != null and tSalaryAccount.formType.trim() != ''">
                    AND a.FORM_TYPE = #{tSalaryAccount.formType}
                </if>
                <if test="tSalaryAccount.salaryTaxFlag != null and tSalaryAccount.salaryTaxFlag.trim() != ''">
                    AND a.SALARY_TAX_FLAG = #{tSalaryAccount.salaryTaxFlag}
                </if>
                <if test="tSalaryAccount.settlementMonth != null and tSalaryAccount.settlementMonth.trim() != ''">
                    AND a.SETTLEMENT_MONTH = #{tSalaryAccount.settlementMonth}
                </if>
                <if test="tSalaryAccount.socialPriority != null and tSalaryAccount.socialPriority.trim() != ''">
                    AND a.SOCIAL_PRIORITY = #{tSalaryAccount.socialPriority}
                </if>
                <if test="tSalaryAccount.fundPriority != null and tSalaryAccount.fundPriority.trim() != ''">
                    AND a.FUND_PRIORITY = #{tSalaryAccount.fundPriority}
                </if>
                <if test="tSalaryAccount.annualBonusType != null and tSalaryAccount.annualBonusType.trim() != ''">
                    AND a.ANNUAL_BONUS_TYPE = #{tSalaryAccount.annualBonusType}
                </if>
                <if test="createUserId != null">
                    AND s.CREATE_USER = #{createUserId}
                </if>
                <if test="userDeptId != null">
                    AND u.dept_id = #{userDeptId}
                </if>
                <if test="unitName != null">
                    AND d.CUSTOMER_NAME = '${unitName}'
                </if>
                <if test="settleMonthStart != null">
                    AND a.SETTLEMENT_MONTH >= '${settleMonthStart}'
                </if>
                <if test="settleMonthEnd != null">
                    AND a.SETTLEMENT_MONTH <![CDATA[<=]]> '${settleMonthEnd}'
                </if>
            </if>
        </where>
        order by a.SETTLEMENT_MONTH,a.id desc
    </select>

    <sql id="Base_Column_List">
                a.ID,
                a.SALARY_ACCOUNT_ID,
                a.CN_NAME,
                a.JAVA_FIED_NAME,
                a.SALARY_MONEY,
                a.IS_TAX,
                a.TEXT_VALUE
    </sql>
    <sql id="tSalaryAccountItem_where">
        <if test="tSalaryAccountItem != null">
                    <if test="tSalaryAccountItem.id != null and tSalaryAccountItem.id.trim() != ''">
                        AND a.ID = #{tSalaryAccountItem.id}
                    </if>
                    <if test="tSalaryAccountItem.salaryAccountId != null and tSalaryAccountItem.salaryAccountId.trim() != ''">
                        AND a.SALARY_ACCOUNT_ID = #{tSalaryAccountItem.salaryAccountId}
                    </if>
                    <if test="tSalaryAccountItem.cnName != null and tSalaryAccountItem.cnName.trim() != ''">
                        AND a.CN_NAME = #{tSalaryAccountItem.cnName}
                    </if>
                    <if test="tSalaryAccountItem.javaFiedName != null and tSalaryAccountItem.javaFiedName.trim() != ''">
                        AND a.JAVA_FIED_NAME = #{tSalaryAccountItem.javaFiedName}
                    </if>
                    <if test="tSalaryAccountItem.salaryMoney != null">
                        AND a.SALARY_MONEY = #{tSalaryAccountItem.salaryMoney}
                    </if>
                    <if test="tSalaryAccountItem.isTax != null">
                        AND a.IS_TAX = #{tSalaryAccountItem.isTax}
                    </if>
                    <if test="tSalaryAccountItem.textValue != null and tSalaryAccountItem.textValue.trim() != ''">
                        AND a.TEXT_VALUE = #{tSalaryAccountItem.textValue}
                    </if>
        </if>
    </sql>

    <!-- 获取工资明细 -->
    <select id="getItemSet" resultType="java.lang.String">
        select
            i.cn_name a
        from t_salary_account_item i
        LEFT JOIN t_salary_account a on a.id=i.SALARY_ACCOUNT_ID
        where
            a.SALARY_FORM_ID = #{salaryId}
        GROUP BY i.CN_NAME
        order by i.JAVA_FIED_NAME desc,i.id
    </select>

	<!-- 获取所有数据,组装map,工资导入使用 -->
	<select id="getAllItemVoList" resultMap="itemVoMap">
		SELECT
		i.ID,
		i.SALARY_ACCOUNT_ID,
		i.CN_NAME,
		i.JAVA_FIED_NAME,
		i.SALARY_MONEY,
		i.TEXT_VALUE,
		i.IS_TAX,
		a.EMP_IDCARD,
		a.SETTLEMENT_MONTH,
		a.FORM_TYPE,
		a.ANNUAL_BONUS_TYPE
		FROM
		t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
		<where>
			a.SETTLEMENT_MONTH like DATE_FORMAT(now(),"%Y%")
			<if test="idCardList != null">
				AND a.EMP_IDCARD in
				<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
					#{item}
				</foreach>
			</if>
			<if test="invoiceTitle != null and invoiceTitle.trim() != ''">
				AND a.INVOICE_TITLE = #{invoiceTitle}
			</if>
			AND a.DELETE_FLAG = 0 and a.FORM_TYPE != 7
		</where>
	</select>

	<!-- 获取所有数据,组装map,工资导入使用 -->
	<select id="getSalaryItemVoList" resultMap="itemVoMap">
		SELECT
		i.ID,
		i.SALARY_ACCOUNT_ID,
		i.CN_NAME,
		i.JAVA_FIED_NAME,
		i.SALARY_MONEY,
		i.TEXT_VALUE,
		i.IS_TAX,
		a.EMP_IDCARD,
		a.SETTLEMENT_MONTH,
		a.FORM_TYPE,
		a.ANNUAL_BONUS_TYPE
		FROM
		t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
		<where>
			a.SETTLEMENT_MONTH like DATE_FORMAT(now(),"%Y%")
			<if test="idCardList != null">
				AND a.EMP_IDCARD in
				<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
					#{item}
				</foreach>
			</if>
			<if test="invoiceTitle != null and invoiceTitle.trim() != ''">
				AND a.INVOICE_TITLE = #{invoiceTitle}
			</if>
			AND a.DELETE_FLAG = 0 and a.FORM_TYPE in ('0','1','2')
		</where>
	</select>
	<select id="getSumByAccountId" resultType="java.util.Map">
		SELECT
		a.SALARY_ACCOUNT_ID as 'key',
		a.SALARY_MONEY  as 'value'
		FROM
		t_salary_account_item a
		WHERE
		a.SALARY_ACCOUNT_ID IN
		<foreach item="item" index="index" collection="account" open="(" separator="," close=")">
			#{item.id}
		</foreach>
		and
		a.JAVA_FIED_NAME='actualSalarySum'
	</select>


	<select id="getListByAccIdList" resultMap="tSalaryAccountItemMap">
		SELECT
		ID,
		SALARY_ACCOUNT_ID,
		CN_NAME,
		JAVA_FIED_NAME,
		SALARY_MONEY,
		TEXT_VALUE,
		IS_TAX
		FROM t_salary_account_item a
		where a.SALARY_ACCOUNT_ID in
		<foreach collection="accIdList" item="ids" open="(" separator="," close=")">
			#{ids}
		</foreach>
	</select>

</mapper>