TForecastLibraryMapper.xml 41 KB
Newer Older
hongguangwu's avatar
hongguangwu committed
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
<?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">

<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TForecastLibraryMapper">

	<resultMap id="tForecastLibraryMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary">
		<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="socialId" column="SOCIAL_ID"/>
		<result property="settleDomainId" column="SETTLE_DOMAIN_ID"/>
		<result property="unitId" column="UNIT_ID"/>
		<result property="providentId" column="PROVIDENT_ID"/>
		<result property="unitPensionFee" column="UNIT_PENSION_FEE"/>
		<result property="unitMedicalFee" column="UNIT_MEDICAL_FEE"/>
		<result property="unitUnemploymentFee" column="UNIT_UNEMPLOYMENT_FEE"/>
		<result property="unitWorkInjuryFee" column="UNIT_WORK_INJURY_FEE"/>
		<result property="unitBirthFee" column="UNIT_BIRTH_FEE"/>
		<result property="unitBitailmentFee" column="UNIT_BITAILMENT_FEE"/>
		<result property="personalPensionFee" column="PERSONAL_PENSION_FEE"/>
		<result property="personalMedicalFee" column="PERSONAL_MEDICAL_FEE"/>
		<result property="personalUnemploymentFee" column="PERSONAL_UNEMPLOYMENT_FEE"/>
		<result property="personalBigailmentFee" column="PERSONAL_BIGAILMENT_FEE"/>
		<result property="socialPayMonth" column="SOCIAL_PAY_MONTH"/>
		<result property="socialCreateMonth" column="SOCIAL_CREATE_MONTH"/>
		<result property="providentPayMonth" column="PROVIDENT_PAY_MONTH"/>
		<result property="providentCreateMonth" column="PROVIDENT_CREATE_MONTH"/>
		<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
		<result property="unitFundSum" column="UNIT_FUND_SUM"/>
		<result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/>
		<result property="personalFundSum" column="PERSONAL_FUND_SUM"/>
54
		<result property="sumAll" column="SUM_ALL"/>
hongguangwu's avatar
hongguangwu committed
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
		<result property="fundProvince" column="FUND_PROVINCE"/>
		<result property="fundCity" column="FUND_CITY"/>
		<result property="fundTown" column="FUND_TOWN"/>
		<result property="socialProvince" column="SOCIAL_PROVINCE"/>
		<result property="socialCity" column="SOCIAL_CITY"/>
		<result property="socialTown" column="SOCIAL_TOWN"/>
		<result property="unitPensionBase" column="UNIT_PENSION_BASE"/>
		<result property="unitMedicalBase" column="UNIT_MEDICAL_BASE"/>
		<result property="unitUnemploymentBase" column="UNIT_UNEMPLOYMENT_BASE"/>
		<result property="unitInjuryBase" column="UNIT_INJURY_BASE"/>
		<result property="unitBirthBase" column="UNIT_BIRTH_BASE"/>
		<result property="unitBigailmentBase" column="UNIT_BIGAILMENT_BASE"/>
		<result property="personalPensionBase" column="PERSONAL_PENSION_BASE"/>
		<result property="personalMedicalBase" column="PERSONAL_MEDICAL_BASE"/>
		<result property="personalUnemploymentBase" column="PERSONAL_UNEMPLOYMENT_BASE"/>
		<result property="personalBigailmentBase" column="PERSONAL_BIGAILMENT_BASE"/>
		<result property="unitPersionPro" column="UNIT_PERSION_PRO"/>
		<result property="unitMedicalPro" column="UNIT_MEDICAL_PRO"/>
		<result property="unitUnemploymentPro" column="UNIT_UNEMPLOYMENT_PRO"/>
		<result property="unitInjuryPro" column="UNIT_INJURY_PRO"/>
		<result property="unitBirthPro" column="UNIT_BIRTH_PRO"/>
		<result property="unitBigailmentPro" column="UNIT_BIGAILMENT_PRO"/>
		<result property="personalPersionPro" column="PERSONAL_PERSION_PRO"/>
		<result property="personalMedicalPro" column="PERSONAL_MEDICAL_PRO"/>
		<result property="personalUnemploymentPro" column="PERSONAL_UNEMPLOYMENT_PRO"/>
		<result property="personalBigailmentPro" column="PERSONAL_BIGAILMENT_PRO"/>
		<result property="unitFundBase" column="UNIT_FUND_BASE"/>
		<result property="personalFundBase" column="PERSONAL_FUND_BASE"/>
		<result property="unitFundProp" column="UNIT_FUND_PROP"/>
		<result property="personalFundProp" column="PERSONAL_FUND_PROP"/>
		<result property="remark" column="REMARK"/>
		<result property="projectId" column="PROJECT_ID"/>
		<result property="unitName" column="UNIT_NAME"/>
		<result property="deptName" column="DEPT_NAME"/>
89
		<result property="deptNo" column="DEPT_NO"/>
hongguangwu's avatar
hongguangwu committed
90 91 92 93 94 95 96 97
		<result property="empNatrue" column="EMP_NATRUE"/>
		<result property="unitInterestFee" column="UNIT_INTEREST_FEE"/>
		<result property="personalInterestFee" column="PERSONAL_INTEREST_FEE"/>
		<result property="socialHousehold" column="SOCIAL_HOUSEHOLD"/>
		<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
		<result property="providentHousehold" column="PROVIDENT_HOUSEHOLD"/>
		<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
		<result property="dataPush" column="DATA_PUSH"/>
hongguangwu's avatar
hongguangwu committed
98
		<result property="dataType" column="DATA_TYPE"/>
99
		<result property="diffType" column="DIFF_TYPE"/>
hongguangwu's avatar
hongguangwu committed
100 101 102 103 104
		<result property="createBy" column="CREATE_BY"/>
		<result property="createName" column="CREATE_NAME"/>
		<result property="createTime" column="CREATE_TIME"/>
		<result property="updateBy" column="UPDATE_BY"/>
		<result property="updateTime" column="UPDATE_TIME"/>
105 106
		<result property="salarySocialFlag" column="SALARY_SOCIAL_FLAG"/>
		<result property="salaryFundFlag" column="SALARY_FUND_FLAG"/>
huyuchen's avatar
huyuchen committed
107 108 109 110
		<result property="incomeSettleFlag" column="INCOME_SETTLE_FLAG"/>
		<result property="incomeCollectFlag" column="INCOME_COLLECT_FLAG"/>
		<result property="paySettleFlag" column="PAY_COLLECT_FLAG"/>
		<result property="payCollectFlag" column="PAY_SETTLE_FLAG"/>
