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
7d11ad4d
Commit
7d11ad4d
authored
Aug 12, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
继续优化薪资导入
parent
dd3bef47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
48 deletions
+6
-48
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+6
-48
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
7d11ad4d
...
...
@@ -43,12 +43,11 @@ import java.util.regex.Pattern;
@Log4j2
@AllArgsConstructor
@Service
(
"salaryUploadService"
)
@EnableConfigurationProperties
({
Dapr
UpmsProperties
.
class
,
DaprCheckProperties
.
class
,
DaprArchivesProperties
.
class
,
DaprSocialProperties
.
class
,
DaprInsurances
Properties
.
class
})
@EnableConfigurationProperties
({
Dapr
ArchivesProperties
.
class
,
DaprSocial
Properties
.
class
})
public
class
SalaryUploadServiceImpl
extends
ServiceImpl
<
TSalaryStandardMapper
,
TSalaryStandard
>
implements
SalaryUploadService
{
private
final
DaprUpmsProperties
daprUpmsProperties
;
private
final
DaprArchivesProperties
archivesProperties
;
private
final
DaprCheckProperties
daprCheckProperties
;
private
final
DaprSocialProperties
socialProperties
;
private
final
TSalaryStandardService
tSalaryStandardService
;
...
...
@@ -400,7 +399,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
socialEstmateList
=
tPaymentVoR
.
getData
().
getPaymentList
();
// 新增一步:根据同步表里的数据更新获取到的社保缴费库数据
if
(
salaryPaymentMap
!=
null
&&
!
salaryPaymentMap
.
isEmpty
())
{
if
(!
salaryPaymentMap
.
isEmpty
())
{
MSalaryPaymentRes
res
;
for
(
TPaymentBySalaryVo
vo
:
socialEstmateList
)
{
res
=
salaryPaymentMap
.
get
(
vo
.
getId
());
...
...
@@ -457,9 +456,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
Set
<
String
>
socialList
=
new
HashSet
<>();
//社保需要存储的id
Set
<
String
>
fundList
=
new
HashSet
<>();
//公积金需要存储的id
Set
<
String
>
noSalarySocialList
=
new
HashSet
<>();
//无工资-社保需要存储的id
Set
<
String
>
noSalaryFundList
=
new
HashSet
<>();
//无工资-公积金需要存储的id
BigDecimal
relaySalary
;
//工资应发
BigDecimal
relaySalarySum
=
BigDecimal
.
ZERO
;
//工资应发
BigDecimal
personalDebt
;
//个人社保、公积金欠款
//前次个人待补足
String
preMonth
=
DateUtil
.
addMonth
(-
1
);
...
...
@@ -599,6 +597,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//工资应发
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
sai
.
getJavaFiedName
()))
{
relaySalary
=
sai
.
getSalaryMoney
();
relaySalarySum
=
relaySalarySum
.
add
(
sai
.
getSalaryMoney
());
}
//减除费用
if
(
SalaryConstants
.
COST_REDUCTION_JAVA
.
equals
(
sai
.
getJavaFiedName
()))
{
...
...
@@ -656,11 +655,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
PRE_CURRENT_SUPPLY
,
SalaryConstants
.
PRE_CURRENT_SUPPLY_JAVA
,
preSupply
,
CommonConstants
.
ZERO_INT
);
}
//验证应发工资的准确性
/*if (checSalaryDataAccuracy(relaySalary, saiList)) {
return R.failed("第" + (i+1) + "行:" + a.getEmpIdcard() + " -应发工资的合计总数与工资详细合计总数不匹配");
}*/
//专项信息
sds
=
sdsMap
.
get
(
a
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
invoiceTitle
);
if
(
sds
!=
null
&&
Common
.
isNotNull
(
sds
.
getId
()))
{
...
...
@@ -695,9 +689,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
asList
=
this
.
getLaborAsList
(
itemMap
.
get
(
a
.
getEmpIdcard
()),
a
.
getSettlementMonth
());
}
//单位社保卡费-暂不加
//个人其他费用-累计tf.getOtherMoney-One\Two\Three()
//验证年终奖计算
// 2021-12-30 17:09:29王成说年终奖按结算月的年来计算
if
(
annualBonus
!=
null
&&
annualBonus
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
EQUAL
)
{
...
...
@@ -782,20 +773,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/*if (Common.isNotNull(bankNameAll) && bankNameAll.length() > 1000) {
return R.failed("请检查档案的开户行与卡号是否反了,封面的开户行已超长!");
}*/
// 无工资人员社保公积金计算:
BigDecimal
noSalaryPersonSocial
=
this
.
getNoSalarySocialOrFundMoneyForForecast
(
noSalarySocialEstmateList
,
money
,
true
,
true
,
noSalarySocialList
,
noSalaryFundList
);
BigDecimal
noSalaryUnitSocial
=
this
.
getNoSalarySocialOrFundMoneyForForecast
(
noSalarySocialEstmateList
,
money
,
true
,
false
,
noSalarySocialList
,
noSalaryFundList
);
BigDecimal
noSalaryPersonFund
=
this
.
getNoSalarySocialOrFundMoneyForForecast
(
noSalaryFundEstmateList
,
money
,
false
,
true
,
noSalarySocialList
,
noSalaryFundList
);
BigDecimal
noSalaryUnitFund
=
this
.
getNoSalarySocialOrFundMoneyForForecast
(
noSalaryFundEstmateList
,
money
,
false
,
false
,
noSalarySocialList
,
noSalaryFundList
);
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
salaryDetailVo
.
setSalaryAccountList
(
aList
);
BigDecimal
buyTakingRisksPay
=
SalaryConstants
.
B_ZERO
;
String
takingBalanceIds
=
""
;
//组件结算单:
// 版本2.6.9:2021-11-4 11:11:20樊青青要求去除总校验,改为每个人提示重复导入,hgw变更
// 版本2.7.3.3 2022-1-13 20:54:34 洪光武变更:不同步缴费库,改为存放在同步表,定时任务更新(或社保服务变更缴费库时更新)
/*String str = SalaryCommonUtil.setToStrEasy(socialList);
...
...
@@ -815,7 +795,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
throw new RuntimeException((null == fundR ? "调用公积金同步结算中状态服务异常,请重试!" : fundR.getMsg()));
}
}*/
//salary.setSettlementAmount(
);
salary
.
setSettlementAmount
(
relaySalarySum
);
//保存工资表
tSalaryStandardService
.
save
(
salary
);
...
...
@@ -879,26 +859,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salaryPaymentResService
.
saveOrUpdate
(
res
);
}
}
if
(
noSalarySocialList
!=
null
&&
!
noSalarySocialList
.
isEmpty
())
{
for
(
String
estId
:
noSalarySocialList
)
{
se
=
new
MSalaryEstimate
();
se
.
setSalaryId
(
salary
.
getId
());
se
.
setEstimateId
(
estId
);
se
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
se
.
setIsNoSalary
(
SalaryConstants
.
IS_NO_SALARY_ONE
);
mSalaryEstimateService
.
save
(
se
);
}
}
if
(
noSalaryFundList
!=
null
&&
!
noSalaryFundList
.
isEmpty
())
{
for
(
String
estId
:
noSalaryFundList
)
{
se
=
new
MSalaryEstimate
();
se
.
setSalaryId
(
salary
.
getId
());
se
.
setEstimateId
(
estId
);
se
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
se
.
setIsNoSalary
(
SalaryConstants
.
IS_NO_SALARY_ONE
);
mSalaryEstimateService
.
save
(
se
);
}
}
TPauseSalary
ps
;
for
(
TSalaryAccount
account
:
aList
)
{
saiList
=
account
.
getSaiList
();
...
...
@@ -934,8 +894,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
tPauseSalaryService
.
save
(
ps
);
}
}
//批量更新商险
//批量更新商险预估单
return
R
.
ok
(
salaryDetailVo
);
}
...
...
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