TSocialFundInfoMapper.xml 47.2 KB
Newer Older
fangxinjiang's avatar
fangxinjiang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~
  ~      Copyright (c) 2018-2025, lengleng All rights reserved.
  ~
  ~  Redistribution and use in source and binary forms, with or without
  ~  modification, are permitted provided that the following conditions are met:
  ~
  ~ Redistributions of source code must retain the above copyright notice,
  ~  this list of conditions and the following disclaimer.
  ~  Redistributions in binary form must reproduce the above copyright
  ~  notice, this list of conditions and the following disclaimer in the
  ~  documentation and/or other materials provided with the distribution.
  ~  Neither the name of the yifu4cloud.com developer nor the names of its
  ~  contributors may be used to endorse or promote products derived from
  ~  this software without specific prior written permission.
  ~  Author: lengleng (wangiegie@gmail.com)
  ~
  -->

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

fangxinjiang's avatar
fangxinjiang committed
24
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper">
fangxinjiang's avatar
fangxinjiang committed
25

26 27 28 29 30 31 32 33 34 35 36 37
	<resultMap id="tSocialFundInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo">
		<id property="id" column="ID"/>
		<result property="empId" column="EMP_ID"/>
		<result property="empNo" column="EMP_NO"/>
		<result property="empName" column="EMP_NAME"/>
		<result property="empIdcard" column="EMP_IDCARD"/>
		<result property="empType" column="EMP_TYPE"/>
		<result property="settleDomain" column="SETTLE_DOMAIN"/>
		<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
		<result property="settleDomainName" column="SETTLE_DOMAIN_NAME"/>
		<result property="unitName" column="UNIT_NAME"/>
		<result property="unitId" column="UNIT_ID"/>
fangxinjiang's avatar
fangxinjiang committed
38

39 40 41 42 43
		<result property="settleDomainFund" column="SETTLE_DOMAIN_FUND"/>
		<result property="settleDomainCodeFund" column="SETTLE_DOMAIN_CODE_FUND"/>
		<result property="settleDomainNameFund" column="SETTLE_DOMAIN_NAME_FUND"/>
		<result property="unitNameFund" column="UNIT_NAME_FUND"/>
		<result property="unitIdFund" column="UNIT_ID_FUND"/>
fangxinjiang's avatar
fangxinjiang committed
44

45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
		<result property="socialHousehold" column="SOCIAL_HOUSEHOLD"/>
		<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
		<result property="socialProvince" column="SOCIAL_PROVINCE"/>
		<result property="socialCity" column="SOCIAL_CITY"/>
		<result property="socialTown" column="SOCIAL_TOWN"/>
		<result property="providentHousehold" column="PROVIDENT_HOUSEHOLD"/>
		<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
		<result property="fundProvince" column="FUND_PROVINCE"/>
		<result property="fundCity" column="FUND_CITY"/>
		<result property="fundTown" column="FUND_TOWN"/>
		<result property="socialAddStatus" column="SOCIAL_ADD_STATUS"/>
		<result property="fundAddStatus" column="FUND_ADD_STATUS"/>
		<result property="socialReduceStatus" column="SOCIAL_REDUCE_STATUS"/>
		<result property="fundReduceStatus" column="FUND_REDUCE_STATUS"/>
		<result property="socialId" column="SOCIAL_ID"/>
		<result property="fundId" column="FUND_ID"/>
		<result property="createBy" column="CREATE_BY"/>
		<result property="updateBy" column="UPDATE_BY"/>
		<result property="createName" column="CREATE_NAME"/>
64
		<result property="createTime" column="CREATE_TIME"/>
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
		<result property="updateTime" column="UPDATE_TIME"/>
		<result property="firstBuyMonthSocial" column="FIRST_BUY_MONTH_SOCIAL"/>
		<result property="unitPensionCardinal" column="UNIT_PENSION_CARDINAL"/>
		<result property="unitMedicalCardinal" column="UNIT_MEDICAL_CARDINAL"/>
		<result property="unitUnemploymentCardinal" column="UNIT_UNEMPLOYMENT_CARDINAL"/>
		<result property="unitBigailmentCardinal" column="UNIT_BIGAILMENT_CARDINAL"/>
		<result property="unitWorkInjuryCardinal" column="UNIT_WORK_INJURY_CARDINAL"/>
		<result property="unitBirthCardinal" column="UNIT_BIRTH_CARDINAL"/>
		<result property="personalPensionCardinal" column="PERSONAL_PENSION_CARDINAL"/>
		<result property="personalMedicalCardinal" column="PERSONAL_MEDICAL_CARDINAL"/>
		<result property="personalBigailmentCardinal" column="PERSONAL_BIGAILMENT_CARDINAL"/>
		<result property="personalUnemploymentCardinal" column="PERSONAL_UNEMPLOYMENT_CARDINAL"/>
		<result property="unitPensionPer" column="UNIT_PENSION_PER"/>
		<result property="unitMedicalPer" column="UNIT_MEDICAL_PER"/>
		<result property="unitUnemploymentPer" column="UNIT_UNEMPLOYMENT_PER"/>
		<result property="unitWorkUnjuryPer" column="UNIT_WORK_UNJURY_PER"/>
		<result property="unitBirthPer" column="UNIT_BIRTH_PER"/>
		<result property="personalPensionPer" column="PERSONAL_PENSION_PER"/>
		<result property="personalMedicalPer" column="PERSONAL_MEDICAL_PER"/>
		<result property="personalUnemploymentPer" column="PERSONAL_UNEMPLOYMENT_PER"/>
		<result property="handleStatus" column="HANDLE_STATUS"/>
		<result property="personalBigailmentPer" column="PERSONAL_BIGAILMENT_PER"/>
		<result property="unitBigailmentPer" column="UNIT_BIGAILMENT_PER"/>
		<result property="socialReduceDate" column="SOCIAL_REDUCE_DATE"/>
		<result property="canOverpay" column="CAN_OVERPAY"/>
		<result property="payPolicy" column="PAY_POLICY"/>
		<result property="overpayNumber" column="OVERPAY_NUMBER"/>
		<result property="haveThisMonth" column="HAVE_THIS_MONTH"/>
		<result property="insurancePension" column="INSURANCE_PENSION"/>
		<result property="insuranceMedical" column="INSURANCE_MEDICAL"/>
		<result property="insuranceUnemployment" column="INSURANCE_UNEMPLOYMENT"/>
		<result property="insuranceInjury" column="INSURANCE_INJURY"/>
		<result property="insuranceBirth" column="INSURANCE_BIRTH"/>
		<result property="insuranceBigailment" column="INSURANCE_BIGAILMENT"/>
		<result property="latestCardinality" column="LATEST_CARDINALITY"/>
		<result property="isIllness" column="IS_ILLNESS"/>
		<result property="collectType" column="COLLECT_TYPE"/>
		<result property="valueType" column="VALUE_TYPE"/>
		<result property="collectMoth" column="COLLECT_MOTH"/>
		<result property="isChargePersonal" column="IS_CHARGE_PERSONAL"/>
		<result property="recordBase" column="RECORD_BASE"/>
		<result property="trustRemark" column="TRUST_REMARK"/>
		<result property="paymentType" column="PAYMENT_TYPE"/>
		<result property="upperLimit" column="UPPER_LIMIT"/>
		<result property="lowerLimit" column="LOWER_LIMIT"/>
		<result property="pensionStart" column="PENSION_START"/>
		<result property="medicalStart" column="MEDICAL_START"/>
		<result property="unemployStart" column="UNEMPLOY_START"/>
		<result property="workInjuryStart" column="WORK_INJURY_START"/>
		<result property="birthStart" column="BIRTH_START"/>
		<result property="bigailmentStart" column="BIGAILMENT_START"/>
		<result property="pensionHandle" column="PENSION_HANDLE"/>
		<result property="medicalHandle" column="MEDICAL_HANDLE"/>
		<result property="unemployHandle" column="UNEMPLOY_HANDLE"/>
		<result property="workInjuryHandle" column="WORK_INJURY_HANDLE"/>
		<result property="birthHandle" column="BIRTH_HANDLE"/>
		<result property="bigailmentHandle" column="BIGAILMENT_HANDLE"/>
		<result property="unitPersionMoney" column="UNIT_PERSION_MONEY"/>
		<result property="unitMedicalMoney" column="UNIT_MEDICAL_MONEY"/>
		<result property="unitUnemploymentMoney" column="UNIT_UNEMPLOYMENT_MONEY"/>
		<result property="unitInjuryMoney" column="UNIT_INJURY_MONEY"/>
		<result property="unitBirthMoney" column="UNIT_BIRTH_MONEY"/>
		<result property="unitBigailmentMoney" column="UNIT_BIGAILMENT_MONEY"/>
		<result property="personalPersionMoney" column="PERSONAL_PERSION_MONEY"/>
		<result property="personalMedicalMoney" column="PERSONAL_MEDICAL_MONEY"/>
		<result property="personalUnemploymentMoney" column="PERSONAL_UNEMPLOYMENT_MONEY"/>
		<result property="personalBigailmentMoney" column="PERSONAL_BIGAILMENT_MONEY"/>
		<result property="unitProvidengCardinal" column="UNIT_PROVIDENG_CARDINAL"/>
		<result property="personalProvidentCardinal" column="PERSONAL_PROVIDENT_CARDINAL"/>
		<result property="socialStartDate" column="SOCIAL_START_DATE"/>
		<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
		<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
		<result property="providentStart" column="PROVIDENT_START"/>
		<result property="firstBuyMothFund" column="FIRST_BUY_MOTH_FUND"/>
		<result property="upperLimitFund" column="UPPER_LIMIT_FUND"/>
		<result property="lowerLimitFund" column="LOWER_LIMIT_FUND"/>
		<result property="fundPayPoint" column="FUND_PAY_POINT"/>
		<result property="canOverpayFund" column="CAN_OVERPAY_FUND"/>
		<result property="overpayNumberFund" column="OVERPAY_NUMBER_FUND"/>
		<result property="payPolicyFund" column="PAY_POLICY_FUND"/>
		<result property="trustRemarkFund" column="TRUST_REMARK_FUND"/>
		<result property="haveThisMonthFund" column="HAVE_THIS_MONTH_FUND"/>
		<result property="latestCardinalityFund" column="LATEST_CARDINALITY_FUND"/>
		<result property="fundReduceDate" column="FUND_REDUCE_DATE"/>