hongguangwu's avatar
hongguangwu committed
111
	</resultMap>
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
	<!-- 导出 -->
	<resultMap id="exportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo">
		<id property="id" column="ID"/>
		<result property="empNo" column="EMP_NO"/>
		<result property="empName" column="EMP_NAME"/>
		<result property="empIdcard" column="EMP_IDCARD"/>
		<result property="unitName" column="UNIT_NAME"/>
		<result property="deptName" column="DEPT_NAME"/>
		<result property="deptNo" column="DEPT_NO"/>
		<result property="unitPensionFee" column="UNIT_PENSION_FEE"/>
		<result property="unitMedicalFee" column="UNIT_MEDICAL_FEE"/>
		<result property="unitUnemploymentFee" column="UNIT_UNEMPLOYMENT_FEE"/>
		<result property="unitWorkInjuryFee" column="UNIT_WORK_INJURY_FEE"/>
		<result property="unitBirthFee" column="UNIT_BIRTH_FEE"/>
		<result property="personalPensionFee" column="PERSONAL_PENSION_FEE"/>
		<result property="personalMedicalFee" column="PERSONAL_MEDICAL_FEE"/>
		<result property="personalUnemploymentFee" column="PERSONAL_UNEMPLOYMENT_FEE"/>
		<result property="personalBigailmentFee" column="PERSONAL_BIGAILMENT_FEE"/>
		<result property="unitBitailmentFee" column="UNIT_BITAILMENT_FEE"/>
		<result property="socialPayMonth" column="SOCIAL_PAY_MONTH"/>
		<result property="socialCreateMonth" column="SOCIAL_CREATE_MONTH"/>
		<result property="providentPayMonth" column="PROVIDENT_PAY_MONTH"/>
		<result property="providentCreateMonth" column="PROVIDENT_CREATE_MONTH"/>
		<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
		<result property="unitFundSum" column="UNIT_FUND_SUM"/>
		<result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/>
		<result property="personalFundSum" column="PERSONAL_FUND_SUM"/>
		<result property="sumAll" column="SUM_ALL"/>
		<result property="fundProvince" column="FUND_PROVINCE"/>
		<result property="fundCity" column="FUND_CITY"/>
		<result property="fundTown" column="FUND_TOWN"/>
		<result property="socialProvince" column="SOCIAL_PROVINCE"/>
		<result property="socialCity" column="SOCIAL_CITY"/>
		<result property="socialTown" column="SOCIAL_TOWN"/>
		<result property="unitPensionBase" column="UNIT_PENSION_BASE"/>
		<result property="unitMedicalBase" column="UNIT_MEDICAL_BASE"/>
		<result property="unitUnemploymentBase" column="UNIT_UNEMPLOYMENT_BASE"/>
		<result property="unitInjuryBase" column="UNIT_INJURY_BASE"/>
		<result property="unitBirthBase" column="UNIT_BIRTH_BASE"/>
		<result property="personalPensionBase" column="PERSONAL_PENSION_BASE"/>
		<result property="personalMedicalBase" column="PERSONAL_MEDICAL_BASE"/>
		<result property="personalUnemploymentBase" column="PERSONAL_UNEMPLOYMENT_BASE"/>
		<result property="personalBigailmentBase" column="PERSONAL_BIGAILMENT_BASE"/>
		<result property="unitBigailmentBase" column="UNIT_BIGAILMENT_BASE"/>
		<result property="unitPersionPro" column="UNIT_PERSION_PRO"/>
		<result property="unitMedicalPro" column="UNIT_MEDICAL_PRO"/>
		<result property="unitUnemploymentPro" column="UNIT_UNEMPLOYMENT_PRO"/>
		<result property="unitInjuryPro" column="UNIT_INJURY_PRO"/>
		<result property="unitBirthPro" column="UNIT_BIRTH_PRO"/>
		<result property="personalPersionPro" column="PERSONAL_PERSION_PRO"/>
		<result property="personalMedicalPro" column="PERSONAL_MEDICAL_PRO"/>
		<result property="personalUnemploymentPro" column="PERSONAL_UNEMPLOYMENT_PRO"/>
		<result property="personalBigailmentPro" column="PERSONAL_BIGAILMENT_PRO"/>
		<result property="unitBigailmentPro" column="UNIT_BIGAILMENT_PRO"/>
		<result property="unitFundBase" column="UNIT_FUND_BASE"/>
		<result property="personalFundBase" column="PERSONAL_FUND_BASE"/>
		<result property="unitFundProp" column="UNIT_FUND_PROP"/>
		<result property="personalFundProp" column="PERSONAL_FUND_PROP"/>
		<result property="dataPush" column="DATA_PUSH"/>
		<result property="createTime" column="CREATE_TIME"/>
		<result property="diffType" column="DIFF_TYPE"/>
		<result property="dataType" column="DATA_TYPE"/>
	</resultMap>
hongguangwu's avatar
hongguangwu committed
175
	<sql id="Base_Column_List">
hongguangwu's avatar
hongguangwu committed
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
		a.ID,
		a.EMP_ID,
		a.EMP_NO,
		a.EMP_NAME,
		a.EMP_IDCARD,
		a.SOCIAL_ID,
		a.SETTLE_DOMAIN_ID,
		a.UNIT_ID,
		a.PROVIDENT_ID,
		a.UNIT_PENSION_FEE,
		a.UNIT_MEDICAL_FEE,
		a.UNIT_UNEMPLOYMENT_FEE,
		a.UNIT_WORK_INJURY_FEE,
		a.UNIT_BIRTH_FEE,
		a.UNIT_BITAILMENT_FEE,
		a.PERSONAL_PENSION_FEE,
		a.PERSONAL_MEDICAL_FEE,
		a.PERSONAL_UNEMPLOYMENT_FEE,
		a.PERSONAL_BIGAILMENT_FEE,
		a.SOCIAL_PAY_MONTH,
		a.SOCIAL_CREATE_MONTH,
		a.PROVIDENT_PAY_MONTH,
		a.PROVIDENT_CREATE_MONTH,
		a.UNIT_SOCIAL_SUM,
		a.UNIT_FUND_SUM,
		a.PERSONAL_SOCIAL_SUM,
		a.PERSONAL_FUND_SUM,
203
		a.SUM_ALL,
hongguangwu's avatar
hongguangwu committed
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
		a.FUND_PROVINCE,
		a.FUND_CITY,
		a.FUND_TOWN,
		a.SOCIAL_PROVINCE,
		a.SOCIAL_CITY,
		a.SOCIAL_TOWN,
		a.UNIT_PENSION_BASE,
		a.UNIT_MEDICAL_BASE,
		a.UNIT_UNEMPLOYMENT_BASE,
		a.UNIT_INJURY_BASE,
		a.UNIT_BIRTH_BASE,
		a.UNIT_BIGAILMENT_BASE,
		a.PERSONAL_PENSION_BASE,
		a.PERSONAL_MEDICAL_BASE,
		a.PERSONAL_UNEMPLOYMENT_BASE,
		a.PERSONAL_BIGAILMENT_BASE,
		a.UNIT_PERSION_PRO,
		a.UNIT_MEDICAL_PRO,
		a.UNIT_UNEMPLOYMENT_PRO,
		a.UNIT_INJURY_PRO,
		a.UNIT_BIRTH_PRO,
		a.UNIT_BIGAILMENT_PRO,
		a.PERSONAL_PERSION_PRO,
		a.PERSONAL_MEDICAL_PRO,
		a.PERSONAL_UNEMPLOYMENT_PRO,
		a.PERSONAL_BIGAILMENT_PRO,
		a.UNIT_FUND_BASE,
		a.PERSONAL_FUND_BASE,
		a.UNIT_FUND_PROP,
		a.PERSONAL_FUND_PROP,
		a.REMARK,
		a.PROJECT_ID,
		a.UNIT_NAME,
		a.DEPT_NAME,
