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
69a24780
Commit
69a24780
authored
Aug 16, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工资拉取-社保公积金
parent
784ef949
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
49 deletions
+94
-49
MSalaryEstimate.java
...ifu/cloud/plus/v1/yifu/salary/entity/MSalaryEstimate.java
+6
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+32
-12
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+56
-37
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/MSalaryEstimate.java
View file @
69a24780
...
...
@@ -68,6 +68,12 @@ public class MSalaryEstimate {
@NotBlank
(
message
=
"类型:0:社保;1:公积金;不能为空"
)
@ExcelProperty
(
"类型:0:社保;1:公积金;"
)
private
Integer
isSocial
;
/**
* 来源类型:0:缴费库;1:预估库;
*/
@ExcelAttribute
(
name
=
"来源类型:0:缴费库;1:预估库;"
,
isNotEmpty
=
true
,
errorInfo
=
"来源类型:0:缴费库;1:预估库;不能为空"
)
@ExcelProperty
(
"来源类型:0:缴费库;1:预估库;"
)
private
Integer
type
;
/**
* 类型:0:正常扣缴;1:无工资人员;
*/
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
69a24780
...
...
@@ -747,23 +747,23 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
if
(!
socialList
.
isEmpty
())
{
//更新社保状态为-
待
结算
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archives
Properties
.
getAppId
()
//更新社保状态为-
已
结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
social
Properties
.
getAppId
()
,
"/tpaymentinfo/inner/updatePaymentSocialStatusToSettle"
,
socialList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(!
fundList
.
isEmpty
())
{
//更新公积金状态为-
待
结算
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archives
Properties
.
getAppId
()
//更新公积金状态为-
已
结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
social
Properties
.
getAppId
()
,
"/tpaymentinfo/inner/updatePaymentFundStatusToSettle"
,
fundList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(!
forecastSocialList
.
isEmpty
())
{
//更新社保状态为-
待
结算
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archives
Properties
.
getAppId
()
//更新社保状态为-
已
结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
social
Properties
.
getAppId
()
,
"/tforecastlibrary/inner/updateForecastSocialStatusToSettle"
,
forecastSocialList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(!
forecastFundList
.
isEmpty
())
{
//更新公积金状态为-
待
结算
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archives
Properties
.
getAppId
()
//更新公积金状态为-
已
结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
social
Properties
.
getAppId
()
,
"/tforecastlibrary/inner/updateForecastFundStatusToSettle"
,
forecastFundList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
//保存工资表
...
...
@@ -772,10 +772,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 获取上一个工资条顺序,复制:
tSalaryStandardSetService
.
copyLastSetByDeptId
(
salary
.
getId
(),
dept
.
getId
(),
String
.
valueOf
(
user
.
getId
()));
// 保存后,修改结算预警统计中的结算状态
List
<
String
>
deptIdList
=
new
ArrayList
<>();
deptIdList
.
add
(
dept
.
getId
());
salaryDetailVo
.
setSalary
(
salary
);
MSalaryEstimate
se
;
...
...
@@ -787,6 +783,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
se
.
setEstimateId
(
estId
);
se
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setType
(
CommonConstants
.
ZERO_INT
);
mSalaryEstimateService
.
save
(
se
);
}
}
...
...
@@ -797,6 +794,29 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
se
.
setEstimateId
(
estId
);
se
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setType
(
CommonConstants
.
ZERO_INT
);
mSalaryEstimateService
.
save
(
se
);
}
}
if
(!
forecastSocialList
.
isEmpty
())
{
for
(
String
estId
:
forecastSocialList
)
{
se
=
new
MSalaryEstimate
();
se
.
setSalaryId
(
salary
.
getId
());
se
.
setEstimateId
(
estId
);
se
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setType
(
CommonConstants
.
ONE_INT
);
mSalaryEstimateService
.
save
(
se
);
}
}
if
(!
forecastFundList
.
isEmpty
())
{
for
(
String
estId
:
forecastFundList
)
{
se
=
new
MSalaryEstimate
();
se
.
setSalaryId
(
salary
.
getId
());
se
.
setEstimateId
(
estId
);
se
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
se
.
setIsNoSalary
(
SalaryConstants
.
NOT_IS_NO_SALARY_ZERO
);
se
.
setType
(
CommonConstants
.
ONE_INT
);
mSalaryEstimateService
.
save
(
se
);
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
69a24780
...
...
@@ -28,9 +28,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.*
;
...
...
@@ -41,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
...
...
@@ -60,6 +66,7 @@ import java.util.*;
*/
@Log4j2
@Service
@EnableConfigurationProperties
({
DaprSocialProperties
.
class
})
public
class
TSalaryStandardServiceImpl
extends
ServiceImpl
<
TSalaryStandardMapper
,
TSalaryStandard
>
implements
TSalaryStandardService
{
@Autowired
...
...
@@ -72,8 +79,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
private
MSalaryEstimateService
mSalaryEstimateService
;
@Autowired
private
MSalaryPaymentResService
salaryPaymentResService
;
private
DaprSocialProperties
socialProperties
;
/**
* 标准薪酬工资表简单分页查询
*
...
...
@@ -311,51 +317,64 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
MSalaryEstimate
salaryEstimate
=
new
MSalaryEstimate
();
salaryEstimate
.
setSalaryId
(
id
);
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
salaryEstimate
.
setType
(
CommonConstants
.
ZERO_INT
);
QueryWrapper
<
MSalaryEstimate
>
salaryEstimateQueryWrapper
=
new
QueryWrapper
<>();
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
//社保
//
缴费库
社保
List
<
MSalaryEstimate
>
socialList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_FUND_ONE
);
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
//公积金
//
缴费库
公积金
List
<
MSalaryEstimate
>
fundList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
if
((
socialList
!=
null
&&
!
socialList
.
isEmpty
())
||
(
fundList
!=
null
&&
!
fundList
.
isEmpty
()))
{
MSalaryPaymentRes
res
;
Map
<
String
,
MSalaryPaymentRes
>
saveResMap
=
new
HashMap
<>();
if
(
socialList
!=
null
&&
!
socialList
.
isEmpty
())
{
for
(
MSalaryEstimate
est
:
socialList
)
{
res
=
saveResMap
.
get
(
est
.
getEstimateId
());
if
(
res
==
null
)
{
res
=
new
MSalaryPaymentRes
();
res
.
setId
(
est
.
getEstimateId
());
res
.
setDeptId
(
deptId
);
}
res
.
setSalarySocialFlag
(
CommonConstants
.
ZERO_STRING
);
saveResMap
.
put
(
est
.
getEstimateId
(),
res
);
}
salaryEstimate
.
setType
(
CommonConstants
.
ONE_INT
);
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
//缴费库公积金
List
<
MSalaryEstimate
>
forecastFundList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
salaryEstimate
.
setIsSocial
(
SalaryConstants
.
IS_SOCIAL_ZERO
);
salaryEstimateQueryWrapper
.
setEntity
(
salaryEstimate
);
//缴费库公积金
List
<
MSalaryEstimate
>
forecastSocialList
=
mSalaryEstimateService
.
list
(
salaryEstimateQueryWrapper
);
List
<
String
>
stringList
;
if
(
socialList
!=
null
&&
!
socialList
.
isEmpty
())
{
stringList
=
new
ArrayList
<>();
for
(
MSalaryEstimate
s
:
socialList
)
{
stringList
.
add
(
s
.
getEstimateId
());
}
//更新社保状态为-待结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tpaymentinfo/inner/updatePaymentSocialStatusToNoSettle"
,
stringList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(
fundList
!=
null
&&
!
fundList
.
isEmpty
())
{
stringList
=
new
ArrayList
<>();
for
(
MSalaryEstimate
s
:
fundList
)
{
stringList
.
add
(
s
.
getEstimateId
());
}
if
(
fundList
!=
null
&&
!
fundList
.
isEmpty
())
{
for
(
MSalaryEstimate
est
:
fundList
)
{
res
=
saveResMap
.
get
(
est
.
getEstimateId
());
if
(
res
==
null
)
{
res
=
new
MSalaryPaymentRes
();
res
.
setId
(
est
.
getEstimateId
());
res
.
setDeptId
(
deptId
);
}
res
.
setSalaryFundFlag
(
CommonConstants
.
ZERO_STRING
);
saveResMap
.
put
(
est
.
getEstimateId
(),
res
);
}
//更新公积金状态为-待结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tpaymentinfo/inner/updatePaymentFundStatusToNoSettle"
,
stringList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(
forecastSocialList
!=
null
&&
!
forecastSocialList
.
isEmpty
())
{
stringList
=
new
ArrayList
<>();
for
(
MSalaryEstimate
s
:
forecastSocialList
)
{
stringList
.
add
(
s
.
getEstimateId
());
}
// 开始更新res
if
(!
saveResMap
.
isEmpty
())
{
Iterator
<
MSalaryPaymentRes
>
iter
=
saveResMap
.
values
().
iterator
();
while
(
iter
.
hasNext
())
{
res
=
iter
.
next
();
salaryPaymentResService
.
saveOrUpdate
(
res
);
}
//更新社保状态为-待结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tforecastlibrary/inner/updateForecastSocialStatusToNoSettle"
,
stringList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(
forecastFundList
!=
null
&&
!
forecastFundList
.
isEmpty
())
{
stringList
=
new
ArrayList
<>();
for
(
MSalaryEstimate
s
:
forecastFundList
)
{
stringList
.
add
(
s
.
getEstimateId
());
}
//更新公积金状态为-待结算
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tforecastlibrary/inner/updateForecastFundStatusToNoSettle"
,
stringList
,
TDepartSettlementInfo
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
}
//6:删除工资表
...
...
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