149

150 151 152 153 154 155 156 157 158
		<result property="personalFundSum" column="PERSONAL_FUND_SUM"/>
		<result property="unitFundSum" column="UNIT_FUND_SUM"/>
		<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
		<result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/>
		<result property="unitInterestFee" column="UNIT_INTEREST_FEE"/>
		<result property="personalInterestFee" column="PERSONAL_INTEREST_FEE"/>
		<result property="socialStatus" column="SOCIAL_STATUS"/>
		<result property="fundStatus" column="FUND_STATUS"/>
		<result property="dispatchId" column="DISPATCH_ID"/>
fangxinjiang's avatar
fangxinjiang committed
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
	</resultMap>

	<!-- 社保公积金查询的导出专用 -->
	<resultMap id="exportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoExportVo">
		<id property="id" column="ID"/>
		<result property="empName" column="EMP_NAME"/>
		<result property="empIdcard" column="EMP_IDCARD"/>
		<result property="empType" column="EMP_TYPE"/>
		<result property="empMobile" column="EMP_MOBILE"/>
		<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
		<result property="unitName" column="UNIT_NAME"/>
		<result property="settleDomainName" column="SETTLE_DOMAIN_NAME"/>
		<result property="idCardProvince" column="ID_CARD_PROVINCE"/>
		<result property="idCardCity" column="ID_CARD_CITY"/>
		<result property="idCardTown" column="ID_CARD_TOWN"/>
		<result property="idCardAddress" column="ID_CARD_ADDRESS"/>
		<result property="fileProvince" column="FILE_PROVINCE"/>
		<result property="fileCity" column="FILE__CITY"/>
		<result property="fileTown" column="FILE__TOWN"/>
		<result property="post" column="POST"/>
		<result property="tryPeriod" column="TRY_PERIOD"/>
		<result property="workingHours" column="WORKING_HOURS"/>
		<result property="contractName" column="CONTRACT_NAME"/>
		<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
		<result property="contractParty" column="CONTRACT_PARTY"/>
		<result property="contractType" column="CONTRACT_TYPE"/>
		<result property="contractStart" column="CONTRACT_START"/>
		<result property="contractEnd" column="CONTRACT_END"/>
		<result property="contractTerm" column="CONTRACT_TERM"/>
		<result property="educationName" column="EDUCATION_NAME"/>
		<result property="recordBase" column="RECORD_BASE"/>
		<result property="socialStatus" column="SOCIAL_STATUS"/>
		<result property="fundStatus" column="FUND_STATUS"/>
		<result property="socialStartDate" column="SOCIAL_START_DATE"/>
		<result property="providentStart" column="PROVIDENT_START"/>
		<result property="socialReduceDate" column="SOCIAL_REDUCE_DATE"/>
		<result property="fundReduceDate" column="FUND_REDUCE_DATE"/>
		<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
		<result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/>
		<result property="unitFundSum" column="UNIT_FUND_SUM"/>
		<result property="personalFundSum" column="PERSONAL_FUND_SUM"/>
		<result property="allSum" column="ALL_SUM"/>
		<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
		<result property="socialProvince" column="SOCIAL_PROVINCE"/>
		<result property="socialCity" column="SOCIAL_CITY"/>
		<result property="socialTown" column="SOCIAL_TOWN"/>
		<result property="pensionStart" column="PENSION_START"/>
		<result property="medicalStart" column="MEDICAL_START"/>
		<result property="unemployStart" column="UNEMPLOY_START"/>
		<result property="workInjuryStart" column="WORK_INJURY_START"/>
		<result property="birthStart" column="BIRTH_START"/>
		<result property="bigailmentStart" column="BIGAILMENT_START"/>
		<result property="paymentType" column="PAYMENT_TYPE"/>

		<result property="unitPensionCardinal" column="UNIT_PENSION_CARDINAL"/>
		<result property="unitMedicalCardinal" column="UNIT_MEDICAL_CARDINAL"/>
		<result property="unitUnemploymentCardinal" column="UNIT_UNEMPLOYMENT_CARDINAL"/>
		<result property="unitWorkInjuryCardinal" column="UNIT_WORK_INJURY_CARDINAL"/>
		<result property="unitBirthCardinal" column="UNIT_BIRTH_CARDINAL"/>
		<result property="unitBigailmentCardinal" column="UNIT_BIGAILMENT_CARDINAL"/>
		<result property="unitPensionPer" column="UNIT_PENSION_PER"/>
		<result property="unitMedicalPer" column="UNIT_MEDICAL_PER"/>
		<result property="unitUnemploymentPer" column="UNIT_UNEMPLOYMENT_PER"/>
		<result property="unitWorkUnjuryPer" column="UNIT_WORK_UNJURY_PER"/>
		<result property="unitBirthPer" column="UNIT_BIRTH_PER"/>
		<result property="unitBigailmentPer" column="UNIT_BIGAILMENT_PER"/>
		<result property="unitPersionMoney" column="UNIT_PERSION_MONEY"/>
		<result property="unitMedicalMoney" column="UNIT_MEDICAL_MONEY"/>
		<result property="unitUnemploymentMoney" column="UNIT_UNEMPLOYMENT_MONEY"/>
		<result property="unitInjuryMoney" column="UNIT_INJURY_MONEY"/>
		<result property="unitBirthMoney" column="UNIT_BIRTH_MONEY"/>
		<result property="unitBigailmentMoney" column="UNIT_BIGAILMENT_MONEY"/>

		<result property="personalPensionPer" column="PERSONAL_PENSION_PER"/>
		<result property="personalMedicalPer" column="PERSONAL_MEDICAL_PER"/>
		<result property="personalUnemploymentPer" column="PERSONAL_UNEMPLOYMENT_PER"/>
		<result property="personalBigailmentPer" column="PERSONAL_BIGAILMENT_PER"/>
		<result property="personalPersionMoney" column="PERSONAL_PERSION_MONEY"/>
		<result property="personalMedicalMoney" column="PERSONAL_MEDICAL_MONEY"/>
		<result property="personalUnemploymentMoney" column="PERSONAL_UNEMPLOYMENT_MONEY"/>
		<result property="personalBigailmentMoney" column="PERSONAL_BIGAILMENT_MONEY"/>

		<result property="persionMoney" column="PERSION_MONEY"/>
		<result property="medicalMoney" column="MEDICAL_MONEY"/>
		<result property="unemploymentMoney" column="UNEMPLOYMENT_MONEY"/>
		<result property="bigailmentMoney" column="BIGAILMENT_MONEY"/>

		<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
		<result property="fundProvince" column="FUND_PROVINCE"/>
		<result property="fundCity" column="FUND_CITY"/>
		<result property="fundTown" column="FUND_TOWN"/>
		<result property="unitProvidengCardinal" column="UNIT_PROVIDENG_CARDINAL"/>
		<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
		<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
		<result property="unitFundSum2" column="UNIT_FUND_SUM2"/>
		<result property="personalFundSum2" column="PERSONAL_FUND_SUM2"/>
		<result property="fundSum" column="FUND_SUM"/>

		<result property="trustRemark" column="TRUST_REMARK"/>
	</resultMap>
	<sql id="Base_Column_List">