238
		a.DEPT_NO,
hongguangwu's avatar
hongguangwu committed
239 240 241 242 243 244 245 246 247
		a.EMP_NATRUE,
		a.UNIT_INTEREST_FEE,
		a.PERSONAL_INTEREST_FEE,
		a.SOCIAL_HOUSEHOLD,
		a.SOCIAL_HOUSEHOLD_NAME,
		a.PROVIDENT_HOUSEHOLD,
		a.PROVIDENT_HOUSEHOLD_NAME,
		a.DATA_PUSH,
		a.DATA_TYPE,
248
		a.DIFF_TYPE,
hongguangwu's avatar
hongguangwu committed
249 250 251 252
		a.CREATE_BY,
		a.CREATE_NAME,
		a.CREATE_TIME,
		a.UPDATE_BY,
253 254
		a.SALARY_SOCIAL_FLAG,
		a.SALARY_FUND_FLAG,
hongguangwu's avatar
hongguangwu committed
255
		a.UPDATE_TIME
hongguangwu's avatar
hongguangwu committed
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
	</sql>
	<sql id="tForecastLibrary_where">
		<if test="tForecastLibrary != null">
			<if test="tForecastLibrary.idList != null">
				AND a.ID in
				<foreach item="idStr" index="index" collection="tForecastLibrary.idList" open="(" separator="," close=")">
					#{idStr}
				</foreach>
			</if>
			<if test="tForecastLibrary.id != null and tForecastLibrary.id.trim() != ''">
				AND a.ID = #{tForecastLibrary.id}
			</if>
			<if test="tForecastLibrary.empId != null and tForecastLibrary.empId.trim() != ''">
				AND a.EMP_ID = #{tForecastLibrary.empId}
			</if>
			<if test="tForecastLibrary.empNo != null and tForecastLibrary.empNo.trim() != ''">
				AND a.EMP_NO = #{tForecastLibrary.empNo}
			</if>
			<if test="tForecastLibrary.empName != null and tForecastLibrary.empName.trim() != ''">
				AND a.EMP_NAME = #{tForecastLibrary.empName}
			</if>
			<if test="tForecastLibrary.empIdcard != null and tForecastLibrary.empIdcard.trim() != ''">
				AND a.EMP_IDCARD = #{tForecastLibrary.empIdcard}
			</if>
			<if test="tForecastLibrary.socialId != null and tForecastLibrary.socialId.trim() != ''">
				AND a.SOCIAL_ID = #{tForecastLibrary.socialId}
			</if>
			<if test="tForecastLibrary.settleDomainId != null and tForecastLibrary.settleDomainId.trim() != ''">
				AND a.SETTLE_DOMAIN_ID = #{tForecastLibrary.settleDomainId}
			</if>
			<if test="tForecastLibrary.unitId != null and tForecastLibrary.unitId.trim() != ''">
				AND a.UNIT_ID = #{tForecastLibrary.unitId}
			</if>
			<if test="tForecastLibrary.providentId != null and tForecastLibrary.providentId.trim() != ''">
				AND a.PROVIDENT_ID = #{tForecastLibrary.providentId}
			</if>
			<if test="tForecastLibrary.unitPensionFee != null">
				AND a.UNIT_PENSION_FEE = #{tForecastLibrary.unitPensionFee}
			</if>
			<if test="tForecastLibrary.unitMedicalFee != null">
				AND a.UNIT_MEDICAL_FEE = #{tForecastLibrary.unitMedicalFee}
			</if>
			<if test="tForecastLibrary.unitUnemploymentFee != null">
				AND a.UNIT_UNEMPLOYMENT_FEE = #{tForecastLibrary.unitUnemploymentFee}
			</if>
			<if test="tForecastLibrary.unitWorkInjuryFee != null">
				AND a.UNIT_WORK_INJURY_FEE = #{tForecastLibrary.unitWorkInjuryFee}
			</if>
			<if test="tForecastLibrary.unitBirthFee != null">
				AND a.UNIT_BIRTH_FEE = #{tForecastLibrary.unitBirthFee}
			</if>
			<if test="tForecastLibrary.unitBitailmentFee != null">
				AND a.UNIT_BITAILMENT_FEE = #{tForecastLibrary.unitBitailmentFee}
			</if>
			<if test="tForecastLibrary.personalPensionFee != null">
				AND a.PERSONAL_PENSION_FEE = #{tForecastLibrary.personalPensionFee}
			</if>
			<if test="tForecastLibrary.personalMedicalFee != null">
				AND a.PERSONAL_MEDICAL_FEE = #{tForecastLibrary.personalMedicalFee}
			</if>
			<if test="tForecastLibrary.personalUnemploymentFee != null">
				AND a.PERSONAL_UNEMPLOYMENT_FEE = #{tForecastLibrary.personalUnemploymentFee}
			</if>
			<if test="tForecastLibrary.personalBigailmentFee != null">
				AND a.PERSONAL_BIGAILMENT_FEE = #{tForecastLibrary.personalBigailmentFee}
			</if>
			<if test="tForecastLibrary.socialPayMonth != null and tForecastLibrary.socialPayMonth.trim() != ''">
				AND a.SOCIAL_PAY_MONTH = #{tForecastLibrary.socialPayMonth}
			</if>
			<if test="tForecastLibrary.socialCreateMonth != null and tForecastLibrary.socialCreateMonth.trim() != ''">
				AND a.SOCIAL_CREATE_MONTH = #{tForecastLibrary.socialCreateMonth}
			</if>
			<if test="tForecastLibrary.providentPayMonth != null and tForecastLibrary.providentPayMonth.trim() != ''">
				AND a.PROVIDENT_PAY_MONTH = #{tForecastLibrary.providentPayMonth}
			</if>
			<if test="tForecastLibrary.providentCreateMonth != null and tForecastLibrary.providentCreateMonth.trim() != ''">
				AND a.PROVIDENT_CREATE_MONTH = #{tForecastLibrary.providentCreateMonth}
			</if>
			<if test="tForecastLibrary.unitSocialSum != null">
				AND a.UNIT_SOCIAL_SUM = #{tForecastLibrary.unitSocialSum}
			</if>
			<if test="tForecastLibrary.unitFundSum != null">
				AND a.UNIT_FUND_SUM = #{tForecastLibrary.unitFundSum}
			</if>
			<if test="tForecastLibrary.personalSocialSum != null">
				AND a.PERSONAL_SOCIAL_SUM = #{tForecastLibrary.personalSocialSum}
			</if>
			<if test="tForecastLibrary.personalFundSum != null">
				AND a.PERSONAL_FUND_SUM = #{tForecastLibrary.personalFundSum}
			</if>
			<if test="tForecastLibrary.fundProvince != null and tForecastLibrary.fundProvince.trim() != ''">
				AND a.FUND_PROVINCE = #{tForecastLibrary.fundProvince}
			</if>
			<if test="tForecastLibrary.fundCity != null and tForecastLibrary.fundCity.trim() != ''">
				AND a.FUND_CITY = #{tForecastLibrary.fundCity}
			</if>
			<if test="tForecastLibrary.fundTown != null and tForecastLibrary.fundTown.trim() != ''">
				AND a.FUND_TOWN = #{tForecastLibrary.fundTown}
			</if>
			<if test="tForecastLibrary.socialProvince != null and tForecastLibrary.socialProvince.trim() != ''">
				AND a.SOCIAL_PROVINCE = #{tForecastLibrary.socialProvince}
			</if>
			<if test="tForecastLibrary.socialCity != null and tForecastLibrary.socialCity.trim() != ''">
				AND a.SOCIAL_CITY = #{tForecastLibrary.socialCity}
			</if>
			<if test="tForecastLibrary.socialTown != null and tForecastLibrary.socialTown.trim() != ''">
				AND a.SOCIAL_TOWN = #{tForecastLibrary.socialTown}
			</if>
			<if test="tForecastLibrary.unitPensionBase != null">
				AND a.UNIT_PENSION_BASE = #{tForecastLibrary.unitPensionBase}
			</if>
			<if test="tForecastLibrary.unitMedicalBase != null">
				AND a.UNIT_MEDICAL_BASE = #{tForecastLibrary.unitMedicalBase}
			</if>
			<if test="tForecastLibrary.unitUnemploymentBase != null">
				AND a.UNIT_UNEMPLOYMENT_BASE = #{tForecastLibrary.unitUnemploymentBase}
			</if>
			<if test="tForecastLibrary.unitInjuryBase != null">
				AND a.UNIT_INJURY_BASE = #{tForecastLibrary.unitInjuryBase}
			</if>
			<if test="tForecastLibrary.unitBirthBase != null">
				AND a.UNIT_BIRTH_BASE = #{tForecastLibrary.unitBirthBase}
			</if>
			<if test="tForecastLibrary.unitBigailmentBase != null">
				AND a.UNIT_BIGAILMENT_BASE = #{tForecastLibrary.unitBigailmentBase}
			</if>
			<if test="tForecastLibrary.personalPensionBase != null">
				AND a.PERSONAL_PENSION_BASE = #{tForecastLibrary.personalPensionBase}
			</if>
			<if test="tForecastLibrary.personalMedicalBase != null">
				AND a.PERSONAL_MEDICAL_BASE = #{tForecastLibrary.personalMedicalBase}
			</if>
			<if test="tForecastLibrary.personalUnemploymentBase != null">
				AND a.PERSONAL_UNEMPLOYMENT_BASE = #{tForecastLibrary.personalUnemploymentBase}
			</if>
			<if test="tForecastLibrary.personalBigailmentBase != null">
				AND a.PERSONAL_BIGAILMENT_BASE = #{tForecastLibrary.personalBigailmentBase}
			</if>
			<if test="tForecastLibrary.unitPersionPro != null">
				AND a.UNIT_PERSION_PRO = #{tForecastLibrary.unitPersionPro}
			</if>
			<if test="tForecastLibrary.unitMedicalPro != null">
				AND a.UNIT_MEDICAL_PRO = #{tForecastLibrary.unitMedicalPro}
			</if>
			<if test="tForecastLibrary.unitUnemploymentPro != null">
				AND a.UNIT_UNEMPLOYMENT_PRO = #{tForecastLibrary.unitUnemploymentPro}
			</if>
			<if test="tForecastLibrary.unitInjuryPro != null">
				AND a.UNIT_INJURY_PRO = #{tForecastLibrary.unitInjuryPro}
			</if>
			<if test="tForecastLibrary.unitBirthPro != null">
				AND a.UNIT_BIRTH_PRO = #{tForecastLibrary.unitBirthPro}
			</if>
			<if test="tForecastLibrary.unitBigailmentPro != null">
				AND a.UNIT_BIGAILMENT_PRO = #{tForecastLibrary.unitBigailmentPro}
			</if>
			<if test="tForecastLibrary.personalPersionPro != null">
				AND a.PERSONAL_PERSION_PRO = #{tForecastLibrary.personalPersionPro}
			</if>
			<if test="tForecastLibrary.personalMedicalPro != null">
				AND a.PERSONAL_MEDICAL_PRO = #{tForecastLibrary.personalMedicalPro}
			</if>
			<if test="tForecastLibrary.personalUnemploymentPro != null">
				AND a.PERSONAL_UNEMPLOYMENT_PRO = #{tForecastLibrary.personalUnemploymentPro}
			</if>
			<if test="tForecastLibrary.personalBigailmentPro != null">
				AND a.PERSONAL_BIGAILMENT_PRO = #{tForecastLibrary.personalBigailmentPro}
			</if>
			<if test="tForecastLibrary.unitFundBase != null">
				AND a.UNIT_FUND_BASE = #{tForecastLibrary.unitFundBase}
			</if>
			<if test="tForecastLibrary.personalFundBase != null">
				AND a.PERSONAL_FUND_BASE = #{tForecastLibrary.personalFundBase}
			</if>
			<if test="tForecastLibrary.unitFundProp != null">
				AND a.UNIT_FUND_PROP = #{tForecastLibrary.unitFundProp}
			</if>
			<if test="tForecastLibrary.personalFundProp != null">
				AND a.PERSONAL_FUND_PROP = #{tForecastLibrary.personalFundProp}
			</if>
			<if test="tForecastLibrary.remark != null and tForecastLibrary.remark.trim() != ''">
				AND a.REMARK = #{tForecastLibrary.remark}
			</if>
			<if test="tForecastLibrary.projectId != null and tForecastLibrary.projectId.trim() != ''">
				AND a.PROJECT_ID = #{tForecastLibrary.projectId}
			</if>
			<if test="tForecastLibrary.unitName != null and tForecastLibrary.unitName.trim() != ''">
				AND a.UNIT_NAME = #{tForecastLibrary.unitName}
			</if>
			<if test="tForecastLibrary.deptName != null and tForecastLibrary.deptName.trim() != ''">
				AND a.DEPT_NAME = #{tForecastLibrary.deptName}
			</if>
