Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
e7a282da
Commit
e7a282da
authored
Jul 25, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社保-批量调基
parent
92e8b945
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
945 additions
and
473 deletions
+945
-473
TForecastLibrary.java
...fu/cloud/plus/v1/yifu/social/entity/TForecastLibrary.java
+0
-7
TSocialFundHistory.java
.../cloud/plus/v1/yifu/social/entity/TSocialFundHistory.java
+78
-120
TSocialFundInfo.java
...ifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
+1
-0
TSocialFundHistoryVo.java
...fu/cloud/plus/v1/yifu/social/vo/TSocialFundHistoryVo.java
+11
-7
TForecastLibraryController.java
...v1/yifu/social/controller/TForecastLibraryController.java
+1
-1
TSocialFundInfoController.java
.../v1/yifu/social/controller/TSocialFundInfoController.java
+0
-2
SysBaseSetInfoService.java
...ud/plus/v1/yifu/social/service/SysBaseSetInfoService.java
+11
-0
TForecastLibraryService.java
.../plus/v1/yifu/social/service/TForecastLibraryService.java
+6
-7
SysBaseSetInfoServiceImpl.java
...1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
+30
-0
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+247
-80
TSocialFundInfoServiceImpl.java
.../yifu/social/service/impl/TSocialFundInfoServiceImpl.java
+384
-28
SysBaseSetInfoMapper.xml
...al-biz/src/main/resources/mapper/SysBaseSetInfoMapper.xml
+4
-0
TForecastLibraryMapper.xml
...-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
+0
-5
TSocialFundHistoryMapper.xml
...iz/src/main/resources/mapper/TSocialFundHistoryMapper.xml
+172
-216
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TForecastLibrary.java
View file @
e7a282da
...
...
@@ -481,13 +481,6 @@ public class TForecastLibrary extends BaseEntity {
@Length
(
max
=
50
,
message
=
"公积金户不能超过50个字符"
)
@ExcelProperty
(
"公积金户"
)
private
String
providentHouseholdName
;
/**
* 公积金编号
*/
@ExcelAttribute
(
name
=
"公积金编号"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"公积金编号不能超过50个字符"
)
@ExcelProperty
(
"公积金编号"
)
private
String
providentNo
;
/**
* 数据同步:0未同步;1已同步
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFundHistory.java
View file @
e7a282da
...
...
@@ -45,103 +45,76 @@ public class TSocialFundHistory extends BaseEntity {
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"
id
"
)
@ExcelProperty
(
"
id
"
)
@Schema
(
description
=
"
主键
"
)
@ExcelProperty
(
"
主键
"
)
private
String
id
;
/**
* name
*/
@Length
(
max
=
20
,
message
=
"
name
不能超过20个字符"
)
@ExcelAttribute
(
name
=
"
name
"
,
maxLength
=
20
)
@Schema
(
description
=
"
name
"
)
@ExcelProperty
(
"
name
"
)
private
String
n
ame
;
@Length
(
max
=
20
,
message
=
"
员工姓名
不能超过20个字符"
)
@ExcelAttribute
(
name
=
"
员工姓名
"
,
maxLength
=
20
)
@Schema
(
description
=
"
员工姓名
"
)
@ExcelProperty
(
"
员工姓名
"
)
private
String
empN
ame
;
/**
* idCard
*/
@Length
(
max
=
20
,
message
=
"
idCard
不能超过20个字符"
)
@ExcelAttribute
(
name
=
"
idCard
"
,
maxLength
=
20
)
@Schema
(
description
=
"
idCard
"
)
@ExcelProperty
(
"
idCard
"
)
private
String
idC
ard
;
@Length
(
max
=
20
,
message
=
"
身份证号
不能超过20个字符"
)
@ExcelAttribute
(
name
=
"
身份证号
"
,
maxLength
=
20
)
@Schema
(
description
=
"
身份证号
"
)
@ExcelProperty
(
"
身份证号
"
)
private
String
empIdc
ard
;
/**
* employeeId
*/
@Length
(
max
=
32
,
message
=
"
employeeI
d 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"
employeeI
d"
,
maxLength
=
32
)
@Schema
(
description
=
"
employeeI
d"
)
@ExcelProperty
(
"
employeeI
d"
)
private
String
emp
loyee
Id
;
@Length
(
max
=
32
,
message
=
"
员工i
d 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"
员工i
d"
,
maxLength
=
32
)
@Schema
(
description
=
"
员工i
d"
)
@ExcelProperty
(
"
员工i
d"
)
private
String
empId
;
/**
* 单位养老基数
*/
@ExcelAttribute
(
name
=
"单位养老基数"
)
@Schema
(
description
=
"单位养老基数"
)
@ExcelProperty
(
"单位养老基数"
)
private
BigDecimal
unitPension
Base
;
private
BigDecimal
unitPension
Cardinal
;
/**
* 单位医疗基数
*/
@ExcelAttribute
(
name
=
"单位医疗基数"
)
@Schema
(
description
=
"单位医疗基数"
)
@ExcelProperty
(
"单位医疗基数"
)
private
BigDecimal
unitMedical
Base
;
private
BigDecimal
unitMedical
Cardinal
;
/**
* 单位失业基数
*/
@ExcelAttribute
(
name
=
"单位失业基数"
)
@Schema
(
description
=
"单位失业基数"
)
@ExcelProperty
(
"单位失业基数"
)
private
BigDecimal
unitUnemployment
Base
;
private
BigDecimal
unitUnemployment
Cardinal
;
/**
* 单位工伤基数
*/
@ExcelAttribute
(
name
=
"单位工伤基数"
)
@Schema
(
description
=
"单位工伤基数"
)
@ExcelProperty
(
"单位工伤基数"
)
private
BigDecimal
unit
InjuryBase
;
private
BigDecimal
unit
WorkInjuryCardinal
;
/**
* 单位生育基数
*/
@ExcelAttribute
(
name
=
"单位生育基数"
)
@Schema
(
description
=
"单位生育基数"
)
@ExcelProperty
(
"单位生育基数"
)
private
BigDecimal
unitBirth
Base
;
private
BigDecimal
unitBirth
Cardinal
;
/**
* 单位大病基数
*/
@ExcelAttribute
(
name
=
"单位大病基数"
)
@Schema
(
description
=
"单位大病基数"
)
@ExcelProperty
(
"单位大病基数"
)
private
BigDecimal
unitBigailmentBase
;
/**
* 个人养老基数
*/
@ExcelAttribute
(
name
=
"个人养老基数"
)
@Schema
(
description
=
"个人养老基数"
)
@ExcelProperty
(
"个人养老基数"
)
private
BigDecimal
personalPensionBase
;
/**
* 个人医疗基数
*/
@ExcelAttribute
(
name
=
"个人医疗基数"
)
@Schema
(
description
=
"个人医疗基数"
)
@ExcelProperty
(
"个人医疗基数"
)
private
BigDecimal
personalMedicalBase
;
/**
* 个人失业基数
*/
@ExcelAttribute
(
name
=
"个人失业基数"
)
@Schema
(
description
=
"个人失业基数"
)
@ExcelProperty
(
"个人失业基数"
)
private
BigDecimal
personalUnemploymentBase
;
/**
* 个人大病基数
*/
@ExcelAttribute
(
name
=
"个人大病基数"
)
@Schema
(
description
=
"个人大病基数"
)
@ExcelProperty
(
"个人大病基数"
)
private
BigDecimal
personalBigailmentBase
;
private
BigDecimal
unitBigailmentCardinal
;
/**
* 单位养老比例
*/
...
...
@@ -150,11 +123,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"单位养老比例"
)
private
BigDecimal
unitPersionPro
;
/**
*
unitPersionMoney
*
单位养老金额
*/
@ExcelAttribute
(
name
=
"
unitPersionMoney
"
)
@Schema
(
description
=
"
unitPersionMoney
"
)
@ExcelProperty
(
"
unitPersionMoney
"
)
@ExcelAttribute
(
name
=
"
单位养老金额
"
)
@Schema
(
description
=
"
单位养老金额
"
)
@ExcelProperty
(
"
单位养老金额
"
)
private
BigDecimal
unitPersionMoney
;
/**
* 单位医疗比例
...
...
@@ -164,11 +137,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"单位医疗比例"
)
private
BigDecimal
unitMedicalPro
;
/**
*
unitMedicalMoney
*
单位医疗金额
*/
@ExcelAttribute
(
name
=
"
unitMedicalMoney
"
)
@Schema
(
description
=
"
unitMedicalMoney
"
)
@ExcelProperty
(
"
unitMedicalMoney
"
)
@ExcelAttribute
(
name
=
"
单位医疗金额
"
)
@Schema
(
description
=
"
单位医疗金额
"
)
@ExcelProperty
(
"
单位医疗金额
"
)
private
BigDecimal
unitMedicalMoney
;
/**
* 单位失业比例
...
...
@@ -178,11 +151,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"单位失业比例"
)
private
BigDecimal
unitUnemploymentPro
;
/**
*
unitUnemploymentMoney
*
单位失业金额
*/
@ExcelAttribute
(
name
=
"
unitUnemploymentMoney
"
)
@Schema
(
description
=
"
unitUnemploymentMoney
"
)
@ExcelProperty
(
"
unitUnemploymentMoney
"
)
@ExcelAttribute
(
name
=
"
单位失业金额
"
)
@Schema
(
description
=
"
单位失业金额
"
)
@ExcelProperty
(
"
单位失业金额
"
)
private
BigDecimal
unitUnemploymentMoney
;
/**
* 单位工伤比例
...
...
@@ -192,11 +165,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"单位工伤比例"
)
private
BigDecimal
unitInjuryPro
;
/**
*
unitInjuryMoney
*
单位工伤金额
*/
@ExcelAttribute
(
name
=
"
unitInjuryMoney
"
)
@Schema
(
description
=
"
unitInjuryMoney
"
)
@ExcelProperty
(
"
unitInjuryMoney
"
)
@ExcelAttribute
(
name
=
"
单位工伤金额
"
)
@Schema
(
description
=
"
单位工伤金额
"
)
@ExcelProperty
(
"
单位工伤金额
"
)
private
BigDecimal
unitInjuryMoney
;
/**
* 单位生育比例
...
...
@@ -206,11 +179,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"单位生育比例"
)
private
BigDecimal
unitBirthPro
;
/**
*
unitBirthMoney
*
单位生育金额
*/
@ExcelAttribute
(
name
=
"
unitBirthMoney
"
)
@Schema
(
description
=
"
unitBirthMoney
"
)
@ExcelProperty
(
"
unitBirthMoney
"
)
@ExcelAttribute
(
name
=
"
单位生育金额
"
)
@Schema
(
description
=
"
单位生育金额
"
)
@ExcelProperty
(
"
单位生育金额
"
)
private
BigDecimal
unitBirthMoney
;
/**
* 单位大病比例
...
...
@@ -220,11 +193,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"单位大病比例"
)
private
BigDecimal
unitBigailmentPro
;
/**
*
unitBigailmentMoney
*
单位大病救助金额
*/
@ExcelAttribute
(
name
=
"
unitBigailmentMoney
"
)
@Schema
(
description
=
"
unitBigailmentMoney
"
)
@ExcelProperty
(
"
unitBigailmentMoney
"
)
@ExcelAttribute
(
name
=
"
单位大病救助金额
"
)
@Schema
(
description
=
"
单位大病救助金额
"
)
@ExcelProperty
(
"
单位大病救助金额
"
)
private
BigDecimal
unitBigailmentMoney
;
/**
* 个人养老比例
...
...
@@ -234,11 +207,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"个人养老比例"
)
private
BigDecimal
personalPersionPro
;
/**
*
personalPersionMoney
*
个人养老金额
*/
@ExcelAttribute
(
name
=
"
personalPersionMoney
"
)
@Schema
(
description
=
"
personalPersionMoney
"
)
@ExcelProperty
(
"
personalPersionMoney
"
)
@ExcelAttribute
(
name
=
"
个人养老金额
"
)
@Schema
(
description
=
"
个人养老金额
"
)
@ExcelProperty
(
"
个人养老金额
"
)
private
BigDecimal
personalPersionMoney
;
/**
* 个人医疗比例
...
...
@@ -248,11 +221,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"个人医疗比例"
)
private
BigDecimal
personalMedicalPro
;
/**
*
personalMedicalMoney
*
个人医疗金额
*/
@ExcelAttribute
(
name
=
"
personalMedicalMoney
"
)
@Schema
(
description
=
"
personalMedicalMoney
"
)
@ExcelProperty
(
"
personalMedicalMoney
"
)
@ExcelAttribute
(
name
=
"
个人医疗金额
"
)
@Schema
(
description
=
"
个人医疗金额
"
)
@ExcelProperty
(
"
个人医疗金额
"
)
private
BigDecimal
personalMedicalMoney
;
/**
* 个人失业比例
...
...
@@ -262,11 +235,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"个人失业比例"
)
private
BigDecimal
personalUnemploymentPro
;
/**
*
personalUnemploymentMoney
*
个人失业金额
*/
@ExcelAttribute
(
name
=
"
personalUnemploymentMoney
"
)
@Schema
(
description
=
"
personalUnemploymentMoney
"
)
@ExcelProperty
(
"
personalUnemploymentMoney
"
)
@ExcelAttribute
(
name
=
"
个人失业金额
"
)
@Schema
(
description
=
"
个人失业金额
"
)
@ExcelProperty
(
"
个人失业金额
"
)
private
BigDecimal
personalUnemploymentMoney
;
/**
* 个人大病比例
...
...
@@ -276,11 +249,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"个人大病比例"
)
private
BigDecimal
personalBigailmentPro
;
/**
*
personalBigailmentMoney
*
个人大病金额
*/
@ExcelAttribute
(
name
=
"
personalBigailmentMoney
"
)
@Schema
(
description
=
"
personalBigailmentMoney
"
)
@ExcelProperty
(
"
personalBigailmentMoney
"
)
@ExcelAttribute
(
name
=
"
个人大病金额
"
)
@Schema
(
description
=
"
个人大病金额
"
)
@ExcelProperty
(
"
个人大病金额
"
)
private
BigDecimal
personalBigailmentMoney
;
/**
* 单位公积金基数
...
...
@@ -311,26 +284,19 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"个人公积金比例"
)
private
BigDecimal
personalFundProp
;
/**
*
unitFundMoney
*
单位公积金金额
*/
@ExcelAttribute
(
name
=
"
unitFundMoney
"
)
@Schema
(
description
=
"
unitFundMoney
"
)
@ExcelProperty
(
"
unitFundMoney
"
)
@ExcelAttribute
(
name
=
"
单位公积金金额
"
)
@Schema
(
description
=
"
单位公积金金额
"
)
@ExcelProperty
(
"
单位公积金金额
"
)
private
BigDecimal
unitFundMoney
;
/**
*
personalFundMoney
*
个人公积金金额
*/
@ExcelAttribute
(
name
=
"
personalFundMoney
"
)
@Schema
(
description
=
"
personalFundMoney
"
)
@ExcelProperty
(
"
personalFundMoney
"
)
@ExcelAttribute
(
name
=
"
个人公积金金额
"
)
@Schema
(
description
=
"
个人公积金金额
"
)
@ExcelProperty
(
"
个人公积金金额
"
)
private
BigDecimal
personalFundMoney
;
/**
* 0老的调基,数据不对,将不使用;1新逻辑调基
*/
@ExcelAttribute
(
name
=
"0老的调基,数据不对,将不使用;1新逻辑调基"
)
@Schema
(
description
=
"0老的调基,数据不对,将不使用;1新逻辑调基"
)
@ExcelProperty
(
"0老的调基,数据不对,将不使用;1新逻辑调基"
)
private
Integer
isOld
;
/**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)
*/
...
...
@@ -353,20 +319,12 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty
(
"是否是公积金:0否1是"
)
private
Integer
isFund
;
/**
* 社保id
*/
@Length
(
max
=
32
,
message
=
"社保id 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"社保id"
,
maxLength
=
32
)
@Schema
(
description
=
"社保id"
)
@ExcelProperty
(
"社保id"
)
private
String
socialId
;
/**
* 公积金id
* 社保公积金表id
*/
@Length
(
max
=
32
,
message
=
"
公积金
id 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"
公积金
id"
,
maxLength
=
32
)
@Schema
(
description
=
"
公积金
id"
)
@ExcelProperty
(
"
公积金
id"
)
private
String
f
undId
;
@Length
(
max
=
32
,
message
=
"
社保公积金表
id 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"
社保公积金表
id"
,
maxLength
=
32
)
@Schema
(
description
=
"
社保公积金表
id"
)
@ExcelProperty
(
"
社保公积金表
id"
)
private
String
socialF
undId
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
View file @
e7a282da
...
...
@@ -460,6 +460,7 @@ public class TSocialFundInfo extends BaseEntity {
private
BigDecimal
unitBigailmentPer
;
/**
* 社保停缴日期
* 社保减少日期
*/
@ExcelAttribute
(
name
=
"社保停缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"社保停缴日期"
)
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TSocialFundHistoryVo.java
View file @
e7a282da
...
...
@@ -42,13 +42,13 @@ public class TSocialFundHistoryVo extends RowIndex implements Serializable {
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
maxLength
=
20
,
needExport
=
true
,
errorInfo
=
"员工姓名必填且不可超过20位"
)
@Schema
(
description
=
"员工姓名"
)
@ExcelProperty
(
"员工姓名"
)
private
String
n
ame
;
private
String
empN
ame
;
@Length
(
max
=
20
,
message
=
"身份证号 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
isNotEmpty
=
true
,
maxLength
=
20
,
needExport
=
true
,
errorInfo
=
"身份证号必填且不可超过20位"
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
idC
ard
;
private
String
empIdc
ard
;
@ExcelAttribute
(
name
=
"缴纳类型"
,
isNotEmpty
=
true
,
errorInfo
=
"缴纳类型必填"
,
readConverterExp
=
"0=最低缴纳,1=自定义缴纳,2=最高缴纳"
)
@Schema
(
description
=
"缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)"
)
...
...
@@ -58,23 +58,27 @@ public class TSocialFundHistoryVo extends RowIndex implements Serializable {
@ExcelAttribute
(
name
=
"养老基数"
)
@Schema
(
description
=
"养老基数"
)
@ExcelProperty
(
"养老基数"
)
private
BigDecimal
unitPensionBase
;
private
BigDecimal
unitPensionCardinal
;
@ExcelAttribute
(
name
=
"医疗基数"
)
@Schema
(
description
=
"医疗基数"
)
@ExcelProperty
(
"医疗基数"
)
private
BigDecimal
unitMedicalBase
;
private
BigDecimal
unitMedicalCardinal
;
@ExcelAttribute
(
name
=
"失业基数"
)
@Schema
(
description
=
"失业基数"
)
@ExcelProperty
(
"失业基数"
)
private
BigDecimal
unitUnemploymentBase
;
private
BigDecimal
unitUnemploymentCardinal
;
@ExcelAttribute
(
name
=
"工伤基数"
)
@Schema
(
description
=
"工伤基数"
)
@ExcelProperty
(
"工伤基数"
)
private
BigDecimal
unitInjuryBase
;
private
BigDecimal
unitWorkInjuryCardinal
;
@ExcelAttribute
(
name
=
"生育基数"
)
@Schema
(
description
=
"生育基数"
)
@ExcelProperty
(
"生育基数"
)
private
BigDecimal
unitBirth
Base
;
private
BigDecimal
unitBirth
Cardinal
;
@ExcelAttribute
(
name
=
"单位大病救助金额"
)
@Schema
(
description
=
"单位大病救助金额"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TForecastLibraryController.java
View file @
e7a282da
...
...
@@ -159,7 +159,7 @@ public class TForecastLibraryController {
@SysLog
(
"按缴纳月重新生成"
)
@PostMapping
(
"/createForecastlibary"
)
@PreAuthorize
(
"@pms.hasPermission('social_tforecastlibrary_create')"
)
public
R
<
Boolean
>
createForecastlibary
(
@RequestParam
String
payMonths
,
public
R
<
String
>
createForecastlibary
(
@RequestParam
String
payMonths
,
@RequestParam
(
value
=
"empIdCard"
,
required
=
false
)
String
empIdCard
,
@RequestParam
(
value
=
"settleDomainIds"
,
required
=
false
)
String
settleDomainIds
)
{
if
(
Common
.
isEmpty
(
empIdCard
)
&&
Common
.
isEmpty
(
settleDomainIds
))
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSocialFundInfoController.java
View file @
e7a282da
...
...
@@ -27,11 +27,9 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFundInfoService;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/SysBaseSetInfoService.java
View file @
e7a282da
...
...
@@ -23,6 +23,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
java.util.Map
;
/**
* 基数设置表
*
...
...
@@ -56,4 +58,13 @@ public interface SysBaseSetInfoService extends IService<SysBaseSetInfo> {
**/
R
<
String
>
updateSysBase
(
SysBaseSetInfo
sysBaseSetInfo
);
/**
* @param
* @Description: 获取社保基数配置的Map
* @Author: hgw
* @Date: 2020/10/27 16:44
* @return: java.util.Map<java.lang.String, com.yifu.cloud.v1.hrms.api.entity.SysBaseSetInfo>
**/
Map
<
String
,
SysBaseSetInfo
>
getSysBaseSetInfoMap
(
String
baseType
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TForecastLibraryService.java
View file @
e7a282da
...
...
@@ -57,16 +57,15 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
* @Date: 2022/7/18 17:11
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
R
<
Boolean
>
createForecastlibary
(
String
payMonths
,
String
empIdCard
,
String
settleDomainIds
);
R
<
String
>
createForecastlibary
(
String
payMonths
,
String
empIdCard
,
String
settleDomainIds
);
/**
* @Description: 填充预估实际金额
* @param socialFundInfo
* @Description: 批量调基,同步预估库
* @Author: hgw
* @Date: 202
0/10/10 16:45
* @return:
com.yifu.cloud.v1.hrms.api.entity.TForecastLibrary
* @Date: 202
2/7/25 17:33
* @return:
void
**/
TForecastLibrary
initForecastLibrary
(
TForecastLibrary
library
,
TSocialFundInfo
socialInfo
,
TSocialFundInfo
fund
,
Integer
month
,
boolean
isReduceFund
,
boolean
isReduceSocial
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
);
R
<
String
>
updateToneForecastLibary
(
TSocialFundInfo
socialFundInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
View file @
e7a282da
...
...
@@ -34,8 +34,11 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 基数设置表
...
...
@@ -261,4 +264,31 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
}
}
}
@Override
public
Map
<
String
,
SysBaseSetInfo
>
getSysBaseSetInfoMap
(
String
baseType
)
{
// 基数配置
SysBaseSetInfo
sysBaseSetInfo
=
new
SysBaseSetInfo
();
sysBaseSetInfo
.
setBaseType
(
baseType
);
sysBaseSetInfo
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
sysBaseSetInfo
.
setStatus
(
CommonConstants
.
ZERO_INT
);
sysBaseSetInfo
.
setApplyStartDate
(
new
Date
());
// 查询符合条件的基数列表
List
<
SysBaseSetInfo
>
sysBaseSetInfoList
=
baseMapper
.
getSysBaseSetInfoNoPage
(
sysBaseSetInfo
);
// 返回的map
Map
<
String
,
SysBaseSetInfo
>
setInfoMap
=
new
HashMap
<>();
if
(
sysBaseSetInfoList
!=
null
&&
!
sysBaseSetInfoList
.
isEmpty
())
{
// map的键
String
key
;
for
(
SysBaseSetInfo
setInfo
:
sysBaseSetInfoList
)
{
key
=
setInfo
.
getDepartId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
setInfo
.
getProvince
()
+
CommonConstants
.
DOWN_LINE_STRING
+
setInfo
.
getCity
();
if
(
setInfo
.
getTown
()
!=
null
)
{
key
+=
CommonConstants
.
DOWN_LINE_STRING
+
setInfo
.
getTown
();
}
setInfoMap
.
put
(
key
,
setInfo
);
}
}
return
setInfoMap
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
e7a282da
...
...
@@ -189,7 +189,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Override
public
R
<
Boolean
>
createForecastlibary
(
String
payMonths
,
String
empIdCard
,
String
settleDomainIds
)
{
public
R
<
String
>
createForecastlibary
(
String
payMonths
,
String
empIdCard
,
String
settleDomainIds
)
{
//定义未推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
librarySocialList
=
null
;
//定义已推送的按条件查询得到的预估数据
...
...
@@ -237,7 +237,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
socialInfoList
=
socialFundInfoMapper
.
getSocialList
(
empIdCard
,
null
);
fundList
=
socialFundInfoMapper
.
getFundList
(
empIdCard
,
null
);
}
else
{
}
else
if
(
settleDomainIdList
!=
null
)
{
librarySocialList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
in
(
TForecastLibrary:
:
getSettleDomainId
,
settleDomainIdList
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
...
...
@@ -273,12 +273,64 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
libraryFundList
))
{
baseMapper
.
deleteBatchIds
(
libraryFundList
);
}
boolean
flag
;
// 未推送的预估明细Map
HashMap
<
String
,
TForecastLibrary
>
socialHistoryMap
=
new
HashMap
<>();
HashMap
<
String
,
TForecastLibrary
>
fundHistoryMap
=
new
HashMap
<>();
// 已推送的预估明细Map
HashMap
<
String
,
TForecastLibrary
>
socialPushMap
=
new
HashMap
<>();
HashMap
<
String
,
TForecastLibrary
>
fundPushMap
=
new
HashMap
<>();
// 组建基础Map
this
.
getBaseMap
(
librarySocialList
,
librarySocialListTemp
,
libraryFundList
,
libraryFundListTemp
,
socialHistoryMap
,
fundHistoryMap
,
socialPushMap
,
fundPushMap
);
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
=
new
HashMap
<>();
boolean
isReduceSocial
=
false
;
boolean
isReduceFund
=
false
;
// 核心刷新
R
<
String
>
coreR
=
this
.
doCore
(
payMonthList
,
socialInfoList
,
fundList
,
agentConfigHashMap
,
socialHistoryMap
,
fundHistoryMap
,
socialPushMap
,
fundPushMap
,
saveLibraryMap
,
isReduceSocial
,
isReduceFund
);
if
(
coreR
!=
null
)
return
coreR
;
boolean
isSaveAndUpdate
=
false
;
for
(
TForecastLibrary
library
:
saveLibraryMap
.
values
())
{
if
(
Common
.
isEmpty
(
library
.
getSocialId
())
&&
Common
.
isEmpty
(
library
.
getProvidentId
()))
{
continue
;
}
if
(
Common
.
isNotNull
(
library
.
getId
()))
{
baseMapper
.
updateById
(
library
);
}
else
{
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
}
isSaveAndUpdate
=
true
;
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
}
else
{
return
R
.
failed
(
"执行失败!无需更新的数据!"
);
}
}
/**
* @Description: 组装基础Map
* @Author: hgw
* @Date: 2022/7/25 19:41
* @return: void
**/
private
void
getBaseMap
(
List
<
TForecastLibrary
>
librarySocialList
,
List
<
TForecastLibrary
>
librarySocialListTemp
,
List
<
TForecastLibrary
>
libraryFundList
,
List
<
TForecastLibrary
>
libraryFundListTemp
,
HashMap
<
String
,
TForecastLibrary
>
socialHistoryMap
,
HashMap
<
String
,
TForecastLibrary
>
fundHistoryMap
,
HashMap
<
String
,
TForecastLibrary
>
socialPushMap
,
HashMap
<
String
,
TForecastLibrary
>
fundPushMap
)
{
// Map的key
String
sfMapKey
;
if
(
Common
.
isNotNull
(
librarySocialList
))
{
for
(
TForecastLibrary
library
:
librarySocialList
)
{
sfMapKey
=
this
.
getMapKey
(
library
.
getEmpIdcard
(),
library
.
getSettleDomainId
(),
library
.
getSocialPayMonth
(),
library
.
getSocialCreateMonth
());
socialHistoryMap
.
put
(
sfMapKey
,
library
);
}
}
if
(
Common
.
isNotNull
(
libraryFundList
))
{
for
(
TForecastLibrary
library
:
libraryFundList
)
{
sfMapKey
=
this
.
getMapKey
(
library
.
getEmpIdcard
(),
library
.
getSettleDomainId
(),
library
.
getProvidentPayMonth
(),
library
.
getProvidentCreateMonth
());
fundHistoryMap
.
put
(
sfMapKey
,
library
);
}
}
if
(
Common
.
isNotNull
(
librarySocialListTemp
))
{
TForecastLibrary
libraryOld
;
for
(
TForecastLibrary
library
:
librarySocialListTemp
)
{
...
...
@@ -288,6 +340,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
this
.
getChangeAddData
(
libraryOld
,
library
);
}
socialPushMap
.
put
(
sfMapKey
,
library
);
socialHistoryMap
.
put
(
sfMapKey
,
library
);
}
}
if
(
Common
.
isNotNull
(
libraryFundListTemp
))
{
...
...
@@ -299,78 +352,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
this
.
getChangeAddData
(
libraryOld
,
library
);
}
fundPushMap
.
put
(
sfMapKey
,
library
);
fundHistoryMap
.
put
(
sfMapKey
,
library
);
}
}
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
=
new
HashMap
<>();
TForecastLibrary
tForecastLibrary
;
String
createMonth
;
boolean
isReduceSocial
=
false
;
boolean
isReduceFund
=
false
;
for
(
String
payMonth
:
payMonthList
)
{
//封装社保预估数据
if
(
Common
.
isNotNull
(
socialInfoList
))
{
for
(
TSocialFundInfo
tSocialInfo
:
socialInfoList
)
{
createMonth
=
ServiceUtil
.
initCreateMonth
(
tSocialInfo
.
getCreateTime
(),
payMonth
);
sfMapKey
=
this
.
getMapKey
(
tSocialInfo
.
getEmpIdcard
(),
tSocialInfo
.
getSettleDomain
(),
payMonth
,
createMonth
);
// 变更:已推送的,计算变更值
tForecastLibrary
=
socialPushMap
.
get
(
sfMapKey
);
if
(
null
!=
tForecastLibrary
)
{
this
.
getChangeReduceData
(
tSocialInfo
,
tForecastLibrary
);
}
//起缴月份在要生成的月份前不处理
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
tSocialInfo
.
getSocialStartDate
()))
{
continue
;
}
flag
=
CommonConstants
.
ZERO_STRING
.
equals
(
tSocialInfo
.
getCanOverpay
())
&&
(
null
==
tSocialInfo
.
getOverpayNumber
()
||
null
==
tSocialInfo
.
getHaveThisMonth
()
||
null
==
tSocialInfo
.
getSocialStartDate
());
if
(
flag
)
{
return
R
.
failed
(
"员工"
+
tSocialInfo
.
getEmpName
()
+
":"
+
tSocialInfo
.
getEmpIdcard
()
+
SocialConstants
.
SOCIAL_SET_ERROR
);
}
// 初始化社保
initSocialLibary
(
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
tForecastLibrary
,
sfMapKey
);
}
}
//封装公积金预估数据
if
(
Common
.
isNotNull
(
fundList
))
{
for
(
TSocialFundInfo
providentFund
:
fundList
)
{
createMonth
=
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
);
sfMapKey
=
this
.
getMapKey
(
providentFund
.
getEmpIdcard
(),
providentFund
.
getSettleDomainFund
(),
payMonth
,
createMonth
);
// 变更:已推送的,计算变更值
tForecastLibrary
=
fundPushMap
.
get
(
sfMapKey
);
if
(
null
!=
tForecastLibrary
)
{
this
.
getChangeReduceData
(
providentFund
,
tForecastLibrary
);
}
//起缴月份在要生成的月份后不处理
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
providentFund
.
getProvidentStart
()))
{
continue
;
}
flag
=
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getCanOverpay
())
&&
(
null
==
providentFund
.
getOverpayNumber
()
||
null
==
providentFund
.
getHaveThisMonth
()
||
null
==
providentFund
.
getProvidentStart
());
if
(
flag
)
{
return
R
.
failed
(
"员工"
+
providentFund
.
getEmpName
()
+
":"
+
providentFund
.
getEmpIdcard
()
+
SocialConstants
.
SOCIAL_SET_ERROR
);
}
// 初始化公积金
initFundLibary
(
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
tForecastLibrary
,
sfMapKey
);
}
}
}
boolean
isSaveAndUpdate
=
false
;
for
(
TForecastLibrary
library
:
saveLibraryMap
.
values
())
{
if
(
Common
.
isEmpty
(
library
.
getSocialId
())
&&
Common
.
isEmpty
(
library
.
getProvidentId
()))
{
continue
;
}
if
(
Common
.
isNotNull
(
library
.
getId
()))
{
baseMapper
.
updateById
(
library
);
}
else
{
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
}
isSaveAndUpdate
=
true
;
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
}
else
{
return
R
.
failed
(
"执行失败!无需更新的数据!"
);
}
}
private
String
getMapKey
(
String
empIdcard
,
String
settleDomainId
...
...
@@ -484,7 +468,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private
void
initSocialLibary
(
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
tSocialInfo
,
boolean
isReduceFund
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
TForecastLibrary
lib
,
String
sfMapKey
)
{
,
TForecastLibrary
lib
,
String
sfMapKey
,
TForecastLibrary
historyLibrary
)
{
if
(
null
==
lib
)
{
lib
=
new
TForecastLibrary
();
}
...
...
@@ -514,7 +498,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
isReduceSocial
=
false
;
}
lib
=
initForecastLibrary
(
lib
,
tSocialInfo
,
null
,
monthT
,
isReduceFund
,
isReduceSocial
,
agentConfigMap
);
lib
=
initForecastLibrary
(
lib
,
tSocialInfo
,
null
,
monthT
,
isReduceFund
,
isReduceSocial
,
agentConfigMap
,
historyLibrary
);
saveLibraryMap
.
put
(
sfMapKey
,
lib
);
}
...
...
@@ -538,10 +522,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
overpayMonth
;
}
@Override
p
ublic
TForecastLibrary
initForecastLibrary
(
TForecastLibrary
library
// historyLibrary_历史比例(暂时未用到)
p
rivate
TForecastLibrary
initForecastLibrary
(
TForecastLibrary
library
,
TSocialFundInfo
socialInfo
,
TSocialFundInfo
fund
,
Integer
month
,
boolean
isReduceFund
,
boolean
isReduceSocial
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
)
{
,
boolean
isReduceSocial
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
TForecastLibrary
historyLibrary
)
{
if
(
null
!=
socialInfo
&&
!
isReduceSocial
)
{
library
.
setSocialId
(
socialInfo
.
getId
());
library
.
setUnitBitailmentFee
(
BigDecimal
.
ZERO
);
...
...
@@ -1142,7 +1126,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @Date 2020-07-21
**/
private
void
initFundLibary
(
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
TForecastLibrary
lib
,
String
mapKeyStr
)
{
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
TForecastLibrary
lib
,
String
mapKeyStr
,
TForecastLibrary
historyLibrary
)
{
if
(
lib
==
null
)
{
lib
=
new
TForecastLibrary
();
}
...
...
@@ -1181,8 +1166,190 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
isReduceFund
=
false
;
}
lib
=
initForecastLibrary
(
lib
,
null
,
providentFund
,
monthT
,
isReduceFund
,
isReduceSocial
,
null
);
lib
=
initForecastLibrary
(
lib
,
null
,
providentFund
,
monthT
,
isReduceFund
,
isReduceSocial
,
null
,
historyLibrary
);
saveLibraryMap
.
put
(
mapKeyStr
,
lib
);
}
/**
* @param socialFundInfo
* @Description: 批量调基,同步预估库
* @Author: hgw
* @Date: 2022/7/25 17:37
* @return: void
**/
@Override
public
R
<
String
>
updateToneForecastLibary
(
TSocialFundInfo
socialFundInfo
)
{
String
empIdCard
=
socialFundInfo
.
getEmpIdcard
();
//定义未推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
librarySocialList
=
null
;
//定义已推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
librarySocialListTemp
=
null
;
//定义未推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
libraryFundList
=
null
;
//定义已推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
libraryFundListTemp
=
null
;
// 获取要更新的月份
int
monthDiff
=
DateUtil
.
getMonthDiff
(
socialFundInfo
.
getSocialStartDate
(),
new
Date
())
+
2
;
List
<
String
>
payMonthList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
monthDiff
;
i
++)
{
payMonthList
.
add
(
DateUtil
.
addMonth
(
1
-
i
));
}
//查询出所有符合条件的社保数据
List
<
TSocialFundInfo
>
socialInfoList
=
null
;
List
<
TSocialFundInfo
>
fundList
=
null
;
// 查询当年所有的社保临时政策用于生成预估数据
List
<
TAgentConfig
>
configList
=
agentConfigMapper
.
selectList
(
Wrappers
.<
TAgentConfig
>
query
().
lambda
()
.
eq
(
TAgentConfig:
:
getOpenFlag
,
CommonConstants
.
ZERO_INT
));
HashMap
<
String
,
TAgentConfig
>
agentConfigHashMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
configList
)
&&
Common
.
isNotNull
(
payMonthList
))
{
initConfigByPayMonths
(
configList
,
payMonthList
,
agentConfigHashMap
);
}
//查询出所有对应条件的预估数、社保数据、公积金数据据用于重新生成
if
(
Common
.
isNotNull
(
empIdCard
))
{
librarySocialList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
librarySocialListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
libraryFundList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
libraryFundListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
socialInfoList
=
socialFundInfoMapper
.
getSocialList
(
empIdCard
,
null
);
fundList
=
socialFundInfoMapper
.
getFundList
(
empIdCard
,
null
);
}
if
(
Common
.
isEmpty
(
socialInfoList
)
&&
Common
.
isEmpty
(
fundList
))
{
return
R
.
failed
(
"无需要重新生成的数据(无数据或数据已结算不可重新生成!)"
);
}
//先删除然后重新生成
if
(
Common
.
isNotNull
(
librarySocialList
))
{
baseMapper
.
deleteBatchIds
(
librarySocialList
);
}
if
(
Common
.
isNotNull
(
libraryFundList
))
{
baseMapper
.
deleteBatchIds
(
libraryFundList
);
}
// 未推送的预估明细Map
HashMap
<
String
,
TForecastLibrary
>
socialHistoryMap
=
new
HashMap
<>();
HashMap
<
String
,
TForecastLibrary
>
fundHistoryMap
=
new
HashMap
<>();
// 已推送的预估明细Map
HashMap
<
String
,
TForecastLibrary
>
socialPushMap
=
new
HashMap
<>();
HashMap
<
String
,
TForecastLibrary
>
fundPushMap
=
new
HashMap
<>();
// 组建基础Map
this
.
getBaseMap
(
librarySocialList
,
librarySocialListTemp
,
libraryFundList
,
libraryFundListTemp
,
socialHistoryMap
,
fundHistoryMap
,
socialPushMap
,
fundPushMap
);
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
=
new
HashMap
<>();
boolean
isReduceSocial
=
false
;
boolean
isReduceFund
=
false
;
// 核心刷新
R
<
String
>
coreR
=
this
.
doCore
(
payMonthList
,
socialInfoList
,
fundList
,
agentConfigHashMap
,
socialHistoryMap
,
fundHistoryMap
,
socialPushMap
,
fundPushMap
,
saveLibraryMap
,
isReduceSocial
,
isReduceFund
);
if
(
coreR
!=
null
)
return
coreR
;
boolean
isSaveAndUpdate
=
false
;
for
(
TForecastLibrary
library
:
saveLibraryMap
.
values
())
{
if
(
Common
.
isEmpty
(
library
.
getSocialId
())
&&
Common
.
isEmpty
(
library
.
getProvidentId
()))
{
continue
;
}
if
(
Common
.
isNotNull
(
library
.
getId
()))
{
baseMapper
.
updateById
(
library
);
}
else
{
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
}
isSaveAndUpdate
=
true
;
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
}
else
{
return
R
.
failed
(
"执行失败!无需更新的数据!"
);
}
}
/**
* @Description: 核心刷新
* @Author: hgw
* @Date: 2022/7/25 19:39
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
R
<
String
>
doCore
(
List
<
String
>
payMonthList
,
List
<
TSocialFundInfo
>
socialInfoList
,
List
<
TSocialFundInfo
>
fundList
,
HashMap
<
String
,
TAgentConfig
>
agentConfigHashMap
,
HashMap
<
String
,
TForecastLibrary
>
socialHistoryMap
,
HashMap
<
String
,
TForecastLibrary
>
fundHistoryMap
,
HashMap
<
String
,
TForecastLibrary
>
socialPushMap
,
HashMap
<
String
,
TForecastLibrary
>
fundPushMap
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
boolean
isReduceSocial
,
boolean
isReduceFund
)
{
// 预估历史,存储基数
TForecastLibrary
historyLibrary
;
boolean
flag
;
String
createMonth
;
String
sfMapKey
;
TForecastLibrary
tForecastLibrary
;
for
(
String
payMonth
:
payMonthList
)
{
//封装社保预估数据
if
(
Common
.
isNotNull
(
socialInfoList
))
{
for
(
TSocialFundInfo
tSocialInfo
:
socialInfoList
)
{
createMonth
=
ServiceUtil
.
initCreateMonth
(
tSocialInfo
.
getCreateTime
(),
payMonth
);
sfMapKey
=
this
.
getMapKey
(
tSocialInfo
.
getEmpIdcard
(),
tSocialInfo
.
getSettleDomain
(),
payMonth
,
createMonth
);
// 变更:已推送的,计算变更值
tForecastLibrary
=
socialPushMap
.
get
(
sfMapKey
);
if
(
null
!=
tForecastLibrary
)
{
this
.
getChangeReduceData
(
tSocialInfo
,
tForecastLibrary
);
}
//起缴月份在要生成的月份前不处理 || 截止月份在要生成的月份后不处理
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
tSocialInfo
.
getSocialStartDate
())
||
Integer
.
parseInt
(
payMonth
)
>
DateUtil
.
formatDateInt
(
tSocialInfo
.
getSocialReduceDate
()))
{
continue
;
}
flag
=
CommonConstants
.
ZERO_STRING
.
equals
(
tSocialInfo
.
getCanOverpay
())
&&
(
null
==
tSocialInfo
.
getOverpayNumber
()
||
null
==
tSocialInfo
.
getHaveThisMonth
()
||
null
==
tSocialInfo
.
getSocialStartDate
());
if
(
flag
)
{
return
R
.
failed
(
"员工"
+
tSocialInfo
.
getEmpName
()
+
":"
+
tSocialInfo
.
getEmpIdcard
()
+
SocialConstants
.
SOCIAL_SET_ERROR
);
}
else
{
historyLibrary
=
socialHistoryMap
.
get
(
sfMapKey
);
// 初始化社保
initSocialLibary
(
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
tForecastLibrary
,
sfMapKey
,
historyLibrary
);
}
}
}
//封装公积金预估数据
if
(
Common
.
isNotNull
(
fundList
))
{
for
(
TSocialFundInfo
providentFund
:
fundList
)
{
createMonth
=
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
);
sfMapKey
=
this
.
getMapKey
(
providentFund
.
getEmpIdcard
(),
providentFund
.
getSettleDomainFund
(),
payMonth
,
createMonth
);
// 变更:已推送的,计算变更值
tForecastLibrary
=
fundPushMap
.
get
(
sfMapKey
);
if
(
null
!=
tForecastLibrary
)
{
this
.
getChangeReduceData
(
providentFund
,
tForecastLibrary
);
}
//起缴月份在要生成的月份后不处理 || 截止月份在要生成的月份后不处理
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
providentFund
.
getProvidentStart
())
||
Integer
.
parseInt
(
payMonth
)
>
DateUtil
.
formatDateInt
(
providentFund
.
getFundReduceDate
()))
{
continue
;
}
flag
=
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getCanOverpay
())
&&
(
null
==
providentFund
.
getOverpayNumber
()
||
null
==
providentFund
.
getHaveThisMonth
()
||
null
==
providentFund
.
getProvidentStart
());
if
(
flag
)
{
return
R
.
failed
(
"员工"
+
providentFund
.
getEmpName
()
+
":"
+
providentFund
.
getEmpIdcard
()
+
SocialConstants
.
SOCIAL_SET_ERROR
);
}
else
{
historyLibrary
=
fundHistoryMap
.
get
(
sfMapKey
);
// 初始化公积金
initFundLibary
(
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
tForecastLibrary
,
sfMapKey
,
historyLibrary
);
}
}
}
}
return
null
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFundInfoServiceImpl.java
View file @
e7a282da
...
...
@@ -52,7 +52,9 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -74,6 +76,8 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
private
final
TSocialLogService
tSocialLogService
;
private
final
TAuditInfoService
tAuditInfoService
;
private
final
TForecastLibraryService
tForecastLibraryService
;
private
final
SysBaseSetInfoService
sysBaseSetInfoService
;
private
final
TSocialFundHistoryService
tSocialFundHistoryService
;
/**
* 社保公积金查询表简单分页查询
...
...
@@ -245,14 +249,11 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
}
private
void
importTSocialFundInfo
(
List
<
TSocialFundHistoryVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
ErrorMessage
errorMsg
;
// 执行数据插入操作 组装
TSocialFundHistoryVo
excel
;
List
<
String
>
idCardList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
idCardList
.
add
(
excelVOList
.
get
(
i
).
get
IdC
ard
());
idCardList
.
add
(
excelVOList
.
get
(
i
).
get
EmpIdc
ard
());
}
List
<
TSocialFundInfo
>
socialFundInfoList
=
this
.
list
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
in
(
TSocialFundInfo:
:
getEmpIdcard
,
idCardList
));
...
...
@@ -265,38 +266,393 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
}
TSocialFundInfo
oldSocialFundInfo
;
TSocialFundInfo
socialFundInfo
;
// 判断是否修改了社保
boolean
isSocial
;
// 判断是否修改了公积金
boolean
isFund
;
TSocialFundHistory
history
;
// 基数配置Map
Map
<
String
,
SysBaseSetInfo
>
socialSetInfoMap
=
sysBaseSetInfoService
.
getSysBaseSetInfoMap
(
CommonConstants
.
ZERO_STRING
);
Map
<
String
,
SysBaseSetInfo
>
fundSetInfoMap
=
sysBaseSetInfoService
.
getSysBaseSetInfoMap
(
CommonConstants
.
ONE_STRING
);
// 社保基数配置
SysBaseSetInfo
socialSetInfo
=
null
;
SysBaseSetInfo
fundSetInfo
=
null
;
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
isSocial
=
false
;
isFund
=
false
;
excel
=
excelVOList
.
get
(
i
);
socialFundInfo
=
socialFundInfoMap
.
get
(
excel
.
getIdCard
());
if
(
socialFundInfo
.
getEmpName
().
equals
(
excel
.
getName
()))
{
// 0:校验数据有效性-TODO
// 1:更新社保公积金查询-TODO
//updateSocialFundInfo(socialFundInfo, excel);
// 2:新增调基记录
insertExcel
(
excel
);
// 3:新增变更日志
oldSocialFundInfo
=
new
TSocialFundInfo
();
BeanUtil
.
copyProperties
(
socialFundInfo
,
oldSocialFundInfo
);
tSocialLogService
.
saveModificationRecord
(
CommonConstants
.
ONE_INT
,
oldSocialFundInfo
.
getId
(),
oldSocialFundInfo
,
socialFundInfo
);
// 4:同步预估库-TODO
//tForecastLibraryService.
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
CommonConstants
.
GREEN
));
socialFundInfo
=
socialFundInfoMap
.
get
(
excel
.
getEmpIdcard
());
if
(
null
!=
socialFundInfo
)
{
if
(
socialFundInfo
.
getEmpName
().
equals
(
excel
.
getEmpName
()))
{
history
=
new
TSocialFundHistory
();
BeanUtil
.
copyProperties
(
excel
,
history
);
// 存储变更日志使用的
oldSocialFundInfo
=
new
TSocialFundInfo
();
BeanUtil
.
copyProperties
(
socialFundInfo
,
oldSocialFundInfo
);
// 0:校验数据有效性
// 缴纳类型不为空
if
(
Common
.
isNotNull
(
excel
.
getPaymentType
()))
{
isSocial
=
true
;
if
(
checkSocialUpdateTwo
(
errorMessageList
,
excel
.
getRowIndex
(),
history
))
continue
;
}
else
{
isFund
=
true
;
// 验证公积金数据调基是否完整
if
(
checkFundUpdate
(
errorMessageList
,
excel
.
getRowIndex
(),
history
))
continue
;
}
isFund
=
initIsFund
(
isFund
,
history
);
// 如果调整公积金,公积金信息全都要填写!
if
(
checkFundInfo
(
errorMessageList
,
excel
.
getRowIndex
(),
isFund
,
history
))
continue
;
history
.
setEmpId
(
socialFundInfo
.
getEmpId
());
history
.
setEmpIdcard
(
socialFundInfo
.
getEmpIdcard
());
history
.
setEmpName
(
socialFundInfo
.
getEmpName
());
history
.
setCreateTime
(
LocalDateTime
.
now
());
// 初始化微0,后面变更
history
.
setIsFund
(
CommonConstants
.
ZERO_INT
);
history
.
setIsFund
(
CommonConstants
.
ZERO_INT
);
// 社保,且缴纳类型为自定义
if
(
isSocial
)
{
if
(
socialFundInfo
.
getSocialTown
()
!=
null
)
{
socialSetInfo
=
socialSetInfoMap
.
get
(
socialFundInfo
.
getSocialHousehold
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getSocialProvince
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getSocialCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getSocialTown
());
}
else
{
socialSetInfo
=
socialSetInfoMap
.
get
(
socialFundInfo
.
getSocialHousehold
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getSocialProvince
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getSocialCity
());
}
if
(
socialSetInfo
==
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"未找到社保基数配置!"
));
continue
;
}
// 初始化社保调基信息
initSocialHistory
(
history
,
socialFundInfo
);
// 更新社保公积金表的社保信息
this
.
setSocialFundInfoBySocial
(
socialFundInfo
,
socialSetInfo
,
history
);
}
if
(
isFund
)
{
history
.
setIsFund
(
CommonConstants
.
ONE_INT
);
history
.
setSocialFundId
(
socialFundInfo
.
getId
());
history
.
setUnitFundBase
(
excel
.
getUnitFundBase
());
history
.
setUnitFundProp
(
excel
.
getUnitFundProp
());
history
.
setPersonalFundBase
(
excel
.
getPersonalFundBase
());
history
.
setPersonalFundProp
(
excel
.
getPersonalFundProp
());
if
(
socialFundInfo
.
getFundTown
()
!=
null
)
{
fundSetInfo
=
fundSetInfoMap
.
get
(
socialFundInfo
.
getProvidentHousehold
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getFundProvince
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getFundCity
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getFundTown
());
}
else
{
fundSetInfo
=
fundSetInfoMap
.
get
(
socialFundInfo
.
getProvidentHousehold
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getFundProvince
()
+
CommonConstants
.
DOWN_LINE_STRING
+
socialFundInfo
.
getFundCity
());
}
if
(
fundSetInfo
==
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
i
,
"未找到公积金基数配置!"
));
continue
;
}
history
.
setUnitFundMoney
(
Common
.
formatMoneyForFund
(
BigDecimalUtils
.
safeMultiply
(
history
.
getUnitFundBase
()
,
history
.
getUnitFundProp
(),
CommonConstants
.
ONE_OF_PERCENT
),
fundSetInfo
.
getFundPayPoint
()));
history
.
setPersonalFundMoney
(
Common
.
formatMoneyForFund
(
BigDecimalUtils
.
safeMultiply
(
history
.
getPersonalFundBase
()
,
history
.
getPersonalFundProp
(),
CommonConstants
.
ONE_OF_PERCENT
),
fundSetInfo
.
getFundPayPoint
()));
// 更新社保公积金表的公积金信息
this
.
setSocialFundInfoByFund
(
socialFundInfo
,
history
);
}
// 1:新增调基记录
tSocialFundHistoryService
.
save
(
history
);
// 2:更新社保公积金查询
this
.
updateById
(
socialFundInfo
);
// 3:新增变更日志
tSocialLogService
.
saveModificationRecord
(
CommonConstants
.
ONE_INT
,
oldSocialFundInfo
.
getId
(),
oldSocialFundInfo
,
socialFundInfo
);
// 4:同步预估库
tForecastLibraryService
.
updateToneForecastLibary
(
socialFundInfo
);
// 返回信息处理
initResSuccessMessage
(
errorMessageList
,
excel
.
getRowIndex
(),
isSocial
,
isFund
);
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
SocialConstants
.
EMP_NAME_ERROR
));
}
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
SocialConstants
.
EMP_NAME_ERROR
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"调基失败:未找到对应结算主体下的员工"
+
excel
.
getEmpName
()
+
"数据!"
));
}
}
}
private
void
initResSuccessMessage
(
List
<
ErrorMessage
>
errorList
,
int
i
,
boolean
isSocial
,
boolean
isFund
)
{
if
(
isSocial
&&
isFund
)
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"社保公积金调基成功!"
,
CommonConstants
.
GREEN
));
}
else
if
(
isSocial
)
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"社保调基成功!"
,
CommonConstants
.
GREEN
));
}
else
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"公积金调基成功!"
,
CommonConstants
.
GREEN
));
}
}
/**
* 插入excel bad record
*/
private
void
insertExcel
(
TSocialFundHistoryVo
excel
)
{
TSocialFundInfo
insert
=
new
TSocialFundInfo
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
* @param socialFundInfo
* @param baseSetVo
* @Description: 塞值:社保公积金表的社保信息
* @Author: hgw
* @Date: 2022/7/25 16:04
* @return: void
**/
private
void
setSocialFundInfoBySocial
(
TSocialFundInfo
socialFundInfo
,
SysBaseSetInfo
socialSetInfo
,
TSocialFundHistory
baseSetVo
)
{
socialFundInfo
.
setPaymentType
(
String
.
valueOf
(
baseSetVo
.
getPaymentType
()));
// 自定义,存基数等
if
(
CommonConstants
.
ONE_INT
==
baseSetVo
.
getPaymentType
())
{
socialFundInfo
.
setUnitPensionCardinal
(
baseSetVo
.
getUnitPensionCardinal
());
socialFundInfo
.
setUnitMedicalCardinal
(
baseSetVo
.
getUnitMedicalCardinal
());
socialFundInfo
.
setUnitBirthCardinal
(
baseSetVo
.
getUnitBirthCardinal
());
socialFundInfo
.
setUnitUnemploymentCardinal
(
baseSetVo
.
getUnitUnemploymentCardinal
());
socialFundInfo
.
setUnitWorkInjuryCardinal
(
baseSetVo
.
getUnitWorkInjuryCardinal
());
socialFundInfo
.
setPersonalPensionCardinal
(
baseSetVo
.
getUnitPensionCardinal
());
socialFundInfo
.
setPersonalMedicalCardinal
(
baseSetVo
.
getUnitMedicalCardinal
());
socialFundInfo
.
setPersonalUnemploymentCardinal
(
baseSetVo
.
getUnitUnemploymentCardinal
());
socialFundInfo
.
setUnitBigailmentMoney
(
baseSetVo
.
getUnitBigailmentMoney
());
socialFundInfo
.
setPersonalBigailmentMoney
(
baseSetVo
.
getPersonalBigailmentMoney
());
}
else
if
(
CommonConstants
.
ZERO_INT
==
baseSetVo
.
getPaymentType
())
{
BigDecimal
limitBase
=
socialSetInfo
.
getLowerLimit
();
this
.
setLimtBase
(
socialFundInfo
,
limitBase
);
}
else
if
(
CommonConstants
.
TWO_INT
==
baseSetVo
.
getPaymentType
())
{
BigDecimal
limitBase
=
socialSetInfo
.
getUpperLimit
();
this
.
setLimtBase
(
socialFundInfo
,
limitBase
);
}
// 金额计算
socialFundInfo
.
setUnitPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getUnitPensionCardinal
(),
socialFundInfo
.
getUnitPensionPer
(),
CommonConstants
.
ONE_OF_PERCENT
));
socialFundInfo
.
setUnitMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getUnitMedicalCardinal
(),
socialFundInfo
.
getUnitMedicalPer
(),
CommonConstants
.
ONE_OF_PERCENT
));
socialFundInfo
.
setUnitBirthMoney
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getUnitBirthCardinal
(),
socialFundInfo
.
getUnitBirthPer
(),
CommonConstants
.
ONE_OF_PERCENT
));
socialFundInfo
.
setUnitInjuryMoney
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getUnitWorkInjuryCardinal
(),
socialFundInfo
.
getUnitWorkUnjuryPer
(),
CommonConstants
.
ONE_OF_PERCENT
));
socialFundInfo
.
setUnitUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getUnitUnemploymentCardinal
(),
socialFundInfo
.
getUnitUnemploymentPer
(),
CommonConstants
.
ONE_OF_PERCENT
));
socialFundInfo
.
setPersonalPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getPersonalPensionCardinal
(),
socialFundInfo
.
getPersonalPensionPer
(),
CommonConstants
.
ONE_OF_PERCENT
));
socialFundInfo
.
setPersonalMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getPersonalMedicalCardinal
(),
socialFundInfo
.
getPersonalMedicalPer
(),
CommonConstants
.
ONE_OF_PERCENT
));
socialFundInfo
.
setPersonalUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getPersonalUnemploymentCardinal
(),
socialFundInfo
.
getPersonalUnemploymentPer
(),
CommonConstants
.
ONE_OF_PERCENT
));
socialFundInfo
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
socialFundInfo
.
getUnitPersionMoney
()
,
socialFundInfo
.
getUnitMedicalMoney
(),
socialFundInfo
.
getUnitBirthMoney
()
,
socialFundInfo
.
getUnitInjuryMoney
()
,
socialFundInfo
.
getUnitUnemploymentMoney
()
,
socialFundInfo
.
getUnitInterestFee
()
,
socialFundInfo
.
getUnitBigailmentMoney
()));
socialFundInfo
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeAdd
(
socialFundInfo
.
getPersonalBigailmentMoney
()
,
socialFundInfo
.
getPersonalPersionMoney
()
,
socialFundInfo
.
getPersonalMedicalMoney
()
,
socialFundInfo
.
getPersonalInterestFee
()
,
socialFundInfo
.
getPersonalUnemploymentMoney
()));
}
/**
* @param socialFundInfo
* @param limitBase
* @Description: 塞最低或最高值
* @Author: hgw
* @Date: 2022/7/25 16:15
* @return: void
**/
private
void
setLimtBase
(
TSocialFundInfo
socialFundInfo
,
BigDecimal
limitBase
)
{
socialFundInfo
.
setUnitPensionCardinal
(
limitBase
);
socialFundInfo
.
setUnitMedicalCardinal
(
limitBase
);
socialFundInfo
.
setUnitBirthCardinal
(
limitBase
);
socialFundInfo
.
setUnitUnemploymentCardinal
(
limitBase
);
socialFundInfo
.
setUnitWorkInjuryCardinal
(
limitBase
);
socialFundInfo
.
setPersonalPensionCardinal
(
limitBase
);
socialFundInfo
.
setPersonalMedicalCardinal
(
limitBase
);
socialFundInfo
.
setPersonalUnemploymentCardinal
(
limitBase
);
}
/**
* @param socialFundInfo
* @param baseSetVo
* @Description: 塞值:社保公积金表的公积金信息
* @Author: hgw
* @Date: 2022/7/25 16:05
* @return: void
**/
private
void
setSocialFundInfoByFund
(
TSocialFundInfo
socialFundInfo
,
TSocialFundHistory
baseSetVo
)
{
socialFundInfo
.
setUnitProvidengCardinal
(
baseSetVo
.
getUnitFundBase
());
socialFundInfo
.
setUnitProvidentPer
(
baseSetVo
.
getUnitFundProp
());
socialFundInfo
.
setPersonalProvidentCardinal
(
baseSetVo
.
getPersonalFundBase
());
socialFundInfo
.
setPersonalProvidentPer
(
baseSetVo
.
getPersonalFundProp
());
socialFundInfo
.
setUnitFundSum
(
Common
.
formatMoneyForFund
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getUnitProvidengCardinal
(),
socialFundInfo
.
getUnitProvidentPer
(),
CommonConstants
.
ONE_OF_PERCENT
)
,
Integer
.
valueOf
(
socialFundInfo
.
getFundPayPoint
())));
socialFundInfo
.
setPersonalFundSum
(
Common
.
formatMoneyForFund
(
BigDecimalUtils
.
safeMultiply
(
socialFundInfo
.
getPersonalProvidentCardinal
(),
socialFundInfo
.
getPersonalProvidentPer
(),
CommonConstants
.
ONE_OF_PERCENT
)
,
Integer
.
valueOf
(
socialFundInfo
.
getFundPayPoint
())));
}
/**
* @param history
* @param baseSetVo
* @Description: 填充调基表信息
* @Author: hgw
* @Date: 2022/7/25 16:06
* @return: void
**/
private
void
initSocialHistory
(
TSocialFundHistory
history
,
TSocialFundInfo
baseSetVo
)
{
history
.
setIsSocial
(
CommonConstants
.
ONE_INT
);
history
.
setSocialFundId
(
baseSetVo
.
getId
());
if
(
CommonConstants
.
ONE_INT
==
history
.
getPaymentType
())
{
history
.
setUnitPersionPro
(
baseSetVo
.
getUnitPensionCardinal
());
history
.
setUnitMedicalPro
(
baseSetVo
.
getUnitMedicalCardinal
());
history
.
setUnitUnemploymentPro
(
baseSetVo
.
getUnitUnemploymentCardinal
());
history
.
setUnitInjuryPro
(
baseSetVo
.
getUnitWorkInjuryCardinal
());
history
.
setUnitBirthPro
(
baseSetVo
.
getUnitBirthCardinal
());
history
.
setPersonalPersionPro
(
baseSetVo
.
getPersonalPensionCardinal
());
history
.
setPersonalMedicalPro
(
baseSetVo
.
getPersonalMedicalCardinal
());
history
.
setPersonalUnemploymentPro
(
baseSetVo
.
getPersonalUnemploymentCardinal
());
history
.
setUnitPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
history
.
getUnitPensionCardinal
(),
history
.
getUnitPersionPro
(),
CommonConstants
.
ONE_OF_PERCENT
));
history
.
setUnitMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
history
.
getUnitMedicalCardinal
(),
history
.
getUnitMedicalPro
(),
CommonConstants
.
ONE_OF_PERCENT
));
history
.
setUnitUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
history
.
getUnitUnemploymentCardinal
(),
history
.
getUnitUnemploymentPro
(),
CommonConstants
.
ONE_OF_PERCENT
));
history
.
setUnitInjuryMoney
(
BigDecimalUtils
.
safeMultiply
(
history
.
getUnitWorkInjuryCardinal
(),
history
.
getUnitInjuryPro
(),
CommonConstants
.
ONE_OF_PERCENT
));
history
.
setUnitBirthMoney
(
BigDecimalUtils
.
safeMultiply
(
history
.
getUnitBirthCardinal
(),
history
.
getUnitBirthPro
(),
CommonConstants
.
ONE_OF_PERCENT
));
// 个人、单位,采用一个基数
history
.
setPersonalPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
history
.
getUnitPensionCardinal
(),
history
.
getPersonalPersionPro
(),
CommonConstants
.
ONE_OF_PERCENT
));
history
.
setPersonalMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
history
.
getUnitMedicalCardinal
(),
history
.
getPersonalMedicalPro
(),
CommonConstants
.
ONE_OF_PERCENT
));
history
.
setPersonalUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
history
.
getUnitUnemploymentCardinal
(),
history
.
getPersonalUnemploymentPro
(),
CommonConstants
.
ONE_OF_PERCENT
));
}
}
/**
* 验证自定义 和非自定义社保的数据完整性
*
* @return
* @Author hgw
* @Date 2022-7-25 10:46:43
**/
private
boolean
checkSocialUpdateTwo
(
List
<
ErrorMessage
>
errorList
,
int
i
,
TSocialFundHistory
baseSetVo
)
{
if
((
CommonConstants
.
ZERO_INT
==
baseSetVo
.
getPaymentType
()
||
CommonConstants
.
TWO_INT
==
baseSetVo
.
getPaymentType
())
&&
(
null
!=
baseSetVo
.
getUnitPensionCardinal
()
||
null
!=
baseSetVo
.
getUnitMedicalCardinal
()
||
null
!=
baseSetVo
.
getUnitBirthCardinal
()
||
null
!=
baseSetVo
.
getUnitUnemploymentCardinal
()
||
null
!=
baseSetVo
.
getUnitWorkInjuryCardinal
()
||
null
!=
baseSetVo
.
getUnitBigailmentMoney
()
||
null
!=
baseSetVo
.
getPersonalBigailmentMoney
()
))
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"缴纳类型非自定义,不可填写社保信息!"
));
return
true
;
}
else
if
(
CommonConstants
.
ONE_INT
==
baseSetVo
.
getPaymentType
()
&&
(
null
==
baseSetVo
.
getUnitPensionCardinal
()
||
null
==
baseSetVo
.
getUnitMedicalCardinal
()
||
null
==
baseSetVo
.
getUnitBirthCardinal
()
||
null
==
baseSetVo
.
getUnitUnemploymentCardinal
()
||
null
==
baseSetVo
.
getUnitWorkInjuryCardinal
()
))
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"缴纳类型为自定义,社保信息除大病外都要填写!"
));
return
true
;
}
return
false
;
}
/**
* @Description: 验证公积金数据调基是否完整
* @Author: hgw
* @Date: 2022/7/25 11:28
* @return: boolean
**/
private
boolean
checkFundUpdate
(
List
<
ErrorMessage
>
errorList
,
int
i
,
TSocialFundHistory
baseSetVo
)
{
if
(
null
!=
baseSetVo
.
getUnitMedicalCardinal
()
||
null
!=
baseSetVo
.
getUnitBirthCardinal
()
||
null
!=
baseSetVo
.
getUnitUnemploymentCardinal
()
||
null
!=
baseSetVo
.
getUnitWorkInjuryCardinal
()
||
null
!=
baseSetVo
.
getUnitBigailmentMoney
()
||
null
!=
baseSetVo
.
getPersonalBigailmentMoney
())
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"检测到调整了社保字段,缴纳类型不可为空。自定义,所有社保项目必填;非自定义,社保项目不可填写!"
));
return
true
;
}
if
(
null
==
baseSetVo
.
getUnitFundBase
()
||
null
==
baseSetVo
.
getUnitFundProp
()
||
null
==
baseSetVo
.
getPersonalFundBase
()
||
null
==
baseSetVo
.
getPersonalFundProp
())
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"缴纳类型为空,如果调整公积金,公积金信息全都要填写!"
));
return
true
;
}
return
false
;
}
/**
* @Description: 是否公积金
* @Author: hgw
* @Date: 2022/7/25 11:31
* @return: boolean
**/
private
boolean
initIsFund
(
boolean
isFund
,
TSocialFundHistory
baseSetVo
)
{
if
(
null
!=
baseSetVo
.
getUnitFundBase
()
&&
null
!=
baseSetVo
.
getUnitFundProp
()
&&
null
!=
baseSetVo
.
getPersonalFundBase
()
&&
null
!=
baseSetVo
.
getPersonalFundProp
())
{
isFund
=
true
;
}
return
isFund
;
}
/**
* @Description: 验证公积金数据的完整性
* @Author: hgw
* @Date: 2022/7/25 11:33
* @return: boolean
**/
private
boolean
checkFundInfo
(
List
<
ErrorMessage
>
errorList
,
int
i
,
boolean
isFund
,
TSocialFundHistory
baseSetVo
)
{
if
(!
isFund
&&
((
null
!=
baseSetVo
.
getUnitFundBase
()
&&
(
null
==
baseSetVo
.
getPersonalFundBase
()
||
null
==
baseSetVo
.
getUnitFundProp
()
||
null
==
baseSetVo
.
getPersonalFundProp
()))
||
(
null
!=
baseSetVo
.
getPersonalFundBase
()
&&
(
null
==
baseSetVo
.
getUnitFundBase
()
||
null
==
baseSetVo
.
getUnitFundProp
()
||
null
==
baseSetVo
.
getPersonalFundProp
()))
||
(
null
!=
baseSetVo
.
getUnitFundProp
()
&&
(
null
==
baseSetVo
.
getUnitFundBase
()
||
null
==
baseSetVo
.
getPersonalFundBase
()
||
null
==
baseSetVo
.
getPersonalFundProp
()))
||
(
null
!=
baseSetVo
.
getPersonalFundProp
()
&&
(
null
==
baseSetVo
.
getUnitFundBase
()
||
null
==
baseSetVo
.
getUnitFundProp
()
||
null
==
baseSetVo
.
getPersonalFundBase
()))))
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"如果调整公积金,公积金信息全都要填写!"
));
return
true
;
}
return
false
;
}
@Override
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/SysBaseSetInfoMapper.xml
View file @
e7a282da
...
...
@@ -161,6 +161,10 @@
<if
test=
"sysBaseSetInfo.applyStartDate != null"
>
AND a.APPLY_START_DATE = #{sysBaseSetInfo.applyStartDate}
</if>
<if
test=
"sysBaseSetInfo.applyStartDate != null"
>
AND a.APPLY_START_DATE
<![CDATA[ <= ]]>
#{sysBaseSetInfo.applyStartDate}
AND (a.APPLY_END_DATE is null or a.APPLY_END_DATE
<![CDATA[ >= ]]>
#{sysBaseSetInfo.applyStartDate})
</if>
<if
test=
"sysBaseSetInfo.applyEndDate != null"
>
AND a.APPLY_END_DATE = #{sysBaseSetInfo.applyEndDate}
</if>
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
View file @
e7a282da
...
...
@@ -92,7 +92,6 @@
<result
property=
"socialHouseholdName"
column=
"SOCIAL_HOUSEHOLD_NAME"
/>
<result
property=
"providentHousehold"
column=
"PROVIDENT_HOUSEHOLD"
/>
<result
property=
"providentHouseholdName"
column=
"PROVIDENT_HOUSEHOLD_NAME"
/>
<result
property=
"providentNo"
column=
"PROVIDENT_NO"
/>
<result
property=
"dataPush"
column=
"DATA_PUSH"
/>
<result
property=
"dataType"
column=
"DATA_TYPE"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
...
...
@@ -170,7 +169,6 @@
a.SOCIAL_HOUSEHOLD_NAME,
a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD_NAME,
a.PROVIDENT_NO,
a.DATA_PUSH,
a.DATA_TYPE,
a.CREATE_BY,
...
...
@@ -391,9 +389,6 @@
<if
test=
"tForecastLibrary.providentHouseholdName != null and tForecastLibrary.providentHouseholdName.trim() != ''"
>
AND a.PROVIDENT_HOUSEHOLD_NAME = #{tForecastLibrary.providentHouseholdName}
</if>
<if
test=
"tForecastLibrary.providentNo != null and tForecastLibrary.providentNo.trim() != ''"
>
AND a.PROVIDENT_NO = #{tForecastLibrary.providentNo}
</if>
<if
test=
"tForecastLibrary.dataPush != null"
>
AND a.DATA_PUSH = #{tForecastLibrary.dataPush}
</if>
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFundHistoryMapper.xml
View file @
e7a282da
...
...
@@ -25,19 +25,16 @@
<resultMap
id=
"tSocialFundHistoryMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundHistory"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"name"
column=
"NAME"
/>
<result
property=
"idCard"
column=
"ID_CARD"
/>
<result
property=
"employeeId"
column=
"EMPLOYEE_ID"
/>
<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=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"ID_CARD"
/>
<result
property=
"empId"
column=
"EMP_ID"
/>
<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=
"unitPersionPro"
column=
"UNIT_PERSION_PRO"
/>
<result
property=
"unitPersionMoney"
column=
"UNIT_PERSION_MONEY"
/>
<result
property=
"unitMedicalPro"
column=
"UNIT_MEDICAL_PRO"
/>
...
...
@@ -64,221 +61,180 @@
<result
property=
"personalFundProp"
column=
"PERSONAL_FUND_PROP"
/>
<result
property=
"unitFundMoney"
column=
"UNIT_FUND_MONEY"
/>
<result
property=
"personalFundMoney"
column=
"PERSONAL_FUND_MONEY"
/>
<result
property=
"isOld"
column=
"IS_OLD"
/>
<result
property=
"paymentType"
column=
"PAYMENT_TYPE"
/>
<result
property=
"isSocial"
column=
"IS_SOCIAL"
/>
<result
property=
"isFund"
column=
"IS_FUND"
/>
<result
property=
"socialId"
column=
"SOCIAL_ID"
/>
<result
property=
"fundId"
column=
"FUND_ID"
/>
<result
property=
"socialFundId"
column=
"SOCIAL_FUND_ID"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.NAME,
a.ID_CARD,
a.EMPLOYEE_ID,
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_PERSION_MONEY,
a.UNIT_MEDICAL_PRO,
a.UNIT_MEDICAL_MONEY,
a.UNIT_UNEMPLOYMENT_PRO,
a.UNIT_UNEMPLOYMENT_MONEY,
a.UNIT_INJURY_PRO,
a.UNIT_INJURY_MONEY,
a.UNIT_BIRTH_PRO,
a.UNIT_BIRTH_MONEY,
a.UNIT_BIGAILMENT_PRO,
a.UNIT_BIGAILMENT_MONEY,
a.PERSONAL_PERSION_PRO,
a.PERSONAL_PERSION_MONEY,
a.PERSONAL_MEDICAL_PRO,
a.PERSONAL_MEDICAL_MONEY,
a.PERSONAL_UNEMPLOYMENT_PRO,
a.PERSONAL_UNEMPLOYMENT_MONEY,
a.PERSONAL_BIGAILMENT_PRO,
a.PERSONAL_BIGAILMENT_MONEY,
a.UNIT_FUND_BASE,
a.PERSONAL_FUND_BASE,
a.UNIT_FUND_PROP,
a.PERSONAL_FUND_PROP,
a.UNIT_FUND_MONEY,
a.PERSONAL_FUND_MONEY,
a.IS_OLD,
a.PAYMENT_TYPE,
a.IS_SOCIAL,
a.IS_FUND,
a.SOCIAL_ID,
a.FUND_ID,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME
a.ID,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_ID,
a.UNIT_PENSION_CARDINAL,
a.UNIT_MEDICAL_CARDINAL,
a.UNIT_UNEMPLOYMENT_CARDINAL,
a.UNIT_WORK_INJURY_CARDINAL,
a.UNIT_BIRTH_CARDINAL,
a.UNIT_BIGAILMENT_CARDINAL,
a.UNIT_PERSION_PRO,
a.UNIT_PERSION_MONEY,
a.UNIT_MEDICAL_PRO,
a.UNIT_MEDICAL_MONEY,
a.UNIT_UNEMPLOYMENT_PRO,
a.UNIT_UNEMPLOYMENT_MONEY,
a.UNIT_INJURY_PRO,
a.UNIT_INJURY_MONEY,
a.UNIT_BIRTH_PRO,
a.UNIT_BIRTH_MONEY,
a.UNIT_BIGAILMENT_PRO,
a.UNIT_BIGAILMENT_MONEY,
a.PERSONAL_PERSION_PRO,
a.PERSONAL_PERSION_MONEY,
a.PERSONAL_MEDICAL_PRO,
a.PERSONAL_MEDICAL_MONEY,
a.PERSONAL_UNEMPLOYMENT_PRO,
a.PERSONAL_UNEMPLOYMENT_MONEY,
a.PERSONAL_BIGAILMENT_PRO,
a.PERSONAL_BIGAILMENT_MONEY,
a.UNIT_FUND_BASE,
a.PERSONAL_FUND_BASE,
a.UNIT_FUND_PROP,
a.PERSONAL_FUND_PROP,
a.UNIT_FUND_MONEY,
a.PERSONAL_FUND_MONEY,
a.PAYMENT_TYPE,
a.IS_SOCIAL,
a.IS_FUND,
a.SOCIAL_FUND_ID,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME
</sql>
<sql
id=
"tSocialFundHistory_where"
>
<if
test=
"tSocialFundHistory != null"
>
<if
test=
"tSocialFundHistory.id != null and tSocialFundHistory.id.trim() != ''"
>
AND a.ID = #{tSocialFundHistory.id}
</if>
<if
test=
"tSocialFundHistory.name != null and tSocialFundHistory.name.trim() != ''"
>
AND a.NAME = #{tSocialFundHistory.name}
</if>
<if
test=
"tSocialFundHistory.idCard != null and tSocialFundHistory.idCard.trim() != ''"
>
AND a.ID_CARD = #{tSocialFundHistory.idCard}
</if>
<if
test=
"tSocialFundHistory.employeeId != null and tSocialFundHistory.employeeId.trim() != ''"
>
AND a.EMPLOYEE_ID = #{tSocialFundHistory.employeeId}
</if>
<if
test=
"tSocialFundHistory.unitPensionBase != null"
>
AND a.UNIT_PENSION_BASE = #{tSocialFundHistory.unitPensionBase}
</if>
<if
test=
"tSocialFundHistory.unitMedicalBase != null"
>
AND a.UNIT_MEDICAL_BASE = #{tSocialFundHistory.unitMedicalBase}
</if>
<if
test=
"tSocialFundHistory.unitUnemploymentBase != null"
>
AND a.UNIT_UNEMPLOYMENT_BASE = #{tSocialFundHistory.unitUnemploymentBase}
</if>
<if
test=
"tSocialFundHistory.unitInjuryBase != null"
>
AND a.UNIT_INJURY_BASE = #{tSocialFundHistory.unitInjuryBase}
</if>
<if
test=
"tSocialFundHistory.unitBirthBase != null"
>
AND a.UNIT_BIRTH_BASE = #{tSocialFundHistory.unitBirthBase}
</if>
<if
test=
"tSocialFundHistory.unitBigailmentBase != null"
>
AND a.UNIT_BIGAILMENT_BASE = #{tSocialFundHistory.unitBigailmentBase}
</if>
<if
test=
"tSocialFundHistory.personalPensionBase != null"
>
AND a.PERSONAL_PENSION_BASE = #{tSocialFundHistory.personalPensionBase}
</if>
<if
test=
"tSocialFundHistory.personalMedicalBase != null"
>
AND a.PERSONAL_MEDICAL_BASE = #{tSocialFundHistory.personalMedicalBase}
</if>
<if
test=
"tSocialFundHistory.personalUnemploymentBase != null"
>
AND a.PERSONAL_UNEMPLOYMENT_BASE = #{tSocialFundHistory.personalUnemploymentBase}
</if>
<if
test=
"tSocialFundHistory.personalBigailmentBase != null"
>
AND a.PERSONAL_BIGAILMENT_BASE = #{tSocialFundHistory.personalBigailmentBase}
</if>
<if
test=
"tSocialFundHistory.unitPersionPro != null"
>
AND a.UNIT_PERSION_PRO = #{tSocialFundHistory.unitPersionPro}
</if>
<if
test=
"tSocialFundHistory.unitPersionMoney != null"
>
AND a.UNIT_PERSION_MONEY = #{tSocialFundHistory.unitPersionMoney}
</if>
<if
test=
"tSocialFundHistory.unitMedicalPro != null"
>
AND a.UNIT_MEDICAL_PRO = #{tSocialFundHistory.unitMedicalPro}
</if>
<if
test=
"tSocialFundHistory.unitMedicalMoney != null"
>
AND a.UNIT_MEDICAL_MONEY = #{tSocialFundHistory.unitMedicalMoney}
</if>
<if
test=
"tSocialFundHistory.unitUnemploymentPro != null"
>
AND a.UNIT_UNEMPLOYMENT_PRO = #{tSocialFundHistory.unitUnemploymentPro}
</if>
<if
test=
"tSocialFundHistory.unitUnemploymentMoney != null"
>
AND a.UNIT_UNEMPLOYMENT_MONEY = #{tSocialFundHistory.unitUnemploymentMoney}
</if>
<if
test=
"tSocialFundHistory.unitInjuryPro != null"
>
AND a.UNIT_INJURY_PRO = #{tSocialFundHistory.unitInjuryPro}
</if>
<if
test=
"tSocialFundHistory.unitInjuryMoney != null"
>
AND a.UNIT_INJURY_MONEY = #{tSocialFundHistory.unitInjuryMoney}
</if>
<if
test=
"tSocialFundHistory.unitBirthPro != null"
>
AND a.UNIT_BIRTH_PRO = #{tSocialFundHistory.unitBirthPro}
</if>
<if
test=
"tSocialFundHistory.unitBirthMoney != null"
>
AND a.UNIT_BIRTH_MONEY = #{tSocialFundHistory.unitBirthMoney}
</if>
<if
test=
"tSocialFundHistory.unitBigailmentPro != null"
>
AND a.UNIT_BIGAILMENT_PRO = #{tSocialFundHistory.unitBigailmentPro}
</if>
<if
test=
"tSocialFundHistory.unitBigailmentMoney != null"
>
AND a.UNIT_BIGAILMENT_MONEY = #{tSocialFundHistory.unitBigailmentMoney}
</if>
<if
test=
"tSocialFundHistory.personalPersionPro != null"
>
AND a.PERSONAL_PERSION_PRO = #{tSocialFundHistory.personalPersionPro}
</if>
<if
test=
"tSocialFundHistory.personalPersionMoney != null"
>
AND a.PERSONAL_PERSION_MONEY = #{tSocialFundHistory.personalPersionMoney}
</if>
<if
test=
"tSocialFundHistory.personalMedicalPro != null"
>
AND a.PERSONAL_MEDICAL_PRO = #{tSocialFundHistory.personalMedicalPro}
</if>
<if
test=
"tSocialFundHistory.personalMedicalMoney != null"
>
AND a.PERSONAL_MEDICAL_MONEY = #{tSocialFundHistory.personalMedicalMoney}
</if>
<if
test=
"tSocialFundHistory.personalUnemploymentPro != null"
>
AND a.PERSONAL_UNEMPLOYMENT_PRO = #{tSocialFundHistory.personalUnemploymentPro}
</if>
<if
test=
"tSocialFundHistory.personalUnemploymentMoney != null"
>
AND a.PERSONAL_UNEMPLOYMENT_MONEY = #{tSocialFundHistory.personalUnemploymentMoney}
</if>
<if
test=
"tSocialFundHistory.personalBigailmentPro != null"
>
AND a.PERSONAL_BIGAILMENT_PRO = #{tSocialFundHistory.personalBigailmentPro}
</if>
<if
test=
"tSocialFundHistory.personalBigailmentMoney != null"
>
AND a.PERSONAL_BIGAILMENT_MONEY = #{tSocialFundHistory.personalBigailmentMoney}
</if>
<if
test=
"tSocialFundHistory.unitFundBase != null"
>
AND a.UNIT_FUND_BASE = #{tSocialFundHistory.unitFundBase}
</if>
<if
test=
"tSocialFundHistory.personalFundBase != null"
>
AND a.PERSONAL_FUND_BASE = #{tSocialFundHistory.personalFundBase}
</if>
<if
test=
"tSocialFundHistory.unitFundProp != null"
>
AND a.UNIT_FUND_PROP = #{tSocialFundHistory.unitFundProp}
</if>
<if
test=
"tSocialFundHistory.personalFundProp != null"
>
AND a.PERSONAL_FUND_PROP = #{tSocialFundHistory.personalFundProp}
</if>
<if
test=
"tSocialFundHistory.unitFundMoney != null"
>
AND a.UNIT_FUND_MONEY = #{tSocialFundHistory.unitFundMoney}
</if>
<if
test=
"tSocialFundHistory.personalFundMoney != null"
>
AND a.PERSONAL_FUND_MONEY = #{tSocialFundHistory.personalFundMoney}
</if>
<if
test=
"tSocialFundHistory.isOld != null"
>
AND a.IS_OLD = #{tSocialFundHistory.isOld}
</if>
<if
test=
"tSocialFundHistory.paymentType != null"
>
AND a.PAYMENT_TYPE = #{tSocialFundHistory.paymentType}
</if>
<if
test=
"tSocialFundHistory.isSocial != null"
>
AND a.IS_SOCIAL = #{tSocialFundHistory.isSocial}
</if>
<if
test=
"tSocialFundHistory.isFund != null"
>
AND a.IS_FUND = #{tSocialFundHistory.isFund}
</if>
<if
test=
"tSocialFundHistory.socialId != null and tSocialFundHistory.socialId.trim() != ''"
>
AND a.SOCIAL_ID = #{tSocialFundHistory.socialId}
</if>
<if
test=
"tSocialFundHistory.fundId != null and tSocialFundHistory.fundId.trim() != ''"
>
AND a.FUND_ID = #{tSocialFundHistory.fundId}
</if>
<if
test=
"tSocialFundHistory.createBy != null and tSocialFundHistory.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tSocialFundHistory.createBy}
</if>
<if
test=
"tSocialFundHistory.updateBy != null and tSocialFundHistory.updateBy.trim() != ''"
>
AND a.UPDATE_BY = #{tSocialFundHistory.updateBy}
</if>
<if
test=
"tSocialFundHistory.createName != null and tSocialFundHistory.createName.trim() != ''"
>
AND a.CREATE_NAME = #{tSocialFundHistory.createName}
</if>
<if
test=
"tSocialFundHistory.updateTime != null"
>
AND a.UPDATE_TIME = #{tSocialFundHistory.updateTime}
</if>
<if
test=
"tSocialFundHistory.id != null and tSocialFundHistory.id.trim() != ''"
>
AND a.ID = #{tSocialFundHistory.id}
</if>
<if
test=
"tSocialFundHistory.empName != null and tSocialFundHistory.empName.trim() != ''"
>
AND a.EMP_NAME = #{tSocialFundHistory.empName}
</if>
<if
test=
"tSocialFundHistory.empIdcard != null and tSocialFundHistory.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{tSocialFundHistory.empIdcard}
</if>
<if
test=
"tSocialFundHistory.empId != null and tSocialFundHistory.empId.trim() != ''"
>
AND a.EMP_ID = #{tSocialFundHistory.empId}
</if>
<if
test=
"tSocialFundHistory.unitPersionPro != null"
>
AND a.UNIT_PERSION_PRO = #{tSocialFundHistory.unitPersionPro}
</if>
<if
test=
"tSocialFundHistory.unitPersionMoney != null"
>
AND a.UNIT_PERSION_MONEY = #{tSocialFundHistory.unitPersionMoney}
</if>
<if
test=
"tSocialFundHistory.unitMedicalPro != null"
>
AND a.UNIT_MEDICAL_PRO = #{tSocialFundHistory.unitMedicalPro}
</if>
<if
test=
"tSocialFundHistory.unitMedicalMoney != null"
>
AND a.UNIT_MEDICAL_MONEY = #{tSocialFundHistory.unitMedicalMoney}
</if>
<if
test=
"tSocialFundHistory.unitUnemploymentPro != null"
>
AND a.UNIT_UNEMPLOYMENT_PRO = #{tSocialFundHistory.unitUnemploymentPro}
</if>
<if
test=
"tSocialFundHistory.unitUnemploymentMoney != null"
>
AND a.UNIT_UNEMPLOYMENT_MONEY = #{tSocialFundHistory.unitUnemploymentMoney}
</if>
<if
test=
"tSocialFundHistory.unitInjuryPro != null"
>
AND a.UNIT_INJURY_PRO = #{tSocialFundHistory.unitInjuryPro}
</if>
<if
test=
"tSocialFundHistory.unitInjuryMoney != null"
>
AND a.UNIT_INJURY_MONEY = #{tSocialFundHistory.unitInjuryMoney}
</if>
<if
test=
"tSocialFundHistory.unitBirthPro != null"
>
AND a.UNIT_BIRTH_PRO = #{tSocialFundHistory.unitBirthPro}
</if>
<if
test=
"tSocialFundHistory.unitBirthMoney != null"
>
AND a.UNIT_BIRTH_MONEY = #{tSocialFundHistory.unitBirthMoney}
</if>
<if
test=
"tSocialFundHistory.unitBigailmentPro != null"
>
AND a.UNIT_BIGAILMENT_PRO = #{tSocialFundHistory.unitBigailmentPro}
</if>
<if
test=
"tSocialFundHistory.unitBigailmentMoney != null"
>
AND a.UNIT_BIGAILMENT_MONEY = #{tSocialFundHistory.unitBigailmentMoney}
</if>
<if
test=
"tSocialFundHistory.personalPersionPro != null"
>
AND a.PERSONAL_PERSION_PRO = #{tSocialFundHistory.personalPersionPro}
</if>
<if
test=
"tSocialFundHistory.personalPersionMoney != null"
>
AND a.PERSONAL_PERSION_MONEY = #{tSocialFundHistory.personalPersionMoney}
</if>
<if
test=
"tSocialFundHistory.personalMedicalPro != null"
>
AND a.PERSONAL_MEDICAL_PRO = #{tSocialFundHistory.personalMedicalPro}
</if>
<if
test=
"tSocialFundHistory.personalMedicalMoney != null"
>
AND a.PERSONAL_MEDICAL_MONEY = #{tSocialFundHistory.personalMedicalMoney}
</if>
<if
test=
"tSocialFundHistory.personalUnemploymentPro != null"
>
AND a.PERSONAL_UNEMPLOYMENT_PRO = #{tSocialFundHistory.personalUnemploymentPro}
</if>
<if
test=
"tSocialFundHistory.personalUnemploymentMoney != null"
>
AND a.PERSONAL_UNEMPLOYMENT_MONEY = #{tSocialFundHistory.personalUnemploymentMoney}
</if>
<if
test=
"tSocialFundHistory.personalBigailmentPro != null"
>
AND a.PERSONAL_BIGAILMENT_PRO = #{tSocialFundHistory.personalBigailmentPro}
</if>
<if
test=
"tSocialFundHistory.personalBigailmentMoney != null"
>
AND a.PERSONAL_BIGAILMENT_MONEY = #{tSocialFundHistory.personalBigailmentMoney}
</if>
<if
test=
"tSocialFundHistory.unitFundBase != null"
>
AND a.UNIT_FUND_BASE = #{tSocialFundHistory.unitFundBase}
</if>
<if
test=
"tSocialFundHistory.personalFundBase != null"
>
AND a.PERSONAL_FUND_BASE = #{tSocialFundHistory.personalFundBase}
</if>
<if
test=
"tSocialFundHistory.unitFundProp != null"
>
AND a.UNIT_FUND_PROP = #{tSocialFundHistory.unitFundProp}
</if>
<if
test=
"tSocialFundHistory.personalFundProp != null"
>
AND a.PERSONAL_FUND_PROP = #{tSocialFundHistory.personalFundProp}
</if>
<if
test=
"tSocialFundHistory.unitFundMoney != null"
>
AND a.UNIT_FUND_MONEY = #{tSocialFundHistory.unitFundMoney}
</if>
<if
test=
"tSocialFundHistory.personalFundMoney != null"
>
AND a.PERSONAL_FUND_MONEY = #{tSocialFundHistory.personalFundMoney}
</if>
<if
test=
"tSocialFundHistory.paymentType != null"
>
AND a.PAYMENT_TYPE = #{tSocialFundHistory.paymentType}
</if>
<if
test=
"tSocialFundHistory.isSocial != null"
>
AND a.IS_SOCIAL = #{tSocialFundHistory.isSocial}
</if>
<if
test=
"tSocialFundHistory.isFund != null"
>
AND a.IS_FUND = #{tSocialFundHistory.isFund}
</if>
<if
test=
"tSocialFundHistory.socialFundId != null and tSocialFundHistory.socialFundId.trim() != ''"
>
AND a.SOCIAL_FUND_ID = #{tSocialFundHistory.socialFundId}
</if>
<if
test=
"tSocialFundHistory.createBy != null and tSocialFundHistory.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tSocialFundHistory.createBy}
</if>
<if
test=
"tSocialFundHistory.updateBy != null and tSocialFundHistory.updateBy.trim() != ''"
>
AND a.UPDATE_BY = #{tSocialFundHistory.updateBy}
</if>
<if
test=
"tSocialFundHistory.createName != null and tSocialFundHistory.createName.trim() != ''"
>
AND a.CREATE_NAME = #{tSocialFundHistory.createName}
</if>
<if
test=
"tSocialFundHistory.updateTime != null"
>
AND a.UPDATE_TIME = #{tSocialFundHistory.updateTime}
</if>
</if>
</sql>
<!--tSocialFundHistory简单分页查询-->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment