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
325f1f86
Commit
325f1f86
authored
Aug 17, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工资-按照项目的配置来取社保公积金
parent
44935282
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
161 additions
and
154 deletions
+161
-154
TSettleDomain.java
...ifu/cloud/plus/v1/yifu/archives/entity/TSettleDomain.java
+16
-0
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+56
-55
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+89
-99
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TSettleDomain.java
View file @
325f1f86
...
@@ -16,10 +16,12 @@
...
@@ -16,10 +16,12 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -328,5 +330,19 @@ public class TSettleDomain extends BaseEntity {
...
@@ -328,5 +330,19 @@ public class TSettleDomain extends BaseEntity {
@Schema
(
description
=
"回款周期1-12"
)
@Schema
(
description
=
"回款周期1-12"
)
private
String
backPayCycle
;
private
String
backPayCycle
;
/**
* 社保类型0:缴费库;1:预估库
*/
@ExcelAttribute
(
name
=
"社保类型0:缴费库;1:预估库"
)
@ExcelProperty
(
"社保类型0:缴费库;1:预估库"
)
@Schema
(
description
=
"社保类型0:缴费库;1:预估库"
)
private
String
socialType
;
/**
* 公积金类型0:缴费库;1:预估库
*/
@ExcelAttribute
(
name
=
"公积金类型0:缴费库;1:预估库"
)
@ExcelProperty
(
"公积金类型0:缴费库;1:预估库"
)
@Schema
(
description
=
"公积金类型0:缴费库;1:预估库"
)
private
String
fundType
;
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
325f1f86
...
@@ -71,13 +71,12 @@
...
@@ -71,13 +71,12 @@
<result
property=
"exceptionRemark"
column=
"EXCEPTION_REMARK"
/>
<result
property=
"exceptionRemark"
column=
"EXCEPTION_REMARK"
/>
<result
property=
"existAdvancePayment"
column=
"EXIST_ADVANCE_PAYMENT"
/>
<result
property=
"existAdvancePayment"
column=
"EXIST_ADVANCE_PAYMENT"
/>
<result
property=
"backPayCycle"
column=
"BACK_PAY_CYCLE"
/>
<result
property=
"backPayCycle"
column=
"BACK_PAY_CYCLE"
/>
<result
property=
"socialType"
column=
"SOCIAL_TYPE"
/>
<result
property=
"fundType"
column=
"FUND_TYPE"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a
a.ID,
.
ID
,
a.DEPART_NO,
a.DEPART_NO,
a.DEPART_NAME,
a.DEPART_NAME,
a.IS_NEW,
a.IS_NEW,
...
@@ -128,7 +127,9 @@
...
@@ -128,7 +127,9 @@
a.CREATE_NAME,
a.CREATE_NAME,
a.CREATE_TIME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_BY,
a.UPDATE_TIME
a.UPDATE_TIME,
a.SOCIAL_TYPE,
a.FUND_TYPE
</sql>
</sql>
<resultMap
id=
"tSettleDomainSelectVoMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo"
>
<resultMap
id=
"tSettleDomainSelectVoMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo"
>
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
325f1f86
...
@@ -292,7 +292,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -292,7 +292,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
Common
.
isEmpty
(
invoiceTitle
))
{
if
(
Common
.
isEmpty
(
invoiceTitle
))
{
return
R
.
failed
(
"新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入"
);
return
R
.
failed
(
"新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入"
);
}
}
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
"新建工资主表失败-获取登录人信息为空"
);
return
R
.
failed
(
"新建工资主表失败-获取登录人信息为空"
);
...
@@ -369,8 +368,20 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -369,8 +368,20 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccountItem
sai
,
TSettleDomainSelectVo
dept
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccountItem
sai
,
TSettleDomainSelectVo
dept
,
String
invoiceTitle
,
YifuUser
user
,
LocalDateTime
nowTime
,
TSalaryStandard
salary
,
String
invoiceTitle
,
YifuUser
user
,
LocalDateTime
nowTime
,
TSalaryStandard
salary
,
boolean
isActual
)
{
,
boolean
isActual
)
{
// 社保类型0:缴费库;1:预估库
String
socialType
=
CommonConstants
.
ZERO_STRING
;
if
(
Common
.
isNotNull
(
dept
.
getSocialType
()))
{
socialType
=
dept
.
getSocialType
();
}
// 公积金类型0:缴费库;1:预估库
String
fundType
=
CommonConstants
.
ZERO_STRING
;
if
(
Common
.
isNotNull
(
dept
.
getFundType
()))
{
fundType
=
dept
.
getFundType
();
}
List
<
TSalaryAccount
>
aList
;
List
<
TSalaryAccount
>
aList
;
TSalaryAccount
a
;
//定库:
TSalaryAccount
a
;
//定库:
List
<
TPaymentBySalaryVo
>
socialEstmateList
=
null
;
//社保缴费库
List
<
TPaymentBySalaryVo
>
socialEstmateList
=
null
;
//社保缴费库
List
<
TPaymentBySalaryVo
>
fundEstmateList
=
null
;
//公积金缴费库
List
<
TPaymentBySalaryVo
>
fundEstmateList
=
null
;
//公积金缴费库
List
<
TPaymentBySalaryVo
>
socialForecastList
=
null
;
//社保预估库
List
<
TPaymentBySalaryVo
>
socialForecastList
=
null
;
//社保预估库
...
@@ -386,11 +397,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -386,11 +397,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
else
{
}
else
{
forecast
.
setSocialPayMonth
(
SalaryConstants
.
PRIORITY_ZERO
);
//没优先级,则限制住
forecast
.
setSocialPayMonth
(
SalaryConstants
.
PRIORITY_ZERO
);
//没优先级,则限制住
}
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
socialType
))
{
R
<
TPaymentVo
>
tPaymentVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
R
<
TPaymentVo
>
tPaymentVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tpaymentinfo/inner/selectTPaymentBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/tpaymentinfo/inner/selectTPaymentBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
socialEstmateList
=
tPaymentVoR
.
getData
().
getPaymentList
();
socialEstmateList
=
tPaymentVoR
.
getData
().
getPaymentList
();
}
}
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialType
))
{
// 预估数据
// 预估数据
R
<
TPaymentVo
>
tForecastVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
R
<
TPaymentVo
>
tForecastVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tforecastlibrary/inner/selectTForecastBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/tforecastlibrary/inner/selectTForecastBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
...
@@ -398,6 +412,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -398,6 +412,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
socialForecastList
=
tForecastVoR
.
getData
().
getPaymentList
();
socialForecastList
=
tForecastVoR
.
getData
().
getPaymentList
();
}
}
}
}
}
if
(
salaryAccountVo
!=
null
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
salaryAccountVo
.
getIsDeductFund
()))
{
if
(
salaryAccountVo
!=
null
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
salaryAccountVo
.
getIsDeductFund
()))
{
forecast
=
new
TPaymentBySalaryVo
();
forecast
=
new
TPaymentBySalaryVo
();
forecast
.
setSettleDomainId
(
dept
.
getId
());
forecast
.
setSettleDomainId
(
dept
.
getId
());
...
@@ -408,11 +423,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -408,11 +423,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
else
{
}
else
{
forecast
.
setProvidentPayMonth
(
SalaryConstants
.
PRIORITY_ZERO
);
//没优先级,则限制住
forecast
.
setProvidentPayMonth
(
SalaryConstants
.
PRIORITY_ZERO
);
//没优先级,则限制住
}
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
fundType
))
{
R
<
TPaymentVo
>
tPaymentVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
R
<
TPaymentVo
>
tPaymentVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tpaymentinfo/inner/selectTPaymentBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/tpaymentinfo/inner/selectTPaymentBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
fundEstmateList
=
tPaymentVoR
.
getData
().
getPaymentList
();
fundEstmateList
=
tPaymentVoR
.
getData
().
getPaymentList
();
}
}
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
fundType
))
{
// 预估数据
// 预估数据
R
<
TPaymentVo
>
tForecastVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
R
<
TPaymentVo
>
tForecastVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tforecastlibrary/inner/selectTForecastBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/tforecastlibrary/inner/selectTForecastBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
...
@@ -420,6 +438,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -420,6 +438,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
fundForecastList
=
tForecastVoR
.
getData
().
getPaymentList
();
fundForecastList
=
tForecastVoR
.
getData
().
getPaymentList
();
}
}
}
}
}
aList
=
new
ArrayList
<>();
aList
=
new
ArrayList
<>();
//true:从缴费库等扣社保标识;false:走代扣
//true:从缴费库等扣社保标识;false:走代扣
boolean
modelPersonSocialFlag
;
boolean
modelPersonSocialFlag
;
...
@@ -571,30 +590,32 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -571,30 +590,32 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
}
}
if
(
Common
.
isEmpty
(
a
.
getIsDeductSocial
())
||
SalaryConstants
.
IS_DEDUCT_ONE
.
equals
(
a
.
getIsDeductSocial
()))
{
if
(
Common
.
isEmpty
(
a
.
getIsDeductSocial
())
||
SalaryConstants
.
IS_DEDUCT_ONE
.
equals
(
a
.
getIsDeductSocial
()))
{
a
.
setSocialType
(
socialType
);
a
.
setIsDeductSocial
(
SalaryConstants
.
IS_DEDUCT_ONE
);
a
.
setIsDeductSocial
(
SalaryConstants
.
IS_DEDUCT_ONE
);
//社保公积金金额扣缴: true : 从库里扣除社保等;false : 走代扣
//社保公积金金额扣缴: true : 从库里扣除社保等;false : 走代扣
if
(
modelPersonSocialFlag
)
{
if
(
modelPersonSocialFlag
)
{
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
PERSONAL_SOCIAL
,
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
PERSONAL_SOCIAL
,
SalaryConstants
.
PERSONAL_SOCIAL_JAVA
,
SalaryConstants
.
PERSONAL_SOCIAL_JAVA
,
this
.
getSocialOrFundMoneyForForecast
(
a
,
deptSet
,
a
.
getEmpIdcard
(),
socialEstmateList
,
socialForecastList
,
true
,
true
,
socialList
,
fundList
,
forecastSocialList
,
forecastFundList
),
CommonConstants
.
ONE_INT
));
this
.
getSocialOrFundMoneyForForecast
(
socialType
,
deptSet
,
a
.
getEmpIdcard
(),
socialEstmateList
,
socialForecastList
,
true
,
true
,
socialList
,
fundList
,
forecastSocialList
,
forecastFundList
),
CommonConstants
.
ONE_INT
));
}
}
if
(
modelUnitSocialFlag
)
{
if
(
modelUnitSocialFlag
)
{
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
UNIT_SOCIAL
,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
UNIT_SOCIAL
,
SalaryConstants
.
UNIT_SOCIAL_JAVA
,
SalaryConstants
.
UNIT_SOCIAL_JAVA
,
this
.
getSocialOrFundMoneyForForecast
(
a
,
deptSet
,
a
.
getEmpIdcard
(),
socialEstmateList
,
socialForecastList
,
true
,
false
,
socialList
,
fundList
,
forecastSocialList
,
forecastFundList
),
CommonConstants
.
ZERO_INT
);
this
.
getSocialOrFundMoneyForForecast
(
socialType
,
deptSet
,
a
.
getEmpIdcard
(),
socialEstmateList
,
socialForecastList
,
true
,
false
,
socialList
,
fundList
,
forecastSocialList
,
forecastFundList
),
CommonConstants
.
ZERO_INT
);
}
}
}
}
if
(
Common
.
isEmpty
(
a
.
getIsDeductFund
())
||
SalaryConstants
.
IS_DEDUCT_ONE
.
equals
(
a
.
getIsDeductFund
()))
{
if
(
Common
.
isEmpty
(
a
.
getIsDeductFund
())
||
SalaryConstants
.
IS_DEDUCT_ONE
.
equals
(
a
.
getIsDeductFund
()))
{
a
.
setFundType
(
fundType
);
a
.
setIsDeductFund
(
SalaryConstants
.
IS_DEDUCT_ONE
);
a
.
setIsDeductFund
(
SalaryConstants
.
IS_DEDUCT_ONE
);
if
(
modelPersonFundFlag
)
{
if
(
modelPersonFundFlag
)
{
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
PERSONAL_FUND
,
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
PERSONAL_FUND
,
SalaryConstants
.
PERSONAL_FUND_JAVA
,
SalaryConstants
.
PERSONAL_FUND_JAVA
,
this
.
getSocialOrFundMoneyForForecast
(
a
,
deptSet
,
a
.
getEmpIdcard
(),
fundEstmateList
,
fundForecastList
,
false
,
true
,
socialList
,
fundList
,
forecastSocialList
,
forecastFundList
),
CommonConstants
.
ONE_INT
));
this
.
getSocialOrFundMoneyForForecast
(
fundType
,
deptSet
,
a
.
getEmpIdcard
(),
fundEstmateList
,
fundForecastList
,
false
,
true
,
socialList
,
fundList
,
forecastSocialList
,
forecastFundList
),
CommonConstants
.
ONE_INT
));
}
}
if
(
modelUnitFundFlag
)
{
if
(
modelUnitFundFlag
)
{
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
UNIT_FUND
,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
UNIT_FUND
,
SalaryConstants
.
UNIT_FUND_JAVA
,
SalaryConstants
.
UNIT_FUND_JAVA
,
this
.
getSocialOrFundMoneyForForecast
(
a
,
deptSet
,
a
.
getEmpIdcard
(),
fundEstmateList
,
fundForecastList
,
false
,
false
,
socialList
,
fundList
,
forecastSocialList
,
forecastFundList
),
CommonConstants
.
ZERO_INT
);
this
.
getSocialOrFundMoneyForForecast
(
fundType
,
deptSet
,
a
.
getEmpIdcard
(),
fundEstmateList
,
fundForecastList
,
false
,
false
,
socialList
,
fundList
,
forecastSocialList
,
forecastFundList
),
CommonConstants
.
ZERO_INT
);
}
}
}
}
}
}
...
@@ -1008,7 +1029,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1008,7 +1029,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/26 15:38
* @Date: 2019/9/26 15:38
* @return: java.math.BigDecimal
* @return: java.math.BigDecimal
**/
**/
public
BigDecimal
getSocialOrFundMoneyForForecast
(
TSalaryAccount
a
,
TDepartSettlementInfo
deptSet
,
String
idNumber
public
BigDecimal
getSocialOrFundMoneyForForecast
(
String
socialFundType
,
TDepartSettlementInfo
deptSet
,
String
idNumber
,
List
<
TPaymentBySalaryVo
>
estmateList
,
List
<
TPaymentBySalaryVo
>
forecastList
,
boolean
isSocial
,
boolean
isPerson
,
List
<
TPaymentBySalaryVo
>
estmateList
,
List
<
TPaymentBySalaryVo
>
forecastList
,
boolean
isSocial
,
boolean
isPerson
,
Set
<
String
>
socialList
,
Set
<
String
>
fundList
,
Set
<
String
>
forecastSocialList
,
Set
<
String
>
forecastFundList
)
{
,
Set
<
String
>
socialList
,
Set
<
String
>
fundList
,
Set
<
String
>
forecastSocialList
,
Set
<
String
>
forecastFundList
)
{
BigDecimal
money
=
SalaryConstants
.
B_ZERO
;
BigDecimal
money
=
SalaryConstants
.
B_ZERO
;
...
@@ -1018,54 +1039,26 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1018,54 +1039,26 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
sub
=
(
new
BigDecimal
(
"100"
).
subtract
(
deptSet
.
getUnitSeriousIllnessProp
()))
sub
=
(
new
BigDecimal
(
"100"
).
subtract
(
deptSet
.
getUnitSeriousIllnessProp
()))
.
divide
(
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
.
divide
(
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
}
}
boolean
typeFlag
=
true
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
socialFundType
)
&&
estmateList
!=
null
&&
!
estmateList
.
isEmpty
())
{
if
(
estmateList
!=
null
&&
!
estmateList
.
isEmpty
())
{
money
=
this
.
getSocialFundMoney
(
idNumber
,
estmateList
,
isSocial
,
isPerson
,
socialList
,
fundList
,
money
,
sub
);
money
=
money
.
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
for
(
TPaymentBySalaryVo
m
:
estmateList
)
{
if
(
Common
.
isNotNull
(
idNumber
)
&&
idNumber
.
equals
(
m
.
getEmpIdcard
()))
{
//社保
if
(
isSocial
&&
(
m
.
getPersonalSocialSum
()
!=
null
||
m
.
getUnitSocialSum
()
!=
null
))
{
typeFlag
=
false
;
if
(
Common
.
isEmpty
(
m
.
getSalarySocialFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalarySocialFlag
()))
{
if
(
isPerson
&&
m
.
getPersonalSocialSum
()
!=
null
)
{
money
=
money
.
add
(
m
.
getPersonalSocialSum
());
if
(
sub
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
EQUAL
&&
m
.
getUnitBitmailmentFee
()
!=
null
)
{
money
=
money
.
add
(
m
.
getUnitBitmailmentFee
().
multiply
(
sub
));
}
}
if
(!
isPerson
&&
m
.
getUnitSocialSum
()
!=
null
)
{
money
=
money
.
add
(
m
.
getUnitSocialSum
());
if
(
sub
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
EQUAL
&&
m
.
getUnitBitmailmentFee
()
!=
null
)
{
money
=
money
.
subtract
(
m
.
getUnitBitmailmentFee
().
multiply
(
sub
));
}
}
a
.
setSocialType
(
CommonConstants
.
ZERO_STRING
);
socialList
.
add
(
m
.
getId
());
}
}
//公积金
if
(!
isSocial
&&
(
m
.
getPersonalFundSum
()
!=
null
||
m
.
getUnitFundSum
()
!=
null
))
{
typeFlag
=
false
;
if
(
Common
.
isEmpty
(
m
.
getSalaryFundFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalaryFundFlag
()))
{
if
(
isPerson
&&
m
.
getPersonalFundSum
()
!=
null
)
{
money
=
money
.
add
(
m
.
getPersonalFundSum
());
}
if
(!
isPerson
&&
m
.
getUnitFundSum
()
!=
null
)
{
money
=
money
.
add
(
m
.
getUnitFundSum
());
}
a
.
setFundType
(
CommonConstants
.
ZERO_STRING
);
fundList
.
add
(
m
.
getId
());
}
}
}
}
// 缴费库没找到,从预估库找
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundType
)
&&
forecastList
!=
null
&&
!
forecastList
.
isEmpty
())
{
money
=
this
.
getSocialFundMoney
(
idNumber
,
forecastList
,
isSocial
,
isPerson
,
forecastSocialList
,
forecastFundList
,
money
,
sub
);
}
}
return
money
;
}
}
// 缴费库没找到,从预估库找
if
(
typeFlag
&&
forecastList
!=
null
&&
!
forecastList
.
isEmpty
())
{
/**
* @Description: 按类型拉取社保公积金
* @Author: hgw
* @Date: 2022/8/17 11:38
* @return: java.math.BigDecimal
**/
private
BigDecimal
getSocialFundMoney
(
String
idNumber
,
List
<
TPaymentBySalaryVo
>
estmateList
,
boolean
isSocial
,
boolean
isPerson
,
Set
<
String
>
socialList
,
Set
<
String
>
fundList
,
BigDecimal
money
,
BigDecimal
sub
)
{
money
=
money
.
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
money
=
money
.
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
for
(
TPaymentBySalaryVo
m
:
forecast
List
)
{
for
(
TPaymentBySalaryVo
m
:
estmate
List
)
{
if
(
Common
.
isNotNull
(
idNumber
)
&&
idNumber
.
equals
(
m
.
getEmpIdcard
()))
{
if
(
Common
.
isNotNull
(
idNumber
)
&&
idNumber
.
equals
(
m
.
getEmpIdcard
()))
{
//社保
//社保
if
(
isSocial
&&
(!
Common
.
isNotNull
(
m
.
getSalarySocialFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalarySocialFlag
()))
if
(
isSocial
&&
(!
Common
.
isNotNull
(
m
.
getSalarySocialFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalarySocialFlag
()))
...
@@ -1084,8 +1077,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1084,8 +1077,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
money
=
money
.
subtract
(
m
.
getUnitBitmailmentFee
().
multiply
(
sub
));
money
=
money
.
subtract
(
m
.
getUnitBitmailmentFee
().
multiply
(
sub
));
}
}
}
}
a
.
setSocialType
(
CommonConstants
.
ONE_STRING
);
socialList
.
add
(
m
.
getId
());
forecastSocialList
.
add
(
m
.
getId
());
}
}
//公积金
//公积金
if
(!
isSocial
&&
(!
Common
.
isNotNull
(
m
.
getSalaryFundFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalaryFundFlag
()))
if
(!
isSocial
&&
(!
Common
.
isNotNull
(
m
.
getSalaryFundFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
m
.
getSalaryFundFlag
()))
...
@@ -1096,9 +1088,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1096,9 +1088,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(!
isPerson
&&
m
.
getUnitFundSum
()
!=
null
)
{
if
(!
isPerson
&&
m
.
getUnitFundSum
()
!=
null
)
{
money
=
money
.
add
(
m
.
getUnitFundSum
());
money
=
money
.
add
(
m
.
getUnitFundSum
());
}
}
a
.
setFundType
(
CommonConstants
.
ONE_STRING
);
fundList
.
add
(
m
.
getId
());
forecastFundList
.
add
(
m
.
getId
());
}
}
}
}
}
}
}
...
...
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