448 449 450
			<if test="tForecastLibrary.deptNo != null and tForecastLibrary.deptNo.trim() != ''">
				AND a.DEPT_NO = #{tForecastLibrary.deptNo}
			</if>
hongguangwu's avatar
hongguangwu committed
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474
			<if test="tForecastLibrary.empNatrue != null and tForecastLibrary.empNatrue.trim() != ''">
				AND a.EMP_NATRUE = #{tForecastLibrary.empNatrue}
			</if>
			<if test="tForecastLibrary.unitInterestFee != null">
				AND a.UNIT_INTEREST_FEE = #{tForecastLibrary.unitInterestFee}
			</if>
			<if test="tForecastLibrary.personalInterestFee != null">
				AND a.PERSONAL_INTEREST_FEE = #{tForecastLibrary.personalInterestFee}
			</if>
			<if test="tForecastLibrary.socialHousehold != null and tForecastLibrary.socialHousehold.trim() != ''">
				AND a.SOCIAL_HOUSEHOLD = #{tForecastLibrary.socialHousehold}
			</if>
			<if test="tForecastLibrary.socialHouseholdName != null and tForecastLibrary.socialHouseholdName.trim() != ''">
				AND a.SOCIAL_HOUSEHOLD_NAME = #{tForecastLibrary.socialHouseholdName}
			</if>
			<if test="tForecastLibrary.providentHousehold != null and tForecastLibrary.providentHousehold.trim() != ''">
				AND a.PROVIDENT_HOUSEHOLD = #{tForecastLibrary.providentHousehold}
			</if>
			<if test="tForecastLibrary.providentHouseholdName != null and tForecastLibrary.providentHouseholdName.trim() != ''">
				AND a.PROVIDENT_HOUSEHOLD_NAME = #{tForecastLibrary.providentHouseholdName}
			</if>
			<if test="tForecastLibrary.dataPush != null">
				AND a.DATA_PUSH = #{tForecastLibrary.dataPush}
			</if>
