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
7434fe68
Commit
7434fe68
authored
Sep 06, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
ccc5651d
8cf9ae89
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1276 additions
and
455 deletions
+1276
-455
SocialDaprUtils.java
.../cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
+35
-7
EkpIncomeProperties.java
...fu.cloud.plus.v1/yifu/ekp/config/EkpIncomeProperties.java
+7
-3
EkpIncomeUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
+17
-3
EkpIncomeParam.java
...va/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParam.java
+25
-194
EkpOrderReplyParam.java
...om/yifu/cloud/plus/v1/yifu/ekp/vo/EkpOrderReplyParam.java
+2
-1
spring.factories
...u-common-ekp/src/main/resources/META-INF/spring.factories
+1
-0
ekpIncomeConfig.properties
...-common-ekp/src/main/resources/ekpIncomeConfig.properties
+8
-6
PersonAttributesMapper.java
...us/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
+3
-1
TInsuranceEkp.java
...u/cloud/plus/v1/yifu/insurances/entity/TInsuranceEkp.java
+1
-1
EkpInteractiveParam.java
...cloud/plus/v1/yifu/insurances/vo/EkpInteractiveParam.java
+1
-1
InsuranceDetailVO.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
+18
-3
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+349
-34
TInsuranceEkpServiceImpl.java
...nces/service/insurance/impl/TInsuranceEkpServiceImpl.java
+165
-87
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+2
-2
SocialTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
+16
-4
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+4
-4
TPaymentVo.java
...ava/com/yifu/cloud/plus/v1/yifu/salary/vo/TPaymentVo.java
+3
-0
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+19
-10
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+8
-8
TIncome.java
...va/com/yifu/cloud/plus/v1/yifu/social/entity/TIncome.java
+13
-1
TIncomeDetail.java
.../yifu/cloud/plus/v1/yifu/social/entity/TIncomeDetail.java
+2
-0
IncomeExportVo.java
...com/yifu/cloud/plus/v1/yifu/social/vo/IncomeExportVo.java
+1
-1
TIncomeController.java
...oud/plus/v1/yifu/social/controller/TIncomeController.java
+13
-2
TIncomeDetailController.java
...us/v1/yifu/social/controller/TIncomeDetailController.java
+22
-0
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+13
-0
TIncomeService.java
...ifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
+2
-0
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+3
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+109
-0
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+203
-36
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+106
-2
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+94
-38
TIncomeMapper.xml
...fu-social-biz/src/main/resources/mapper/TIncomeMapper.xml
+11
-6
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
View file @
7434fe68
...
@@ -7,8 +7,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...
@@ -7,8 +7,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -71,7 +73,7 @@ public class SocialDaprUtils {
...
@@ -71,7 +73,7 @@ public class SocialDaprUtils {
/**
/**
* @Author huyc
* @Author huyc
* @Description 更新
缴费库
* @Description 更新
社保公积金明细
* @Date 2022/8/15
* @Date 2022/8/15
* @Param
* @Param
* @return
* @return
...
@@ -82,13 +84,17 @@ public class SocialDaprUtils {
...
@@ -82,13 +84,17 @@ public class SocialDaprUtils {
/**
/**
* @Author huyc
* @Author huyc
* @Description
生成
收入数据
* @Description
查询人员
收入数据
* @Date 2022/9/2
* @Date 2022/9/2
* @Param
* @Param
* @return
* @return
**/
**/
public
void
createTIncomeDetail
(
TIncomeDetail
infoVo
)
{
public
R
<
TIncomeDetailReturnVo
>
getTIncomeDetailList
(
TIncomeDetail
infoVo
)
{
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincomedetail/inner/createTIncomeDetail"
,
JSON
.
toJSONString
(
infoVo
),
TIncomeDetail
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
TIncomeDetailReturnVo
>
listVo
=
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincomedetail/inner/getTIncomeDetailList"
,
JSON
.
toJSONString
(
infoVo
),
TIncomeDetail
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
listVo
)){
return
R
.
failed
(
"查询人员收入数据失败!"
);
}
return
listVo
;
}
}
/**
/**
...
@@ -98,11 +104,33 @@ public class SocialDaprUtils {
...
@@ -98,11 +104,33 @@ public class SocialDaprUtils {
* @Param
* @Param
* @return
* @return
**/
**/
public
R
<
TIncomeDetailReturnVo
>
getTIncomeDetailList
(
TIncomeDetail
infoVo
)
{
public
R
<
Boolean
>
createTIncomeDetail
(
TIncomeDetail
infoVo
)
{
R
<
TIncomeDetailReturnVo
>
listVo
=
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincomedetail/inner/getTIncomeDetailList"
,
JSON
.
toJSONString
(
infoVo
),
TIncomeDetail
.
class
,
SecurityConstants
.
FROM_IN
);
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/saveDetail"
,
JSON
.
toJSONString
(
infoVo
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huyc
* @Description 查询人员缴费库数据
* @Date 2022/9/2
* @Param
* @return
**/
public
R
<
TPaymentVo
>
getPaymentSocialAndFound
(
TPaymentInfo
infoVo
)
{
R
<
TPaymentVo
>
listVo
=
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincomedetail/inner/getPaymentSocialAndFound"
,
JSON
.
toJSONString
(
infoVo
),
TPaymentInfo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
listVo
)){
if
(
Common
.
isEmpty
(
listVo
)){
return
R
.
failed
(
"查询人员
收入
数据失败!"
);
return
R
.
failed
(
"查询人员
缴费库
数据失败!"
);
}
}
return
listVo
;
return
listVo
;
}
}
/**
* @Author huyc
* @Description 通过收入id删除收入数据
* @Date 2022/9/2
* @Param
* @return
**/
public
void
deleteById
(
TIncomeDetail
infoVo
)
{
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincomedetail/inner/deleteById"
,
JSON
.
toJSONString
(
infoVo
),
TIncomeDetail
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/config/EkpIncomeProperties.java
View file @
7434fe68
...
@@ -20,13 +20,17 @@ public class EkpIncomeProperties {
...
@@ -20,13 +20,17 @@ public class EkpIncomeProperties {
String
url
;
String
url
;
String
fdModelId
;
String
fdModelId
Manage
;
String
fdFlowId
;
String
fdFlowIdManage
;
String
fdModelIdRisk
;
String
fdFlowIdRisk
;
String
docStatus
;
String
docStatus
;
String
L
oginName
;
String
l
oginName
;
String
docSubject
;
String
docSubject
;
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
View file @
7434fe68
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
util
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
util
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONObject
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpIncomeProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpIncomeProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam
;
...
@@ -26,7 +27,15 @@ public class EkpIncomeUtil {
...
@@ -26,7 +27,15 @@ public class EkpIncomeUtil {
@Autowired
@Autowired
private
EkpIncomeProperties
ekpProperties
;
private
EkpIncomeProperties
ekpProperties
;
public
String
sendToEKP
(
EkpIncomeParam
param
)
{
/**
* @param param 内容传参
* @param type 1:管理费2:风险金
* @Description:
* @Author: hgw
* @Date: 2022/9/5 16:12
* @return: java.lang.String
**/
public
String
sendToEKP
(
EkpIncomeParam
param
,
String
type
)
{
log
.
info
(
"推送EKP开始--收入明细数据"
);
log
.
info
(
"推送EKP开始--收入明细数据"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
try
{
try
{
...
@@ -39,8 +48,13 @@ public class EkpIncomeUtil {
...
@@ -39,8 +48,13 @@ public class EkpIncomeUtil {
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getDocSubject
());
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getDocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelId
());
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowId
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelIdManage
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowIdManage
());
}
else
{
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelIdRisk
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowIdRisk
());
}
wholeForm
.
add
(
"formValues"
,
formValues
);
wholeForm
.
add
(
"formValues"
,
formValues
);
HttpHeaders
headers
=
new
HttpHeaders
();
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParam.java
View file @
7434fe68
...
@@ -12,241 +12,72 @@ import java.io.Serializable;
...
@@ -12,241 +12,72 @@ import java.io.Serializable;
*/
*/
@Data
@Data
public
class
EkpIncomeParam
implements
Serializable
{
public
class
EkpIncomeParam
implements
Serializable
{
/**
/**
* 项目编码
* 项目编码
**/
**/
private
String
fd_3adfe
df98ccba2
;
private
String
fd_3adfe
f5e5b9d34
;
/**
/**
* 项目名称
* 项目名称
**/
**/
private
String
fd_3adfe
df9d2bf
1c
;
private
String
fd_3adfe
f5eb669
1c
;
/**
/**
* 单号
* 单号
**/
**/
private
String
fd_3adfe
dfa4410aa
;
private
String
fd_3adfe
f7f5d2b52
;
/**
/**
* 客户编码
* 客户编码
**/
**/
private
String
fd_3adfe
dfacd65d6
;
private
String
fd_3adfe
f80202ab2
;
/**
/**
* 客户名称
* 客户名称
**/
**/
private
String
fd_3adfedfb174068
;
private
String
fd_3adfef7fc1c886
;
/**
* 姓名
**/
private
String
fd_3adfedfb5a68a2
;
/**
/**
*
身份证号
*
类型:单选(人,人次,比例,固定值,总额)
**/
**/
private
String
fd_3ad
fedfb8f76d4
;
private
String
fd_3ad
da3037e3bda
;
/**
/**
*
手机号
*
产生来源:单选(社保,工资,商险)
**/
**/
private
String
fd_3ad
fedfbd23ab8
;
private
String
fd_3ad
da320daef5a
;
/**
/**
*
银行卡号
*
姓名
**/
**/
private
String
fd_3adfe
dfcb17f1e
;
private
String
fd_3adfe
f948da848
;
/**
/**
*
开户行
*
身份证号
**/
**/
private
String
fd_3adfe
dfc453cc
4
;
private
String
fd_3adfe
f94dcdbb
4
;
/**
/**
*
工资
月份
*
生成
月份
**/
**/
private
String
fd_3a
dfee063acff0
;
private
String
fd_3a
e0c3032cffc8
;
/**
/**
* 结算月份
* 结算月份
**/
**/
private
String
fd_3adfee0690737c
;
private
String
fd_3ae0c3044e5958
;
/**
* 是否薪资扣税
**/
private
String
fd_3adfee01668666
;
/**
* 社保优先级
**/
private
String
fd_3adfedfed8bb28
;
/**
* 公积金优先级
**/
private
String
fd_3adfedff3a7430
;
/**
* 是否自有员工
**/
private
String
fd_3adfee0009d070
;
/**
* 年终奖扣税方案
**/
private
String
fd_3adfee01dea2fa
;
/**
* 应发工资
**/
private
String
fd_3adfee12cb8840
;
/**
* 个人代扣
**/
private
String
fd_3adfee1374ed7a
;
/**
* 单位社保
**/
private
String
fd_3adfee1e2b2f78
;
/**
/**
*
个人社保
*
管理费、风险金金额
**/
**/
private
String
fd_3adfee1e88723e
;
private
String
fd_3adfef963bae28
;
/**
* 单位公积金
**/
private
String
fd_3adfee1ee24680
;
/**
* 个人公积金
**/
private
String
fd_3adfee1f32fa24
;
/**
* 个税
**/
private
String
fd_3adfee1f901c46
;
/**
* 企业年金单位
**/
private
String
fd_3adfee1ff1ca6a
;
/**
* 企业年金个人
**/
private
String
fd_3adfee203f86b2
;
/**
* 实发合计
**/
private
String
fd_3adfee20fe5ba4
;
/**
/**
* 应收
* 应收
**/
**/
private
String
fd_3adfe
e21802434
;
private
String
fd_3adfe
fa3daae72
;
/**
/**
*
收入
结算状态
* 结算状态
**/
**/
private
String
fd_3adfe
e4ba5ad36
;
private
String
fd_3adfe
faaa3bbd0
;
/**
/**
* 收款状态
* 收款状态
**/
**/
private
String
fd_3adfe
e4c0c59e
e
;
private
String
fd_3adfe
faaef583
e
;
/**
/**
*
收入
结算单号
* 结算单号
**/
**/
private
String
fd_3a
dfee5dd14866
;
private
String
fd_3a
ead7204bb594
;
/**
/**
* 收款单号
* 收款单号
**/
**/
private
String
fd_3adfee5e3d1638
;
private
String
fd_3aeae59b70fe5a
;
/**
* 代扣费用应支出
**/
private
String
fd_3adfeeb34ea0ea
;
/**
* 代扣费用结算状态
**/
private
String
fd_3adfeededfb5a6
;
/**
* 代扣费用付款状态
**/
private
String
fd_3adfeed3a20598
;
/**
* 代扣费用结算单号
**/
private
String
fd_3aea30866d0c30
;
/**
* 代扣费用付款单号
**/
private
String
fd_3aea309696d32e
;
/**
* 个税应支出
**/
private
String
fd_3adfeec6db8766
;
/**
* 个税结算状态
**/
private
String
fd_3adfeef8ef38fc
;
/**
* 个税付款状态
**/
private
String
fd_3adfeedd08222c
;
/**
* 个税支出结算单号
**/
private
String
fd_3aeadede4cea84
;
/**
* 个税支出付款单号
**/
private
String
fd_3aeadee1cf1266
;
/**
* 实发合计应支出
**/
private
String
fd_3adfeec730ec44
;
/**
* 工资实发结算状态
**/
private
String
fd_3adfeef9440ab2
;
/**
* 实发合计付款状态
**/
private
String
fd_3adfeedd5f3cb2
;
/**
* 实发结算单号
**/
private
String
fd_3aeadf17522642
;
/**
* 实发付款单号
**/
private
String
fd_3aeadf17b7d03a
;
/**
* 企业年金单位应支出
**/
private
String
fd_3adfeec782070a
;
/**
* 企业年金单位应结算状态
**/
private
String
fd_3adfeef9b9fb3e
;
/**
* 企业年金单位付款状态
**/
private
String
fd_3adfeeddacf6d4
;
/**
* 年金单位结算单号
**/
private
String
fd_3aeadf182ef6a2
;
/**
* 年金单位付款单号
**/
private
String
fd_3aeadf1892fdb2
;
/**
* 企业年金个人应支出
**/
private
String
fd_3adfeec7ccdd1c
;
/**
* 企业年金个人结算状态
**/
private
String
fd_3adfeefa1eba32
;
/**
* 企业年金个人付款状态
**/
private
String
fd_3adfeede08d430
;
/**
* 年金个人结算单号
**/
private
String
fd_3aeadf191c62a0
;
/**
* 年金个人付款单号
**/
private
String
fd_3aeadf1992544c
;
/**
* 暂停发
**/
private
String
fd_3af9d49d165e90
;
/**
* 税务主体
**/
private
String
fd_3afab1895feea2
;
}
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpOrderReplyParam.java
View file @
7434fe68
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.ekp.vo;
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Map
;
/**
/**
* @author licancan
* @author licancan
...
@@ -19,7 +20,7 @@ public class EkpOrderReplyParam implements Serializable {
...
@@ -19,7 +20,7 @@ public class EkpOrderReplyParam implements Serializable {
/**
/**
* 回复人 (人员账号)
* 回复人 (人员账号)
**/
**/
private
String
fd_3ac904badcaa06
;
private
Map
<
String
,
Object
>
fd_3ac904badcaa06
;
/**
/**
* 回复时间
* 回复时间
**/
**/
...
...
yifu-common/yifu-common-ekp/src/main/resources/META-INF/spring.factories
View file @
7434fe68
...
@@ -2,5 +2,6 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
...
@@ -2,5 +2,6 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpOrderUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpOrderUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil
\ No newline at end of file
yifu-common/yifu-common-ekp/src/main/resources/ekpIncomeConfig.properties
View file @
7434fe68
ekp.url
=
http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
income.url
=
http://119.96.227.251.8080/api/sys-modeling/appModelRestService/addModel
ekp.fdModelId
=
181d7633ff8bc797276d0d3a54e80ad6
income.fdModelIdManage
=
181d76db26e419a88dba97b0c406689e
ekp.fdFlowId
=
182b40249c1bc940d7226b941c7a4183
income.fdFlowIdManage
=
182d3b6e522b2690119e70d4ff082136
ekp.docStatus
=
20
income.fdModelIdRisk
=
181d76db26e419a88dba97b0c406689e
ekp.LoginName
=
admin
income.fdFlowIdRisk
=
182d3b6e522b2690119e70d4ff082136
ekp.docSubject
=
\u6536\u5165\u
660E
\u
7EC6
\u6570\u
636E
\u
63A5
\u
53E3
income.docStatus
=
20
income.loginName
=
admin
income.docSubject
=
\u6536\u5165\u
660E
\u
7EC6
\u6570\u
636E
\u
63A5
\u
53E3
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
View file @
7434fe68
...
@@ -28,7 +28,9 @@ public class PersonAttributesMapper implements AttributesMapper<PersonVo> {
...
@@ -28,7 +28,9 @@ public class PersonAttributesMapper implements AttributesMapper<PersonVo> {
if
(
null
!=
attributes
.
get
(
"ou"
))
{
if
(
null
!=
attributes
.
get
(
"ou"
))
{
personVo
.
setDeptName
((
String
)
attributes
.
get
(
"ou"
).
get
());
personVo
.
setDeptName
((
String
)
attributes
.
get
(
"ou"
).
get
());
}
}
personVo
.
setPassword
((
String
)
attributes
.
get
(
"uid"
).
get
());
if
(
null
!=
attributes
.
get
(
"userPassword"
))
{
personVo
.
setPassword
((
String
)
attributes
.
get
(
"userPassword"
).
get
());
}
return
personVo
;
return
personVo
;
}
}
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceEkp.java
View file @
7434fe68
...
@@ -158,7 +158,7 @@ public class TInsuranceEkp implements Serializable {
...
@@ -158,7 +158,7 @@ public class TInsuranceEkp implements Serializable {
/**
/**
* EKP推送类型
* EKP推送类型
*/
*/
@Schema
(
description
=
"
1推送预估费用,2推送实缴费用,3变更结算月,4推送作废信息,5推送红冲信息,6投保退回红冲,7变更保单保费
"
)
@Schema
(
description
=
"
推送类型(1推送预估费用,2推送实缴费用,3变更结算信息,4推送作废信息,5推送预估红冲信息,6推送实缴红冲信息)
"
)
private
Integer
pushType
;
private
Integer
pushType
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/EkpInteractiveParam.java
View file @
7434fe68
...
@@ -168,7 +168,7 @@ public class EkpInteractiveParam implements Serializable {
...
@@ -168,7 +168,7 @@ public class EkpInteractiveParam implements Serializable {
/**
/**
* EKP推送类型
* EKP推送类型
*/
*/
@Schema
(
description
=
"1推送预估费用,2推送实缴费用,3变更结算月,4推送作废信息,5推送
红冲信息,6投保退回红冲,7变更保单保费
"
)
@Schema
(
description
=
"1推送预估费用,2推送实缴费用,3变更结算月,4推送作废信息,5推送
预估红冲信息,6投保退回红冲,7变更保单保费,8推送实缴红冲信息
"
)
private
Integer
pushType
;
private
Integer
pushType
;
/**
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
View file @
7434fe68
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
...
@@ -179,10 +181,16 @@ public class InsuranceDetailVO implements Serializable {
...
@@ -179,10 +181,16 @@ public class InsuranceDetailVO implements Serializable {
private
Integer
reduceHandleStatus
;
private
Integer
reduceHandleStatus
;
/**
/**
* 结算办理状态 1待结算 2结算中 3已结算
*
预估
结算办理状态 1待结算 2结算中 3已结算
*/
*/
@Schema
(
description
=
"结算办理状态 1待结算 2结算中 3已结算"
)
@Schema
(
description
=
"预估结算办理状态 1待结算 2结算中 3已结算"
)
private
Integer
settleHandleStatus
;
private
String
estimateSettleStatus
;
/**
* 实缴结算办理状态 1待结算 2结算中 3已结算
*/
@Schema
(
description
=
"实缴结算办理状态 1待结算 2结算中 3已结算"
)
private
String
actualSettleStatus
;
/**
/**
* 是否出险 0未出险 1已出险
* 是否出险 0未出险 1已出险
...
@@ -342,4 +350,11 @@ public class InsuranceDetailVO implements Serializable {
...
@@ -342,4 +350,11 @@ public class InsuranceDetailVO implements Serializable {
*/
*/
@Schema
(
description
=
"退保结算状态 :预留字段,暂时都是空(减员类型专用)"
)
@Schema
(
description
=
"退保结算状态 :预留字段,暂时都是空(减员类型专用)"
)
private
String
surrenderSettleStatus
;
private
String
surrenderSettleStatus
;
/**
* 默认结算信息id
*/
@Schema
(
description
=
"默认结算信息id"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
defaultSettleId
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
7434fe68
...
@@ -7,18 +7,17 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -7,18 +7,17 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.IdCardUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil
;
...
@@ -28,11 +27,15 @@ import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetail
...
@@ -28,11 +27,15 @@ import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetail
import
com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -88,10 +91,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -88,10 +91,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource
@Resource
private
EkpSettleService
ekpSettleService
;
private
EkpSettleService
ekpSettleService
;
@Resource
@Resource
private
TInsuranceSettleCancelService
tInsuranceSettleCancelService
;
private
TInsuranceSettleCancelService
tInsuranceSettleCancelService
;
@Resource
private
SocialDaprUtils
socialDaprUtils
;
/***********************商险办理********************************/
/***********************商险办理********************************/
...
@@ -181,7 +185,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -181,7 +185,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
*/
@Override
@Override
public
IPage
<
InsuranceListVO
>
getInsuranceListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
public
IPage
<
InsuranceListVO
>
getInsuranceListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
//todo 根据登录人获取数据权限
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
IPage
<
InsuranceListVO
>
insuranceList
=
new
Page
<>();
IPage
<
InsuranceListVO
>
insuranceList
=
new
Page
<>();
...
@@ -210,7 +213,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -210,7 +213,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
*/
@Override
@Override
public
List
<
InsuranceListVO
>
getInsuranceList
(
InsuranceListParam
param
)
{
public
List
<
InsuranceListVO
>
getInsuranceList
(
InsuranceListParam
param
)
{
//todo 根据登录人获取数据权限
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptList
=
getDeptNoList
(
user
);
List
<
String
>
deptList
=
getDeptNoList
(
user
);
List
<
InsuranceListVO
>
insuranceList
=
new
ArrayList
<>();
List
<
InsuranceListVO
>
insuranceList
=
new
ArrayList
<>();
...
@@ -239,7 +241,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -239,7 +241,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
*/
@Override
@Override
public
IPage
<
InsuranceListVO
>
getInsuranceHandleListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
public
IPage
<
InsuranceListVO
>
getInsuranceHandleListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
//todo 根据登录人获取数据权限
IPage
<
InsuranceListVO
>
iPage
=
new
Page
<>();
IPage
<
InsuranceListVO
>
iPage
=
new
Page
<>();
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
String
regionSQL
=
getRegionSQL
(
user
);
String
regionSQL
=
getRegionSQL
(
user
);
...
@@ -766,6 +767,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -766,6 +767,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
null
!=
insuranceDetailVO
){
if
(
null
!=
insuranceDetailVO
){
long
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetailVO
.
getPolicyStart
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
long
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetailVO
.
getPolicyStart
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
long
month
=
LocalDateUtil
.
betweenMonth
(
insuranceDetailVO
.
getPolicyStart
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
long
month
=
LocalDateUtil
.
betweenMonth
(
insuranceDetailVO
.
getPolicyStart
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
String
defaultSettleId
=
insuranceDetailVO
.
getDefaultSettleId
();
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
id
,
defaultSettleId
);
if
(!
Common
.
isEmpty
(
settleVo
)){
insuranceDetailVO
.
setEstimateSettleStatus
(
settleVo
.
getEstimateStatus
());
insuranceDetailVO
.
setActualSettleStatus
(
settleVo
.
getActualStatus
());
}
}
//购买周期
//购买周期
String
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
String
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
...
@@ -851,7 +860,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -851,7 +860,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
R
<
List
<
InsuranceExportListVO
>>
getInsuranceExportList
(
InsuranceExportListParam
param
)
{
public
R
<
List
<
InsuranceExportListVO
>>
getInsuranceExportList
(
InsuranceExportListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
InsuranceExportListVO
>
insuranceExportList
=
new
ArrayList
<>();
List
<
InsuranceExportListVO
>
insuranceExportList
=
new
ArrayList
<>();
//todo 根据登录人获取数据权限
String
regionSQL
=
getRegionSQL
(
user
);
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
param
.
setRegionSql
(
regionSQL
);
if
(
StringUtils
.
isBlank
(
regionSQL
)){
if
(
StringUtils
.
isBlank
(
regionSQL
)){
...
@@ -882,6 +890,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -882,6 +890,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
record
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitle
()).
orElse
(
""
));
}
}
//购买月数
//购买月数
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
...
@@ -1096,6 +1105,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1096,6 +1105,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
StringUtils
.
isNotBlank
(
pushResult
)){
if
(
StringUtils
.
isNotBlank
(
pushResult
)){
detail
.
setDefaultSettleId
(
null
);
detail
.
setDefaultSettleId
(
null
);
}
}
//已投保退回,收入数据同步处理
updateInsuranceInfo
(
detail
,
settle
);
}
}
}
}
}
}
...
@@ -1274,6 +1285,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1274,6 +1285,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setDefaultSettleId
(
settle
.
getId
());
detail
.
setDefaultSettleId
(
settle
.
getId
());
successList
.
add
(
detail
);
successList
.
add
(
detail
);
}
}
//生成收入数据
createInsuranceInfo
(
detail
);
}
}
//实缴
//实缴
if
(
detail
.
getSettleType
()
==
CommonConstants
.
ONE_INT
){
if
(
detail
.
getSettleType
()
==
CommonConstants
.
ONE_INT
){
...
@@ -1289,6 +1302,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1289,6 +1302,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setIsUse
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsUse
(
CommonConstants
.
ZERO_INT
);
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
successList
.
add
(
detail
);
successList
.
add
(
detail
);
//生成收入数据
createInsuranceInfo
(
detail
);
}
}
}
}
}
}
...
@@ -1373,7 +1388,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1373,7 +1388,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
);
);
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
//如果发票号不为空,将替换类型的发票号也全部更新
//如果发票号不为空,将替换类型的发票号也全部更新
List
<
TInsuranceReplace
>
list
=
tInsuranceReplaceService
.
list
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
List
<
TInsuranceReplace
>
list
=
tInsuranceReplaceService
.
list
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getOriginInsuranceDetailId
,
detail
.
getId
()));
.
eq
(
TInsuranceReplace:
:
getOriginInsuranceDetailId
,
detail
.
getId
()));
...
@@ -1404,15 +1418,38 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1404,15 +1418,38 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
}
}
//如果保费不为空
if
(
StringUtils
.
isNotBlank
(
success
.
getActualPremium
())){
if
(
StringUtils
.
isNotBlank
(
success
.
getActualPremium
())){
//判断推送金额是否一致,不一致才推送ekp
Integer
settleType
=
detail
.
getSettleType
();
if
(
detail
.
getActualPremium
()
==
null
||
(
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
!=
0
)){
String
defaultSettleId
=
detail
.
getDefaultSettleId
();
// todo 判断是否推送过ekp,没推送过调新增接口,推送过调更新接口
//如果当前保单为合并结算
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
if
(
settleType
==
CommonConstants
.
ZERO_INT
){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)){
if
(!
Common
.
isEmpty
(
settleVo
)
&&
InsurancesConstants
.
SETTLE_ZERO
.
equals
(
settleVo
.
getActualStatus
())){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
//如果当前实缴信息未推送,则新增实缴单推送
if
(
settle
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
){
//保费存储
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
//调EKP新增实际保费
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
threadPool
.
execute
(()
->{
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
TWO_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
//如果当前实缴信息已推送,且金额与本次不一致,则推送实缴更新
if
(
settle
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
&&
(
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
!=
0
)){
//推送保费更新
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
...
@@ -1427,9 +1464,51 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1427,9 +1464,51 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService
.
updateById
(
settle
);
tInsuranceSettleService
.
updateById
(
settle
);
}
}
});
});
}
else
if
(
settle
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
&&
(
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
==
0
)){
//推送保费更新
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
//调EKP更新实际保费
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
threadPool
.
execute
(()
->{
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
}
});
}
}
}
else
{
}
}
}
//如果当前保单为单独结算
if
(
settleType
==
CommonConstants
.
ONE_INT
){
//推送过实缴信息且金额与本次不一致,则推送更新
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)
&&
(
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
!=
0
)){
//推送保费更新
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
//调EKP更新实际保费
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
threadPool
.
execute
(()
->{
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
//未推送过实缴信息,则推送新增
if
(
StringUtils
.
isBlank
(
defaultSettleId
)){
//保费存储
//保费存储
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
settle
.
setInsDetailId
(
detail
.
getId
());
settle
.
setInsDetailId
(
detail
.
getId
());
...
@@ -1455,6 +1534,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1455,6 +1534,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
}
}
String
invoiceNo
=
success
.
getInvoiceNo
();
String
policyNo
=
success
.
getPolicyNo
();
boolean
booleanInvoiceNo
=
StringUtils
.
isNotBlank
(
invoiceNo
)
&&
!
invoiceNo
.
equals
(
detail
.
getInvoiceNo
());
boolean
booleanPolicyNo
=
StringUtils
.
isNotBlank
(
policyNo
)
&&
!
policyNo
.
equals
(
detail
.
getPolicyNo
());
//如果当前保费为空,且保单号或发票号不一样
if
(
StringUtils
.
isBlank
(
success
.
getActualPremium
())
&&
(!
booleanInvoiceNo
||
!
booleanPolicyNo
)){
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
//如果当前实缴信息未推送,则新增实缴单推送
threadPool
.
execute
(()
->{
if
(
StringUtils
.
isNotBlank
(
invoiceNo
)){
detail
.
setInvoiceNo
(
invoiceNo
);
}
if
(
StringUtils
.
isNotBlank
(
policyNo
)){
detail
.
setPolicyNo
(
policyNo
);
}
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
}
}
//可以改成批量更新
//可以改成批量更新
this
.
updateById
(
detail
);
this
.
updateById
(
detail
);
detailList
.
add
(
detail
);
detailList
.
add
(
detail
);
...
@@ -2615,7 +2722,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2615,7 +2722,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
...
@@ -2753,24 +2859,74 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2753,24 +2859,74 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
//保单号是否更新
boolean
booleanPolicyNo
=
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())
&&
!
param
.
getPolicyNo
().
equals
(
detail
.
getPolicyNo
());
//发票号是否更新
boolean
booleanInvoiceNo
=
StringUtils
.
isNotBlank
(
param
.
getInvoiceNo
())
&&
!
param
.
getInvoiceNo
().
equals
(
detail
.
getInvoiceNo
());
//保费是否更新
boolean
booleanActualPremium
=
StringUtils
.
isNotBlank
(
param
.
getActualPremium
())
&&
detail
.
getActualPremium
().
compareTo
(
new
BigDecimal
(
param
.
getActualPremium
()))
!=
0
;
//如果当前为合并结算
if
(
CommonConstants
.
ZERO_INT
==
detail
.
getSettleType
()
&&
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
if
(!
Common
.
isEmpty
(
settleVo
)){
if
(!
Common
.
isEmpty
(
settleVo
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
())){
String
estimateStatus
=
settleVo
.
getEstimateStatus
();
String
actualStatus
=
settleVo
.
getActualStatus
();
//保费更新,保单号,发票号不更新
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
}
//
if
(!
booleanPolicyNo
||
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getActualStatus
())){
}
}
}
}
//如果当前为单独结算,判断实缴有没有结算
if
(
CommonConstants
.
ONE_INT
==
detail
.
getSettleType
()
&&
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
if
(!
Common
.
isEmpty
(
settleVo
)){
String
actualStatus
=
settleVo
.
getActualStatus
();
//判断实缴是否结算中
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
}
}
}
}
}
}
}
}
}
listSuccess
.
add
(
param
);
listSuccess
.
add
(
param
);
}
}
...
@@ -2996,7 +3152,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2996,7 +3152,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
*/
@Override
@Override
public
IPage
<
InsuredListVo
>
getInsuredListPage
(
Page
<
InsuredListVo
>
page
,
InsuredParam
param
)
{
public
IPage
<
InsuredListVo
>
getInsuredListPage
(
Page
<
InsuredListVo
>
page
,
InsuredParam
param
)
{
//todo 根据登录人获取其项目权限列表
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptList
=
getDeptNoList
(
user
);
List
<
String
>
deptList
=
getDeptNoList
(
user
);
IPage
<
InsuredListVo
>
insuranceList
=
new
Page
<>();
IPage
<
InsuredListVo
>
insuranceList
=
new
Page
<>();
...
@@ -3033,7 +3188,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3033,7 +3188,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
*/
@Override
@Override
public
List
<
InsuredListVo
>
getInsuredList
(
InsuredParam
param
)
{
public
List
<
InsuredListVo
>
getInsuredList
(
InsuredParam
param
)
{
//todo 根据登录人获取其项目权限列表
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptList
=
getDeptNoList
(
user
);
List
<
String
>
deptList
=
getDeptNoList
(
user
);
List
<
InsuredListVo
>
insuredList
=
new
ArrayList
<>();
List
<
InsuredListVo
>
insuredList
=
new
ArrayList
<>();
...
@@ -3072,7 +3226,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3072,7 +3226,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
*/
@Override
@Override
public
R
getInsuranceRefundPageList
(
Page
<
InsuranceRefundParam
>
page
,
InsuranceRefundParam
param
)
{
public
R
getInsuranceRefundPageList
(
Page
<
InsuranceRefundParam
>
page
,
InsuranceRefundParam
param
)
{
//todo 根据登录人获取其项目权限列表
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptList
=
getDeptNoList
(
user
);
List
<
String
>
deptList
=
getDeptNoList
(
user
);
if
(
CollectionUtils
.
isEmpty
(
deptList
)){
if
(
CollectionUtils
.
isEmpty
(
deptList
)){
...
@@ -3110,6 +3263,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3110,6 +3263,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
List
<
InsuranceRefundListVo
>
getInsuranceRefundList
(
InsuranceRefundParam
param
)
{
public
List
<
InsuranceRefundListVo
>
getInsuranceRefundList
(
InsuranceRefundParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
List
<
InsuranceRefundListVo
>
pageList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
return
pageList
;
}
param
.
setDeptNoList
(
deptNoList
);
param
.
setDeptNoList
(
deptNoList
);
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
...
@@ -3183,7 +3340,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3183,7 +3340,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
R
<
List
<
RefundExportListVo
>>
getInsuranceRefundHandlingList
(
RefundExportListParam
param
){
public
R
<
List
<
RefundExportListVo
>>
getInsuranceRefundHandlingList
(
RefundExportListParam
param
){
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
RefundExportListVo
>
refundExportList
;
List
<
RefundExportListVo
>
refundExportList
;
//todo 根据登录人获取数据权限
String
regionSQL
=
getRegionSQL
(
user
);
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
param
.
setRegionSql
(
regionSQL
);
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
...
@@ -3437,6 +3593,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3437,6 +3593,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail
byId
=
getById
(
ekpInteractiveParam
.
getDetailId
());
TInsuranceDetail
byId
=
getById
(
ekpInteractiveParam
.
getDetailId
());
BeanCopyUtils
.
copyProperties
(
byId
,
ekpInteractiveParam
);
BeanCopyUtils
.
copyProperties
(
byId
,
ekpInteractiveParam
);
ekpInteractiveParam
.
setInteractiveType
(
InsurancesConstants
.
UPDATE_SETTLE_BILL
);
ekpInteractiveParam
.
setInteractiveType
(
InsurancesConstants
.
UPDATE_SETTLE_BILL
);
if
(
byId
.
getSettleType
()
==
CommonConstants
.
ZERO_INT
){
ekpInteractiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
}
else
{
ekpInteractiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
}
String
body
=
eKPInsuranceUtil
.
sendToEkp
(
ekpInteractiveParam
);
String
body
=
eKPInsuranceUtil
.
sendToEkp
(
ekpInteractiveParam
);
if
(!
StringUtils
.
isBlank
(
body
)){
if
(!
StringUtils
.
isBlank
(
body
)){
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
...
@@ -3559,6 +3720,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3559,6 +3720,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更后为单独结算
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
//推送新的结算信息至EKP
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
...
@@ -3567,6 +3729,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3567,6 +3729,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
String
pushResult
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
String
pushResult
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
pushResult
)){
if
(
StringUtils
.
isNotBlank
(
pushResult
)){
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
...
@@ -3581,6 +3744,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3581,6 +3744,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更后为合并结算
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
//先推送预估,再推送实际
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
@@ -3622,6 +3786,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3622,6 +3786,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更后为单独结算
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
//推送新的结算信息至EKP
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
interactiveParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
...
@@ -3644,6 +3809,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3644,6 +3809,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更后为合并结算
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
//先推送预估,再推送实际
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
@@ -3704,6 +3870,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3704,6 +3870,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
update
(
updateWrapper
);
update
(
updateWrapper
);
//推送结算信息至EKP
//推送结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
tInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
@@ -3776,6 +3943,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3776,6 +3943,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0.00"
));
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0.00"
));
update
(
updateWrapper
);
update
(
updateWrapper
);
//推送新的结算信息至EKP,推实际保费
//推送新的结算信息至EKP,推实际保费
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
NOTHING
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
@@ -3800,6 +3968,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3800,6 +3968,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更为合并结算
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
// 推送新的结算信息
// 推送新的结算信息
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
@@ -3842,6 +4011,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3842,6 +4011,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
String
deleteBody
=
eKPInsuranceUtil
.
sendToEkp
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
)){
if
(
StringUtils
.
isNotBlank
(
deleteBody
)){
//先推送预估,再推送实际
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
@@ -3882,6 +4052,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3882,6 +4052,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//如果预估和实缴均未推送
//如果预估和实缴均未推送
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//先推送预估,再推送实际
//先推送预估,再推送实际
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
@@ -3944,6 +4115,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3944,6 +4115,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更为合并结算
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
//新增新的结算信息
//新增新的结算信息
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
...
@@ -3956,6 +4128,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3956,6 +4128,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
update
(
updateWrapper
);
//推送新的结算信息至EKP
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
@@ -3981,6 +4154,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3981,6 +4154,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
else
{
}
else
{
//推送新的结算信息至EKP
//推送新的结算信息至EKP
interactiveParam
.
setDefaultSettleId
(
newInsuranceSettle
.
getId
());
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setEstimateStatus
(
EkpConstants
.
HAVE
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
@@ -5146,7 +5320,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5146,7 +5320,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
R
getDeptListByUser
(){
public
R
getDeptListByUser
(){
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
//根据当前登录人获取其拥有的项目列表权限
//根据当前登录人获取其拥有的项目列表权限
// TODO: 2022/8/5
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
List
<
Dept
>
deptList
=
new
ArrayList
<>(
16
);
List
<
Dept
>
deptList
=
new
ArrayList
<>(
16
);
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
deptNoList
);
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
deptNoList
);
...
@@ -5298,6 +5471,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5298,6 +5471,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< String>}
* @return {@link List< String>}
*/
*/
public
List
<
String
>
getDeptNoList
(
YifuUser
user
){
public
List
<
String
>
getDeptNoList
(
YifuUser
user
){
//todo 根据登录人获取其项目权限列表
List
<
String
>
deptList
=
new
ArrayList
<>(
16
);
List
<
String
>
deptList
=
new
ArrayList
<>(
16
);
String
id
=
user
.
getId
();
String
id
=
user
.
getId
();
//周日琴12,徐燕13
//周日琴12,徐燕13
...
@@ -5336,6 +5510,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5336,6 +5510,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link String}
* @return {@link String}
*/
*/
public
String
getRegionSQL
(
YifuUser
user
){
public
String
getRegionSQL
(
YifuUser
user
){
//todo 根据登录人获取其办理地SQL
String
id
=
user
.
getId
();
String
id
=
user
.
getId
();
String
sql
;
String
sql
;
//user_id=14, 合肥办理1
//user_id=14, 合肥办理1
...
@@ -5501,5 +5676,145 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5501,5 +5676,145 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
//商险预估
public
void
createInsuranceInfo
(
TInsuranceDetail
insuranceDetail
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
=
null
;
R
<
TSettleDomainListVo
>
listVo
=
null
;
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoByNo
(
insuranceDetail
.
getDeptNo
());
if
(
Common
.
isNotNull
(
listVo
))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
}
}
}
//判断是否存在当月的商险收入数据
Boolean
isExist
=
false
;
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setEmpIdcard
(
insuranceDetail
.
getEmpIdcardNo
());
incomeDetail
.
setCreateMonth
(
DateUtil
.
getYearAndMonth
(
insuranceDetail
.
getHandledTime
(),
0
));
incomeDetail
.
setDeptNo
(
insuranceDetail
.
getDeptNo
());
incomeDetail
.
setSourceType
(
CommonConstants
.
THREE_STRING
);
R
<
TIncomeDetailReturnVo
>
detailList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
)
&&
detailList
.
getCode
()
==
CommonConstants
.
SUCCESS
){
isExist
=
true
;
}
//判断是否为按人次收费
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有商险,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
THREE_STRING
))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
//预估模式只有按人次和人数收费
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
isSum
=
1
;
}
if
(!
isExist
||
isSum
==
1
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
());
}
}
}
else
{
BigDecimal
gMoney
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
isSum
=
2
;
}
else
{
gMoney
=
BigDecimalUtils
.
safeMultiply
(
insuranceDetail
.
getActualPremium
(),
settleDomain
.
getManagementFee
());
}
if
(!
isExist
||
isSum
==
2
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
);
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
THREE_STRING
))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
isSum
=
3
;
}
if
(!
isExist
||
isSum
==
3
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
());
}
}
else
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
BigDecimal
money
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
isSum
=
4
;
}
else
{
money
=
BigDecimalUtils
.
safeMultiply
(
insuranceDetail
.
getActualPremium
(),
settleDomain
.
getRiskFundFee
());
}
if
(!
isExist
||
isSum
==
4
)
{
createIncomeInsurance
(
insuranceDetail
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
);
}
}
}
}
}
}
public
void
createIncomeInsurance
(
TInsuranceDetail
insuranceDetail
,
TSettleDomain
settleDomain
,
String
feeType
,
String
charges
,
String
feeMode
,
BigDecimal
money
)
{
//生成收入数据
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
detail
.
setDeptName
(
settleDomain
.
getDepartName
());
detail
.
setDeptNo
(
settleDomain
.
getDepartNo
());
detail
.
setDeptId
(
settleDomain
.
getId
());
detail
.
setEmpIdcard
(
insuranceDetail
.
getEmpIdcardNo
());
detail
.
setEmpName
(
insuranceDetail
.
getEmpName
());
detail
.
setUnitNo
(
settleDomain
.
getCustomerNo
());
detail
.
setUnitId
(
settleDomain
.
getCustomerId
());
detail
.
setUnitName
(
settleDomain
.
getCustomerName
());
detail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
detail
.
setSourceId
(
insuranceDetail
.
getId
());
detail
.
setSourceType
(
CommonConstants
.
THREE_STRING
);
detail
.
setCreateMonth
(
DateUtil
.
getYearAndMonth
(
insuranceDetail
.
getHandledTime
(),
0
));
detail
.
setPayMonth
(
insuranceDetail
.
getSettleMonth
());
detail
.
setMoney
(
money
);
detail
.
setFeeType
(
feeType
);
detail
.
setFeeMode
(
feeMode
);
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setId
(
CommonConstants
.
NULL
);
socialDaprUtils
.
createTIncomeDetail
(
detail
);
}
//更新收入信息
public
void
updateInsuranceInfo
(
TInsuranceDetail
insuranceDetail
,
TInsuranceSettle
settle
)
{
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setSourceId
(
insuranceDetail
.
getId
());
R
<
TIncomeDetailReturnVo
>
detailList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
)
&&
detailList
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
for
(
TIncomeDetail
detail
:
detailList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
detail1
);
socialDaprUtils
.
deleteById
(
detail
);
//已推送的数据生成红冲数据
if
(
settle
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
||
settle
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
)
{
detail1
.
setMoney
(
detail1
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
}
}
}
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceEkpServiceImpl.java
View file @
7434fe68
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
...
@@ -61,101 +62,178 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
...
@@ -61,101 +62,178 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
List
<
TInsuranceEkp
>
successLit
=
new
ArrayList
<>();
List
<
TInsuranceEkp
>
successLit
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
ekpRefundList
)){
if
(
CollectionUtils
.
isNotEmpty
(
ekpRefundList
)){
for
(
TInsuranceEkp
tInsuranceEkp
:
ekpRefundList
)
{
for
(
TInsuranceEkp
tInsuranceEkp
:
ekpRefundList
)
{
//结算信息
TInsuranceDetail
byId
=
tInsuranceDetailService
.
getById
(
tInsuranceEkp
.
getDetailId
());
String
defaultSettleId
=
byId
.
getDefaultSettleId
();
if
(
tInsuranceEkp
.
getDefaultSettleId
().
equals
(
defaultSettleId
)){
//ekp结算信息
SettleVo
settleVo
=
tInsuranceDetailService
.
getInsuranceDetailSettleStatus
(
tInsuranceEkp
.
getDetailId
(),
tInsuranceEkp
.
getDefaultSettleId
());
SettleVo
settleVo
=
tInsuranceDetailService
.
getInsuranceDetailSettleStatus
(
tInsuranceEkp
.
getDetailId
(),
tInsuranceEkp
.
getDefaultSettleId
());
//商险结算信息
TInsuranceSettle
insuranceSettle
=
tInsuranceSettleService
.
getById
(
tInsuranceEkp
.
getDefaultSettleId
());
//预估推送状态
Integer
isEstimatePush
=
insuranceSettle
.
getIsEstimatePush
();
//实缴推送状态
Integer
isActualPush
=
insuranceSettle
.
getIsActualPush
();
//实缴结算状态
//实缴结算状态
String
actualStatus
=
settleVo
.
getActualStatus
();
String
actualStatus
=
settleVo
.
getActualStatus
();
//预缴结算状态
//预缴结算状态
String
estimateStatus
=
settleVo
.
getEstimateStatus
();
String
estimateStatus
=
settleVo
.
getEstimateStatus
();
Integer
pushType
=
tInsuranceEkp
.
getPushType
();
Integer
pushType
=
tInsuranceEkp
.
getPushType
();
LambdaQueryWrapper
<
TInsuranceSettle
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceEkp
.
getDefaultSettleId
());
TInsuranceSettle
insuranceSettle
=
tInsuranceSettleService
.
getOne
(
queryWrapper
);
//如果当前需要重发预估保费的数据已发送,则过滤掉执行下一条数据
//如果当前需要重发预估保费的数据已发送,则过滤掉执行下一条数据
if
(
CommonConstants
.
ONE_INT
==
pushType
&&
CommonConstants
.
ONE_INT
==
insuranceSettle
.
getIsEstimatePush
()
){
if
(
CommonConstants
.
ONE_INT
==
pushType
&&
CommonConstants
.
ONE_INT
==
isEstimatePush
){
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
THREE_INT
);
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
THREE_INT
);
failList
.
add
(
tInsuranceEkp
);
failList
.
add
(
tInsuranceEkp
);
continue
;
continue
;
}
}
//如果当前需要重发实际保费的数据已发送,则过滤掉执行下一条数据
//如果当前需要重发实际保费的数据已发送,则过滤掉执行下一条数据
if
(
CommonConstants
.
TWO_INT
==
pushType
&&
CommonConstants
.
ONE_INT
==
insuranceSettle
.
getIsActualPush
()
){
if
(
CommonConstants
.
TWO_INT
==
pushType
&&
CommonConstants
.
ONE_INT
==
isActualPush
){
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
THREE_INT
);
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
THREE_INT
);
failList
.
add
(
tInsuranceEkp
);
failList
.
add
(
tInsuranceEkp
);
continue
;
continue
;
}
}
EkpInteractiveParam
ekpParam
=
new
EkpInteractiveParam
();
EkpInteractiveParam
ekpParam
=
new
EkpInteractiveParam
();
BeanCopyUtils
.
copyProperties
(
tInsuranceEkp
,
ekpParam
);
BeanCopyUtils
.
copyProperties
(
tInsuranceEkp
,
ekpParam
);
if
(
actualStatus
.
equals
(
InsurancesConstants
.
SETTLE_ZERO
)){
//如果预估未结算
String
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
//如果发送成功
if
(
StringUtils
.
isNotBlank
(
s
)){
//预估则更新预估保费
if
(
CommonConstants
.
ONE_INT
==
pushType
){
LambdaUpdateWrapper
<
TInsuranceSettle
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TInsuranceSettle
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
String
s
=
null
;
if
(
InsurancesConstants
.
SETTLE_ZERO
.
equals
(
estimateStatus
)){
//实缴未结算
if
(
InsurancesConstants
.
SETTLE_ZERO
.
equals
(
actualStatus
)){
//如果是新增预估保费,则推送预估保费新增
if
(
CommonConstants
.
ONE_INT
==
pushType
){
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
)){
updateWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceEkp
.
getDefaultSettleId
())
updateWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceEkp
.
getDefaultSettleId
())
.
set
(
TInsuranceSettle
::
getIsEstimatePush
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceSettle
::
getIsEstimatePush
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
());
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
());
tInsuranceSettleService
.
update
(
updateWrapper
);
tInsuranceSettleService
.
update
(
updateWrapper
);
}
}
//预估则更新预估保费
}
//如果是新增实缴保费,则推送实缴保费新增
if
(
CommonConstants
.
TWO_INT
==
pushType
){
if
(
CommonConstants
.
TWO_INT
==
pushType
){
LambdaUpdateWrapper
<
TInsuranceSettle
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
updateWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceEkp
.
getDefaultSettleId
())
if
(
StringUtils
.
isNotBlank
(
s
))
{
.
set
(
TInsuranceSettle
::
getIsActualPush
,
CommonConstants
.
ONE_INT
)
updateWrapper
.
eq
(
TInsuranceSettle:
:
getId
,
tInsuranceEkp
.
getDefaultSettleId
())
.
set
(
TInsuranceSettle
::
getActualPushTime
,
LocalDateTime
.
now
());
.
set
(
TInsuranceSettle:
:
getIsActualPush
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceSettle:
:
getActualPushTime
,
LocalDateTime
.
now
());
tInsuranceSettleService
.
update
(
updateWrapper
);
tInsuranceSettleService
.
update
(
updateWrapper
);
}
}
//结算月则变更结算月
}
//如果是变更结算信息,则推送变更结算信息
if
(
CommonConstants
.
THREE_INT
==
pushType
){
if
(
CommonConstants
.
THREE_INT
==
pushType
){
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
tInsuranceEkp
.
getDetailId
())
if
(
StringUtils
.
isNotBlank
(
s
))
{
.
set
(
TInsuranceDetail
::
getSettleMonth
,
tInsuranceEkp
.
getSettleMonth
())
updateWrapper
.
eq
(
TInsuranceSettle:
:
getId
,
tInsuranceEkp
.
getDefaultSettleId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
.
set
(
TInsuranceSettle:
:
getIsActualPush
,
CommonConstants
.
ONE_INT
)
tInsuranceDetailService
.
update
(
updateWrapper
);
.
set
(
TInsuranceSettle:
:
getActualPushTime
,
LocalDateTime
.
now
());
tInsuranceSettleService
.
update
(
updateWrapper
);
LambdaUpdateWrapper
<
TInsuranceDetail
>
detailLambdaUpdate
=
new
LambdaUpdateWrapper
<>();
detailLambdaUpdate
.
eq
(
TInsuranceDetail:
:
getId
,
tInsuranceEkp
.
getDetailId
())
.
set
(
TInsuranceDetail:
:
getSettleMonth
,
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
update
(
updateWrapper
);
}
}
}
//如果是作废信息,则推送作废信息
if
(
CommonConstants
.
FOUR_INT
==
pushType
){
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
}
if
(
CommonConstants
.
FIVE_INT
==
pushType
||
CommonConstants
.
SIX_INT
==
pushType
){
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
TWO_INT
);
failList
.
add
(
tInsuranceEkp
);
continue
;
}
//成功则更新,不成功则跳出循环
if
(
StringUtils
.
isNotBlank
(
s
))
{
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
ONE_INT
);
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
ONE_INT
);
successLit
.
ad
d
(
tInsuranceEkp
);
updateByI
d
(
tInsuranceEkp
);
}
else
{
}
else
{
break
;
break
;
}
}
}
}
else
{
//实缴结算中,已结算
//如果为作废信息,已结算和结算中发送红冲数据
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)
||
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
//如果是作废,则推送实缴红冲
if
(
CommonConstants
.
FOUR_INT
==
pushType
){
if
(
CommonConstants
.
FOUR_INT
==
pushType
){
//预估保费
BigDecimal
estimatePremium
=
ekpParam
.
getEstimatePremium
();
//实际保费
BigDecimal
actualPremium
=
ekpParam
.
getActualPremium
();
BigDecimal
actualPremium
=
ekpParam
.
getActualPremium
();
if
(!
BigDecimalUtils
.
isNullOrZero
(
estimatePremium
)){
ekpParam
.
setEstimatePremium
(
estimatePremium
.
negate
());
}
if
(!
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
ekpParam
.
setActualPremium
(
actualPremium
.
negate
());
ekpParam
.
setActualPremium
(
actualPremium
.
negate
());
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
CORRECT_SETTLE_BILL
);
ekpParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
))
{
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
ONE_INT
);
updateById
(
tInsuranceEkp
);
}
else
{
break
;
}
}
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
NEW_SETTLE_BILL
);
}
String
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
CommonConstants
.
SIX_INT
==
pushType
){
if
(
StringUtils
.
isNotBlank
(
s
)){
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
))
{
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
ONE_INT
);
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
ONE_INT
);
successLit
.
ad
d
(
tInsuranceEkp
);
updateByI
d
(
tInsuranceEkp
);
}
else
{
}
else
{
break
;
break
;
}
}
//如果为红冲数据则正常发送
}
else
{
}
else
if
(
CommonConstants
.
FIVE_INT
==
pushType
||
CommonConstants
.
SIX_INT
==
pushType
){
//推送预估新增,实缴新增,变更结算信息,作废,则不进行重发
String
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
TWO_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
updateById
(
tInsuranceEkp
);
}
}
}
else
{
//如果实缴未结算
if
(
InsurancesConstants
.
SETTLE_ZERO
.
equals
(
actualStatus
)){
//如果是作废信息,则推送预估红冲信息
if
(
CommonConstants
.
FOUR_INT
==
pushType
){
BigDecimal
estimatePremium
=
ekpParam
.
getEstimatePremium
();
ekpParam
.
setActualPremium
(
estimatePremium
.
negate
());
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
CORRECT_SETTLE_BILL
);
ekpParam
.
setSettleType
(
InsurancesConstants
.
ESTIMATE_SETTLE_BILL
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
))
{
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
ONE_INT
);
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
ONE_INT
);
successLit
.
add
(
tInsuranceEkp
);
updateById
(
tInsuranceEkp
);
}
else
{
break
;
}
}
else
if
(
CommonConstants
.
FIVE_INT
==
pushType
){
//如果是预估红冲信息,则推送预估红冲信息
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
))
{
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
ONE_INT
);
updateById
(
tInsuranceEkp
);
}
else
{
}
else
{
break
;
break
;
}
}
}
else
{
}
else
{
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
TWO_INT
);
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
TWO_INT
);
failList
.
ad
d
(
tInsuranceEkp
);
updateByI
d
(
tInsuranceEkp
);
}
}
}
else
{
//如果是实缴红冲信息,则推送实缴红冲信息
if
(
CommonConstants
.
SIX_INT
==
pushType
){
BigDecimal
actualPremium
=
ekpParam
.
getActualPremium
();
ekpParam
.
setActualPremium
(
actualPremium
.
negate
());
ekpParam
.
setInteractiveType
(
InsurancesConstants
.
CORRECT_SETTLE_BILL
);
ekpParam
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
s
=
ekpInsuranceUtil
.
sendToEkp
(
ekpParam
);
if
(
StringUtils
.
isNotBlank
(
s
))
{
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
ONE_INT
);
updateById
(
tInsuranceEkp
);
}
else
{
break
;
}
}
else
{
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
TWO_INT
);
updateById
(
tInsuranceEkp
);
}
}
}
}
else
{
//结算id与当前不一致则不进行重发
tInsuranceEkp
.
setResendFlag
(
CommonConstants
.
THREE_INT
);
failList
.
add
(
tInsuranceEkp
);
}
}
}
}
updateBatchById
(
successLit
);
updateBatchById
(
failList
);
updateBatchById
(
failList
);
return
R
.
ok
(
"发送成功"
);
return
R
.
ok
(
"发送成功"
);
}
else
{
}
else
{
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
7434fe68
...
@@ -285,7 +285,6 @@
...
@@ -285,7 +285,6 @@
detail.SETTLE_MONTH as settleMonth,
detail.SETTLE_MONTH as settleMonth,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
tis.SETTLE_HANDLE_STATUS as settleHandleStatus,
detail.IS_USE as isUse,
detail.IS_USE as isUse,
detail.IS_EFFECT as isEffect,
detail.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue,
detail.IS_OVERDUE as isOverdue,
...
@@ -301,6 +300,7 @@
...
@@ -301,6 +300,7 @@
detail.CREATE_TIME as createTime,
detail.CREATE_TIME as createTime,
detail.REMARK as remark,
detail.REMARK as remark,
detail.BILLING_TYPE as billingType,
detail.BILLING_TYPE as billingType,
detail.DEFAULT_SETTLE_ID as defaultSettleId,
detail.RATE as rate
detail.RATE as rate
from t_insurance_detail detail
from t_insurance_detail detail
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
View file @
7434fe68
...
@@ -105,9 +105,9 @@ public class SocialTask {
...
@@ -105,9 +105,9 @@ public class SocialTask {
* @return: void
* @return: void
**/
**/
public
void
createPaymentInfoIncome
()
{
public
void
createPaymentInfoIncome
()
{
log
.
info
(
"------------定时生成缴费库的收入数据-定时任务开始------------"
);
log
.
info
(
"------------定时生成缴费库
社保
的收入数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/createPaymentInfoIncome"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/createPaymentInfoIncome"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时生成缴费库的收入数据-定时任务结束------------"
);
log
.
info
(
"------------定时生成缴费库
社保
的收入数据-定时任务结束------------"
);
}
}
/**
/**
...
@@ -117,8 +117,20 @@ public class SocialTask {
...
@@ -117,8 +117,20 @@ public class SocialTask {
* @return: void
* @return: void
**/
**/
public
void
createPaymentFundIncome
()
{
public
void
createPaymentFundIncome
()
{
log
.
info
(
"------------定时生成缴费库的收入数据-定时任务开始------------"
);
log
.
info
(
"------------定时生成缴费库
公积金
的收入数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/createPaymentFundIncome"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/createPaymentFundIncome"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时生成缴费库的收入数据-定时任务结束------------"
);
log
.
info
(
"------------定时生成缴费库公积金的收入数据-定时任务结束------------"
);
}
/**
* @Description: 定时任务生成统计表数据
* @Author: huyc
* @Date: 2022/8/30
* @return: void
**/
public
void
pushDetail
()
{
log
.
info
(
"------------定时任务生成统计表数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/pushDetail"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时任务生成统计表数据-定时任务结束------------"
);
}
}
}
}
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
7434fe68
...
@@ -39,9 +39,7 @@ import javax.annotation.Resource;
...
@@ -39,9 +39,7 @@ import javax.annotation.Resource;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Optional
;
/**
/**
* @author licancan
* @author licancan
...
@@ -272,7 +270,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
...
@@ -272,7 +270,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
//同步推送ekp
//同步推送ekp
EkpOrderReplyParam
param
=
new
EkpOrderReplyParam
();
EkpOrderReplyParam
param
=
new
EkpOrderReplyParam
();
param
.
setFd_3ac904bbaf972a
(
orderNo
);
param
.
setFd_3ac904bbaf972a
(
orderNo
);
param
.
setFd_3ac904badcaa06
(
user
.
getUsername
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"LoginName"
,
user
.
getUsername
());
param
.
setFd_3ac904badcaa06
(
map
);
param
.
setFd_3ac904b8590598
(
reply
.
getCreateTime
().
toString
());
param
.
setFd_3ac904b8590598
(
reply
.
getCreateTime
().
toString
());
param
.
setFd_3ac904c7798e5c
(
replyContent
);
param
.
setFd_3ac904c7798e5c
(
replyContent
);
ekpOrderUtil
.
sendReplyToEKP
(
param
,
file
);
ekpOrderUtil
.
sendReplyToEKP
(
param
,
file
);
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TPaymentVo.java
View file @
7434fe68
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
...
@@ -12,4 +13,6 @@ import java.util.List;
...
@@ -12,4 +13,6 @@ import java.util.List;
@Data
@Data
public
class
TPaymentVo
{
public
class
TPaymentVo
{
List
<
TPaymentBySalaryVo
>
paymentList
;
List
<
TPaymentBySalaryVo
>
paymentList
;
List
<
TPaymentInfo
>
paymentInfoList
;
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
7434fe68
...
@@ -242,7 +242,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -242,7 +242,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
,
"/tsettledomain/inner/getSettleDomainVoById"
,
tSalaryStandard
.
getDeptId
()
,
"/tsettledomain/inner/getSettleDomainVoById"
,
tSalaryStandard
.
getDeptId
()
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
// 结算主体
// 结算主体
TSettleDomainSelectVo
dept
=
null
;
TSettleDomainSelectVo
dept
;
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
)
{
dept
=
sdr
.
getData
();
dept
=
sdr
.
getData
();
}
else
{
}
else
{
...
@@ -258,7 +258,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -258,7 +258,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TIncomeDetail
detail
=
new
TIncomeDetail
();
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setPayMonth
(
tSalaryStandard
.
getSalaryMonth
());
detail
.
setPayMonth
(
tSalaryStandard
.
getSalaryMonth
());
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincomedetail/inner/getTIncomeDetail
Ex
ist"
,
detail
,
"/tincomedetail/inner/getTIncomeDetail
L
ist"
,
detail
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
Integer
value
;
Integer
value
;
...
@@ -267,7 +267,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -267,7 +267,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
());
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
());
if
(
Common
.
isEmpty
(
value
))
{
if
(
Common
.
isEmpty
(
value
))
{
value
=
CommonConstants
.
ZERO_INT
;
value
=
CommonConstants
.
ZERO_INT
;
}
}
...
@@ -276,7 +277,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -276,7 +277,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
else
{
}
else
{
value
--;
value
--;
}
}
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
(),
value
);
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
(),
value
);
}
}
}
}
}
else
{
}
else
{
...
@@ -301,7 +304,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -301,7 +304,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TIncomeDetail
detail
=
new
TIncomeDetail
();
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setPayMonth
(
tSalaryStandard
.
getSalaryMonth
());
detail
.
setPayMonth
(
tSalaryStandard
.
getSalaryMonth
());
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincomedetail/inner/getTIncomeDetail
Ex
ist"
,
detail
,
"/tincomedetail/inner/getTIncomeDetail
L
ist"
,
detail
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
Integer
value
;
Integer
value
;
...
@@ -310,7 +313,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -310,7 +313,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
());
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
());
if
(
Common
.
isEmpty
(
value
))
{
if
(
Common
.
isEmpty
(
value
))
{
value
=
CommonConstants
.
ZERO_INT
;
value
=
CommonConstants
.
ZERO_INT
;
}
}
...
@@ -319,7 +323,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -319,7 +323,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
else
{
}
else
{
value
--;
value
--;
}
}
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
(),
value
);
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
(),
value
);
}
}
}
}
}
else
{
}
else
{
...
@@ -354,11 +359,13 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -354,11 +359,13 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
BigDecimal
money
;
BigDecimal
money
;
for
(
TSalaryAccount
account
:
salaryAccountList
)
{
for
(
TSalaryAccount
account
:
salaryAccountList
)
{
value
=
detailMap
.
get
(
account
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
isManage
);
value
=
detailMap
.
get
(
account
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
account
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
isManage
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
);
if
(
Common
.
isEmpty
(
value
)
||
value
==
0
)
{
if
(
Common
.
isEmpty
(
value
)
||
value
==
0
)
{
detail
=
new
TIncomeDetail
();
detail
=
new
TIncomeDetail
();
detail
.
setPayMonth
(
account
.
getSalaryMonth
());
detail
.
setPayMonth
(
account
.
getSalaryMonth
());
detail
.
setCharges
(
String
.
valueOf
(
dept
.
getManagementFee
()));
detail
.
setDeptId
(
account
.
getDeptId
());
detail
.
setDeptId
(
account
.
getDeptId
());
detail
.
setDeptName
(
account
.
getDeptName
());
detail
.
setDeptName
(
account
.
getDeptName
());
detail
.
setDeptNo
(
account
.
getDeptNo
());
detail
.
setDeptNo
(
account
.
getDeptNo
());
...
@@ -370,9 +377,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -370,9 +377,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
detail
.
setEmpName
(
account
.
getEmpName
());
detail
.
setEmpName
(
account
.
getEmpName
());
detail
.
setFeeMode
(
dept
.
getManagementType
());
detail
.
setFeeMode
(
dept
.
getManagementType
());
detail
.
setFeeType
(
isManage
);
detail
.
setFeeType
(
isManage
);
detail
.
setCharges
(
String
.
valueOf
(
dept
.
getManagementFee
()));
money
=
dept
.
getManagementFee
();
money
=
dept
.
getManagementFee
();
if
(
CommonConstants
.
TWO_STRING
.
equals
(
isManage
))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
isManage
))
{
money
=
dept
.
getRiskFundFee
();
money
=
dept
.
getRiskFundFee
();
detail
.
setCharges
(
String
.
valueOf
(
dept
.
getRiskFundFee
()));
}
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
feeType
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
feeType
))
{
money
=
BigDecimalUtils
.
safeMultiply
(
account
.
getRelaySalary
(),
money
,
CommonConstants
.
ONE_OF_PERCENT
);
money
=
BigDecimalUtils
.
safeMultiply
(
account
.
getRelaySalary
(),
money
,
CommonConstants
.
ONE_OF_PERCENT
);
...
@@ -384,7 +393,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -384,7 +393,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
detail
.
setSourceType
(
CommonConstants
.
FOUR_STRING
);
detail
.
setSourceType
(
CommonConstants
.
FOUR_STRING
);
R
<
Boolean
>
saveR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
R
<
Boolean
>
saveR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincome/inner/saveDetail"
,
detail
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/tincome/inner/saveDetail"
,
detail
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
saveR
==
null
||
saveR
.
get
Data
()
==
null
||
Boolean
.
FALSE
.
equals
(
saveR
.
getData
()))
{
if
(
saveR
==
null
||
saveR
.
get
Code
()
==
CommonConstants
.
ONE_INT
||
Boolean
.
FALSE
.
equals
(
saveR
.
getData
()))
{
return
R
.
failed
(
"保存收入明细以及统计出错!"
);
return
R
.
failed
(
"保存收入明细以及统计出错!"
);
}
}
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
7434fe68
...
@@ -455,13 +455,13 @@
...
@@ -455,13 +455,13 @@
,ifnull(a.EMP_PHONE,'') fd_3adfedfbd23ab8
,ifnull(a.EMP_PHONE,'') fd_3adfedfbd23ab8
,ifnull(a.BANK_NO,'') fd_3adfedfcb17f1e
,ifnull(a.BANK_NO,'') fd_3adfedfcb17f1e
,ifnull(a.BANK_NAME,'') fd_3adfedfc453cc4
,ifnull(a.BANK_NAME,'') fd_3adfedfc453cc4
,
ifnull(a.SALARY_MONTH,''
) fd_3adfee063acff0
,
concat(left(ifnull(a.SALARY_MONTH,'1970'),4),'-',right(ifnull(a.SALARY_MONTH,'02'),2)
) fd_3adfee063acff0
,
ifnull(a.SETTLEMENT_MONTH,''
) fd_3adfee0690737c
,
concat(left(ifnull(a.SETTLEMENT_MONTH,'1970'),4),'-',right(ifnull(a.SETTLEMENT_MONTH,'02'),2)
) fd_3adfee0690737c
,'
1
' fd_3adfee01668666
,'
是
' fd_3adfee01668666
,if
null(a.SOCIAL_PRIORITY,'
') fd_3adfedfed8bb28
,if
(a.SOCIAL_PRIORITY='1','缴纳月','生成月
') fd_3adfedfed8bb28
,if
null(a.FUND_PRIORITY,'
') fd_3adfedff3a7430
,if
(a.FUND_PRIORITY='1','缴纳月','生成月
') fd_3adfedff3a7430
,if
null(a.OWN_FLAG,'
') fd_3adfee0009d070
,if
(a.OWN_FLAG='1','是','否
') fd_3adfee0009d070
,if
null(a.ANNUAL_BONUS_TYPE,'
') fd_3adfee01dea2fa
,if
(a.ANNUAL_BONUS_TYPE='1','单独','合并
') fd_3adfee01dea2fa
,ifnull(a.RELAY_SALARY,'') fd_3adfee12cb8840
,ifnull(a.RELAY_SALARY,'') fd_3adfee12cb8840
,ifnull(pdeduction.SALARY_MONEY,'') fd_3adfee1374ed7a
,ifnull(pdeduction.SALARY_MONEY,'') fd_3adfee1374ed7a
,ifnull(ifnull(withholidingUnitSocial.SALARY_MONEY,unitSocial.SALARY_MONEY),'') fd_3adfee1e2b2f78
,ifnull(ifnull(withholidingUnitSocial.SALARY_MONEY,unitSocial.SALARY_MONEY),'') fd_3adfee1e2b2f78
...
@@ -502,7 +502,7 @@
...
@@ -502,7 +502,7 @@
,'' fd_3adfeede08d430
,'' fd_3adfeede08d430
,'' fd_3aeadf191c62a0
,'' fd_3aeadf191c62a0
,'' fd_3aeadf1992544c
,'' fd_3aeadf1992544c
,if
null(a.SALARY_GIVE_TIME,'
') fd_3af9d49d165e90
,if
(a.SALARY_GIVE_TIME='1','是','否
') fd_3af9d49d165e90
,ifnull(a.INVOICE_TITLE,'') fd_3afab1895feea2
,ifnull(a.INVOICE_TITLE,'') fd_3afab1895feea2
from t_salary_account a
from t_salary_account a
LEFT JOIN t_salary_standard s on a.SALARY_FORM_ID=s.ID
LEFT JOIN t_salary_standard s on a.SALARY_FORM_ID=s.ID
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TIncome.java
View file @
7434fe68
...
@@ -183,6 +183,18 @@ public class TIncome {
...
@@ -183,6 +183,18 @@ public class TIncome {
@ExcelAttribute
(
name
=
"推送状态:0未推送1已推送"
,
maxLength
=
1
)
@ExcelAttribute
(
name
=
"推送状态:0未推送1已推送"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"推送状态:0未推送1已推送不能超过1个字符"
)
@Length
(
max
=
1
,
message
=
"推送状态:0未推送1已推送不能超过1个字符"
)
@ExcelProperty
(
"推送状态:0未推送1已推送"
)
@ExcelProperty
(
"推送状态:0未推送1已推送"
)
private
String
pushStatus
;
private
String
sendStatus
;
@ExcelAttribute
(
name
=
"发送月份"
)
@ExcelProperty
(
"发送月份"
)
private
String
sendMonth
;
@ExcelAttribute
(
name
=
"发送时间"
)
@ExcelProperty
(
"发送时间"
)
private
Date
sendTime
;
@ExcelAttribute
(
name
=
"发送返回的EKPID"
)
@ExcelProperty
(
"发送返回的EKPID"
)
private
String
ekpId
;
}
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TIncomeDetail.java
View file @
7434fe68
...
@@ -21,6 +21,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
...
@@ -21,6 +21,7 @@ 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.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -161,6 +162,7 @@ public class TIncomeDetail {
...
@@ -161,6 +162,7 @@ public class TIncomeDetail {
@ExcelAttribute
(
name
=
"数据生成时间"
,
isNotEmpty
=
true
,
errorInfo
=
"数据生成时间不能为空"
,
isDate
=
true
)
@ExcelAttribute
(
name
=
"数据生成时间"
,
isNotEmpty
=
true
,
errorInfo
=
"数据生成时间不能为空"
,
isDate
=
true
)
@NotBlank
(
message
=
"数据生成时间不能为空"
)
@NotBlank
(
message
=
"数据生成时间不能为空"
)
@ExcelProperty
(
"数据生成时间"
)
@ExcelProperty
(
"数据生成时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
private
Date
createTime
;
/**
/**
* 数据生成月份
* 数据生成月份
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/IncomeExportVo.java
View file @
7434fe68
...
@@ -144,6 +144,6 @@ public class IncomeExportVo implements Serializable {
...
@@ -144,6 +144,6 @@ public class IncomeExportVo implements Serializable {
@ExcelAttribute
(
name
=
"推送状态"
,
isDataId
=
true
,
readConverterExp
=
"0=未推送,1=已推送"
)
@ExcelAttribute
(
name
=
"推送状态"
,
isDataId
=
true
,
readConverterExp
=
"0=未推送,1=已推送"
)
@Schema
(
description
=
"推送状态:0未推送1已推送"
)
@Schema
(
description
=
"推送状态:0未推送1已推送"
)
@ExcelProperty
(
"推送状态"
)
@ExcelProperty
(
"推送状态"
)
private
String
push
Status
;
private
String
send
Status
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TIncomeController.java
View file @
7434fe68
...
@@ -158,8 +158,19 @@ public class TIncomeController {
...
@@ -158,8 +158,19 @@ public class TIncomeController {
**/
**/
@Inner
@Inner
@PostMapping
(
"/inner/saveDetail"
)
@PostMapping
(
"/inner/saveDetail"
)
public
R
<
Boolean
>
saveDetail
(
@RequestBody
TIncomeDetail
tIncomeDetail
)
{
public
Boolean
saveDetail
(
@RequestBody
TIncomeDetail
tIncomeDetail
)
{
return
R
.
ok
(
tIncomeService
.
saveDetail
(
tIncomeDetail
)
);
return
tIncomeService
.
saveDetail
(
tIncomeDetail
);
}
}
/**
* @Description: 定时任务统计表未推送数据推送;
* @Author: huyc
* @Date: 2022/9/5 16:34
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Inner
@PostMapping
(
"/inner/pushDetail"
)
public
void
pushDetail
()
{
tIncomeService
.
pushDetail
();
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TIncomeDetailController.java
View file @
7434fe68
...
@@ -56,4 +56,26 @@ public class TIncomeDetailController {
...
@@ -56,4 +56,26 @@ public class TIncomeDetailController {
return
vo
;
return
vo
;
}
}
/**
* @Description: 生成收入数据
* @Author: huyc
* @Date: 2022-9-2
**/
@Inner
@PostMapping
(
"/inner/createTIncomeDetail"
)
public
void
createTIncomeDetail
(
@RequestBody
TIncomeDetail
detail
)
{
tIncomeDetailService
.
save
(
detail
);
}
/**
* 通过id删除收入明细表
*
* @param tIncomeDetail
* @return R
*/
@Inner
@PostMapping
(
"/deleteById"
)
public
void
deleteById
(
@RequestBody
TIncomeDetail
tIncomeDetail
)
{
tIncomeDetailService
.
removeById
(
tIncomeDetail
.
getId
());
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
7434fe68
...
@@ -368,4 +368,17 @@ public class TPaymentInfoController {
...
@@ -368,4 +368,17 @@ public class TPaymentInfoController {
public
void
createPaymentFundIncome
()
{
public
void
createPaymentFundIncome
()
{
tPaymentInfoService
.
createPaymentFundIncome
();
tPaymentInfoService
.
createPaymentFundIncome
();
}
}
/**
* @param info
* @Description: 查询缴费库
* @Author: huyc
* @Date: 2022/8/25
* @return: int
**/
@Inner
@PostMapping
(
"/inner/getPaymentSocialAndFound"
)
public
TPaymentVo
getPaymentSocialAndFound
(
@RequestBody
TPaymentInfo
info
)
{
return
tPaymentInfoService
.
getPaymentSocialAndFound
(
info
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
View file @
7434fe68
...
@@ -57,4 +57,6 @@ public interface TIncomeService extends IService<TIncome> {
...
@@ -57,4 +57,6 @@ public interface TIncomeService extends IService<TIncome> {
**/
**/
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
);
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
);
void
pushDetail
();
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
7434fe68
...
@@ -137,4 +137,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
...
@@ -137,4 +137,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
void
createPaymentInfoIncome
();
void
createPaymentInfoIncome
();
void
createPaymentFundIncome
();
void
createPaymentFundIncome
();
TPaymentVo
getPaymentSocialAndFound
(
TPaymentInfo
info
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
7434fe68
...
@@ -33,6 +33,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
...
@@ -33,6 +33,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
@@ -54,6 +55,7 @@ import lombok.RequiredArgsConstructor;
...
@@ -54,6 +55,7 @@ import lombok.RequiredArgsConstructor;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.shardingsphere.transaction.annotation.ShardingTransactionType
;
import
org.apache.shardingsphere.transaction.annotation.ShardingTransactionType
;
import
org.apache.shardingsphere.transaction.core.TransactionType
;
import
org.apache.shardingsphere.transaction.core.TransactionType
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.CacheManager
;
...
@@ -102,6 +104,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -102,6 +104,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
final
TForecastLibraryService
forecastLibraryService
;
private
final
TForecastLibraryService
forecastLibraryService
;
private
final
TIncomeDetailMapper
detailMapper
;
/**
/**
* 派单信息记录表简单分页查询
* 派单信息记录表简单分页查询
*
*
...
@@ -3313,6 +3317,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -3313,6 +3317,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
||
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getSocialStatus
())){
||
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getSocialStatus
())){
forecastLibraryService
.
updateForecastLibaryByDispatch
(
sf
);
forecastLibraryService
.
updateForecastLibaryByDispatch
(
sf
);
}
}
//公积金办理成功增加收入
if
(
Common
.
isNotNull
(
dis
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getFundStatus
())){
int
monthDiff
;
// 获取最小的起缴月
Date
minStartDate
=
this
.
getMinDate
(
sf
);
// 再计算月份
monthDiff
=
DateUtil
.
getMonthDiff
(
minStartDate
,
new
Date
())
+
2
;
for
(
int
i
=
0
;
i
<
monthDiff
;
i
++)
{
//生成收入
createIncomeInfo
(
sf
,
DateUtil
.
addMonth
(
1
-
i
));
}
}
}
}
// 2.派减办理成功 处理预估 (不管社保还是公积金办理失败)
// 2.派减办理成功 处理预估 (不管社保还是公积金办理失败)
...
@@ -3944,4 +3961,96 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -3944,4 +3961,96 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
baseMapper
.
getFundRecordCount
(
searchVo
,
settleDomains
,
Common
.
getList
(
idStr
),
sql
);
return
baseMapper
.
getFundRecordCount
(
searchVo
,
settleDomains
,
Common
.
getList
(
idStr
),
sql
);
}
}
/**
* @param socialFundInfo
* @Description: 获取最小起缴日
* @Author: hgw
* @Date: 2022/7/29 11:06
* @return: java.util.Date
**/
private
Date
getMinDate
(
TSocialFundInfo
socialFundInfo
)
{
Date
minStartDate
=
null
;
if
(
socialFundInfo
.
getSocialStartDate
()
!=
null
)
{
minStartDate
=
socialFundInfo
.
getSocialStartDate
();
if
(
socialFundInfo
.
getUnitPersionMoney
()
!=
null
&&
socialFundInfo
.
getPensionStart
()
!=
null
&&
socialFundInfo
.
getPensionStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getPensionStart
();
}
if
(
socialFundInfo
.
getUnitMedicalMoney
()
!=
null
&&
socialFundInfo
.
getMedicalStart
()
!=
null
&&
socialFundInfo
.
getMedicalStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getMedicalStart
();
}
if
(
socialFundInfo
.
getUnitUnemploymentMoney
()
!=
null
&&
socialFundInfo
.
getUnemployStart
()
!=
null
&&
socialFundInfo
.
getUnemployStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getUnemployStart
();
}
if
(
socialFundInfo
.
getUnitInjuryMoney
()
!=
null
&&
socialFundInfo
.
getWorkInjuryStart
()
!=
null
&&
socialFundInfo
.
getWorkInjuryStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getWorkInjuryStart
();
}
if
(
socialFundInfo
.
getUnitBirthMoney
()
!=
null
&&
socialFundInfo
.
getBirthStart
()
!=
null
&&
socialFundInfo
.
getBirthStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getBirthStart
();
}
}
if
(
socialFundInfo
.
getProvidentStart
()
!=
null
&&
(
null
==
minStartDate
||
socialFundInfo
.
getProvidentStart
().
before
(
minStartDate
)))
{
minStartDate
=
socialFundInfo
.
getProvidentStart
();
}
if
(
null
==
minStartDate
)
{
minStartDate
=
new
Date
();
}
return
minStartDate
;
}
public
void
createIncomeInfo
(
TSocialFundInfo
library
,
String
createMonth
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
=
null
;
R
<
TSettleDomainListVo
>
listVo
=
null
;
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
library
.
getSettleDomain
());
if
(
Common
.
isNotNull
(
listVo
))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
}
}
}
//生成收入数据
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
detail
.
setDeptName
(
library
.
getSettleDomainName
());
detail
.
setDeptNo
(
library
.
getSettleDomainCode
());
detail
.
setDeptId
(
library
.
getSettleDomain
());
detail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
detail
.
setEmpName
(
library
.
getEmpName
());
detail
.
setUnitNo
(
settleDomain
.
getCustomerNo
());
detail
.
setUnitId
(
library
.
getUnitId
());
detail
.
setUnitName
(
library
.
getUnitName
());
detail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
detail
.
setSourceId
(
library
.
getId
());
detail
.
setSourceType
(
CommonConstants
.
TWO_STRING
);
detail
.
setCreateMonth
(
createMonth
);
detail
.
setPayMonth
(
createMonth
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setMoney
(
BigDecimalUtils
.
safeAdd
(
library
.
getUnitFundSum
(),
library
.
getPersonalFundSum
()));
//管理费和风险金收取
managemeRisk
(
settleDomain
,
detail
);
}
public
void
managemeRisk
(
TSettleDomain
settleDomain
,
TIncomeDetail
detail
)
{
//管理费和风险金是否收取
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
detail
.
setFeeType
(
CommonConstants
.
ONE_STRING
);
detail
.
setFeeMode
(
settleDomain
.
getManagementType
());
detail
.
setCharges
(
settleDomain
.
getManagementFee
().
toString
());
detail
.
setId
(
CommonConstants
.
NULL
);
detailMapper
.
insert
(
detail
);
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
detail
.
setFeeType
(
CommonConstants
.
TWO_STRING
);
detail
.
setFeeMode
(
settleDomain
.
getRiskFundType
());
detail
.
setCharges
(
settleDomain
.
getRiskFundFee
().
toString
());
detail
.
setId
(
CommonConstants
.
NULL
);
detailMapper
.
insert
(
detail
);
}
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
7434fe68
...
@@ -25,9 +25,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -25,9 +25,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
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.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil
;
...
@@ -37,19 +41,16 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
...
@@ -37,19 +41,16 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.SysBaseSetInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TAgentConfigMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TForecastLibraryMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
...
@@ -81,6 +82,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -81,6 +82,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private
final
EkpSocialUtil
ekpSocialUtil
;
private
final
EkpSocialUtil
ekpSocialUtil
;
private
final
TIncomeDetailService
detailService
;
private
final
TIncomeService
incomeService
;
private
final
ArchivesDaprUtil
archivesDaprUtil
;
/**
/**
* 预估费用简单分页查询
* 预估费用简单分页查询
*
*
...
@@ -476,6 +483,26 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -476,6 +483,26 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
}
/**
* @Description: 获取可补缴的最大月份
* @Author: hgw
* @Date: 2020/10/10 15:26
* @return: java.lang.Integer
**/
private
Integer
getOverpayMonth
(
TSocialFundInfo
tSocialInfo
)
{
Integer
overpayMonth
=
null
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tSocialInfo
.
getCanOverpay
()))
{
//补缴是否含当月: 含当月
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tSocialInfo
.
getHaveThisMonth
()))
{
overpayMonth
=
Integer
.
parseInt
(
DateUtil
.
getYearAndMonth
(
tSocialInfo
.
getCreateTime
(),
0
));
//补缴是否含当月: 不含含当月
}
else
{
overpayMonth
=
Integer
.
parseInt
(
DateUtil
.
getYearAndMonth
(
tSocialInfo
.
getCreateTime
(),
CommonConstants
.
ONE_INT_NEGATE
));
}
}
return
overpayMonth
;
}
private
void
initSocialLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
private
void
initSocialLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
tSocialInfo
,
boolean
isReduceFund
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
TSocialFundInfo
tSocialInfo
,
boolean
isReduceFund
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
String
sfMapKey
,
TForecastLibrary
historyLibrary
,
boolean
isOnly
)
{
,
String
sfMapKey
,
TForecastLibrary
historyLibrary
,
boolean
isOnly
)
{
...
@@ -520,26 +547,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -520,26 +547,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
saveLibraryMap
.
put
(
sfMapKey
,
lib
);
saveLibraryMap
.
put
(
sfMapKey
,
lib
);
}
}
/**
* @Description: 获取可补缴的最大月份
* @Author: hgw
* @Date: 2020/10/10 15:26
* @return: java.lang.Integer
**/
private
Integer
getOverpayMonth
(
TSocialFundInfo
tSocialInfo
)
{
Integer
overpayMonth
=
null
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tSocialInfo
.
getCanOverpay
()))
{
//补缴是否含当月: 含当月
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tSocialInfo
.
getHaveThisMonth
()))
{
overpayMonth
=
Integer
.
parseInt
(
DateUtil
.
getYearAndMonth
(
tSocialInfo
.
getCreateTime
(),
0
));
//补缴是否含当月: 不含含当月
}
else
{
overpayMonth
=
Integer
.
parseInt
(
DateUtil
.
getYearAndMonth
(
tSocialInfo
.
getCreateTime
(),
CommonConstants
.
ONE_INT_NEGATE
));
}
}
return
overpayMonth
;
}
// historyLibrary_历史比例(暂时未用到)
// historyLibrary_历史比例(暂时未用到)
private
TForecastLibrary
initForecastLibrary
(
TForecastLibrary
library
private
TForecastLibrary
initForecastLibrary
(
TForecastLibrary
library
,
TSocialFundInfo
socialInfo
,
TSocialFundInfo
fund
,
Integer
month
,
boolean
isReduceFund
,
TSocialFundInfo
socialInfo
,
TSocialFundInfo
fund
,
Integer
month
,
boolean
isReduceFund
...
@@ -1545,6 +1552,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1545,6 +1552,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
// 删除
// 删除
baseMapper
.
deleteById
(
library
.
getId
());
baseMapper
.
deleteById
(
library
.
getId
());
}
}
//删除停缴月以后的收入数据
detailService
.
remove
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
().
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
library
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TIncomeDetail:
:
getPayMonth
,
library
.
getSocialPayMonth
()));
}
}
private
void
calculateFundType
(
BigDecimal
zero
,
TForecastLibrary
library
)
{
private
void
calculateFundType
(
BigDecimal
zero
,
TForecastLibrary
library
)
{
...
@@ -1566,6 +1579,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1566,6 +1579,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
// 删除
// 删除
baseMapper
.
deleteById
(
library
.
getId
());
baseMapper
.
deleteById
(
library
.
getId
());
}
}
//删除停缴月以后的收入数据
detailService
.
remove
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
().
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
library
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
TWO_STRING
)
.
eq
(
TIncomeDetail:
:
getPayMonth
,
library
.
getSocialPayMonth
()));
}
}
/**
/**
...
@@ -1771,6 +1790,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1771,6 +1790,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library
.
setCreateTime
(
LocalDateTime
.
now
());
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
baseMapper
.
insert
(
library
);
isSaveAndUpdate
=
true
;
isSaveAndUpdate
=
true
;
//办理成功生成收入
createIncomeInfo
(
library
);
}
}
}
}
}
}
...
@@ -2092,6 +2114,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2092,6 +2114,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library
.
setCreateName
(
"定时生成"
);
library
.
setCreateName
(
"定时生成"
);
library
.
setCreateTime
(
LocalDateTime
.
now
());
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
baseMapper
.
insert
(
library
);
//办理成功生成收入
createIncomeInfo
(
library
);
}
}
isSaveAndUpdate
=
true
;
isSaveAndUpdate
=
true
;
}
}
...
@@ -2102,14 +2127,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2102,14 +2127,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
}
@Override
public
TPaymentVo
selectTForecastBySalaryVo
(
TPaymentBySalaryVo
tPaymentBySalaryVo
)
{
List
<
TPaymentBySalaryVo
>
list
=
baseMapper
.
selectTForecastBySalaryVo
(
tPaymentBySalaryVo
);
TPaymentVo
vo
=
new
TPaymentVo
();
vo
.
setPaymentList
(
list
);
return
vo
;
}
@Override
@Override
public
int
updateForecastSocialStatusToSettle
(
List
<
String
>
idList
)
{
public
int
updateForecastSocialStatusToSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
...
@@ -2118,6 +2135,14 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2118,6 +2135,14 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
0
;
return
0
;
}
}
@Override
public
TPaymentVo
selectTForecastBySalaryVo
(
TPaymentBySalaryVo
tPaymentBySalaryVo
)
{
List
<
TPaymentBySalaryVo
>
list
=
baseMapper
.
selectTForecastBySalaryVo
(
tPaymentBySalaryVo
);
TPaymentVo
vo
=
new
TPaymentVo
();
vo
.
setPaymentList
(
list
);
return
vo
;
}
@Override
@Override
public
int
updateForecastSocialStatusToNoSettle
(
List
<
String
>
idList
)
{
public
int
updateForecastSocialStatusToNoSettle
(
List
<
String
>
idList
)
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
if
(
idList
!=
null
&&
!
idList
.
isEmpty
())
{
...
@@ -2497,4 +2522,146 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2497,4 +2522,146 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
pushList
;
return
pushList
;
}
}
public
void
createIncomeInfo
(
TForecastLibrary
library
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
=
null
;
R
<
TSettleDomainListVo
>
listVo
=
null
;
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
library
.
getSettleDomainId
());
if
(
Common
.
isNotNull
(
listVo
))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
}
}
}
//判断是否存在当月的社保或公积金收入数据
Boolean
isExist
=
false
;
String
sourceType
=
""
;
if
(
Common
.
isNotNull
(
library
.
getProvidentId
()))
{
sourceType
=
CommonConstants
.
TWO_STRING
;
}
else
{
sourceType
=
CommonConstants
.
ONE_STRING
;
}
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
if
(
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
{
incomeDetail
.
setPayMonth
(
library
.
getSocialPayMonth
());
}
else
{
incomeDetail
.
setPayMonth
(
library
.
getProvidentPayMonth
());
}
incomeDetail
.
setDeptNo
(
library
.
getDeptNo
());
incomeDetail
.
setSourceType
(
sourceType
);
List
<
TIncomeDetail
>
detailList
=
detailService
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
))
{
isExist
=
true
;
}
//判断是否为按人次收费
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
||
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
//预估模式只有按人次和人数收费
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
isSum
=
1
;
}
if
(!
isExist
||
isSum
==
1
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
(),
sourceType
);
}
}
}
else
{
BigDecimal
gMoney
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
isSum
=
2
;
}
else
{
gMoney
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getManagementFee
());
}
if
(!
isExist
||
isSum
==
2
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
,
sourceType
);
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
||
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
isSum
=
3
;
}
if
(!
isExist
||
isSum
==
3
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
(),
sourceType
);
}
}
else
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
BigDecimal
money
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
isSum
=
4
;
}
else
{
money
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getRiskFundFee
());
}
if
(!
isExist
||
isSum
==
4
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
,
sourceType
);
}
}
}
}
}
}
public
void
createIncomeInsurance
(
TForecastLibrary
library
,
TSettleDomain
settleDomain
,
String
feeType
,
String
charges
,
String
feeMode
,
BigDecimal
money
,
String
sourceType
)
{
//生成收入数据
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
detail
.
setDeptName
(
settleDomain
.
getDepartName
());
detail
.
setDeptNo
(
settleDomain
.
getDepartNo
());
detail
.
setDeptId
(
settleDomain
.
getId
());
detail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
detail
.
setEmpName
(
library
.
getEmpName
());
detail
.
setUnitNo
(
settleDomain
.
getCustomerNo
());
detail
.
setUnitId
(
settleDomain
.
getCustomerId
());
detail
.
setUnitName
(
settleDomain
.
getCustomerName
());
detail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
detail
.
setSourceId
(
library
.
getId
());
detail
.
setSourceType
(
sourceType
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
{
detail
.
setCreateMonth
(
library
.
getSocialCreateMonth
());
detail
.
setPayMonth
(
library
.
getSocialPayMonth
());
}
else
{
detail
.
setCreateMonth
(
library
.
getProvidentCreateMonth
());
detail
.
setPayMonth
(
library
.
getProvidentPayMonth
());
}
detail
.
setMoney
(
money
);
detail
.
setFeeType
(
feeType
);
detail
.
setFeeMode
(
feeMode
);
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setId
(
CommonConstants
.
NULL
);
incomeService
.
saveDetail
(
detail
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
7434fe68
...
@@ -25,10 +25,14 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
...
@@ -25,10 +25,14 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper
;
...
@@ -61,6 +65,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -61,6 +65,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
@Autowired
@Autowired
private
TIncomeDetailService
tIncomeDetailService
;
private
TIncomeDetailService
tIncomeDetailService
;
@Autowired
private
EkpIncomeUtil
ekpIncomeUtil
;
/**
/**
* 收入明细表简单分页查询
* 收入明细表简单分页查询
*
*
...
@@ -265,12 +272,109 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -265,12 +272,109 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
}
}
}
@Override
public
void
pushDetail
()
{
List
<
TIncome
>
list
=
baseMapper
.
selectList
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
));
for
(
TIncome
income
:
list
)
{
EkpIncomeParam
sendParam
=
new
EkpIncomeParam
();
this
.
copyToEkp
(
income
,
sendParam
);
String
sendBack
=
ekpIncomeUtil
.
sendToEKP
(
sendParam
,
income
.
getFeeType
());
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
}
this
.
updateById
(
income
);
}
}
// 复制并保存
// 复制并保存
private
boolean
saveIncome
(
TIncomeDetail
tIncomeDetail
)
{
private
boolean
saveIncome
(
TIncomeDetail
tIncomeDetail
)
{
TIncome
income
=
new
TIncome
();
TIncome
income
=
new
TIncome
();
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setPushStatus
(
CommonConstants
.
ZERO_STRING
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
return
this
.
save
(
income
);
this
.
save
(
income
);
EkpIncomeParam
sendParam
=
new
EkpIncomeParam
();
this
.
copyToEkp
(
income
,
sendParam
);
String
sendBack
=
ekpIncomeUtil
.
sendToEKP
(
sendParam
,
income
.
getFeeType
());
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
}
return
this
.
updateById
(
income
);
}
/**
* @param income 收入
* @param sendParam 目标格式
* @Description: 转化格式,传到EKP
* @Author: hgw
* @Date: 2022/9/5 16:57
* @return: void
**/
private
void
copyToEkp
(
TIncome
income
,
EkpIncomeParam
sendParam
)
{
// 项目编码
sendParam
.
setFd_3adfef5e5b9d34
(
income
.
getDeptNo
());
// 项目名称
sendParam
.
setFd_3adfef5eb6691c
(
income
.
getDeptName
());
// 单号
sendParam
.
setFd_3adfef7f5d2b52
(
""
);
// 客户编码
sendParam
.
setFd_3adfef80202ab2
(
income
.
getUnitNo
());
// 客户名称
sendParam
.
setFd_3adfef7fc1c886
(
income
.
getUnitName
());
// 类型:单选(人,人次,比例,固定值,总额)
// feeMode收费方式:1按比例2金额-人数3金额-人次
if
(
CommonConstants
.
ONE_STRING
.
equals
(
income
.
getFeeMode
()))
{
sendParam
.
setFd_3adda3037e3bda
(
"比例"
);
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
income
.
getFeeMode
()))
{
sendParam
.
setFd_3adda3037e3bda
(
"人"
);
}
else
{
sendParam
.
setFd_3adda3037e3bda
(
"人次"
);
}
// 产生来源:单选(社保,工资,商险)
// sourceType1社保2公积金3商险4薪资
if
(
CommonConstants
.
THREE_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"商险"
);
}
else
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"工资"
);
}
else
{
sendParam
.
setFd_3adda320daef5a
(
"社保"
);
}
// 姓名
sendParam
.
setFd_3adfef948da848
(
income
.
getEmpName
());
// 身份证号
sendParam
.
setFd_3adfef94dcdbb4
(
income
.
getEmpIdcard
());
// 生成月份
if
(
Common
.
isEmpty
(
income
.
getCreateMonth
())
||
income
.
getCreateMonth
().
length
()
!=
6
)
{
sendParam
.
setFd_3ae0c3032cffc8
(
"1970-02"
);
}
else
{
sendParam
.
setFd_3ae0c3032cffc8
(
income
.
getCreateMonth
().
substring
(
0
,
4
)
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
income
.
getCreateMonth
().
substring
(
4
,
6
));
}
// 结算月份
if
(
Common
.
isEmpty
(
income
.
getPayMonth
())
||
income
.
getPayMonth
().
length
()
!=
6
)
{
sendParam
.
setFd_3ae0c3044e5958
(
"1970-02"
);
}
else
{
sendParam
.
setFd_3ae0c3044e5958
(
income
.
getPayMonth
().
substring
(
0
,
4
)
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
income
.
getPayMonth
().
substring
(
4
,
6
));
}
// 管理费、风险金金额
sendParam
.
setFd_3adfef963bae28
(
String
.
valueOf
(
income
.
getMoney
()));
// 应收
sendParam
.
setFd_3adfefa3daae72
(
String
.
valueOf
(
income
.
getMoney
()));
// 结算状态
sendParam
.
setFd_3adfefaaa3bbd0
(
"未结算"
);
// 收款状态
sendParam
.
setFd_3adfefaaef583e
(
"未收"
);
// 结算单号
sendParam
.
setFd_3aead7204bb594
(
""
);
// 收款单号
sendParam
.
setFd_3aeae59b70fe5a
(
""
);
}
}
/**
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
7434fe68
...
@@ -58,6 +58,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.PaymentConstants;
...
@@ -58,6 +58,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.PaymentConstants;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentHeFeiVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentHeFeiVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo
;
...
@@ -123,6 +124,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -123,6 +124,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Autowired
@Autowired
private
TIncomeDetailMapper
detailMapper
;
private
TIncomeDetailMapper
detailMapper
;
@Autowired
private
TIncomeService
incomeService
;
@Autowired
@Autowired
private
ArchivesDaprUtil
archivesDaprUtil
;
private
ArchivesDaprUtil
archivesDaprUtil
;
...
@@ -2293,6 +2297,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2293,6 +2297,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}
@Override
public
TPaymentVo
getPaymentSocialAndFound
(
TPaymentInfo
info
)
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getEmpIdcard
,
info
.
getEmpIdcard
())
.
eq
(
TPaymentInfo:
:
getSettleDomainId
,
info
.
getSettleDomainId
())
.
eq
(
TPaymentInfo:
:
getSocialCreateMonth
,
"202212"
));
TPaymentVo
paymentVo
=
new
TPaymentVo
();
paymentVo
.
setPaymentInfoList
(
sumList
);
return
paymentVo
;
}
public
List
<
String
>
initEkpPushSocialParam
(
List
<
TPaymentInfo
>
unPushInfo
)
{
public
List
<
String
>
initEkpPushSocialParam
(
List
<
TPaymentInfo
>
unPushInfo
)
{
List
<
String
>
pushList
=
new
ArrayList
<>();
List
<
String
>
pushList
=
new
ArrayList
<>();
for
(
TPaymentInfo
library:
unPushInfo
)
{
for
(
TPaymentInfo
library:
unPushInfo
)
{
...
@@ -2646,73 +2661,114 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2646,73 +2661,114 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
exitFlag
=
true
;
exitFlag
=
true
;
}
}
//判断是否为按人次收费
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
||
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
//按金额计算的话要看缴纳月有没有收入数据
//预估模式只有按人次和人数收费
if
(!
exitFlag
)
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
isSum
=
1
;
}
if
(!
exitFlag
||
isSum
==
1
)
{
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
(),
socialFundFlag
);
}
}
}
else
{
BigDecimal
gMoney
=
BigDecimal
.
ZERO
;
BigDecimal
gMoney
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
isSum
=
2
;
}
else
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
gMoney
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getSocialSum
(),
settleDomain
.
getManagementFee
());
gMoney
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getSocialSum
(),
settleDomain
.
getManagementFee
());
}
else
{
}
else
{
gMoney
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getProvidentSum
(),
settleDomain
.
getManagementFee
());
gMoney
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getProvidentSum
(),
settleDomain
.
getManagementFee
());
}
}
}
else
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
gMoney
=
paymentInfo
.
getSocialSum
();
}
else
{
gMoney
=
paymentInfo
.
getProvidentSum
();
}
}
createIncomeRiskInfo
(
paymentInfo
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
if
(!
exitFlag
||
isSum
==
2
)
{
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
,
socialFundFlag
);
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
,
socialFundFlag
);
}
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
||
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
isSum
=
3
;
}
}
if
(!
exitFlag
||
isSum
==
3
)
{
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
(),
socialFundFlag
);
}
}
else
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
BigDecimal
money
=
BigDecimal
.
ZERO
;
BigDecimal
money
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
isSum
=
4
;
}
else
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
money
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getSocialSum
(),
settleDomain
.
getRiskFundFee
());
money
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getSocialSum
(),
settleDomain
.
getRiskFundFee
());
}
else
{
}
else
{
money
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getProvidentSum
(),
settleDomain
.
getRiskFundFee
());
money
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getProvidentSum
(),
settleDomain
.
getRiskFundFee
());
}
}
}
else
{
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
)
)
{
if
(
!
exitFlag
||
isSum
==
4
)
{
money
=
paymentInfo
.
getSocialSum
();
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
}
else
{
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
=
paymentInfo
.
getProvidentSum
(
);
money
,
socialFundFlag
);
}
}
}
}
createIncomeRiskInfo
(
paymentInfo
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
,
socialFundFlag
);
}
}
}
}
}
}
}
}
public
void
createIncome
RiskInfo
(
TPaymentInfo
paymentInfo
,
TSettleDomain
settleDomain
,
String
feeType
,
public
void
createIncome
Insurance
(
TPaymentInfo
library
,
TSettleDomain
settleDomain
,
String
feeType
,
String
charges
,
String
feeMode
,
BigDecimal
money
,
String
sourceType
)
{
String
charges
,
String
feeMode
,
BigDecimal
money
,
String
sourceType
)
{
//生成收入数据
//生成收入数据
TIncomeDetail
detail
=
new
TIncomeDetail
();
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
detail
.
setDeptName
(
paymentInfo
.
getSettleDomain
Name
());
detail
.
setDeptName
(
settleDomain
.
getDepart
Name
());
detail
.
setDeptNo
(
paymentInfo
.
getSettleDomainCode
());
detail
.
setDeptNo
(
settleDomain
.
getDepartNo
());
detail
.
setDeptId
(
paymentInfo
.
getSettleDomain
Id
());
detail
.
setDeptId
(
settleDomain
.
get
Id
());
detail
.
setEmpIdcard
(
paymentInfo
.
getEmpIdcard
());
detail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
detail
.
setEmpName
(
paymentInfo
.
getEmpName
());
detail
.
setEmpName
(
library
.
getEmpName
());
detail
.
setUnitNo
(
settleDomain
.
getCustomerNo
());
detail
.
setUnitNo
(
settleDomain
.
getCustomerNo
());
detail
.
setUnitId
(
paymentInfo
.
getUnit
Id
());
detail
.
setUnitId
(
settleDomain
.
getCustomer
Id
());
detail
.
setUnitName
(
paymentInfo
.
getUnit
Name
());
detail
.
setUnitName
(
settleDomain
.
getCustomer
Name
());
detail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
detail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
detail
.
setSourceId
(
paymentInfo
.
getId
());
detail
.
setSourceId
(
library
.
getId
());
detail
.
setSourceType
(
sourceType
);
detail
.
setSourceType
(
sourceType
);
detail
.
setCreateMonth
(
paymentInfo
.
getSocialCreateMonth
());
if
(
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
{
detail
.
setPayMonth
(
paymentInfo
.
getSocialPayMonth
());
detail
.
setCreateMonth
(
library
.
getSocialCreateMonth
());
detail
.
setPayMonth
(
library
.
getSocialPayMonth
());
}
else
{
detail
.
setCreateMonth
(
library
.
getProvidentCreateMonth
());
detail
.
setPayMonth
(
library
.
getProvidentPayMonth
());
}
detail
.
setMoney
(
money
);
detail
.
setMoney
(
money
);
detail
.
setFeeType
(
feeType
);
detail
.
setFeeType
(
feeType
);
detail
.
setFeeMode
(
feeMode
);
detail
.
setFeeMode
(
feeMode
);
detail
.
setCharges
(
charges
);
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setId
(
CommonConstants
.
NULL
);
detailMapper
.
insert
(
detail
);
incomeService
.
saveDetail
(
detail
);
}
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TIncomeMapper.xml
View file @
7434fe68
...
@@ -42,8 +42,11 @@
...
@@ -42,8 +42,11 @@
<result
property=
"payMonth"
column=
"PAY_MONTH"
/>
<result
property=
"payMonth"
column=
"PAY_MONTH"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"dataCreateMonth"
column=
"DATA_CREATE_MONTH"
/>
<result
property=
"dataCreateMonth"
column=
"DATA_CREATE_MONTH"
/>
<result
property=
"
pushStatus"
column=
"PUSH
_STATUS"
/>
<result
property=
"
sendStatus"
column=
"SEND
_STATUS"
/>
<result
property=
"redData"
column=
"RED_DATA"
/>
<result
property=
"redData"
column=
"RED_DATA"
/>
<result
property=
"sendStatus"
column=
"SEND_STATUS"
/>
<result
property=
"sendTime"
column=
"SEND_TIME"
/>
<result
property=
"sendMonth"
column=
"SEND_MONTH"
/>
</resultMap>
</resultMap>
<resultMap
id=
"incomeExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.IncomeExportVo"
>
<resultMap
id=
"incomeExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.IncomeExportVo"
>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
...
@@ -60,7 +63,7 @@
...
@@ -60,7 +63,7 @@
<result
property=
"payMonth"
column=
"PAY_MONTH"
/>
<result
property=
"payMonth"
column=
"PAY_MONTH"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"dataCreateMonth"
column=
"DATA_CREATE_MONTH"
/>
<result
property=
"dataCreateMonth"
column=
"DATA_CREATE_MONTH"
/>
<result
property=
"
pushStatus"
column=
"PUSH
_STATUS"
/>
<result
property=
"
sendStatus"
column=
"SEND
_STATUS"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
...
@@ -81,8 +84,10 @@
...
@@ -81,8 +84,10 @@
a.PAY_MONTH,
a.PAY_MONTH,
a.CREATE_TIME,
a.CREATE_TIME,
a.DATA_CREATE_MONTH,
a.DATA_CREATE_MONTH,
a.PUSH_STATUS,
a.RED_DATA,
a.RED_DATA
a.SEND_STATUS,
a.SEND_TIME,
a.SEND_MONTH
</sql>
</sql>
<sql
id=
"tIncome_where"
>
<sql
id=
"tIncome_where"
>
<if
test=
"tIncome != null"
>
<if
test=
"tIncome != null"
>
...
@@ -140,8 +145,8 @@
...
@@ -140,8 +145,8 @@
<if
test=
"tIncome.dataCreateMonth != null and tIncome.dataCreateMonth.trim() != ''"
>
<if
test=
"tIncome.dataCreateMonth != null and tIncome.dataCreateMonth.trim() != ''"
>
AND a.DATA_CREATE_MONTH = #{tIncome.dataCreateMonth}
AND a.DATA_CREATE_MONTH = #{tIncome.dataCreateMonth}
</if>
</if>
<if
test=
"tIncome.
pushStatus != null and tIncome.push
Status.trim() != ''"
>
<if
test=
"tIncome.
sendStatus != null and tIncome.send
Status.trim() != ''"
>
AND a.
PUSH_STATUS = #{tIncome.push
Status}
AND a.
SEND_STATUS = #{tIncome.send
Status}
</if>
</if>
<if
test=
"tIncome.redData != null and tIncome.redData.trim() != ''"
>
<if
test=
"tIncome.redData != null and tIncome.redData.trim() != ''"
>
AND a.RED_DATA = #{tIncome.redData}
AND a.RED_DATA = #{tIncome.redData}
...
...
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