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
bcaf7cd3
Commit
bcaf7cd3
authored
Aug 11, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
1bac909d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
34 deletions
+78
-34
TSalaryAccount.java
...yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
+15
-15
TSocialFundInfo.java
...ifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
+5
-0
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+58
-19
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
View file @
bcaf7cd3
...
...
@@ -110,28 +110,28 @@ public class TSalaryAccount {
@ExcelProperty
(
"开户行总行"
)
private
String
bankName
;
/**
*
结算部门
id
*
项目
id
*/
@ExcelAttribute
(
name
=
"
结算部门id"
,
isNotEmpty
=
true
,
errorInfo
=
"结算部门
id不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"
结算部门
id不能为空"
)
@Length
(
max
=
32
,
message
=
"
结算部门
id不能超过32个字符"
)
@ExcelProperty
(
"
结算部门
id"
)
@ExcelAttribute
(
name
=
"
项目id"
,
isNotEmpty
=
true
,
errorInfo
=
"项目
id不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"
项目
id不能为空"
)
@Length
(
max
=
32
,
message
=
"
项目
id不能超过32个字符"
)
@ExcelProperty
(
"
项目
id"
)
private
String
deptId
;
/**
*
结算部门
no
*
项目
no
*/
@ExcelAttribute
(
name
=
"
结算部门no"
,
isNotEmpty
=
true
,
errorInfo
=
"结算部门
no不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"
结算部门no
不能为空"
)
@Length
(
max
=
50
,
message
=
"
结算部门no
不能超过50个字符"
)
@ExcelProperty
(
"
结算部门no
"
)
@ExcelAttribute
(
name
=
"
项目编码"
,
isNotEmpty
=
true
,
errorInfo
=
"项目
no不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"
项目编码
不能为空"
)
@Length
(
max
=
50
,
message
=
"
项目编码
不能超过50个字符"
)
@ExcelProperty
(
"
项目编码
"
)
private
String
deptNo
;
/**
*
结算部门
name
*
项目
name
*/
@ExcelAttribute
(
name
=
"
结算部门name"
,
isNotEmpty
=
true
,
errorInfo
=
"结算部门
name不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"
结算部门name
不能为空"
)
@Length
(
max
=
50
,
message
=
"
结算部门name
不能超过50个字符"
)
@ExcelProperty
(
"
结算部门name
"
)
@ExcelAttribute
(
name
=
"
项目名称"
,
isNotEmpty
=
true
,
errorInfo
=
"项目
name不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"
项目名称
不能为空"
)
@Length
(
max
=
50
,
message
=
"
项目名称
不能超过50个字符"
)
@ExcelProperty
(
"
项目名称
"
)
private
String
deptName
;
/**
* 工资发放方式(0现金/1银行)/2线下
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
View file @
bcaf7cd3
...
...
@@ -1043,4 +1043,9 @@ public class TSocialFundInfo extends BaseEntity {
// 执行月份,整体调基使用的
@TableField
(
exist
=
false
)
private
String
doMonth
;
// 基数配置,户调基使用的
@TableField
(
exist
=
false
)
private
SysBaseSetInfo
socialSetInfo
;
@TableField
(
exist
=
false
)
private
SysBaseSetInfo
fundSetInfo
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
bcaf7cd3
...
...
@@ -459,7 +459,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private
void
initSocialLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
tSocialInfo
,
boolean
isReduceFund
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
String
sfMapKey
,
TForecastLibrary
historyLibrary
)
{
,
String
sfMapKey
,
TForecastLibrary
historyLibrary
,
boolean
isOnly
)
{
TForecastLibrary
lib
=
new
TForecastLibrary
();
lib
.
setDataPush
(
CommonConstants
.
ZERO_INT
);
lib
.
setSocialHousehold
(
tSocialInfo
.
getSocialHousehold
());
...
...
@@ -495,7 +495,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
isReduceSocial
=
false
;
}
lib
=
initForecastLibrary
(
lib
,
tSocialInfo
,
null
,
monthT
,
isReduceFund
,
isReduceSocial
,
agentConfigMap
,
historyLibrary
);
lib
=
initForecastLibrary
(
lib
,
tSocialInfo
,
null
,
monthT
,
isReduceFund
,
isReduceSocial
,
agentConfigMap
,
historyLibrary
,
isOnly
);
saveLibraryMap
.
put
(
sfMapKey
,
lib
);
}
...
...
@@ -522,7 +523,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
// historyLibrary_历史比例(暂时未用到)
private
TForecastLibrary
initForecastLibrary
(
TForecastLibrary
library
,
TSocialFundInfo
socialInfo
,
TSocialFundInfo
fund
,
Integer
month
,
boolean
isReduceFund
,
boolean
isReduceSocial
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
TForecastLibrary
historyLibrary
)
{
,
boolean
isReduceSocial
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
TForecastLibrary
historyLibrary
,
boolean
isOnly
)
{
if
(
null
!=
socialInfo
&&
!
isReduceSocial
)
{
library
.
setSocialId
(
socialInfo
.
getId
());
library
.
setUnitBitailmentFee
(
BigDecimal
.
ZERO
);
...
...
@@ -535,12 +537,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
TAgentConfig
configPersonal
=
getAgentConfig
(
agentConfigMap
,
socialInfo
,
library
.
getSocialPayMonth
(),
CommonConstants
.
ONE_STRING
);
// 基数配置
SysBaseSetInfo
sysBaseSetInfo
=
this
.
getSysBaseSetInfo
(
CommonConstants
.
ZERO_STRING
,
socialInfo
.
getSocialHousehold
()
,
library
.
getSocialPayMonth
(),
socialInfo
.
getSocialProvince
(),
socialInfo
.
getSocialCity
(),
socialInfo
.
getSocialTown
());
SysBaseSetInfo
sysBaseSetInfo
;
if
(
isOnly
)
{
sysBaseSetInfo
=
socialInfo
.
getSocialSetInfo
();
}
else
{
sysBaseSetInfo
=
this
.
getSysBaseSetInfo
(
CommonConstants
.
ZERO_STRING
,
socialInfo
.
getSocialHousehold
()
,
library
.
getSocialPayMonth
(),
socialInfo
.
getSocialProvince
(),
socialInfo
.
getSocialCity
(),
socialInfo
.
getSocialTown
());
}
// 初始化大病:
this
.
initLibraryBigMoneyBySocial
(
library
,
socialInfo
,
sysBaseSetInfo
);
initUnitAndPersonalLibrary
(
library
,
socialInfo
,
sysBaseSetInfo
,
historyLibrary
);
initUnitAndPersonalLibrary
(
library
,
socialInfo
,
sysBaseSetInfo
,
historyLibrary
,
isOnly
);
if
(
null
!=
configAll
||
null
!=
configUnit
||
null
!=
configPersonal
)
{
if
(
null
!=
configPersonal
)
{
initPersonalLibByConfig
(
library
,
configPersonal
);
...
...
@@ -771,13 +778,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @Date 2020-08-03
**/
private
void
initUnitAndPersonalLibrary
(
TForecastLibrary
library
,
TSocialFundInfo
socialInfo
,
SysBaseSetInfo
sysBaseSetInfo
,
TForecastLibrary
historyLibrary
)
{
initLibrayOfPersonal
(
library
,
socialInfo
,
sysBaseSetInfo
,
historyLibrary
);
initLibraryOfUnit
(
library
,
socialInfo
,
sysBaseSetInfo
,
historyLibrary
);
,
SysBaseSetInfo
sysBaseSetInfo
,
TForecastLibrary
historyLibrary
,
boolean
isOnly
)
{
initLibrayOfPersonal
(
library
,
socialInfo
,
sysBaseSetInfo
,
historyLibrary
,
isOnly
);
initLibraryOfUnit
(
library
,
socialInfo
,
sysBaseSetInfo
,
historyLibrary
,
isOnly
);
}
private
void
initLibrayOfPersonal
(
TForecastLibrary
library
,
TSocialFundInfo
socialInfo
,
SysBaseSetInfo
sysBaseSetInfo
,
TForecastLibrary
historyLibrary
)
{
,
SysBaseSetInfo
sysBaseSetInfo
,
TForecastLibrary
historyLibrary
,
boolean
isOnly
)
{
// 个人养老基数
BigDecimal
personalPersionBase
;
// 个人医疗基数
...
...
@@ -831,7 +838,18 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
personalUnemploymentMoney
=
BigDecimalUtils
.
safeMultiply
(
personalUnemploymentBase
,
personalUnemploymentPro
,
CommonConstants
.
ONE_OF_PERCENT
);
if
(
library
.
getSocialPayMonth
()
!=
null
)
{
// 户调基不看起缴时间
if
(
isOnly
)
{
library
.
setPersonalPensionBase
(
personalPersionBase
);
library
.
setPersonalPersionPro
(
personalPersionPro
);
library
.
setPersonalPensionFee
(
personalPersionMoney
);
library
.
setPersonalMedicalBase
(
personalMedicalBase
);
library
.
setPersonalMedicalPro
(
personalMedicalPro
);
library
.
setPersonalMedicalFee
(
personalMedicalMoney
);
library
.
setPersonalUnemploymentBase
(
personalUnemploymentBase
);
library
.
setPersonalUnemploymentPro
(
personalUnemploymentPro
);
library
.
setPersonalUnemploymentFee
(
personalUnemploymentMoney
);
}
else
if
(
library
.
getSocialPayMonth
()
!=
null
)
{
int
libraryPayMonth
=
Integer
.
parseInt
(
library
.
getSocialPayMonth
());
if
(
socialInfo
.
getPensionStart
()
!=
null
&&
libraryPayMonth
>=
DateUtil
.
formatDateInt
(
socialInfo
.
getPensionStart
()))
{
library
.
setPersonalPensionBase
(
personalPersionBase
);
...
...
@@ -854,7 +872,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
private
void
initLibraryOfUnit
(
TForecastLibrary
library
,
TSocialFundInfo
socialInfo
,
SysBaseSetInfo
sysBaseSetInfo
,
TForecastLibrary
historyLibrary
)
{
,
SysBaseSetInfo
sysBaseSetInfo
,
TForecastLibrary
historyLibrary
,
boolean
isOnly
)
{
// 单位养老基数
BigDecimal
unitPersionBase
;
// 单位医疗基数
...
...
@@ -938,7 +956,24 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
unitBirthMoney
=
BigDecimalUtils
.
safeMultiply
(
unitBirthBase
,
unitBirthPro
,
CommonConstants
.
ONE_OF_PERCENT
);
if
(
library
.
getSocialPayMonth
()
!=
null
)
{
// 户调基不看起缴时间
if
(
isOnly
)
{
library
.
setUnitPensionBase
(
unitPersionBase
);
library
.
setUnitPersionPro
(
unitPersionPro
);
library
.
setUnitPensionFee
(
unitPersionMoney
);
library
.
setUnitMedicalBase
(
unitMedicalBase
);
library
.
setUnitMedicalPro
(
unitMedicalPro
);
library
.
setUnitMedicalFee
(
unitMedicalMoney
);
library
.
setUnitUnemploymentBase
(
unitUnemploymentBase
);
library
.
setUnitUnemploymentPro
(
unitUnemploymentPro
);
library
.
setUnitUnemploymentFee
(
unitUnemploymentMoney
);
library
.
setUnitInjuryBase
(
unitInjuryBase
);
library
.
setUnitInjuryPro
(
unitInjuryPro
);
library
.
setUnitWorkInjuryFee
(
unitInjuryMoney
);
library
.
setUnitBirthBase
(
unitBirthBase
);
library
.
setUnitBirthPro
(
unitBirthPro
);
library
.
setUnitBirthFee
(
unitBirthMoney
);
}
else
if
(
library
.
getSocialPayMonth
()
!=
null
)
{
int
libraryPayMonth
=
Integer
.
parseInt
(
library
.
getSocialPayMonth
());
if
(
socialInfo
.
getPensionStart
()
!=
null
&&
libraryPayMonth
>=
DateUtil
.
formatDateInt
(
socialInfo
.
getPensionStart
()))
{
library
.
setUnitPensionBase
(
unitPersionBase
);
...
...
@@ -1256,7 +1291,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
**/
private
void
initFundLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
String
mapKeyStr
,
TForecastLibrary
historyLibrary
)
{
,
TForecastLibrary
historyLibrary
,
boolean
isOnly
)
{
TForecastLibrary
lib
=
new
TForecastLibrary
();
lib
.
setDataPush
(
CommonConstants
.
ZERO_INT
);
lib
.
setProvidentHousehold
(
providentFund
.
getProvidentHousehold
());
...
...
@@ -1301,7 +1336,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
isReduceFund
=
false
;
}
lib
=
initForecastLibrary
(
lib
,
null
,
providentFund
,
monthT
,
isReduceFund
,
isReduceSocial
,
null
,
historyLibrary
);
lib
=
initForecastLibrary
(
lib
,
null
,
providentFund
,
monthT
,
isReduceFund
,
isReduceSocial
,
null
,
historyLibrary
,
isOnly
);
saveLibraryMap
.
put
(
mapKeyStr
,
lib
);
}
...
...
@@ -1448,6 +1483,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
this
.
changeSocialInfoByBase
(
socialFundInfo
,
sysBaseSetInfo
);
socialFundInfo
.
setDoMonth
(
sysBaseSetInfo
.
getDoMonth
());
socialFundInfo
.
setSocialSetInfo
(
sysBaseSetInfo
);
socialFundInfoMap
.
put
(
socialFundInfo
.
getId
(),
socialFundInfo
);
}
}
...
...
@@ -1461,6 +1497,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoList
)
{
this
.
changeFundInfoByBase
(
socialFundInfo
,
sysBaseSetInfo
);
socialFundInfo
.
setDoMonth
(
sysBaseSetInfo
.
getDoMonth
());
socialFundInfo
.
setFundSetInfo
(
sysBaseSetInfo
);
socialFundInfoMap
.
put
(
socialFundInfo
.
getId
(),
socialFundInfo
);
}
}
...
...
@@ -1925,7 +1962,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
historyLibrary
=
socialHistoryMap
.
get
(
sfMapKey
);
if
(
historyLibrary
!=
null
)
{
// 初始化社保
initSocialLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
sfMapKey
,
historyLibrary
);
initSocialLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
sfMapKey
,
historyLibrary
,
isOnly
);
if
(
null
!=
tForecastLibrary
)
{
newForecastLibrary
=
saveLibraryMap
.
get
(
sfMapKey
);
if
(
null
!=
newForecastLibrary
)
{
...
...
@@ -1946,7 +1984,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
historyLibrary
=
socialHistoryMap
.
get
(
sfMapKey
);
// 初始化社保
initSocialLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
sfMapKey
,
historyLibrary
);
initSocialLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
sfMapKey
,
historyLibrary
,
isOnly
);
if
(
null
!=
tForecastLibrary
)
{
newForecastLibrary
=
saveLibraryMap
.
get
(
sfMapKey
);
if
(
null
!=
newForecastLibrary
)
{
...
...
@@ -1977,7 +2016,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
historyLibrary
=
fundHistoryMap
.
get
(
sfMapKey
);
if
(
historyLibrary
!=
null
)
{
// 初始化公积金
initFundLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
sfMapKey
,
historyLibrary
);
initFundLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
sfMapKey
,
historyLibrary
,
isOnly
);
if
(
null
!=
tForecastLibrary
)
{
newForecastLibrary
=
saveLibraryMap
.
get
(
sfMapKey
);
if
(
null
!=
newForecastLibrary
)
{
...
...
@@ -1999,7 +2038,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
historyLibrary
=
fundHistoryMap
.
get
(
sfMapKey
);
// 初始化公积金
initFundLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
sfMapKey
,
historyLibrary
);
initFundLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
sfMapKey
,
historyLibrary
,
isOnly
);
if
(
null
!=
tForecastLibrary
)
{
newForecastLibrary
=
saveLibraryMap
.
get
(
sfMapKey
);
if
(
null
!=
newForecastLibrary
)
{
...
...
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