hongguangwu's avatar
hongguangwu committed
475 476 477
			<if test="tForecastLibrary.dataType != null">
				AND a.DATA_TYPE = #{tForecastLibrary.dataType}
			</if>
478 479 480
			<if test="tForecastLibrary.diffType != null and tForecastLibrary.diffType.trim() != ''">
				AND a.DIFF_TYPE = #{tForecastLibrary.diffType}
			</if>
hongguangwu's avatar
hongguangwu committed
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501
			<if test="tForecastLibrary.createBy != null and tForecastLibrary.createBy.trim() != ''">
				AND a.CREATE_BY = #{tForecastLibrary.createBy}
			</if>
			<if test="tForecastLibrary.createName != null and tForecastLibrary.createName.trim() != ''">
				AND a.CREATE_NAME = #{tForecastLibrary.createName}
			</if>
			<if test="tForecastLibrary.createTime != null">
				AND a.CREATE_TIME = #{tForecastLibrary.createTime}
			</if>
			<if test="tForecastLibrary.updateBy != null and tForecastLibrary.updateBy.trim() != ''">
				AND a.UPDATE_BY = #{tForecastLibrary.updateBy}
			</if>
			<if test="tForecastLibrary.updateTime != null">
				AND a.UPDATE_TIME = #{tForecastLibrary.updateTime}
			</if>
			<if test="tForecastLibrary.createTimeStart != null">
				AND a.CREATE_TIME >= #{tForecastLibrary.createTimeStart}
			</if>
			<if test="tForecastLibrary.createTimeEnd != null">
				AND a.CREATE_TIME <![CDATA[ <= ]]> #{tForecastLibrary.createTimeEnd}
			</if>
huyuchen's avatar
huyuchen committed
502 503 504
			<if test="tForecastLibrary.authSql != null and tForecastLibrary.authSql.trim() != ''">
				${tForecastLibrary.authSql}
			</if>
hongguangwu's avatar
hongguangwu committed
505 506 507 508 509 510 511 512 513 514 515
		</if>
	</sql>
	<!--tForecastLibrary简单分页查询-->
	<select id="getTForecastLibraryPage" resultMap="tForecastLibraryMap">
		SELECT
		<include refid="Base_Column_List"/>
		FROM t_forecast_library a
		<where>
			1=1
			<include refid="tForecastLibrary_where"/>
		</where>
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547
		order by a.CREATE_TIME desc
	</select>

	<!-- 导出 -->
	<select id="exportLibrary" resultMap="exportMap">
		select
		    a.ID,
			a.EMP_NO,
			a.EMP_NAME,
			a.EMP_IDCARD,
			a.UNIT_NAME,
			a.DEPT_NAME,
			a.DEPT_NO,
			a.UNIT_PENSION_FEE,
			a.UNIT_MEDICAL_FEE,
			a.UNIT_UNEMPLOYMENT_FEE,
			a.UNIT_WORK_INJURY_FEE,
			a.UNIT_BIRTH_FEE,
			a.UNIT_BITAILMENT_FEE,
			a.PERSONAL_PENSION_FEE,
			a.PERSONAL_MEDICAL_FEE,
			a.PERSONAL_UNEMPLOYMENT_FEE,
			a.PERSONAL_BIGAILMENT_FEE,
			a.SOCIAL_PAY_MONTH,
			a.SOCIAL_CREATE_MONTH,
			a.PROVIDENT_PAY_MONTH,
			a.PROVIDENT_CREATE_MONTH,
			a.UNIT_SOCIAL_SUM,
			a.UNIT_FUND_SUM,
			a.PERSONAL_SOCIAL_SUM,
			a.PERSONAL_FUND_SUM,
			a.SUM_ALL,
huyuchen's avatar
huyuchen committed
548 549 550 551 552 553
			a1.AREA_NAME as "FUND_PROVINCE",
			a2.AREA_NAME as "FUND_CITY",
			a3.AREA_NAME as "FUND_TOWN",
			a4.AREA_NAME as "SOCIAL_PROVINCE",
			a5.AREA_NAME as "SOCIAL_CITY",
			a6.AREA_NAME as "SOCIAL_TOWN",
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577
			a.UNIT_PENSION_BASE,
			a.UNIT_MEDICAL_BASE,
			a.UNIT_UNEMPLOYMENT_BASE,
			a.UNIT_INJURY_BASE,
			a.UNIT_BIRTH_BASE,
			a.PERSONAL_PENSION_BASE,
			a.PERSONAL_MEDICAL_BASE,
			a.PERSONAL_UNEMPLOYMENT_BASE,
			a.PERSONAL_BIGAILMENT_BASE,
			a.UNIT_BIGAILMENT_BASE,
			a.UNIT_PERSION_PRO,
			a.UNIT_MEDICAL_PRO,
			a.UNIT_UNEMPLOYMENT_PRO,
			a.UNIT_INJURY_PRO,
			a.UNIT_BIRTH_PRO,
			a.PERSONAL_PERSION_PRO,
			a.PERSONAL_MEDICAL_PRO,
			a.PERSONAL_UNEMPLOYMENT_PRO,
			a.PERSONAL_BIGAILMENT_PRO,
			a.UNIT_BIGAILMENT_PRO,
			a.UNIT_FUND_BASE,
			a.PERSONAL_FUND_BASE,
			a.UNIT_FUND_PROP,
			a.PERSONAL_FUND_PROP,
huyuchen's avatar
huyuchen committed
578 579 580
			CASE WHEN a.DATA_PUSH=0 THEN "未同步"
			WHEN a.DATA_PUSH =1 THEN "已同步"
			ELSE a.DATA_PUSH END as "DATA_PUSH",
581 582
			a.CREATE_TIME,
			a.DIFF_TYPE,
huyuchen's avatar
huyuchen committed
583 584 585
			CASE WHEN a.DATA_TYPE=0 THEN "社保"
			WHEN a.DATA_TYPE =1 THEN "公积金"
			ELSE a.DATA_TYPE END as "DATA_TYPE"
586
		from t_forecast_library a