261
				a.ID,
fangxinjiang's avatar
fangxinjiang committed
262 263 264 265 266 267
                a.EMP_ID,
                a.EMP_NO,
                a.EMP_NAME,
                a.EMP_IDCARD,
                a.EMP_TYPE,
                a.SETTLE_DOMAIN,
hongguangwu's avatar
hongguangwu committed
268 269 270
                if(a.SETTLE_DOMAIN_CODE = a.SETTLE_DOMAIN_CODE_FUND,a.SETTLE_DOMAIN_CODE,concat(ifnull(a.SETTLE_DOMAIN_CODE,""),if(a.SETTLE_DOMAIN_CODE is null or a.SETTLE_DOMAIN_CODE_FUND is null,"",","),ifnull(a.SETTLE_DOMAIN_CODE_FUND,""))) SETTLE_DOMAIN_CODE,
				if(a.SETTLE_DOMAIN_NAME = a.SETTLE_DOMAIN_NAME_FUND,a.SETTLE_DOMAIN_NAME,concat(ifnull(a.SETTLE_DOMAIN_NAME,""),if(a.SETTLE_DOMAIN_NAME is null or a.SETTLE_DOMAIN_NAME_FUND is null,"",","),ifnull(a.SETTLE_DOMAIN_NAME_FUND,""))) SETTLE_DOMAIN_NAME,
				if(a.UNIT_NAME = a.UNIT_NAME_FUND,a.UNIT_NAME,concat(ifnull(a.UNIT_NAME,""),if(a.UNIT_NAME is null or a.UNIT_NAME_FUND is null,"",","),ifnull(a.UNIT_NAME_FUND,""))) UNIT_NAME,
fangxinjiang's avatar
fangxinjiang committed
271
                a.UNIT_ID,
fangxinjiang's avatar
fangxinjiang committed
272 273 274 275 276
 				a.SETTLE_DOMAIN_FUND,
				a.SETTLE_DOMAIN_CODE_FUND,
                a.SETTLE_DOMAIN_NAME_FUND,
                a.UNIT_NAME_FUND,
                a.UNIT_ID_FUND,
fangxinjiang's avatar
fangxinjiang committed
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
                a.SOCIAL_HOUSEHOLD,
                a.SOCIAL_HOUSEHOLD_NAME,
                a.SOCIAL_PROVINCE,
                a.SOCIAL_CITY,
                a.SOCIAL_TOWN,
                a.PROVIDENT_HOUSEHOLD,
                a.PROVIDENT_HOUSEHOLD_NAME,
                a.FUND_PROVINCE,
                a.FUND_CITY,
                a.FUND_TOWN,
                a.SOCIAL_ADD_STATUS,
                a.FUND_ADD_STATUS,
                a.SOCIAL_REDUCE_STATUS,
                a.FUND_REDUCE_STATUS,
                a.SOCIAL_ID,
                a.FUND_ID,
                a.CREATE_BY,
                a.UPDATE_BY,
                a.CREATE_NAME,
                a.UPDATE_TIME,
297
                a.CREATE_TIME,
fangxinjiang's avatar
fangxinjiang committed
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
                a.FIRST_BUY_MONTH_SOCIAL,
                a.UNIT_PENSION_CARDINAL,
                a.UNIT_MEDICAL_CARDINAL,
                a.UNIT_UNEMPLOYMENT_CARDINAL,
                a.UNIT_BIGAILMENT_CARDINAL,
                a.UNIT_WORK_INJURY_CARDINAL,
                a.UNIT_BIRTH_CARDINAL,
                a.PERSONAL_PENSION_CARDINAL,
                a.PERSONAL_MEDICAL_CARDINAL,
                a.PERSONAL_BIGAILMENT_CARDINAL,
                a.PERSONAL_UNEMPLOYMENT_CARDINAL,
                a.UNIT_PENSION_PER,
                a.UNIT_MEDICAL_PER,
                a.UNIT_UNEMPLOYMENT_PER,
                a.UNIT_WORK_UNJURY_PER,
                a.UNIT_BIRTH_PER,
                a.PERSONAL_PENSION_PER,
                a.PERSONAL_MEDICAL_PER,
                a.PERSONAL_UNEMPLOYMENT_PER,
                a.HANDLE_STATUS,
                a.PERSONAL_BIGAILMENT_PER,
                a.UNIT_BIGAILMENT_PER,
                a.SOCIAL_REDUCE_DATE,
                a.CAN_OVERPAY,
                a.PAY_POLICY,
                a.OVERPAY_NUMBER,
                a.HAVE_THIS_MONTH,
                a.INSURANCE_PENSION,
                a.INSURANCE_MEDICAL,
                a.INSURANCE_UNEMPLOYMENT,
                a.INSURANCE_INJURY,
                a.INSURANCE_BIRTH,
                a.INSURANCE_BIGAILMENT,
                a.LATEST_CARDINALITY,
                a.IS_ILLNESS,
                a.COLLECT_TYPE,
                a.VALUE_TYPE,
                a.COLLECT_MOTH,
                a.IS_CHARGE_PERSONAL,
                a.RECORD_BASE,
                a.TRUST_REMARK,
                a.PAYMENT_TYPE,
                a.UPPER_LIMIT,
                a.LOWER_LIMIT,
                a.PENSION_START,
                a.MEDICAL_START,
                a.UNEMPLOY_START,
                a.WORK_INJURY_START,
                a.BIRTH_START,
                a.BIGAILMENT_START,
                a.PENSION_HANDLE,
                a.MEDICAL_HANDLE,
                a.UNEMPLOY_HANDLE,
                a.WORK_INJURY_HANDLE,
                a.BIRTH_HANDLE,
                a.BIGAILMENT_HANDLE,
                a.UNIT_PERSION_MONEY,
                a.UNIT_MEDICAL_MONEY,
                a.UNIT_UNEMPLOYMENT_MONEY,
                a.UNIT_INJURY_MONEY,
                a.UNIT_BIRTH_MONEY,
                a.UNIT_BIGAILMENT_MONEY,
                a.PERSONAL_PERSION_MONEY,
                a.PERSONAL_MEDICAL_MONEY,
                a.PERSONAL_UNEMPLOYMENT_MONEY,
                a.PERSONAL_BIGAILMENT_MONEY,
                a.UNIT_PROVIDENG_CARDINAL,
                a.PERSONAL_PROVIDENT_CARDINAL,
                a.SOCIAL_START_DATE,
                a.UNIT_PROVIDENT_PER,
                a.PERSONAL_PROVIDENT_PER,
                a.PROVIDENT_START,
                a.FIRST_BUY_MOTH_FUND,
                a.UPPER_LIMIT_FUND,
                a.LOWER_LIMIT_FUND,
                a.FUND_PAY_POINT,
                a.CAN_OVERPAY_FUND,
                a.OVERPAY_NUMBER_FUND,
                a.PAY_POLICY_FUND,
                a.TRUST_REMARK_FUND,
                a.HAVE_THIS_MONTH_FUND,
