TForecastLibraryMapper.xml 29.2 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"/>
hongguangwu's avatar
hongguangwu committed
107
	</resultMap>
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
	<!-- 导出 -->
	<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
171
	<sql id="Base_Column_List">
hongguangwu's avatar
hongguangwu committed
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
		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,
199
		a.SUM_ALL,
hongguangwu's avatar
hongguangwu committed
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
		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,
234
		a.DEPT_NO,
hongguangwu's avatar
hongguangwu committed
235 236 237 238 239 240 241 242 243
		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,
244
		a.DIFF_TYPE,
hongguangwu's avatar
hongguangwu committed
245 246 247 248
		a.CREATE_BY,
		a.CREATE_NAME,
		a.CREATE_TIME,
		a.UPDATE_BY,
249 250
		a.SALARY_SOCIAL_FLAG,
		a.SALARY_FUND_FLAG,
hongguangwu's avatar
hongguangwu committed
251
		a.UPDATE_TIME
hongguangwu's avatar
hongguangwu committed
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443
	</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>
444 445 446
			<if test="tForecastLibrary.deptNo != null and tForecastLibrary.deptNo.trim() != ''">
				AND a.DEPT_NO = #{tForecastLibrary.deptNo}
			</if>
hongguangwu's avatar
hongguangwu committed
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470
			<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
471 472 473
			<if test="tForecastLibrary.dataType != null">
				AND a.DATA_TYPE = #{tForecastLibrary.dataType}
			</if>
474 475 476
			<if test="tForecastLibrary.diffType != null and tForecastLibrary.diffType.trim() != ''">
				AND a.DIFF_TYPE = #{tForecastLibrary.diffType}
			</if>
hongguangwu's avatar
hongguangwu committed
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
			<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>
		</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>
509 510 511 512 513 514 515 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 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583
		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,
			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.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,
			a.DATA_PUSH,
			a.CREATE_TIME,
			a.DIFF_TYPE,
			a.DATA_TYPE
		from t_forecast_library a
		<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
584
	</select>
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608

	<!--洪光武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
609 610 611 612 613
			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,
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
			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
664 665 666 667 668 669 670 671 672 673 674 675 676
	<!-- 更改薪资公积金结算状态 -->
	<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
				(SALARY_SOCIAL_FLAG = '0' and SOCIAL_CREATE_MONTH >= #{infoVo.socialCreateMonth}) and DATA_PUSH = '0' and EMP_IDCARD = #{infoVo.empIdcard}
			or (SALARY_FUND_FLAG = '0' and PROVIDENT_CREATE_MONTH >= #{infoVo.socialCreateMonth})
	</update>

huyuchen's avatar
huyuchen committed
677 678 679 680 681 682 683 684 685 686
	<!-- 更改预估社保推送状态 -->
	<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>

hongguangwu's avatar
hongguangwu committed
687
</mapper>