huyuchen's avatar
huyuchen committed
587 588 589 590 591 592
		LEFT JOIN sys_area a1 on a1.id=a.FUND_PROVINCE
		LEFT JOIN sys_area a2 on a2.id=a.FUND_CITY
		LEFT JOIN sys_area a3 on a3.id=a.FUND_TOWN
		LEFT JOIN sys_area a4 on a4.id=a.SOCIAL_PROVINCE
		LEFT JOIN sys_area a5 on a5.id=a.SOCIAL_CITY
		LEFT JOIN sys_area a6 on a6.id=a.SOCIAL_TOWN
593 594 595 596 597 598 599 600
		<where>
			1=1
			<include refid="tForecastLibrary_where"/>
		</where>
		order by a.CREATE_TIME desc
		<if test="tForecastLibrary.limitStart != null">
			limit #{tForecastLibrary.limitStart},#{tForecastLibrary.limitEnd}
		</if>
hongguangwu's avatar
hongguangwu committed
601
	</select>
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625

	<!--洪光武2022-8-10 18:05:42-->
	<resultMap id="tPaymentBySalaryMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo">
		<id property="id" column="ID"/>
		<result property="empIdcard" column="EMP_IDCARD"/>
		<result property="unitBitmailmentFee" column="UNIT_BIGMAILMENT_MONEY"/>
		<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
		<result property="personalSocialSum" column="SOCIAL_SECURITY_PERSONAL_SUM"/>
		<result property="unitFundSum" column="UNIT_PROVIDENT_SUM"/>
		<result property="personalFundSum" column="PERSONAL_PROVIDENT_SUM"/>
		<result property="salarySocialFlag" column="SALARY_SOCIAL_FLAG"/>
		<result property="salaryFundFlag" column="SALARY_FUND_FLAG"/>
		<result property="socialPayMonth" column="SOCIAL_PAY_MONTH"/>
		<result property="socialCreateMonth" column="SOCIAL_CREATE_MONTH"/>
		<result property="providentPayMonth" column="PROVIDENT_PAY_MONTH"/>
		<result property="providentCreateMonth" column="PROVIDENT_CREATE_MONTH"/>
		<result property="settleDomainId" column="SETTLE_DOMAIN_ID"/>
	</resultMap>

	<!-- 薪资获取缴费库 -->
	<select id="selectTForecastBySalaryVo" resultMap="tPaymentBySalaryMap">
		SELECT
			a.id,
			a.EMP_IDCARD,
hongguangwu's avatar
hongguangwu committed
626 627 628 629 630
			ifnull(a.UNIT_BITAILMENT_FEE,0) UNIT_BIGMAILMENT_MONEY,
			ifnull(a.UNIT_SOCIAL_SUM,0) UNIT_SOCIAL_SUM,
			ifnull(a.PERSONAL_SOCIAL_SUM,0) SOCIAL_SECURITY_PERSONAL_SUM,
			ifnull(a.UNIT_FUND_SUM,0) UNIT_PROVIDENT_SUM,
			ifnull(a.PERSONAL_FUND_SUM,0) PERSONAL_PROVIDENT_SUM,
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
			a.SALARY_SOCIAL_FLAG,
			a.SALARY_FUND_FLAG,
			a.SOCIAL_PAY_MONTH,
			a.SOCIAL_CREATE_MONTH,
			a.PROVIDENT_PAY_MONTH,
			a.PROVIDENT_CREATE_MONTH,
			a.SETTLE_DOMAIN_ID
		FROM t_forecast_library a
		<where>
			1=1
			<if test="tPaymentInfo != null">
				<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
					AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
				</if>
				<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
					AND a.SOCIAL_CREATE_MONTH = #{tPaymentInfo.socialCreateMonth}
				</if>
				<if test="tPaymentInfo.providentPayMonth != null and tPaymentInfo.providentPayMonth.trim() != ''">
					AND a.PROVIDENT_PAY_MONTH = #{tPaymentInfo.providentPayMonth}
				</if>
				<if test="tPaymentInfo.providentCreateMonth != null and tPaymentInfo.providentCreateMonth.trim() != ''">
					AND a.PROVIDENT_CREATE_MONTH = #{tPaymentInfo.providentCreateMonth}
				</if>
				<if test="tPaymentInfo.settleDomainId != null and tPaymentInfo.settleDomainId.trim() != ''">
					AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
				</if>
			</if>
		</where>
	</select>

	<!-- 更改薪资社保结算状态 -->
	<update id="updateForecastSocialStatusByIdList">
		update t_forecast_library set SALARY_SOCIAL_FLAG = #{status}
		where
		ID in
		<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
			#{item}
		</foreach>
	</update>

	<!-- 更改薪资公积金结算状态 -->
	<update id="updateForecastFundStatusByIdList">
		update t_forecast_library set SALARY_FUND_FLAG = #{status}
		where
		ID in
		<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
			#{item}
		</foreach>
	</update>

huyuchen's avatar
huyuchen committed
681
	<delete id="deleteForecastSocial">