379
                a.LATEST_CARDINALITY_FUND,
380 381 382 383 384 385
				a.FUND_REDUCE_DATE,
				a.PERSONAL_FUND_SUM,
				a.UNIT_FUND_SUM,
				a.UNIT_SOCIAL_SUM,
				a.PERSONAL_SOCIAL_SUM,
				a.UNIT_INTEREST_FEE,
386 387 388
				a.PERSONAL_INTEREST_FEE,
				a.SOCIAL_STATUS,
				a.FUND_STATUS,
fangxinjiang's avatar
fangxinjiang committed
389
				a.DISPATCH_ID,a.UNIT_SOCIAL_SUM,a.PERSONAL_SOCIAL_SUM
390
	</sql>
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 511 512 513 514 515 516 517 518 519 520 521 522 523

	<!-- 其他地方查询,不需要拼接项目名称 -->
	<sql id="Other_Base_Column_List">
				a.ID,
                a.EMP_ID,
                a.EMP_NO,
                a.EMP_NAME,
                a.EMP_IDCARD,
                a.EMP_TYPE,
                a.SETTLE_DOMAIN,
                a.SETTLE_DOMAIN_CODE,
                a.SETTLE_DOMAIN_NAME,
                a.UNIT_NAME,
                a.UNIT_ID,
 				a.SETTLE_DOMAIN_FUND,
				a.SETTLE_DOMAIN_CODE_FUND,
                a.SETTLE_DOMAIN_NAME_FUND,
                a.UNIT_NAME_FUND,
                a.UNIT_ID_FUND,
                a.SOCIAL_HOUSEHOLD,
                a.SOCIAL_HOUSEHOLD_NAME,
                a.SOCIAL_PROVINCE,
                a.SOCIAL_CITY,
                a.SOCIAL_TOWN,
                a.PROVIDENT_HOUSEHOLD,
                a.PROVIDENT_HOUSEHOLD_NAME,
                a.FUND_PROVINCE,
                a.FUND_CITY,
                a.FUND_TOWN,
                a.SOCIAL_ADD_STATUS,
                a.FUND_ADD_STATUS,
                a.SOCIAL_REDUCE_STATUS,
                a.FUND_REDUCE_STATUS,
                a.SOCIAL_ID,
                a.FUND_ID,
                a.CREATE_BY,
                a.UPDATE_BY,
                a.CREATE_NAME,
                a.UPDATE_TIME,
                a.CREATE_TIME,
                a.FIRST_BUY_MONTH_SOCIAL,
                a.UNIT_PENSION_CARDINAL,
                a.UNIT_MEDICAL_CARDINAL,
                a.UNIT_UNEMPLOYMENT_CARDINAL,
                a.UNIT_BIGAILMENT_CARDINAL,
                a.UNIT_WORK_INJURY_CARDINAL,
                a.UNIT_BIRTH_CARDINAL,
                a.PERSONAL_PENSION_CARDINAL,
                a.PERSONAL_MEDICAL_CARDINAL,
                a.PERSONAL_BIGAILMENT_CARDINAL,
                a.PERSONAL_UNEMPLOYMENT_CARDINAL,
                a.UNIT_PENSION_PER,
                a.UNIT_MEDICAL_PER,
                a.UNIT_UNEMPLOYMENT_PER,
                a.UNIT_WORK_UNJURY_PER,
                a.UNIT_BIRTH_PER,
                a.PERSONAL_PENSION_PER,
                a.PERSONAL_MEDICAL_PER,
                a.PERSONAL_UNEMPLOYMENT_PER,
                a.HANDLE_STATUS,
                a.PERSONAL_BIGAILMENT_PER,
                a.UNIT_BIGAILMENT_PER,
                a.SOCIAL_REDUCE_DATE,
                a.CAN_OVERPAY,
                a.PAY_POLICY,
                a.OVERPAY_NUMBER,
                a.HAVE_THIS_MONTH,
                a.INSURANCE_PENSION,
                a.INSURANCE_MEDICAL,
                a.INSURANCE_UNEMPLOYMENT,
                a.INSURANCE_INJURY,
                a.INSURANCE_BIRTH,
                a.INSURANCE_BIGAILMENT,
                a.LATEST_CARDINALITY,
                a.IS_ILLNESS,
                a.COLLECT_TYPE,
                a.VALUE_TYPE,
                a.COLLECT_MOTH,
                a.IS_CHARGE_PERSONAL,
                a.RECORD_BASE,
                a.TRUST_REMARK,
                a.PAYMENT_TYPE,
                a.UPPER_LIMIT,
                a.LOWER_LIMIT,
                a.PENSION_START,
                a.MEDICAL_START,
                a.UNEMPLOY_START,
                a.WORK_INJURY_START,
                a.BIRTH_START,
                a.BIGAILMENT_START,
                a.PENSION_HANDLE,
                a.MEDICAL_HANDLE,
                a.UNEMPLOY_HANDLE,
                a.WORK_INJURY_HANDLE,
                a.BIRTH_HANDLE,
                a.BIGAILMENT_HANDLE,
                a.UNIT_PERSION_MONEY,
                a.UNIT_MEDICAL_MONEY,
                a.UNIT_UNEMPLOYMENT_MONEY,
                a.UNIT_INJURY_MONEY,
                a.UNIT_BIRTH_MONEY,
                a.UNIT_BIGAILMENT_MONEY,
                a.PERSONAL_PERSION_MONEY,
                a.PERSONAL_MEDICAL_MONEY,
                a.PERSONAL_UNEMPLOYMENT_MONEY,
                a.PERSONAL_BIGAILMENT_MONEY,
                a.UNIT_PROVIDENG_CARDINAL,
                a.PERSONAL_PROVIDENT_CARDINAL,
                a.SOCIAL_START_DATE,
                a.UNIT_PROVIDENT_PER,
                a.PERSONAL_PROVIDENT_PER,
                a.PROVIDENT_START,
                a.FIRST_BUY_MOTH_FUND,
                a.UPPER_LIMIT_FUND,
                a.LOWER_LIMIT_FUND,
                a.FUND_PAY_POINT,
                a.CAN_OVERPAY_FUND,
                a.OVERPAY_NUMBER_FUND,
                a.PAY_POLICY_FUND,
                a.TRUST_REMARK_FUND,
                a.HAVE_THIS_MONTH_FUND,
                a.LATEST_CARDINALITY_FUND,
				a.FUND_REDUCE_DATE,
				a.PERSONAL_FUND_SUM,
				a.UNIT_FUND_SUM,
				a.UNIT_SOCIAL_SUM,
				a.PERSONAL_SOCIAL_SUM,
				a.UNIT_INTEREST_FEE,
				a.PERSONAL_INTEREST_FEE,
				a.SOCIAL_STATUS,
				a.FUND_STATUS,
				a.DISPATCH_ID,a.UNIT_SOCIAL_SUM,a.PERSONAL_SOCIAL_SUM
	</sql>
524 525 526
	<sql id="tSocialFundInfo_where">
		<if test="tSocialFundInfo != null">
			<if test="tSocialFundInfo.idList != null">
527
				AND a.ID in
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553
				<foreach item="idStr" index="index" collection="tSocialFundInfo.idList" open="(" separator="," close=")">
					#{idStr}
				</foreach>
			</if>
			<if test="tSocialFundInfo.id != null and tSocialFundInfo.id.trim() != ''">
				AND a.ID = #{tSocialFundInfo.id}
			</if>
			<if test="tSocialFundInfo.empId != null and tSocialFundInfo.empId.trim() != ''">
				AND a.EMP_ID = #{tSocialFundInfo.empId}
			</if>
			<if test="tSocialFundInfo.empNo != null and tSocialFundInfo.empNo.trim() != ''">
				AND a.EMP_NO = #{tSocialFundInfo.empNo}
			</if>
			<if test="tSocialFundInfo.empName != null and tSocialFundInfo.empName.trim() != ''">
				AND a.EMP_NAME = #{tSocialFundInfo.empName}
			</if>
			<if test="tSocialFundInfo.empIdcard != null and tSocialFundInfo.empIdcard.trim() != ''">
				AND a.EMP_IDCARD = #{tSocialFundInfo.empIdcard}
			</if>
			<if test="tSocialFundInfo.empType != null and tSocialFundInfo.empType.trim() != ''">
				AND a.EMP_TYPE = #{tSocialFundInfo.empType}
			</if>
			<if test="tSocialFundInfo.settleDomain != null and tSocialFundInfo.settleDomain.trim() != ''">
				AND a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain}
			</if>
			<if test="tSocialFundInfo.settleDomainName != null and tSocialFundInfo.settleDomainName.trim() != ''">