huyuchen's avatar
huyuchen committed
682 683
		delete from t_forecast_library where ((SOCIAL_PAY_MONTH = #{socialPayMonth} and SOCIAL_CREATE_MONTH = #{socialCreateMonth})
		or (PROVIDENT_PAY_MONTH = #{fundPayMonth} and PROVIDENT_CREATE_MONTH = #{fundCreateMonth}))
huyuchen's avatar
huyuchen committed
684 685 686
		and EMP_IDCARD = #{idCard} and DATA_PUSH = 0
	</delete>

huyuchen's avatar
huyuchen committed
687 688 689 690 691 692 693 694 695
	<!-- 更改薪资公积金结算状态 -->
	<update id="updateForSocialAndFound">
		update t_forecast_library
		set UNIT_ID = #{infoVo.unitId},
			UNIT_NAME = #{infoVo.unitName},
			DEPT_NAME = #{infoVo.settleDomainName},
			DEPT_NO = #{infoVo.settleDomainCode},
			SETTLE_DOMAIN_ID = #{infoVo.settleDomainId}
			where
huyuchen's avatar
huyuchen committed
696 697 698 699
				((SALARY_SOCIAL_FLAG = '0' and SOCIAL_CREATE_MONTH >= #{infoVo.socialCreateMonth})
			   or (SALARY_FUND_FLAG = '0' and PROVIDENT_CREATE_MONTH >= #{infoVo.socialCreateMonth}))
			  and DATA_PUSH = '0' and EMP_IDCARD = #{infoVo.empIdcard}

huyuchen's avatar
huyuchen committed
700 701
	</update>

huyuchen's avatar
huyuchen committed
702 703 704 705 706 707 708 709 710 711
	<!-- 更改预估社保推送状态 -->
	<update id="updatePushStatus">
		update t_forecast_library set DATA_PUSH = 1
		where
		ID in
		<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
			#{item}
		</foreach>
	</update>

712
	<!-- 校验预估库库是否有已结算的数据,有,则不允许ekp费用划转 -->
huyuchen's avatar
huyuchen committed
713 714
	<select id="checkForecastChange" resultType="java.lang.String">
		select p.EMP_IDCARD from t_forecast_library p
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734
		where (p.SALARY_SOCIAL_FLAG = '1' or p.SALARY_FUND_FLAG = '1') and p.id in
		<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
			#{item}
		</foreach>
	</select>

	<!-- ekp费用划转 -->
	<update id="changeForecastDept">
		update t_forecast_library p
		set p.SETTLE_DOMAIN_ID = #{dept.id}
		,p.DEPT_NAME = #{dept.departName}
		,p.DEPT_NO = #{dept.departNo}
		,p.UNIT_ID = #{dept.customerId}
		,p.UNIT_NAME = #{dept.customerName}
		where (p.SALARY_SOCIAL_FLAG = '0' and p.SALARY_FUND_FLAG = '0') and p.id in
		<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
			#{item}
		</foreach>
	</update>

huyuchen's avatar
huyuchen committed
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 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927
	<!-- 根据id更新 -->
	<update id="updateForecastById">
		update
		t_forecast_library
		set
		<if test="tForecastLibrary.unitPensionFee != null">
			UNIT_PENSION_FEE = #{tForecastLibrary.unitPensionFee},
		</if>
		<if test="tForecastLibrary.unitMedicalFee != null">
			UNIT_MEDICAL_FEE = #{tForecastLibrary.unitMedicalFee},
		</if>
		<if test="tForecastLibrary.unitUnemploymentFee != null">
			UNIT_UNEMPLOYMENT_FEE = #{tForecastLibrary.unitUnemploymentFee},
		</if>
		<if test="tForecastLibrary.unitWorkInjuryFee != null">
			UNIT_WORK_INJURY_FEE = #{tForecastLibrary.unitWorkInjuryFee},
		</if>
		<if test="tForecastLibrary.unitBirthFee != null">
			UNIT_BIRTH_FEE = #{tForecastLibrary.unitBirthFee},
		</if>
		<if test="tForecastLibrary.unitBitailmentFee != null">
			UNIT_BITAILMENT_FEE = #{tForecastLibrary.unitBitailmentFee},
		</if>
		<if test="tForecastLibrary.personalPensionFee != null">
			PERSONAL_PENSION_FEE = #{tForecastLibrary.personalPensionFee},
		</if>
		<if test="tForecastLibrary.personalMedicalFee != null">
			PERSONAL_MEDICAL_FEE = #{tForecastLibrary.personalMedicalFee},
		</if>
		<if test="tForecastLibrary.personalUnemploymentFee != null">
			PERSONAL_UNEMPLOYMENT_FEE = #{tForecastLibrary.personalUnemploymentFee},
		</if>
		<if test="tForecastLibrary.personalBigailmentFee != null">
			PERSONAL_BIGAILMENT_FEE = #{tForecastLibrary.personalBigailmentFee},
		</if>
		<if test="tForecastLibrary.socialPayMonth != null and tForecastLibrary.socialPayMonth.trim() != ''">
			SOCIAL_PAY_MONTH = #{tForecastLibrary.socialPayMonth},
		</if>
		<if test="tForecastLibrary.socialCreateMonth != null and tForecastLibrary.socialCreateMonth.trim() != ''">
			SOCIAL_CREATE_MONTH = #{tForecastLibrary.socialCreateMonth},
		</if>
		<if test="tForecastLibrary.providentPayMonth != null and tForecastLibrary.providentPayMonth.trim() != ''">
			PROVIDENT_PAY_MONTH = #{tForecastLibrary.providentPayMonth},
		</if>
		<if test="tForecastLibrary.providentCreateMonth != null and tForecastLibrary.providentCreateMonth.trim() != ''">
			PROVIDENT_CREATE_MONTH = #{tForecastLibrary.providentCreateMonth},
		</if>
		<if test="tForecastLibrary.unitSocialSum != null">
			UNIT_SOCIAL_SUM = #{tForecastLibrary.unitSocialSum},
		</if>
		<if test="tForecastLibrary.unitFundSum != null">
			UNIT_FUND_SUM = #{tForecastLibrary.unitFundSum},
		</if>
		<if test="tForecastLibrary.personalSocialSum != null">
			PERSONAL_SOCIAL_SUM = #{tForecastLibrary.personalSocialSum},
		</if>
		<if test="tForecastLibrary.personalFundSum != null">
			PERSONAL_FUND_SUM = #{tForecastLibrary.personalFundSum},
		</if>
		<if test="tForecastLibrary.sumAll != null">
			SUM_ALL = #{tForecastLibrary.sumAll},
		</if>
		<if test="tForecastLibrary.unitPensionBase != null">
			UNIT_PENSION_BASE = #{tForecastLibrary.unitPensionBase},
		</if>
		<if test="tForecastLibrary.unitMedicalBase != null">
			UNIT_MEDICAL_BASE = #{tForecastLibrary.unitMedicalBase},
		</if>
		<if test="tForecastLibrary.unitUnemploymentBase != null">
			UNIT_UNEMPLOYMENT_BASE = #{tForecastLibrary.unitUnemploymentBase},
		</if>
		<if test="tForecastLibrary.unitInjuryBase != null">
			UNIT_INJURY_BASE = #{tForecastLibrary.unitInjuryBase},
		</if>
		<if test="tForecastLibrary.unitBirthBase != null">
			UNIT_BIRTH_BASE = #{tForecastLibrary.unitBirthBase},
		</if>
		<if test="tForecastLibrary.unitBigailmentBase != null">
			UNIT_BIGAILMENT_BASE = #{tForecastLibrary.unitBigailmentBase},
		</if>
		<if test="tForecastLibrary.personalPensionBase != null">
			PERSONAL_PENSION_BASE = #{tForecastLibrary.personalPensionBase},
		</if>
		<if test="tForecastLibrary.personalMedicalBase != null">
			PERSONAL_MEDICAL_BASE = #{tForecastLibrary.personalMedicalBase},
		</if>
		<if test="tForecastLibrary.personalUnemploymentBase != null">
			PERSONAL_UNEMPLOYMENT_BASE = #{tForecastLibrary.personalUnemploymentBase},
		</if>
		<if test="tForecastLibrary.personalBigailmentBase != null">
			PERSONAL_BIGAILMENT_BASE = #{tForecastLibrary.personalBigailmentBase},
		</if>
		<if test="tForecastLibrary.unitPersionPro != null">
			UNIT_PERSION_PRO = #{tForecastLibrary.unitPersionPro},
		</if>
		<if test="tForecastLibrary.unitMedicalPro != null">
			UNIT_MEDICAL_PRO = #{tForecastLibrary.unitMedicalPro},
		</if>
		<if test="tForecastLibrary.unitUnemploymentPro != null">
			UNIT_UNEMPLOYMENT_PRO = #{tForecastLibrary.unitUnemploymentPro},
		</if>
		<if test="tForecastLibrary.unitInjuryPro != null">
			UNIT_INJURY_PRO = #{tForecastLibrary.unitInjuryPro},
		</if>
		<if test="tForecastLibrary.unitBirthPro != null">
			UNIT_BIRTH_PRO = #{tForecastLibrary.unitBirthPro},
		</if>
		<if test="tForecastLibrary.unitBigailmentPro != null">
			UNIT_BIGAILMENT_PRO = #{tForecastLibrary.unitBigailmentPro},
		</if>
		<if test="tForecastLibrary.personalPersionPro != null">
			PERSONAL_PERSION_PRO = #{tForecastLibrary.personalPersionPro},
		</if>
		<if test="tForecastLibrary.personalMedicalPro != null">
			PERSONAL_MEDICAL_PRO = #{tForecastLibrary.personalMedicalPro},
		</if>
		<if test="tForecastLibrary.personalUnemploymentPro != null">
			PERSONAL_UNEMPLOYMENT_PRO = #{tForecastLibrary.personalUnemploymentPro},
		</if>
		<if test="tForecastLibrary.personalBigailmentPro != null">
			PERSONAL_BIGAILMENT_PRO = #{tForecastLibrary.personalBigailmentPro},
		</if>
		<if test="tForecastLibrary.unitFundBase != null">
			UNIT_FUND_BASE = #{tForecastLibrary.unitFundBase},
		</if>
		<if test="tForecastLibrary.personalFundBase != null">
			PERSONAL_FUND_BASE = #{tForecastLibrary.personalFundBase},
		</if>
		<if test="tForecastLibrary.unitFundProp != null">
			UNIT_FUND_PROP = #{tForecastLibrary.unitFundProp},
		</if>
		<if test="tForecastLibrary.personalFundProp != null">
			PERSONAL_FUND_PROP = #{tForecastLibrary.personalFundProp},
		</if>
		<if test="tForecastLibrary.unitInterestFee != null">
			UNIT_INTEREST_FEE = #{tForecastLibrary.unitInterestFee},
		</if>
		<if test="tForecastLibrary.personalInterestFee != null">
			PERSONAL_INTEREST_FEE = #{tForecastLibrary.personalInterestFee},
		</if>
		<if test="tForecastLibrary.socialHousehold != null and tForecastLibrary.socialHousehold.trim() != ''">
			SOCIAL_HOUSEHOLD = #{tForecastLibrary.socialHousehold},
		</if>
		<if test="tForecastLibrary.socialHouseholdName != null and tForecastLibrary.socialHouseholdName.trim() != ''">
			SOCIAL_HOUSEHOLD_NAME = #{tForecastLibrary.socialHouseholdName},
		</if>
		<if test="tForecastLibrary.providentHousehold != null and tForecastLibrary.providentHousehold.trim() != ''">
			PROVIDENT_HOUSEHOLD = #{tForecastLibrary.providentHousehold},
		</if>
		<if test="tForecastLibrary.providentHouseholdName != null and tForecastLibrary.providentHouseholdName.trim() != ''">
			PROVIDENT_HOUSEHOLD_NAME = #{tForecastLibrary.providentHouseholdName},
		</if>
		<if test="tForecastLibrary.salarySocialFlag != null and tForecastLibrary.salarySocialFlag.trim() != ''">
			SALARY_SOCIAL_FLAG = #{tForecastLibrary.salarySocialFlag},
		</if>
		<if test="tForecastLibrary.salaryFundFlag != null and tForecastLibrary.salaryFundFlag.trim() != ''">
			SALARY_FUND_FLAG = #{tForecastLibrary.salaryFundFlag},
		</if>
		<if test="tForecastLibrary.settleDomainId != null and tForecastLibrary.settleDomainId.trim() != ''">
			SETTLE_DOMAIN_ID = #{tForecastLibrary.settleDomainId},
		</if>
		<if test="tForecastLibrary.unitId != null and tForecastLibrary.unitId.trim() != ''">
			UNIT_ID = #{tForecastLibrary.unitId},
		</if>
		<if test="tForecastLibrary.unitName != null and tForecastLibrary.unitName.trim() != ''">
			UNIT_NAME = #{tForecastLibrary.unitName},
		</if>
		<if test="tForecastLibrary.deptName != null and tForecastLibrary.deptName.trim() != ''">
			DEPT_NAME = #{tForecastLibrary.deptName},
		</if>
		<if test="tForecastLibrary.deptNo != null and tForecastLibrary.deptNo.trim() != ''">
			DEPT_NO = #{tForecastLibrary.deptNo},
		</if>
		<if test="tForecastLibrary.empNatrue != null and tForecastLibrary.empNatrue.trim() != ''">
			EMP_NATRUE = #{tForecastLibrary.empNatrue},
		</if>
		SOCIAL_ID = #{tForecastLibrary.socialId},
		PROVIDENT_ID = #{tForecastLibrary.providentId},
		FUND_PROVINCE = #{tForecastLibrary.fundProvince},
		FUND_CITY = #{tForecastLibrary.fundCity},
		FUND_TOWN = #{tForecastLibrary.fundTown},
		SOCIAL_PROVINCE = #{tForecastLibrary.socialProvince},
		SOCIAL_CITY = #{tForecastLibrary.socialCity},
		SOCIAL_TOWN = #{tForecastLibrary.socialTown},
		DATA_PUSH = #{tForecastLibrary.dataPush},
		DATA_TYPE = #{tForecastLibrary.dataType},
		DIFF_TYPE = #{tForecastLibrary.diffType},
		UPDATE_BY = #{tForecastLibrary.updateBy},
		UPDATE_TIME = now()
		where
		ID = #{tForecastLibrary.id}
	</update>

huyuchen's avatar
huyuchen committed
928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949
	<!-- 根据id更新 -->
	<update id="updateForecastStatusById">
		update
		t_forecast_library
		set
		<if test="tForecastLibrary.incomeSettleFlag != null and tForecastLibrary.incomeSettleFlag.trim() != ''">
			INCOME_SETTLE_FLAG = #{tForecastLibrary.incomeSettleFlag},
		</if>
		<if test="tForecastLibrary.incomeCollectFlag != null and tForecastLibrary.incomeCollectFlag.trim() != ''">
			INCOME_COLLECT_FLAG = #{tForecastLibrary.incomeCollectFlag},
		</if>
		<if test="tForecastLibrary.paySettleFlag != null and tForecastLibrary.paySettleFlag.trim() != ''">
			PAY_SETTLE_FLAG = #{tForecastLibrary.paySettleFlag},
		</if>
		<if test="tForecastLibrary.payCollectFlag != null and tForecastLibrary.payCollectFlag.trim() != ''">
			PAY_COLLECT_FLAG = #{tForecastLibrary.payCollectFlag},
		</if>
		UPDATE_TIME = now()
		where
		ID = #{tForecastLibrary.id}
	</update>

huyuchen's avatar
huyuchen committed
950 951 952 953 954 955 956 957 958 959 960
	<select id="selectTForecastSocialInfoList" resultMap="tForecastLibraryMap">
		SELECT
		<include refid="Base_Column_List"/>
		FROM t_forecast_library a where a.data_push = 0 and a.data_type = 0
	</select>

	<select id="selectTForecastFundInfoList" resultMap="tForecastLibraryMap">
		SELECT
		<include refid="Base_Column_List"/>
		FROM t_forecast_library a where a.data_push = 0 and a.data_type = 1
	</select>
hongguangwu's avatar
hongguangwu committed
961
</mapper>