hongguangwu's avatar
hongguangwu committed
554
				AND (a.SETTLE_DOMAIN_NAME like concat('%',#{tSocialFundInfo.settleDomainName},'%') or a.SETTLE_DOMAIN_NAME_FUND like concat('%',#{tSocialFundInfo.settleDomainName},'%'))
555 556
			</if>
			<if test="tSocialFundInfo.unitName != null and tSocialFundInfo.unitName.trim() != ''">
hongguangwu's avatar
hongguangwu committed
557
				AND (a.UNIT_NAME like concat('%',#{tSocialFundInfo.unitName},'%') or a.UNIT_NAME_FUND like concat('%',#{tSocialFundInfo.unitName},'%'))
558 559 560 561 562 563 564 565
			</if>
			<if test="tSocialFundInfo.unitId != null and tSocialFundInfo.unitId.trim() != ''">
				AND a.UNIT_ID = #{tSocialFundInfo.unitId}
			</if>
			<if test="tSocialFundInfo.socialHousehold != null and tSocialFundInfo.socialHousehold.trim() != ''">
				AND a.SOCIAL_HOUSEHOLD = #{tSocialFundInfo.socialHousehold}
			</if>
			<if test="tSocialFundInfo.socialHouseholdName != null and tSocialFundInfo.socialHouseholdName.trim() != ''">
hongguangwu's avatar
hongguangwu committed
566
				AND a.SOCIAL_HOUSEHOLD_NAME like concat('%',#{tSocialFundInfo.socialHouseholdName},'%')
567 568 569 570 571 572 573 574 575 576 577 578 579 580
			</if>
			<if test="tSocialFundInfo.socialProvince != null and tSocialFundInfo.socialProvince.trim() != ''">
				AND a.SOCIAL_PROVINCE = #{tSocialFundInfo.socialProvince}
			</if>
			<if test="tSocialFundInfo.socialCity != null and tSocialFundInfo.socialCity.trim() != ''">
				AND a.SOCIAL_CITY = #{tSocialFundInfo.socialCity}
			</if>
			<if test="tSocialFundInfo.socialTown != null and tSocialFundInfo.socialTown.trim() != ''">
				AND a.SOCIAL_TOWN = #{tSocialFundInfo.socialTown}
			</if>
			<if test="tSocialFundInfo.providentHousehold != null and tSocialFundInfo.providentHousehold.trim() != ''">
				AND a.PROVIDENT_HOUSEHOLD = #{tSocialFundInfo.providentHousehold}
			</if>
			<if test="tSocialFundInfo.providentHouseholdName != null and tSocialFundInfo.providentHouseholdName.trim() != ''">
hongguangwu's avatar
hongguangwu committed
581
				AND a.PROVIDENT_HOUSEHOLD_NAME like concat('%',#{tSocialFundInfo.providentHouseholdName},'%')
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867
			</if>
			<if test="tSocialFundInfo.fundProvince != null and tSocialFundInfo.fundProvince.trim() != ''">
				AND a.FUND_PROVINCE = #{tSocialFundInfo.fundProvince}
			</if>
			<if test="tSocialFundInfo.fundCity != null and tSocialFundInfo.fundCity.trim() != ''">
				AND a.FUND_CITY = #{tSocialFundInfo.fundCity}
			</if>
			<if test="tSocialFundInfo.fundTown != null and tSocialFundInfo.fundTown.trim() != ''">
				AND a.FUND_TOWN = #{tSocialFundInfo.fundTown}
			</if>
			<if test="tSocialFundInfo.socialAddStatus != null and tSocialFundInfo.socialAddStatus.trim() != ''">
				AND a.SOCIAL_ADD_STATUS = #{tSocialFundInfo.socialAddStatus}
			</if>
			<if test="tSocialFundInfo.fundAddStatus != null and tSocialFundInfo.fundAddStatus.trim() != ''">
				AND a.FUND_ADD_STATUS = #{tSocialFundInfo.fundAddStatus}
			</if>
			<if test="tSocialFundInfo.socialReduceStatus != null and tSocialFundInfo.socialReduceStatus.trim() != ''">
				AND a.SOCIAL_REDUCE_STATUS = #{tSocialFundInfo.socialReduceStatus}
			</if>
			<if test="tSocialFundInfo.fundReduceStatus != null and tSocialFundInfo.fundReduceStatus.trim() != ''">
				AND a.FUND_REDUCE_STATUS = #{tSocialFundInfo.fundReduceStatus}
			</if>
			<if test="tSocialFundInfo.socialId != null and tSocialFundInfo.socialId.trim() != ''">
				AND a.SOCIAL_ID = #{tSocialFundInfo.socialId}
			</if>
			<if test="tSocialFundInfo.fundId != null and tSocialFundInfo.fundId.trim() != ''">
				AND a.FUND_ID = #{tSocialFundInfo.fundId}
			</if>
			<if test="tSocialFundInfo.createBy != null and tSocialFundInfo.createBy.trim() != ''">
				AND a.CREATE_BY = #{tSocialFundInfo.createBy}
			</if>
			<if test="tSocialFundInfo.updateBy != null and tSocialFundInfo.updateBy.trim() != ''">
				AND a.UPDATE_BY = #{tSocialFundInfo.updateBy}
			</if>
			<if test="tSocialFundInfo.createName != null and tSocialFundInfo.createName.trim() != ''">
				AND a.CREATE_NAME = #{tSocialFundInfo.createName}
			</if>
			<if test="tSocialFundInfo.updateTime != null">
				AND a.UPDATE_TIME = #{tSocialFundInfo.updateTime}
			</if>
			<if test="tSocialFundInfo.firstBuyMonthSocial != null">
				AND a.FIRST_BUY_MONTH_SOCIAL = #{tSocialFundInfo.firstBuyMonthSocial}
			</if>
			<if test="tSocialFundInfo.unitPensionCardinal != null">
				AND a.UNIT_PENSION_CARDINAL = #{tSocialFundInfo.unitPensionCardinal}
			</if>
			<if test="tSocialFundInfo.unitMedicalCardinal != null">
				AND a.UNIT_MEDICAL_CARDINAL = #{tSocialFundInfo.unitMedicalCardinal}
			</if>
			<if test="tSocialFundInfo.unitUnemploymentCardinal != null">
				AND a.UNIT_UNEMPLOYMENT_CARDINAL = #{tSocialFundInfo.unitUnemploymentCardinal}
			</if>
			<if test="tSocialFundInfo.unitBigailmentCardinal != null">
				AND a.UNIT_BIGAILMENT_CARDINAL = #{tSocialFundInfo.unitBigailmentCardinal}
			</if>
			<if test="tSocialFundInfo.unitWorkInjuryCardinal != null">
				AND a.UNIT_WORK_INJURY_CARDINAL = #{tSocialFundInfo.unitWorkInjuryCardinal}
			</if>
			<if test="tSocialFundInfo.unitBirthCardinal != null">
				AND a.UNIT_BIRTH_CARDINAL = #{tSocialFundInfo.unitBirthCardinal}
			</if>
			<if test="tSocialFundInfo.personalPensionCardinal != null">
				AND a.PERSONAL_PENSION_CARDINAL = #{tSocialFundInfo.personalPensionCardinal}
			</if>
			<if test="tSocialFundInfo.personalMedicalCardinal != null">
				AND a.PERSONAL_MEDICAL_CARDINAL = #{tSocialFundInfo.personalMedicalCardinal}
			</if>
			<if test="tSocialFundInfo.personalBigailmentCardinal != null">
				AND a.PERSONAL_BIGAILMENT_CARDINAL = #{tSocialFundInfo.personalBigailmentCardinal}
			</if>
			<if test="tSocialFundInfo.personalUnemploymentCardinal != null">
				AND a.PERSONAL_UNEMPLOYMENT_CARDINAL = #{tSocialFundInfo.personalUnemploymentCardinal}
			</if>
			<if test="tSocialFundInfo.unitPensionPer != null">
				AND a.UNIT_PENSION_PER = #{tSocialFundInfo.unitPensionPer}
			</if>
			<if test="tSocialFundInfo.unitMedicalPer != null">
				AND a.UNIT_MEDICAL_PER = #{tSocialFundInfo.unitMedicalPer}
			</if>
			<if test="tSocialFundInfo.unitUnemploymentPer != null">
				AND a.UNIT_UNEMPLOYMENT_PER = #{tSocialFundInfo.unitUnemploymentPer}
			</if>
			<if test="tSocialFundInfo.unitWorkUnjuryPer != null">
				AND a.UNIT_WORK_UNJURY_PER = #{tSocialFundInfo.unitWorkUnjuryPer}
			</if>
			<if test="tSocialFundInfo.unitBirthPer != null">
				AND a.UNIT_BIRTH_PER = #{tSocialFundInfo.unitBirthPer}
			</if>
			<if test="tSocialFundInfo.personalPensionPer != null">
				AND a.PERSONAL_PENSION_PER = #{tSocialFundInfo.personalPensionPer}
			</if>
			<if test="tSocialFundInfo.personalMedicalPer != null">
				AND a.PERSONAL_MEDICAL_PER = #{tSocialFundInfo.personalMedicalPer}
			</if>
			<if test="tSocialFundInfo.personalUnemploymentPer != null">
				AND a.PERSONAL_UNEMPLOYMENT_PER = #{tSocialFundInfo.personalUnemploymentPer}
			</if>
			<if test="tSocialFundInfo.handleStatus != null and tSocialFundInfo.handleStatus.trim() != ''">
				AND a.HANDLE_STATUS = #{tSocialFundInfo.handleStatus}
			</if>
			<if test="tSocialFundInfo.personalBigailmentPer != null">
				AND a.PERSONAL_BIGAILMENT_PER = #{tSocialFundInfo.personalBigailmentPer}
			</if>
			<if test="tSocialFundInfo.unitBigailmentPer != null">
				AND a.UNIT_BIGAILMENT_PER = #{tSocialFundInfo.unitBigailmentPer}
			</if>
			<if test="tSocialFundInfo.socialReduceDate != null">
				AND a.SOCIAL_REDUCE_DATE = #{tSocialFundInfo.socialReduceDate}
			</if>
			<if test="tSocialFundInfo.canOverpay != null and tSocialFundInfo.canOverpay.trim() != ''">
				AND a.CAN_OVERPAY = #{tSocialFundInfo.canOverpay}
			</if>
			<if test="tSocialFundInfo.payPolicy != null and tSocialFundInfo.payPolicy.trim() != ''">
				AND a.PAY_POLICY = #{tSocialFundInfo.payPolicy}
			</if>
			<if test="tSocialFundInfo.overpayNumber != null">
				AND a.OVERPAY_NUMBER = #{tSocialFundInfo.overpayNumber}
			</if>
			<if test="tSocialFundInfo.haveThisMonth != null and tSocialFundInfo.haveThisMonth.trim() != ''">
				AND a.HAVE_THIS_MONTH = #{tSocialFundInfo.haveThisMonth}
			</if>
			<if test="tSocialFundInfo.insurancePension != null and tSocialFundInfo.insurancePension.trim() != ''">
				AND a.INSURANCE_PENSION = #{tSocialFundInfo.insurancePension}
			</if>
			<if test="tSocialFundInfo.insuranceMedical != null and tSocialFundInfo.insuranceMedical.trim() != ''">
				AND a.INSURANCE_MEDICAL = #{tSocialFundInfo.insuranceMedical}
			</if>
			<if test="tSocialFundInfo.insuranceUnemployment != null and tSocialFundInfo.insuranceUnemployment.trim() != ''">
				AND a.INSURANCE_UNEMPLOYMENT = #{tSocialFundInfo.insuranceUnemployment}
			</if>
			<if test="tSocialFundInfo.insuranceInjury != null and tSocialFundInfo.insuranceInjury.trim() != ''">
				AND a.INSURANCE_INJURY = #{tSocialFundInfo.insuranceInjury}
			</if>
			<if test="tSocialFundInfo.insuranceBirth != null and tSocialFundInfo.insuranceBirth.trim() != ''">
				AND a.INSURANCE_BIRTH = #{tSocialFundInfo.insuranceBirth}
			</if>
			<if test="tSocialFundInfo.insuranceBigailment != null and tSocialFundInfo.insuranceBigailment.trim() != ''">
				AND a.INSURANCE_BIGAILMENT = #{tSocialFundInfo.insuranceBigailment}
			</if>
			<if test="tSocialFundInfo.latestCardinality != null and tSocialFundInfo.latestCardinality.trim() != ''">
				AND a.LATEST_CARDINALITY = #{tSocialFundInfo.latestCardinality}
			</if>
			<if test="tSocialFundInfo.isIllness != null and tSocialFundInfo.isIllness.trim() != ''">
				AND a.IS_ILLNESS = #{tSocialFundInfo.isIllness}
			</if>
			<if test="tSocialFundInfo.collectType != null and tSocialFundInfo.collectType.trim() != ''">
				AND a.COLLECT_TYPE = #{tSocialFundInfo.collectType}
			</if>
			<if test="tSocialFundInfo.valueType != null and tSocialFundInfo.valueType.trim() != ''">
				AND a.VALUE_TYPE = #{tSocialFundInfo.valueType}
			</if>
			<if test="tSocialFundInfo.collectMoth != null">
				AND a.COLLECT_MOTH = #{tSocialFundInfo.collectMoth}
			</if>
			<if test="tSocialFundInfo.isChargePersonal != null and tSocialFundInfo.isChargePersonal.trim() != ''">
				AND a.IS_CHARGE_PERSONAL = #{tSocialFundInfo.isChargePersonal}
			</if>
			<if test="tSocialFundInfo.recordBase != null and tSocialFundInfo.recordBase.trim() != ''">
				AND a.RECORD_BASE = #{tSocialFundInfo.recordBase}
			</if>
			<if test="tSocialFundInfo.trustRemark != null and tSocialFundInfo.trustRemark.trim() != ''">
				AND a.TRUST_REMARK = #{tSocialFundInfo.trustRemark}
			</if>
			<if test="tSocialFundInfo.paymentType != null and tSocialFundInfo.paymentType.trim() != ''">
				AND a.PAYMENT_TYPE = #{tSocialFundInfo.paymentType}
			</if>
			<if test="tSocialFundInfo.upperLimit != null">
				AND a.UPPER_LIMIT = #{tSocialFundInfo.upperLimit}
			</if>
			<if test="tSocialFundInfo.lowerLimit != null">
				AND a.LOWER_LIMIT = #{tSocialFundInfo.lowerLimit}
			</if>
			<if test="tSocialFundInfo.pensionStart != null">
				AND a.PENSION_START = #{tSocialFundInfo.pensionStart}
			</if>
			<if test="tSocialFundInfo.medicalStart != null">
				AND a.MEDICAL_START = #{tSocialFundInfo.medicalStart}
			</if>
			<if test="tSocialFundInfo.unemployStart != null">
				AND a.UNEMPLOY_START = #{tSocialFundInfo.unemployStart}
			</if>
			<if test="tSocialFundInfo.workInjuryStart != null">
				AND a.WORK_INJURY_START = #{tSocialFundInfo.workInjuryStart}
			</if>
			<if test="tSocialFundInfo.birthStart != null">
				AND a.BIRTH_START = #{tSocialFundInfo.birthStart}
			</if>
			<if test="tSocialFundInfo.bigailmentStart != null">
				AND a.BIGAILMENT_START = #{tSocialFundInfo.bigailmentStart}
			</if>
			<if test="tSocialFundInfo.pensionHandle != null and tSocialFundInfo.pensionHandle.trim() != ''">
				AND a.PENSION_HANDLE = #{tSocialFundInfo.pensionHandle}
			</if>
			<if test="tSocialFundInfo.medicalHandle != null and tSocialFundInfo.medicalHandle.trim() != ''">
				AND a.MEDICAL_HANDLE = #{tSocialFundInfo.medicalHandle}
			</if>
			<if test="tSocialFundInfo.unemployHandle != null and tSocialFundInfo.unemployHandle.trim() != ''">
				AND a.UNEMPLOY_HANDLE = #{tSocialFundInfo.unemployHandle}
			</if>
			<if test="tSocialFundInfo.workInjuryHandle != null and tSocialFundInfo.workInjuryHandle.trim() != ''">
				AND a.WORK_INJURY_HANDLE = #{tSocialFundInfo.workInjuryHandle}
			</if>
			<if test="tSocialFundInfo.birthHandle != null and tSocialFundInfo.birthHandle.trim() != ''">
				AND a.BIRTH_HANDLE = #{tSocialFundInfo.birthHandle}
			</if>
			<if test="tSocialFundInfo.bigailmentHandle != null and tSocialFundInfo.bigailmentHandle.trim() != ''">
				AND a.BIGAILMENT_HANDLE = #{tSocialFundInfo.bigailmentHandle}
			</if>
			<if test="tSocialFundInfo.unitPersionMoney != null">
				AND a.UNIT_PERSION_MONEY = #{tSocialFundInfo.unitPersionMoney}
			</if>
			<if test="tSocialFundInfo.unitMedicalMoney != null">
				AND a.UNIT_MEDICAL_MONEY = #{tSocialFundInfo.unitMedicalMoney}
			</if>
			<if test="tSocialFundInfo.unitUnemploymentMoney != null">
				AND a.UNIT_UNEMPLOYMENT_MONEY = #{tSocialFundInfo.unitUnemploymentMoney}
			</if>
			<if test="tSocialFundInfo.unitInjuryMoney != null">
				AND a.UNIT_INJURY_MONEY = #{tSocialFundInfo.unitInjuryMoney}
			</if>
			<if test="tSocialFundInfo.unitBirthMoney != null">
				AND a.UNIT_BIRTH_MONEY = #{tSocialFundInfo.unitBirthMoney}
			</if>
			<if test="tSocialFundInfo.unitBigailmentMoney != null">
				AND a.UNIT_BIGAILMENT_MONEY = #{tSocialFundInfo.unitBigailmentMoney}
			</if>
			<if test="tSocialFundInfo.personalPersionMoney != null">
				AND a.PERSONAL_PERSION_MONEY = #{tSocialFundInfo.personalPersionMoney}
			</if>
			<if test="tSocialFundInfo.personalMedicalMoney != null">
				AND a.PERSONAL_MEDICAL_MONEY = #{tSocialFundInfo.personalMedicalMoney}
			</if>
			<if test="tSocialFundInfo.personalUnemploymentMoney != null">
				AND a.PERSONAL_UNEMPLOYMENT_MONEY = #{tSocialFundInfo.personalUnemploymentMoney}
			</if>
			<if test="tSocialFundInfo.personalBigailmentMoney != null">
				AND a.PERSONAL_BIGAILMENT_MONEY = #{tSocialFundInfo.personalBigailmentMoney}
			</if>
			<if test="tSocialFundInfo.unitProvidengCardinal != null">
				AND a.UNIT_PROVIDENG_CARDINAL = #{tSocialFundInfo.unitProvidengCardinal}
			</if>
			<if test="tSocialFundInfo.personalProvidentCardinal != null">
				AND a.PERSONAL_PROVIDENT_CARDINAL = #{tSocialFundInfo.personalProvidentCardinal}
			</if>
			<if test="tSocialFundInfo.socialStartDate != null">
				AND a.SOCIAL_START_DATE = #{tSocialFundInfo.socialStartDate}
			</if>
			<if test="tSocialFundInfo.unitProvidentPer != null">
				AND a.UNIT_PROVIDENT_PER = #{tSocialFundInfo.unitProvidentPer}
			</if>
			<if test="tSocialFundInfo.personalProvidentPer != null">
				AND a.PERSONAL_PROVIDENT_PER = #{tSocialFundInfo.personalProvidentPer}
			</if>
			<if test="tSocialFundInfo.providentStart != null">
				AND a.PROVIDENT_START = #{tSocialFundInfo.providentStart}
			</if>
			<if test="tSocialFundInfo.firstBuyMothFund != null">
				AND a.FIRST_BUY_MOTH_FUND = #{tSocialFundInfo.firstBuyMothFund}
			</if>
			<if test="tSocialFundInfo.upperLimitFund != null">
				AND a.UPPER_LIMIT_FUND = #{tSocialFundInfo.upperLimitFund}
			</if>
			<if test="tSocialFundInfo.lowerLimitFund != null">
				AND a.LOWER_LIMIT_FUND = #{tSocialFundInfo.lowerLimitFund}
			</if>
			<if test="tSocialFundInfo.fundPayPoint != null and tSocialFundInfo.fundPayPoint.trim() != ''">
				AND a.FUND_PAY_POINT = #{tSocialFundInfo.fundPayPoint}
			</if>
			<if test="tSocialFundInfo.canOverpayFund != null and tSocialFundInfo.canOverpayFund.trim() != ''">
				AND a.CAN_OVERPAY_FUND = #{tSocialFundInfo.canOverpayFund}
			</if>
			<if test="tSocialFundInfo.overpayNumberFund != null">
				AND a.OVERPAY_NUMBER_FUND = #{tSocialFundInfo.overpayNumberFund}
			</if>
			<if test="tSocialFundInfo.payPolicyFund != null and tSocialFundInfo.payPolicyFund.trim() != ''">
				AND a.PAY_POLICY_FUND = #{tSocialFundInfo.payPolicyFund}
			</if>
			<if test="tSocialFundInfo.trustRemarkFund != null and tSocialFundInfo.trustRemarkFund.trim() != ''">
				AND a.TRUST_REMARK_FUND = #{tSocialFundInfo.trustRemarkFund}
			</if>
			<if test="tSocialFundInfo.haveThisMonthFund != null and tSocialFundInfo.haveThisMonthFund.trim() != ''">
				AND a.HAVE_THIS_MONTH_FUND = #{tSocialFundInfo.haveThisMonthFund}
			</if>
			<if test="tSocialFundInfo.latestCardinalityFund != null and tSocialFundInfo.latestCardinalityFund.trim() != ''">
				AND a.LATEST_CARDINALITY_FUND = #{tSocialFundInfo.latestCardinalityFund}
			</if>
hongguangwu's avatar
hongguangwu committed
868 869 870 871 872 873
			<if test="tSocialFundInfo.socialStatus != null and tSocialFundInfo.socialStatus.trim() != ''">
				AND a.SOCIAL_STATUS = #{tSocialFundInfo.socialStatus}
			</if>
			<if test="tSocialFundInfo.fundStatus != null and tSocialFundInfo.fundStatus.trim() != ''">
				AND a.FUND_STATUS = #{tSocialFundInfo.fundStatus}
			</if>
874 875 876 877 878 879 880 881 882 883 884
		</if>
	</sql>
	<!--tSocialFundInfo简单分页查询-->
	<select id="getTSocialFundInfoPage" resultMap="tSocialFundInfoMap">
		SELECT
		<include refid="Base_Column_List"/>
		FROM t_social_fund_info a
		<where>
			1=1
			<include refid="tSocialFundInfo_where"/>
		</where>
885
		order by a.CREATE_TIME desc
886
	</select>
hongguangwu's avatar
hongguangwu committed
887

888
	<!--获取在用社保 #a.SOCIAL_ADD_STATUS != '4' and a.SOCIAL_REDUCE_STATUS != '2' -->
889 890
	<select id="getSocialList" resultMap="tSocialFundInfoMap">
		SELECT
891
		<include refid="Other_Base_Column_List"/>
892 893
		FROM t_social_fund_info a
		<where>
hongguangwu's avatar
hongguangwu committed
894
			a.SOCIAL_ID is not null
hongguangwu's avatar
hongguangwu committed
895 896 897 898 899 900 901 902 903
			<if test="empIdCard != null">
				and a.EMP_IDCARD = #{empIdCard}
			</if>
			<if test="settleDomainIds != null">
				AND a.SETTLE_DOMAIN in
				<foreach item="item" index="index" collection="settleDomainIds" open="(" separator="," close=")">
					#{item}
				</foreach>
			</if>
904 905
		</where>
	</select>
906
	<!--获取在用公积金 a.FUND_ADD_STATUS != '4' and a.FUND_REDUCE_STATUS != '2' -->
907 908
	<select id="getFundList" resultMap="tSocialFundInfoMap">
		SELECT
909
		<include refid="Other_Base_Column_List"/>
910 911
		FROM t_social_fund_info a
		<where>
hongguangwu's avatar
hongguangwu committed
912
			a.FUND_ID is not null
hongguangwu's avatar
hongguangwu committed
913 914 915 916 917 918 919 920 921
			<if test="empIdCard != null">
				and a.EMP_IDCARD = #{empIdCard}
			</if>
			<if test="settleDomainIds != null">
				AND a.SETTLE_DOMAIN in
				<foreach item="item" index="index" collection="settleDomainIds" open="(" separator="," close=")">
					#{item}
				</foreach>
			</if>
922 923 924 925 926 927 928 929 930 931 932
		</where>
	</select>

	<!--导出-->
	<select id="exportList" resultMap="exportMap">
		select
			a.ID,
			a.EMP_NAME,
			a.EMP_IDCARD,
			a.EMP_TYPE,
			d.EMP_MOBILE,
hongguangwu's avatar
hongguangwu committed
933 934 935
		if(a.SETTLE_DOMAIN_CODE = a.SETTLE_DOMAIN_CODE_FUND,a.SETTLE_DOMAIN_CODE,concat(ifnull(a.SETTLE_DOMAIN_CODE,""),if(a.SETTLE_DOMAIN_CODE is null or a.SETTLE_DOMAIN_CODE_FUND is null,"",","),ifnull(a.SETTLE_DOMAIN_CODE_FUND,""))) SETTLE_DOMAIN_CODE,
		if(a.SETTLE_DOMAIN_NAME = a.SETTLE_DOMAIN_NAME_FUND,a.SETTLE_DOMAIN_NAME,concat(ifnull(a.SETTLE_DOMAIN_NAME,""),if(a.SETTLE_DOMAIN_NAME is null or a.SETTLE_DOMAIN_NAME_FUND is null,"",","),ifnull(a.SETTLE_DOMAIN_NAME_FUND,""))) SETTLE_DOMAIN_NAME,
		if(a.UNIT_NAME = a.UNIT_NAME_FUND,a.UNIT_NAME,concat(ifnull(a.UNIT_NAME,""),if(a.UNIT_NAME is null or a.UNIT_NAME_FUND is null,"",","),ifnull(a.UNIT_NAME_FUND,""))) UNIT_NAME,
936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023
			d.ID_CARD_PROVINCE,
			d.ID_CARD_CITY,
			d.ID_CARD_TOWN,
			d.ID_CARD_ADDRESS,
			d.FILE_PROVINCE,
			d.FILE_CITY,
			d.FILE_TOWN,
			d.POST,
			d.TRY_PERIOD,
			d.WORKING_HOURS,
			d.CONTRACT_NAME,
			d.CONTRACT_SUB_NAME,
			a.SOCIAL_HOUSEHOLD_NAME CONTRACT_PARTY,
			d.CONTRACT_TYPE,
			d.CONTRACT_START,
			d.CONTRACT_END,
			d.CONTRACT_TERM,
			d.EDUCATION_NAME,
			a.RECORD_BASE,
			a.SOCIAL_STATUS,
			a.FUND_STATUS,
			a.SOCIAL_START_DATE,
			a.PROVIDENT_START,
			a.SOCIAL_REDUCE_DATE,
			a.FUND_REDUCE_DATE,
			a.UNIT_SOCIAL_SUM,
			a.PERSONAL_SOCIAL_SUM,
			a.UNIT_FUND_SUM,
			a.PERSONAL_FUND_SUM,
			ifnull(a.UNIT_SOCIAL_SUM,0) + ifnull(a.PERSONAL_SOCIAL_SUM,0) + ifnull(a.UNIT_FUND_SUM,0) + ifnull(a.PERSONAL_FUND_SUM,0) ALL_SUM,
			a.SOCIAL_HOUSEHOLD_NAME,
			a.SOCIAL_PROVINCE,
			a.SOCIAL_CITY,
			a.SOCIAL_TOWN,
			a.PENSION_START,
			a.MEDICAL_START,
			a.UNEMPLOY_START,
			a.WORK_INJURY_START,
			a.BIRTH_START,
			a.BIGAILMENT_START,
			a.PAYMENT_TYPE,

			a.UNIT_PENSION_CARDINAL,
			a.UNIT_PENSION_PER,
			a.PERSONAL_PENSION_PER,
			a.UNIT_PERSION_MONEY,
			a.PERSONAL_PERSION_MONEY,
			ifnull(a.UNIT_PERSION_MONEY,0) + ifnull(a.PERSONAL_PERSION_MONEY,0) PERSION_MONEY,

			a.UNIT_MEDICAL_CARDINAL,
			a.UNIT_MEDICAL_PER,
			a.PERSONAL_MEDICAL_PER,
			a.UNIT_MEDICAL_MONEY,
			a.PERSONAL_MEDICAL_MONEY,
			ifnull(a.UNIT_MEDICAL_MONEY,0) + ifnull(a.PERSONAL_MEDICAL_MONEY,0) MEDICAL_MONEY,

			a.UNIT_UNEMPLOYMENT_CARDINAL,
			a.UNIT_UNEMPLOYMENT_PER,
			a.PERSONAL_UNEMPLOYMENT_PER,
			a.UNIT_UNEMPLOYMENT_MONEY,
			a.PERSONAL_UNEMPLOYMENT_MONEY,
			ifnull(a.UNIT_UNEMPLOYMENT_MONEY,0) + ifnull(a.PERSONAL_UNEMPLOYMENT_MONEY,0) UNEMPLOYMENT_MONEY,

			a.UNIT_WORK_INJURY_CARDINAL,
			a.UNIT_WORK_UNJURY_PER,
			a.UNIT_INJURY_MONEY,

			a.UNIT_BIRTH_CARDINAL,
			a.UNIT_BIRTH_PER,
			a.UNIT_BIRTH_MONEY,

			a.UNIT_BIGAILMENT_CARDINAL,
			a.UNIT_BIGAILMENT_PER,
			a.PERSONAL_BIGAILMENT_PER,
			a.UNIT_BIGAILMENT_MONEY,
			a.PERSONAL_BIGAILMENT_MONEY,
			ifnull(a.UNIT_BIGAILMENT_MONEY,0) + ifnull(a.PERSONAL_BIGAILMENT_MONEY,0) BIGAILMENT_MONEY,

			a.PROVIDENT_HOUSEHOLD_NAME,
			d.FUND_PROVINCE,
			d.FUND_CITY,
			d.FUND_TOWN,
			a.UNIT_PROVIDENG_CARDINAL,
			a.UNIT_PROVIDENT_PER,
			a.PERSONAL_PROVIDENT_PER,
			a.UNIT_FUND_SUM UNIT_FUND_SUM2,
			a.PERSONAL_FUND_SUM PERSONAL_FUND_SUM2,
			ifnull(a.UNIT_FUND_SUM,0) + ifnull(a.PERSONAL_FUND_SUM,0) FUND_SUM,
hongguangwu's avatar
hongguangwu committed
1024 1025 1026 1027 1028 1029 1030
			a.TRUST_REMARK,
			a.PENSION_HANDLE,
			a.MEDICAL_HANDLE,
			a.UNEMPLOY_HANDLE,
			a.WORK_INJURY_HANDLE,
			a.BIRTH_HANDLE,
			a.BIGAILMENT_HANDLE
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041
		from t_social_fund_info a
		left join t_dispatch_info d on a.DISPATCH_ID=d.ID
		<where>
			1=1
			<include refid="tSocialFundInfo_where"/>
		</where>
		order by a.CREATE_TIME desc
		<if test="tSocialFundInfo.limitStart != null">
			limit #{tSocialFundInfo.limitStart},#{tSocialFundInfo.limitEnd}
		</if>
	</select>
fangxinjiang's avatar
fangxinjiang committed
1042
</mapper>