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
d6265406
Commit
d6265406
authored
Mar 21, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fxj-dev' into fxj-dev
parents
822d5d3c
efeb0380
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
1683 additions
and
346 deletions
+1683
-346
EkpDaprUtils.java
...ifu/cloud/plus/v1/yifu/common/dapr/util/EkpDaprUtils.java
+46
-3
EkpManagerInfo.java
...ava/com/yifu/cloud/plus/v1/ekp/entity/EkpManagerInfo.java
+174
-0
EkpRiskInfo.java
...n/java/com/yifu/cloud/plus/v1/ekp/entity/EkpRiskInfo.java
+174
-0
EkpSocialStatusUpdateVo.java
...om/yifu/cloud/plus/v1/ekp/vo/EkpSocialStatusUpdateVo.java
+27
-0
pom.xml
yifu-ekp/yifu-ekp-biz/pom.xml
+10
-10
OTAStrategyShardingAlgorithm.java
...loud/plus/v1/ekp/config/OTAStrategyShardingAlgorithm.java
+101
-101
TEkpManagerInfoController.java
...oud/plus/v1/ekp/controller/TEkpManagerInfoController.java
+55
-0
TEkpRiskInfoController.java
.../cloud/plus/v1/ekp/controller/TEkpRiskInfoController.java
+57
-0
TEkpSocialInfoController.java
...loud/plus/v1/ekp/controller/TEkpSocialInfoController.java
+28
-0
EkpManagerInfoMapper.java
...m/yifu/cloud/plus/v1/ekp/mapper/EkpManagerInfoMapper.java
+24
-0
EkpRiskInfoMapper.java
.../com/yifu/cloud/plus/v1/ekp/mapper/EkpRiskInfoMapper.java
+24
-0
EkpSocialInfoMapper.java
...om/yifu/cloud/plus/v1/ekp/mapper/EkpSocialInfoMapper.java
+2
-0
EkpFundInfoService.java
...om/yifu/cloud/plus/v1/ekp/service/EkpFundInfoService.java
+2
-0
EkpManagerInfoService.java
...yifu/cloud/plus/v1/ekp/service/EkpManagerInfoService.java
+22
-0
EkpRiskInfoService.java
...om/yifu/cloud/plus/v1/ekp/service/EkpRiskInfoService.java
+22
-0
EkpSalaryInfoService.java
.../yifu/cloud/plus/v1/ekp/service/EkpSalaryInfoService.java
+1
-3
EkpSocialInfoService.java
.../yifu/cloud/plus/v1/ekp/service/EkpSocialInfoService.java
+5
-3
EkpFundInfoServiceImpl.java
...loud/plus/v1/ekp/service/impl/EkpFundInfoServiceImpl.java
+5
-0
EkpManagerInfoServiceImpl.java
...d/plus/v1/ekp/service/impl/EkpManagerInfoServiceImpl.java
+179
-0
EkpRiskInfoServiceImpl.java
...loud/plus/v1/ekp/service/impl/EkpRiskInfoServiceImpl.java
+178
-0
EkpSalaryInfoServiceImpl.java
...ud/plus/v1/ekp/service/impl/EkpSalaryInfoServiceImpl.java
+8
-4
EkpSocialInfoServiceImpl.java
...ud/plus/v1/ekp/service/impl/EkpSocialInfoServiceImpl.java
+20
-4
application-test.yml
...-ekp/yifu-ekp-biz/src/main/resources/application-test.yml
+82
-42
EkpFundInfoMapper.xml
...u-ekp-biz/src/main/resources/mapper/EkpFundInfoMapper.xml
+2
-2
EkpManagerInfoMapper.xml
...kp-biz/src/main/resources/mapper/EkpManagerInfoMapper.xml
+70
-0
EkpRiskInfoMapper.xml
...u-ekp-biz/src/main/resources/mapper/EkpRiskInfoMapper.xml
+69
-0
EkpSalaryInfoMapper.xml
...ekp-biz/src/main/resources/mapper/EkpSalaryInfoMapper.xml
+2
-2
EkpSocialInfoMapper.xml
...ekp-biz/src/main/resources/mapper/EkpSocialInfoMapper.xml
+5
-2
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+2
-2
TIncomeMapper.java
.../yifu/cloud/plus/v1/yifu/social/mapper/TIncomeMapper.java
+2
-0
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+44
-36
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+67
-55
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+162
-77
TIncomeMapper.xml
...fu-social-biz/src/main/resources/mapper/TIncomeMapper.xml
+12
-0
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/EkpDaprUtils.java
View file @
d6265406
...
...
@@ -5,9 +5,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprEkpProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.*
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
...
...
@@ -59,4 +57,49 @@ public class EkpDaprUtils {
public
R
<
Boolean
>
pushSalaryInfoToEkp
(
List
<
EkpSalaryParam
>
unPushList
)
{
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/ekpSalaryPush/inner/pushSalaryInfoToEkp"
,
JSON
.
toJSONString
(
unPushList
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huyc
* @Description 新增管理费明细数据
* @Date 9:23 2024/03/14
* @Param
* @return
**/
public
R
<
String
>
pushManagerInfoToEkp
(
EkpIncomeParamManage
incomeParam
)
{
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/ekpmanagerinfo/inner/pushManangerInfoToEkp"
,
JSON
.
toJSONString
(
incomeParam
),
String
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huyc
* @Description 新增管理费明细数据
* @Date 9:23 2024/03/14
* @Param
* @return
**/
public
R
<
EkpSocialPushInfoVo
>
jobPushManagerInfoToEkp
(
List
<
EkpIncomeParamManage
>
incomeParam
)
{
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/ekpmanagerinfo/inner/jobPushManagerInfoToEkp"
,
JSON
.
toJSONString
(
incomeParam
),
EkpSocialPushInfoVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huyc
* @Description 新增风险金明细数据
* @Date 11:15 2024/03/18
* @Param
* @return
**/
public
R
<
String
>
pushRiskInfoToEkp
(
EkpIncomeParamRisk
incomeParam
)
{
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/ekpriskinfo/inner/pushRiskInfoToEkp"
,
JSON
.
toJSONString
(
incomeParam
),
String
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huyc
* @Description 新增风险金明细数据
* @Date 11:15 2024/03/18
* @Param
* @return
**/
public
R
<
EkpSocialPushInfoVo
>
jobpushRiskInfoToEkp
(
List
<
EkpIncomeParamRisk
>
incomeParam
)
{
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/ekpriskinfo/inner/jobPushRiskInfoToEkp"
,
JSON
.
toJSONString
(
incomeParam
),
EkpSocialPushInfoVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
yifu-ekp/yifu-ekp-api/src/main/java/com/yifu/cloud/plus/v1/ekp/entity/EkpManagerInfo.java
0 → 100644
View file @
d6265406
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* @author huyc
* @date 2024-03-13 16:14:37
*/
@Data
@TableName
(
"ekp_manager_info"
)
@EqualsAndHashCode
()
@Schema
(
description
=
"管理费明细表"
)
public
class
EkpManagerInfo
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"id"
)
private
String
fdId
;
/**
* 项目编码
*/
@Schema
(
description
=
"项目编码"
)
private
String
fd_3adfef5e5b9d34
;
/**
* 项目名称
*/
@Schema
(
description
=
"项目名称"
)
private
String
fd_3adfef5eb6691c
;
/**
* 单号
*/
@Schema
(
description
=
"单号"
)
private
String
fd_3adfef7f5d2b52
;
/**
* 客户编码
*/
@Schema
(
description
=
"客户编码"
)
private
String
fd_3adfef80202ab2
;
/**
* 客户名称
*/
@Schema
(
description
=
"客户名称"
)
private
String
fd_3adfef7fc1c886
;
/**
* 类型
*/
@Schema
(
description
=
"类型"
)
private
String
fd_3adda3037e3bda
;
/**
* 产生来源
*/
@Schema
(
description
=
"产生来源"
)
private
String
fd_3adda320daef5a
;
/**
* 姓名
*/
@Schema
(
description
=
"姓名"
)
private
String
fd_3adfef948da848
;
/**
* 身份证号
*/
@Schema
(
description
=
"身份证号"
)
private
String
fd_3adfef94dcdbb4
;
/**
* 管理费金额
*/
@Schema
(
description
=
"管理费金额"
)
private
Double
fd_3adfef963bae28
;
/**
* 应收
*/
@Schema
(
description
=
"应收"
)
private
Double
fd_3adfefa3daae72
;
/**
* 结算状态
*/
@Schema
(
description
=
"结算状态"
)
private
String
fd_3adfefaaa3bbd0
;
/**
* 收款状态
*/
@Schema
(
description
=
"收款状态"
)
private
String
fd_3adfefaaef583e
;
/**
* 实际结算月份
*/
@Schema
(
description
=
"实际结算月份"
)
private
String
fd_3ae0c23cb3fccc
;
/**
* 生成月份
*/
@Schema
(
description
=
"生成月份"
)
private
String
fd_3ae0c23b2e9a92
;
/**
* 结算单号
*/
@Schema
(
description
=
"结算单号"
)
private
String
fd_3aead3c68b1078
;
/**
* 收款单号
*/
@Schema
(
description
=
"收款单号"
)
private
String
fd_3aeae58b14691c
;
/**
* 数据来源
*/
@Schema
(
description
=
"数据来源"
)
private
String
fd_3b0b7231bb5896
;
/**
* 是否全部结算
*/
@Schema
(
description
=
"是否全部结算"
)
private
String
fd_3b13b15f5b63fa
;
/**
* 管理费ID
*/
@Schema
(
description
=
"管理费ID"
)
private
String
fd_3b13dc864a3052
;
/**
* HRO结算月
*/
@Schema
(
description
=
"HRO结算月"
)
private
String
fd_3b13dd215b55b2
;
/**
* 项目台账ID(ID)
*/
@Schema
(
description
=
"项目台账ID(ID)"
)
private
String
fd_3b16e47cb6874c
;
/**
* 项目台账ID
*/
@Schema
(
description
=
"项目台账ID"
)
private
String
fd_3b16e47cb6874c_text
;
/**
* 薪酬申请编号
*/
@Schema
(
description
=
"薪酬申请编号"
)
private
String
fd_3b3bf110837a96
;
/**
* 变更记录
*/
@Schema
(
description
=
"变更记录"
)
private
String
fd_3b3e43a10ab4b2
;
@Schema
(
description
=
"创建时间"
)
private
Date
createTime
;
}
yifu-ekp/yifu-ekp-api/src/main/java/com/yifu/cloud/plus/v1/ekp/entity/EkpRiskInfo.java
0 → 100644
View file @
d6265406
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* @author huyc
* @date 2024-03-13 16:14:37
*/
@Data
@TableName
(
"ekp_risk_info"
)
@EqualsAndHashCode
()
@Schema
(
description
=
"风险金明细表"
)
public
class
EkpRiskInfo
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"id"
)
private
String
fdId
;
/**
* 项目编码
*/
@Schema
(
description
=
"项目编码"
)
private
String
fd_3adfef5e5b9d34
;
/**
* 项目名称
*/
@Schema
(
description
=
"项目名称"
)
private
String
fd_3adfef5eb6691c
;
/**
* 单号
*/
@Schema
(
description
=
"单号"
)
private
String
fd_3adfef7f5d2b52
;
/**
* 客户编码
*/
@Schema
(
description
=
"客户编码"
)
private
String
fd_3adfef80202ab2
;
/**
* 客户名称
*/
@Schema
(
description
=
"客户名称"
)
private
String
fd_3adfef7fc1c886
;
/**
* 类型
*/
@Schema
(
description
=
"类型"
)
private
String
fd_3adda3037e3bda
;
/**
* 产生来源
*/
@Schema
(
description
=
"产生来源"
)
private
String
fd_3adda320daef5a
;
/**
* 姓名
*/
@Schema
(
description
=
"姓名"
)
private
String
fd_3adfef948da848
;
/**
* 身份证号
*/
@Schema
(
description
=
"身份证号"
)
private
String
fd_3adfef94dcdbb4
;
/**
* 风险金金额
*/
@Schema
(
description
=
"风险金金额"
)
private
Double
fd_3adfef963bae28
;
/**
* 应收
*/
@Schema
(
description
=
"应收"
)
private
Double
fd_3adfefa3daae72
;
/**
* 结算状态
*/
@Schema
(
description
=
"结算状态"
)
private
String
fd_3adfefaaa3bbd0
;
/**
* 收款状态
*/
@Schema
(
description
=
"收款状态"
)
private
String
fd_3adfefaaef583e
;
/**
* 生成月份
*/
@Schema
(
description
=
"生成月份"
)
private
String
fd_3ae0c3032cffc8
;
/**
* 实际结算月份
*/
@Schema
(
description
=
"实际结算月份"
)
private
String
fd_3ae0c3044e5958
;
/**
* 结算单号
*/
@Schema
(
description
=
"结算单号"
)
private
String
fd_3aead7204bb594
;
/**
* 收款单号
*/
@Schema
(
description
=
"收款单号"
)
private
String
fd_3aeae59b70fe5a
;
/**
* 数据来源
*/
@Schema
(
description
=
"数据来源"
)
private
String
fd_3b0b7210ce9432
;
/**
* 是否全部结算
*/
@Schema
(
description
=
"是否全部结算"
)
private
String
fd_3b13b218b76a36
;
/**
* HRO结算月份
*/
@Schema
(
description
=
"HRO结算月份"
)
private
String
fd_3b13b2093b95ec
;
/**
* 风险金ID
*/
@Schema
(
description
=
"风险金ID"
)
private
String
fd_3b13db120a8224
;
/**
* 项目台账ID
*/
@Schema
(
description
=
"项目台账ID"
)
private
String
fd_3b16e4cd2c9a86_text
;
/**
* 项目台账ID(ID)
*/
@Schema
(
description
=
"项目台账ID(ID)"
)
private
String
fd_3b16e4cd2c9a86
;
/**
* 薪酬申请编号
*/
@Schema
(
description
=
"薪酬申请编号"
)
private
String
fd_3b3bf0c3198840
;
/**
* 变更记录
*/
@Schema
(
description
=
"变更记录"
)
private
String
fd_3b3e4252b16714
;
@Schema
(
description
=
"创建时间"
)
private
Date
createTime
;
}
yifu-ekp/yifu-ekp-api/src/main/java/com/yifu/cloud/plus/v1/ekp/vo/EkpSocialStatusUpdateVo.java
0 → 100644
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author huyc
* @Date 2024/3/15
* @Description 社保明细更新相关参数
* @Version 1.0
*/
@Data
public
class
EkpSocialStatusUpdateVo
implements
Serializable
{
/**
* 社保明细
**/
private
List
<
Object
>
param
;
/**
* 更新sql
**/
private
String
updateSql
;
}
yifu-ekp/yifu-ekp-biz/pom.xml
View file @
d6265406
...
...
@@ -80,16 +80,16 @@
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency
>
<groupId>
org.apache.shardingsphere
</groupId
>
<artifactId>
shardingsphere-jdbc-core-spring-boot-starter
</artifactId
>
<version>
5.1.2
</version
>
</dependency
>
<dependency
>
<groupId>
org.apache.shardingsphere
</groupId
>
<artifactId>
sharding-transaction-base-seata-at
</artifactId
>
<version>
4.1.1
</version
>
</dependency
>
<!-- <dependency>--
>
<!-- <groupId>org.apache.shardingsphere</groupId>--
>
<!-- <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>--
>
<!-- <version>5.1.2</version>--
>
<!-- </dependency>--
>
<!-- <dependency>--
>
<!-- <groupId>org.apache.shardingsphere</groupId>--
>
<!-- <artifactId>sharding-transaction-base-seata-at</artifactId>--
>
<!-- <version>4.1.1</version>--
>
<!-- </dependency>--
>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-common-core
</artifactId>
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/config/OTAStrategyShardingAlgorithm.java
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
config
;
import
com.google.common.collect.Range
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue
;
import
org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue
;
import
org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm
;
import
org.springframework.stereotype.Component
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
@Component
public
class
OTAStrategyShardingAlgorithm
implements
StandardShardingAlgorithm
<
String
>
{
private
static
final
DateTimeFormatter
yyyy
=
DateTimeFormatter
.
ofPattern
(
"yyyy"
);
/**
* 数据插入
* @param collection
* @param preciseShardingValue
* @Author hyc
* @Date 2022-07-21
* @return
*/
@Override
public
String
doSharding
(
Collection
<
String
>
collection
,
PreciseShardingValue
<
String
>
preciseShardingValue
)
{
String
value
=
preciseShardingValue
.
getValue
();
String
tableSuffix
=
value
.
substring
(
0
,
4
);
String
logicTableName
=
preciseShardingValue
.
getLogicTableName
();
String
table
=
logicTableName
.
concat
(
"_"
).
concat
(
tableSuffix
);
return
collection
.
stream
().
filter
(
s
->
s
.
equals
(
table
)).
findFirst
().
orElseThrow
(()
->
new
RuntimeException
(
"逻辑分表不存在"
));
}
/**
* 【范围】数据查询
* @param collection
* @param rangeShardingValue
* @Author hyc
* @Date 2022-07-21
* @return
*/
@Override
public
Collection
<
String
>
doSharding
(
Collection
<
String
>
collection
,
RangeShardingValue
<
String
>
rangeShardingValue
)
{
// 逻辑表名
String
logicTableName
=
rangeShardingValue
.
getLogicTableName
();
// 范围参数
Range
<
String
>
valueRange
=
rangeShardingValue
.
getValueRange
();
Set
<
String
>
queryRangeTables
=
extracted
(
logicTableName
,
valueRange
.
lowerEndpoint
(),
valueRange
.
upperEndpoint
());
ArrayList
<
String
>
tables
=
new
ArrayList
<>(
collection
);
tables
.
retainAll
(
queryRangeTables
);
return
tables
;
}
/**
* 根据范围计算表名
* @param logicTableName 逻辑表明
* @param lowerEndpoint 范围起点
* @param upperEndpoint 范围终端
* @Author hyc
* @Date 2022-07-21
* @return 物理表名集合
*/
private
Set
<
String
>
extracted
(
String
logicTableName
,
String
lowerEndpoint
,
String
upperEndpoint
)
{
Set
<
String
>
rangeTable
=
new
HashSet
<>();
while
(
DateUtil
.
stringToDate
(
lowerEndpoint
+
"01"
).
before
(
DateUtil
.
stringToDate
(
upperEndpoint
+
"01"
)))
{
String
str
=
getTableNameByDate
(
lowerEndpoint
,
logicTableName
);
rangeTable
.
add
(
str
);
lowerEndpoint
=
DateUtil
.
dateToString
(
DateUtil
.
dateIncreaseByYear
(
DateUtil
.
stringToDate
(
lowerEndpoint
+
"01"
),
1
),
DateUtil
.
DATETIME_YYYYMM
);
}
// 获取物理表明
String
tableName
=
getTableNameByDate
(
upperEndpoint
,
logicTableName
);
rangeTable
.
add
(
tableName
);
return
rangeTable
;
}
/**
* 根据日期获取表明
* @param dateTime 日期
* @param logicTableName 逻辑表名
* @Author hyc
* @Date 2022-07-21
* @return 物理表名
*/
private
String
getTableNameByDate
(
String
dateTime
,
String
logicTableName
)
{
String
tableSuffix
=
dateTime
.
substring
(
0
,
4
);
return
logicTableName
.
concat
(
"_"
).
concat
(
tableSuffix
);
}
@Override
public
Properties
getProps
()
{
return
null
;
}
@Override
public
void
init
(
Properties
properties
)
{
}
}
//
package com.yifu.cloud.plus.v1.ekp.config;
//
//
import com.google.common.collect.Range;
//
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
//
import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
//
import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
//
import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
//
import org.springframework.stereotype.Component;
//
//
import java.time.format.DateTimeFormatter;
//
import java.util.*;
//
//
@Component
//
public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<String> {
//
//
private static final DateTimeFormatter yyyy = DateTimeFormatter.ofPattern("yyyy");
//
//
/**
//
* 数据插入
//
* @param collection
//
* @param preciseShardingValue
//
* @Author hyc
//
* @Date 2022-07-21
//
* @return
//
*/
//
@Override
//
public String doSharding(Collection<String> collection, PreciseShardingValue<String> preciseShardingValue) {
//
//
String value = preciseShardingValue.getValue();
//
String tableSuffix = value.substring(0,4);
//
String logicTableName = preciseShardingValue.getLogicTableName();
//
String table = logicTableName.concat("_").concat(tableSuffix);
//
return collection.stream().filter(s -> s.equals(table)).findFirst().orElseThrow(() -> new RuntimeException("逻辑分表不存在"));
//
}
//
//
/**
//
* 【范围】数据查询
//
* @param collection
//
* @param rangeShardingValue
//
* @Author hyc
//
* @Date 2022-07-21
//
* @return
//
*/
//
@Override
//
public Collection<String> doSharding(Collection<String> collection, RangeShardingValue<String> rangeShardingValue) {
//
// 逻辑表名
//
String logicTableName = rangeShardingValue.getLogicTableName();
//
//
// 范围参数
//
Range<String> valueRange = rangeShardingValue.getValueRange();
//
Set<String> queryRangeTables = extracted(logicTableName, valueRange.lowerEndpoint(), valueRange.upperEndpoint());
//
ArrayList<String> tables = new ArrayList<>(collection);
//
tables.retainAll(queryRangeTables);
//
return tables;
//
}
//
//
/**
//
* 根据范围计算表名
//
* @param logicTableName 逻辑表明
//
* @param lowerEndpoint 范围起点
//
* @param upperEndpoint 范围终端
//
* @Author hyc
//
* @Date 2022-07-21
//
* @return 物理表名集合
//
*/
//
private Set<String> extracted(String logicTableName, String lowerEndpoint, String upperEndpoint) {
//
Set<String> rangeTable = new HashSet<>();
//
while (DateUtil.stringToDate(lowerEndpoint + "01").before(DateUtil.stringToDate(upperEndpoint + "01"))) {
//
String str = getTableNameByDate(lowerEndpoint, logicTableName);
//
rangeTable.add(str);
//
lowerEndpoint = DateUtil.dateToString(DateUtil.dateIncreaseByYear(DateUtil.stringToDate(lowerEndpoint + "01"),1),DateUtil.DATETIME_YYYYMM);
//
}
//
// 获取物理表明
//
String tableName = getTableNameByDate(upperEndpoint, logicTableName);
//
rangeTable.add(tableName);
//
return rangeTable;
//
}
//
//
/**
//
* 根据日期获取表明
//
* @param dateTime 日期
//
* @param logicTableName 逻辑表名
//
* @Author hyc
//
* @Date 2022-07-21
//
* @return 物理表名
//
*/
//
private String getTableNameByDate(String dateTime, String logicTableName) {
//
String tableSuffix = dateTime.substring(0,4);
//
return logicTableName.concat("_").concat(tableSuffix);
//
}
//
//
@Override
//
public Properties getProps() {
//
return null;
//
}
//
//
@Override
//
public void init(Properties properties) {
//
//
}
//
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/TEkpManagerInfoController.java
0 → 100644
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
controller
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpManagerInfoService
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
*
*
* @author huyc
* @date 2024-03-13 16:14:37
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/ekpmanagerinfo"
)
@Tag
(
name
=
"管理费明细"
)
public
class
TEkpManagerInfoController
{
private
final
EkpManagerInfoService
ekpManagerInfoService
;
/**
* @param incomeParam
* @Description: 推送管理费明细数据
* @Author: huyc
* @Date: 2024/3/14
* @return:
**/
@Inner
@PostMapping
(
"/inner/pushManangerInfoToEkp"
)
public
String
pushManangerInfoToEkp
(
@RequestBody
EkpIncomeParamManage
incomeParam
)
{
return
ekpManagerInfoService
.
pushManangerInfoToEkp
(
incomeParam
);
}
/**
* @param incomeParamList
* @Description: 推送管理费明细数据
* @Author: huyc
* @Date: 2024/3/14
* @return:
**/
@Inner
@PostMapping
(
"/inner/jobPushManagerInfoToEkp"
)
public
EkpSocialPushInfoVo
jobPushManagerInfoToEkp
(
@RequestBody
List
<
EkpIncomeParamManage
>
incomeParamList
)
{
return
ekpManagerInfoService
.
jobPushManagerInfoToEkp
(
incomeParamList
);
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/TEkpRiskInfoController.java
0 → 100644
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
controller
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpRiskInfoService
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
*
*
* @author huyc
* @date 2024-03-13 16:14:37
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/ekpriskinfo"
)
@Tag
(
name
=
"风险金明细"
)
public
class
TEkpRiskInfoController
{
private
final
EkpRiskInfoService
ekpRiskInfoService
;
/**
* @param incomeParam
* @Description: 推送管理费明细数据
* @Author: huyc
* @Date: 2024/3/14
* @return:
**/
@Inner
@PostMapping
(
"/inner/pushRiskInfoToEkp"
)
public
String
pushRiskInfoToEkp
(
@RequestBody
EkpIncomeParamRisk
incomeParam
)
{
return
ekpRiskInfoService
.
pushRiskInfoToEkp
(
incomeParam
);
}
/**
* @param incomeParam
* @Description: 推送管理费明细数据
* @Author: huyc
* @Date: 2024/3/14
* @return:
**/
@Inner
@PostMapping
(
"/inner/jobPushRiskInfoToEkp"
)
public
EkpSocialPushInfoVo
jobPushRiskInfoToEkp
(
@RequestBody
List
<
EkpIncomeParamRisk
>
incomeParam
)
{
return
ekpRiskInfoService
.
jobPushRiskInfoToEkp
(
incomeParam
);
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/TEkpSocialInfoController.java
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpSocialInfoService
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialStatusUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -11,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.util.List
;
...
...
@@ -39,4 +47,24 @@ public class TEkpSocialInfoController {
public
EkpSocialPushInfoVo
pushSocialInfoToEkp
(
@RequestBody
List
<
EkpPushSocialParam
>
unPushList
)
{
return
socialInfoService
.
pushSocialInfoToEkp
(
unPushList
);
}
/**
* 修改项目表--EKP调用接口
* @author hyc
* @param jsonStr 社保订单明细
* @return R
*/
@Operation
(
summary
=
"更新社保明细状态--EKP调用接口"
,
description
=
"更新社保明细状态--EKP调用接口"
)
@SysLog
(
"更新社保明细状态--EKP调用接口"
)
@PostMapping
(
"/updateScoialStatus"
)
public
R
updateScoialStatus
(
@RequestBody
String
jsonStr
)
{
try
{
jsonStr
=
URLDecoder
.
decode
(
jsonStr
,
CommonConstants
.
UTF8
).
replace
(
"="
,
""
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
List
<
EkpSocialStatusUpdateVo
>
list
=
JSONObject
.
parseArray
(
jsonStr
,
EkpSocialStatusUpdateVo
.
class
);
return
socialInfoService
.
updateScoialStatus
(
list
);
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/mapper/EkpManagerInfoMapper.java
0 → 100644
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpManagerInfo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
*
*
* @author huyc
* @date 2024-03-13 16:14:37
*/
@Mapper
public
interface
EkpManagerInfoMapper
extends
BaseMapper
<
EkpManagerInfo
>
{
/**
* 根据身项目编码获取ekp项目明细
* @param
* @return
*/
EkpDeptInfoVo
getEkpDeptInfoByNo
(
@Param
(
"deptNo"
)
String
getEkpDeptInfoByNo
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/mapper/EkpRiskInfoMapper.java
0 → 100644
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpRiskInfo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
*
*
* @author huyc
* @date 2024-03-13 16:14:37
*/
@Mapper
public
interface
EkpRiskInfoMapper
extends
BaseMapper
<
EkpRiskInfo
>
{
/**
* 根据身项目编码获取ekp项目明细
* @param
* @return
*/
EkpDeptInfoVo
getEkpDeptInfoByNo
(
@Param
(
"deptNo"
)
String
getEkpDeptInfoByNo
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/mapper/EkpSocialInfoMapper.java
View file @
d6265406
...
...
@@ -31,4 +31,6 @@ public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> {
* @return
*/
EkpSocialSumInfoVo
getCostSumInfo
(
@Param
(
"card"
)
String
empIdCard
,
@Param
(
"month"
)
String
createMonth
);
void
updateSocialStatus
(
@Param
(
"sql"
)
String
sql
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/EkpFundInfoService.java
View file @
d6265406
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpFundInfo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
...
...
@@ -15,5 +16,6 @@ import java.util.List;
*/
public
interface
EkpFundInfoService
extends
IService
<
EkpFundInfo
>
{
@Transactional
EkpSocialPushInfoVo
pushFundInfoToEkp
(
List
<
EkpPushFundParam
>
unPushList
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/EkpManagerInfoService.java
0 → 100644
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpManagerInfo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
*
*
* @author huyc
* @date 2024-03-13 16:14:37
*/
public
interface
EkpManagerInfoService
extends
IService
<
EkpManagerInfo
>
{
String
pushManangerInfoToEkp
(
EkpIncomeParamManage
incomeParam
);
@Transactional
EkpSocialPushInfoVo
jobPushManagerInfoToEkp
(
List
<
EkpIncomeParamManage
>
incomeParam
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/EkpRiskInfoService.java
0 → 100644
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpRiskInfo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
*
*
* @author huyc
* @date 2024-03-13 16:14:37
*/
public
interface
EkpRiskInfoService
extends
IService
<
EkpRiskInfo
>
{
String
pushRiskInfoToEkp
(
EkpIncomeParamRisk
incomeParam
);
@Transactional
EkpSocialPushInfoVo
jobPushRiskInfoToEkp
(
List
<
EkpIncomeParamRisk
>
incomeParam
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/EkpSalaryInfoService.java
View file @
d6265406
...
...
@@ -3,8 +3,6 @@ package com.yifu.cloud.plus.v1.ekp.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
org.apache.shardingsphere.transaction.annotation.ShardingTransactionType
;
import
org.apache.shardingsphere.transaction.core.TransactionType
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
...
...
@@ -18,6 +16,6 @@ import java.util.List;
public
interface
EkpSalaryInfoService
extends
IService
<
EkpSalaryInfo
>
{
@Transactional
@ShardingTransactionType
(
TransactionType
.
BASE
)
//
@ShardingTransactionType(TransactionType.BASE)
Boolean
pushSalaryInfoToEkp
(
List
<
EkpSalaryParam
>
unPushList
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/EkpSocialInfoService.java
View file @
d6265406
...
...
@@ -3,9 +3,9 @@ package com.yifu.cloud.plus.v1.ekp.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialStatusUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
org.apache.shardingsphere.transaction.annotation.ShardingTransactionType
;
import
org.apache.shardingsphere.transaction.core.TransactionType
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
...
...
@@ -19,6 +19,8 @@ import java.util.List;
public
interface
EkpSocialInfoService
extends
IService
<
EkpSocialInfo
>
{
@Transactional
@ShardingTransactionType
(
TransactionType
.
BASE
)
//
@ShardingTransactionType(TransactionType.BASE)
EkpSocialPushInfoVo
pushSocialInfoToEkp
(
List
<
EkpPushSocialParam
>
unPushList
);
R
updateScoialStatus
(
List
<
EkpSocialStatusUpdateVo
>
list
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpFundInfoServiceImpl.java
View file @
d6265406
...
...
@@ -11,11 +11,13 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -264,6 +266,9 @@ public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFu
socialInfo
.
setFd_3add9eed23894a
(
"未付"
);
//支出结算状态
socialInfo
.
setFd_3add9edfbc6f7e
(
"未结算"
);
//单号
socialInfo
.
setFd_3adfe95c169c48
(
"GJJ"
+
LocalDateTimeUtils
.
formatTime
(
LocalDateTime
.
now
(),
DateUtil
.
DATE_PATTERN
)
+
"_"
+
socialInfo
.
getFd_3b10b38f90d138
());
}
/**
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpManagerInfoServiceImpl.java
0 → 100644
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpManagerInfo
;
import
com.yifu.cloud.plus.v1.ekp.mapper.EkpManagerInfoMapper
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpManagerInfoService
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Optional
;
/**
* @author huyc
* @date 2024-03-14 10:14:37
*/
@Log4j2
@Service
public
class
EkpManagerInfoServiceImpl
extends
ServiceImpl
<
EkpManagerInfoMapper
,
EkpManagerInfo
>
implements
EkpManagerInfoService
{
/**
* //@Description: 管理费明细推送至ekp
* //@Author: huyc
* //@Date: 2024-3-14
* //@return: void
**/
public
String
pushManangerInfoToEkp
(
EkpIncomeParamManage
incomeParam
)
{
//根据项目编码获取ekp所有项目信息
EkpDeptInfoVo
deptInfo
=
baseMapper
.
getEkpDeptInfoByNo
(
incomeParam
.
getFd_3adfef5e5b9d34
());
EkpManagerInfo
managerInfoCount
;
try
{
//去重 防止重复推送
managerInfoCount
=
baseMapper
.
selectOne
(
Wrappers
.<
EkpManagerInfo
>
query
().
lambda
()
.
eq
(
EkpManagerInfo:
:
getFd_3b13dc864a3052
,
incomeParam
.
getFd_3b13dae9bd70f8
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
managerInfoCount
).
isPresent
())
{
return
null
;
}
EkpManagerInfo
managerInfo
=
new
EkpManagerInfo
();
//对象信息赋值
copyManagerProperties
(
incomeParam
,
managerInfo
);
//项目信息
managerInfo
.
setFd_3b16e47cb6874c_text
(
deptInfo
.
getDeptName
());
managerInfo
.
setFd_3b16e47cb6874c
(
deptInfo
.
getFdId
());
//实际结算月份
if
(
"结算月本月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
managerInfo
.
setFd_3ae0c23cb3fccc
(
incomeParam
.
getFd_3ae0c23cb3fccc
());
}
else
if
(
"结算月上月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
managerInfo
.
setFd_3ae0c23cb3fccc
(
DateUtil
.
dateToString
(
DateUtil
.
addMonthByDate
(
DateUtil
.
parseDate
(
incomeParam
.
getFd_3ae0c23cb3fccc
(),
"yyyy-MM"
),
-
1
),
"yyyy-MM"
));
}
else
{
managerInfo
.
setFd_3ae0c23cb3fccc
(
""
);
}
//是否全部结算
managerInfo
.
setFd_3b13b15f5b63fa
(
"全量未结算数据"
.
equals
(
deptInfo
.
getSocialType
())
?
"是"
:
"否"
);
//创建时间
managerInfo
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
int
i
=
baseMapper
.
insert
(
managerInfo
);
return
i
<=
0
?
null
:
managerInfo
.
getFdId
();
}
catch
(
Exception
e
)
{
log
.
error
(
"管理费明细推送失败:"
,
e
);
return
null
;
}
}
/**
* //@Description: 管理费明细推送至ekp
* //@Author: huyc
* //@Date: 2024-3-14
* //@return: void
**/
public
EkpSocialPushInfoVo
jobPushManagerInfoToEkp
(
List
<
EkpIncomeParamManage
>
incomeParamList
)
{
List
<
EkpManagerInfo
>
managerInfolist
=
new
ArrayList
<>();
EkpManagerInfo
managerInfoCount
;
EkpDeptInfoVo
deptInfo
;
List
<
String
>
paymentIds
=
new
ArrayList
<>();
try
{
for
(
EkpIncomeParamManage
incomeParam
:
incomeParamList
)
{
//根据项目编码获取ekp所有项目信息
deptInfo
=
baseMapper
.
getEkpDeptInfoByNo
(
incomeParam
.
getFd_3adfef5e5b9d34
());
//去重 防止重复推送
managerInfoCount
=
baseMapper
.
selectOne
(
Wrappers
.<
EkpManagerInfo
>
query
().
lambda
()
.
eq
(
EkpManagerInfo:
:
getFd_3b13dc864a3052
,
incomeParam
.
getFd_3b13dae9bd70f8
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
managerInfoCount
).
isPresent
())
{
return
null
;
}
EkpManagerInfo
managerInfo
=
new
EkpManagerInfo
();
//对象信息赋值
copyManagerProperties
(
incomeParam
,
managerInfo
);
//项目信息
managerInfo
.
setFd_3b16e47cb6874c_text
(
deptInfo
.
getDeptName
());
managerInfo
.
setFd_3b16e47cb6874c
(
deptInfo
.
getFdId
());
//实际结算月份
if
(
"结算月本月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
managerInfo
.
setFd_3ae0c23cb3fccc
(
incomeParam
.
getFd_3ae0c23cb3fccc
());
}
else
if
(
"结算月上月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
managerInfo
.
setFd_3ae0c23cb3fccc
(
DateUtil
.
dateToString
(
DateUtil
.
addMonthByDate
(
DateUtil
.
parseDate
(
incomeParam
.
getFd_3ae0c23cb3fccc
(),
"yyyy-MM"
),
-
1
),
"yyyy-MM"
));
}
else
{
managerInfo
.
setFd_3ae0c23cb3fccc
(
""
);
}
//是否全部结算
managerInfo
.
setFd_3b13b15f5b63fa
(
"全量未结算数据"
.
equals
(
deptInfo
.
getSocialType
())
?
"是"
:
"否"
);
//创建时间
managerInfo
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
managerInfolist
.
add
(
managerInfo
);
paymentIds
.
add
(
managerInfo
.
getFd_3b13dc864a3052
());
}
if
(!
managerInfolist
.
isEmpty
())
{
boolean
flag
=
this
.
saveBatch
(
managerInfolist
);
if
(
flag
)
{
//推送成功保存社保明细合并的数据对应关系
EkpSocialPushInfoVo
pushInfoVo
=
new
EkpSocialPushInfoVo
();
pushInfoVo
.
setPaymentIds
(
paymentIds
);
return
pushInfoVo
;
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"管理费明细推送失败:"
,
e
);
return
null
;
}
return
null
;
}
private
void
copyManagerProperties
(
EkpIncomeParamManage
incomeParam
,
EkpManagerInfo
managerInfo
)
{
//项目编码
managerInfo
.
setFd_3adfef5e5b9d34
(
incomeParam
.
getFd_3adfef5e5b9d34
());
//项目名称
managerInfo
.
setFd_3adfef5eb6691c
(
incomeParam
.
getFd_3adfef5eb6691c
());
//单号
managerInfo
.
setFd_3adfef7f5d2b52
(
incomeParam
.
getFd_3adfef7f5d2b52
());
//客户编码
managerInfo
.
setFd_3adfef80202ab2
(
incomeParam
.
getFd_3adfef80202ab2
());
//客户名称
managerInfo
.
setFd_3adfef7fc1c886
(
incomeParam
.
getFd_3adfef7fc1c886
());
//类型
managerInfo
.
setFd_3adda3037e3bda
(
incomeParam
.
getFd_3adda3037e3bda
());
//产生来源
managerInfo
.
setFd_3adda320daef5a
(
incomeParam
.
getFd_3adda320daef5a
());
//薪酬申请编号
managerInfo
.
setFd_3b3bf110837a96
(
incomeParam
.
getFd_3b3bf13759b850
());
//姓名
managerInfo
.
setFd_3adfef948da848
(
incomeParam
.
getFd_3adfef948da848
());
//身份证号
managerInfo
.
setFd_3adfef94dcdbb4
(
incomeParam
.
getFd_3adfef94dcdbb4
());
//生成月份
managerInfo
.
setFd_3ae0c23b2e9a92
(
incomeParam
.
getFd_3ae0c23b2e9a92
());
//HRO结算月
managerInfo
.
setFd_3b13dd215b55b2
(
incomeParam
.
getFd_3ae0c23cb3fccc
());
//数据来源
managerInfo
.
setFd_3b0b7231bb5896
(
"HRO"
);
//管理费ID
managerInfo
.
setFd_3b13dc864a3052
(
incomeParam
.
getFd_3b13dae9bd70f8
());
//管理费金额
managerInfo
.
setFd_3adfef963bae28
(
CommonConstants
.
EMPTY_STRING
.
equals
(
incomeParam
.
getFd_3adfef963bae28
())
?
null
:
Double
.
parseDouble
(
incomeParam
.
getFd_3adfef963bae28
()));
//应收
managerInfo
.
setFd_3adfefa3daae72
(
CommonConstants
.
EMPTY_STRING
.
equals
(
incomeParam
.
getFd_3adfefa3daae72
())
?
null
:
Double
.
parseDouble
(
incomeParam
.
getFd_3adfefa3daae72
()));
//结算状态
managerInfo
.
setFd_3adfefaaa3bbd0
(
"未结算"
);
//收款状态
managerInfo
.
setFd_3adfefaaef583e
(
"未收"
);
//单号
managerInfo
.
setFd_3adfef7f5d2b52
(
"GLF"
+
LocalDateTimeUtils
.
formatTime
(
LocalDateTime
.
now
(),
DateUtil
.
DATE_PATTERN
)
+
"_"
+
managerInfo
.
getFd_3b13dc864a3052
());
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpRiskInfoServiceImpl.java
0 → 100644
View file @
d6265406
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpRiskInfo
;
import
com.yifu.cloud.plus.v1.ekp.mapper.EkpRiskInfoMapper
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpRiskInfoService
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Optional
;
/**
* @author huyc
* @date 2024-03-13 16:14:37
*/
@Log4j2
@Service
public
class
EkpRiskInfoServiceImpl
extends
ServiceImpl
<
EkpRiskInfoMapper
,
EkpRiskInfo
>
implements
EkpRiskInfoService
{
/**
* //@Description: 风险金明细推送至ekp
* //@Author: huyc
* //@Date: 2024-3-14
* //@return: void
**/
public
String
pushRiskInfoToEkp
(
EkpIncomeParamRisk
incomeParam
)
{
//根据项目编码获取ekp所有项目信息
EkpDeptInfoVo
deptInfo
=
baseMapper
.
getEkpDeptInfoByNo
(
incomeParam
.
getFd_3adfef5e5b9d34
());
EkpRiskInfo
riskInfoCount
;
try
{
//去重 防止重复推送
riskInfoCount
=
baseMapper
.
selectOne
(
Wrappers
.<
EkpRiskInfo
>
query
().
lambda
()
.
eq
(
EkpRiskInfo:
:
getFd_3b13db120a8224
,
incomeParam
.
getFd_3b13dac4c03022
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
riskInfoCount
).
isPresent
())
{
return
null
;
}
EkpRiskInfo
riskInfoInfo
=
new
EkpRiskInfo
();
//对象信息赋值
copyManagerProperties
(
incomeParam
,
riskInfoInfo
);
//项目信息
riskInfoInfo
.
setFd_3b16e4cd2c9a86_text
(
deptInfo
.
getDeptName
());
riskInfoInfo
.
setFd_3b16e4cd2c9a86
(
deptInfo
.
getFdId
());
//实际结算月份
if
(
"结算月本月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
riskInfoInfo
.
setFd_3ae0c3044e5958
(
incomeParam
.
getFd_3ae0c3044e5958
());
}
else
if
(
"结算月上月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
riskInfoInfo
.
setFd_3ae0c3044e5958
(
DateUtil
.
dateToString
(
DateUtil
.
addMonthByDate
(
DateUtil
.
parseDate
(
incomeParam
.
getFd_3ae0c3044e5958
(),
"yyyy-MM"
),
-
1
),
"yyyy-MM"
));
}
else
{
riskInfoInfo
.
setFd_3ae0c3044e5958
(
""
);
}
//是否全部结算
riskInfoInfo
.
setFd_3b13b218b76a36
(
"全量未结算数据"
.
equals
(
deptInfo
.
getSocialType
())
?
"是"
:
"否"
);
//创建时间
riskInfoInfo
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
int
i
=
baseMapper
.
insert
(
riskInfoInfo
);
return
i
<=
0
?
null
:
riskInfoInfo
.
getFdId
();
}
catch
(
Exception
e
)
{
log
.
error
(
"管理费明细推送失败:"
,
e
);
return
null
;
}
}
/**
* //@Description: 风险金明细推送至ekp
* //@Author: huyc
* //@Date: 2024-3-14
* //@return: void
**/
public
EkpSocialPushInfoVo
jobPushRiskInfoToEkp
(
List
<
EkpIncomeParamRisk
>
incomeParamList
)
{
List
<
String
>
paymentIds
=
new
ArrayList
<>();
List
<
EkpRiskInfo
>
riskInfoList
=
new
ArrayList
();
EkpRiskInfo
riskInfoCount
;
EkpDeptInfoVo
deptInfo
;
try
{
for
(
EkpIncomeParamRisk
incomeParam
:
incomeParamList
)
{
//根据项目编码获取ekp所有项目信息
deptInfo
=
baseMapper
.
getEkpDeptInfoByNo
(
incomeParam
.
getFd_3adfef5e5b9d34
());
//去重 防止重复推送
riskInfoCount
=
baseMapper
.
selectOne
(
Wrappers
.<
EkpRiskInfo
>
query
().
lambda
()
.
eq
(
EkpRiskInfo:
:
getFd_3b13db120a8224
,
incomeParam
.
getFd_3b13dac4c03022
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
riskInfoCount
).
isPresent
())
{
return
null
;
}
EkpRiskInfo
riskInfoInfo
=
new
EkpRiskInfo
();
//对象信息赋值
copyManagerProperties
(
incomeParam
,
riskInfoInfo
);
//项目信息
riskInfoInfo
.
setFd_3b16e4cd2c9a86_text
(
deptInfo
.
getDeptName
());
riskInfoInfo
.
setFd_3b16e4cd2c9a86
(
deptInfo
.
getFdId
());
//实际结算月份
if
(
"结算月本月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
riskInfoInfo
.
setFd_3ae0c3044e5958
(
incomeParam
.
getFd_3ae0c3044e5958
());
}
else
if
(
"结算月上月数据"
.
equals
(
deptInfo
.
getSocialType
()))
{
riskInfoInfo
.
setFd_3ae0c3044e5958
(
DateUtil
.
dateToString
(
DateUtil
.
addMonthByDate
(
DateUtil
.
parseDate
(
incomeParam
.
getFd_3ae0c3044e5958
(),
"yyyy-MM"
),
-
1
),
"yyyy-MM"
));
}
else
{
riskInfoInfo
.
setFd_3ae0c3044e5958
(
""
);
}
//是否全部结算
riskInfoInfo
.
setFd_3b13b218b76a36
(
"全量未结算数据"
.
equals
(
deptInfo
.
getSocialType
())
?
"是"
:
"否"
);
//创建时间
riskInfoInfo
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
paymentIds
.
add
(
riskInfoInfo
.
getFd_3b13db120a8224
());
riskInfoList
.
add
(
riskInfoInfo
);
}
if
(!
riskInfoList
.
isEmpty
())
{
boolean
flag
=
this
.
saveBatch
(
riskInfoList
);
if
(
flag
)
{
//推送成功保存社保明细合并的数据对应关系
EkpSocialPushInfoVo
pushInfoVo
=
new
EkpSocialPushInfoVo
();
pushInfoVo
.
setPaymentIds
(
paymentIds
);
return
pushInfoVo
;
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"管理费明细推送失败:"
,
e
);
return
null
;
}
return
null
;
}
private
void
copyManagerProperties
(
EkpIncomeParamRisk
incomeParam
,
EkpRiskInfo
riskInfoInfo
)
{
//项目编码
riskInfoInfo
.
setFd_3adfef5e5b9d34
(
incomeParam
.
getFd_3adfef5e5b9d34
());
//项目名称
riskInfoInfo
.
setFd_3adfef5eb6691c
(
incomeParam
.
getFd_3adfef5eb6691c
());
//单号
riskInfoInfo
.
setFd_3adfef7f5d2b52
(
incomeParam
.
getFd_3adfef7f5d2b52
());
//客户编码
riskInfoInfo
.
setFd_3adfef80202ab2
(
incomeParam
.
getFd_3adfef80202ab2
());
//客户名称
riskInfoInfo
.
setFd_3adfef7fc1c886
(
incomeParam
.
getFd_3adfef7fc1c886
());
//类型
riskInfoInfo
.
setFd_3adda3037e3bda
(
incomeParam
.
getFd_3adda3037e3bda
());
//产生来源
riskInfoInfo
.
setFd_3adda320daef5a
(
incomeParam
.
getFd_3adda320daef5a
());
//薪酬申请编号
riskInfoInfo
.
setFd_3b3bf0c3198840
(
incomeParam
.
getFd_3b3bf0e75ef6c4
());
//姓名
riskInfoInfo
.
setFd_3adfef948da848
(
incomeParam
.
getFd_3adfef948da848
());
//身份证号
riskInfoInfo
.
setFd_3adfef94dcdbb4
(
incomeParam
.
getFd_3adfef94dcdbb4
());
//生成月份
riskInfoInfo
.
setFd_3ae0c3032cffc8
(
incomeParam
.
getFd_3ae0c3032cffc8
());
//HRO结算月
riskInfoInfo
.
setFd_3b13b2093b95ec
(
incomeParam
.
getFd_3ae0c3044e5958
());
//数据来源
riskInfoInfo
.
setFd_3b0b7210ce9432
(
"HRO"
);
//风险金ID
riskInfoInfo
.
setFd_3b13db120a8224
(
incomeParam
.
getFd_3b13dac4c03022
());
//管理费金额
riskInfoInfo
.
setFd_3adfef963bae28
(
CommonConstants
.
EMPTY_STRING
.
equals
(
incomeParam
.
getFd_3adfef963bae28
())
?
null
:
Double
.
parseDouble
(
incomeParam
.
getFd_3adfef963bae28
()));
//应收
riskInfoInfo
.
setFd_3adfefa3daae72
(
CommonConstants
.
EMPTY_STRING
.
equals
(
incomeParam
.
getFd_3adfefa3daae72
())
?
null
:
Double
.
parseDouble
(
incomeParam
.
getFd_3adfefa3daae72
()));
//结算状态
riskInfoInfo
.
setFd_3adfefaaa3bbd0
(
"未结算"
);
//收款状态
riskInfoInfo
.
setFd_3adfefaaef583e
(
"未收"
);
//单号
riskInfoInfo
.
setFd_3adfef7f5d2b52
(
"FXJ"
+
LocalDateTimeUtils
.
formatTime
(
LocalDateTime
.
now
(),
DateUtil
.
DATE_PATTERN
)
+
"_"
+
riskInfoInfo
.
getFd_3b13db120a8224
());
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpSalaryInfoServiceImpl.java
View file @
d6265406
...
...
@@ -10,11 +10,13 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -29,7 +31,7 @@ import java.util.stream.Collectors;
public
class
EkpSalaryInfoServiceImpl
extends
ServiceImpl
<
EkpSalaryInfoMapper
,
EkpSalaryInfo
>
implements
EkpSalaryInfoService
{
/**
//@Description:
社保
明细推送至ekp
//@Description:
工资
明细推送至ekp
//@Author: huyc
//@Date: 2024-3-11
//@return: void
...
...
@@ -92,7 +94,7 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"工资明细推送失败
"
);
log
.
error
(
"工资明细推送失败
:"
,
e
);
return
false
;
}
return
false
;
...
...
@@ -238,10 +240,12 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
//实发合计应支出
salaryInfo
.
setFd_3adfeec730ec44
(
CommonConstants
.
EMPTY_STRING
.
equals
(
salaryParam
.
getFd_3adfee20fe5ba4
())
?
null
:
Double
.
parseDouble
(
salaryParam
.
getFd_3adfee20fe5ba4
()));
//企业年金单位应支出
salaryInfo
.
setFd_3adfeec782070a
(
CommonConstants
.
EMPTY_STRING
.
equals
(
salaryParam
.
getFd_3adfee
c782070a
())
?
null
:
Double
.
parseDouble
(
salaryParam
.
getFd_3adfeec782070
a
()));
salaryInfo
.
setFd_3adfeec782070a
(
CommonConstants
.
EMPTY_STRING
.
equals
(
salaryParam
.
getFd_3adfee
1ff1ca6a
())
?
null
:
Double
.
parseDouble
(
salaryParam
.
getFd_3adfee1ff1ca6
a
()));
//企业年金个人应支出
salaryInfo
.
setFd_3adfeec7ccdd1c
(
CommonConstants
.
EMPTY_STRING
.
equals
(
salaryParam
.
getFd_3adfee203f86b2
())
?
null
:
Double
.
parseDouble
(
salaryParam
.
getFd_3adfee203f86b2
()));
//单号
salaryInfo
.
setFd_3adfedfa4410aa
(
"GZ"
+
LocalDateTimeUtils
.
formatTime
(
LocalDateTime
.
now
(),
DateUtil
.
DATE_PATTERN
)
+
"_"
+
salaryInfo
.
getFd_3b10afe8c70742
());
}
/**
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpSocialInfoServiceImpl.java
View file @
d6265406
...
...
@@ -7,17 +7,17 @@ import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
import
com.yifu.cloud.plus.v1.ekp.service.EkpSocialInfoService
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialStatusUpdateVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentSocialPush
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -233,6 +233,19 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
return
null
;
}
@Override
public
R
updateScoialStatus
(
List
<
EkpSocialStatusUpdateVo
>
list
)
{
if
(
Optional
.
ofNullable
(
list
).
isPresent
())
{
for
(
EkpSocialStatusUpdateVo
socialStatusUpdateVo
:
list
)
{
String
updateSql
=
socialStatusUpdateVo
.
getUpdateSql
().
replaceAll
(
"\\?"
,
"%s"
);
String
sql
=
String
.
format
(
updateSql
,
socialStatusUpdateVo
.
getParam
().
toArray
());
baseMapper
.
updateSocialStatus
(
sql
);
}
return
R
.
ok
();
}
return
null
;
}
private
void
copySocialProperties
(
EkpPushSocialParam
socialParam
,
EkpSocialInfo
socialInfo
)
{
//订单类型
socialInfo
.
setFd_3add9dd7833db8
(
socialParam
.
getFd_3add9dd7833db8
());
...
...
@@ -277,7 +290,7 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
//预估单位养老
socialInfo
.
setFd_3af9f257b1b586
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ec80a9de7a
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ec80a9de7a
()));
//预估单位医疗
socialInfo
.
setFd_3af9f25b851e94
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9eba5899c90
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9e
c80a9de7a
()));
socialInfo
.
setFd_3af9f25b851e94
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9eba5899c90
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9e
ba5899c90
()));
//预估单位失业
socialInfo
.
setFd_3af9f25f5e9cc4
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9eba5f6e19e
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9eba5f6e19e
()));
//预估单位工伤
...
...
@@ -342,6 +355,9 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
socialInfo
.
setFd_3add9edfbc6f7e
(
"未结算"
);
//付款状态
socialInfo
.
setFd_3add9eed23894a
(
"未付"
);
//单号
socialInfo
.
setFd_3adfe95c169c48
(
"SB"
+
LocalDateTimeUtils
.
formatTime
(
LocalDateTime
.
now
(),
DateUtil
.
DATE_PATTERN
)
+
"_"
+
socialParam
.
getFd_3b0afbe1f94a08
());
}
...
...
yifu-ekp/yifu-ekp-biz/src/main/resources/application-test.yml
View file @
d6265406
## 数据源配置
#spring:
# shardingsphere:
# datasource:
# ds0:
# type: com.zaxxer.hikari.HikariDataSource
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://192.168.1.122:33306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
# username: root
# password: ll_mysql
# hikari:
# driver-class-name: ${spring.datasource.driver-class-name}
# jdbc-url: ${spring.datasource.url}
# username: ${spring.datasource.username}
# password: ${spring.datasource.password}
# pool-name: AmytangHikariCP
# minimum-idle: 10 # 最小空闲连接数量
# idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
# maximum-pool-size: 12 # 连接池最大连接数,默认是10
# auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
# max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
# names: ds0
# rules:
# sharding:
# key-generators:
# snowflake:
# type: SNOWFLAKE
# sharding-algorithms:
# t-payment-inline:
# props:
# strategy: standard
# algorithmClassName: com.yifu.cloud.plus.v1.ekp.config.OTAStrategyShardingAlgorithm
# type: CLASS_BASED
# tables:
# ekp_social_info:
# actual-data-nodes: ds0.ekp_social_info_20$->{23..24}
# key-generate-strategy:
# column: fd_id
# key-generator-name: snowflake
# table-strategy:
# standard:
# sharding-column: fd_3adfe8cb96c41e
# sharding-algorithm-name: t-payment-inline
#
# mvc:
# pathmatch:
# matching-strategy: ant_path_matcher
# config:
# activate:
# on-profile: test
# redis:
# host: 192.168.1.65
# port: 22379
# password: '@yf_2017'
### spring security 配置
#security:
# oauth2:
# resource:
# loadBalanced: true
# token-info-uri: http://127.0.0.1:3000/oauth/check_token
# # 直接放行URL
# ignore:
# urls:
# - /v3/api-docs
# - /actuator/**
# - /swagger-ui/**
# 数据源配置
spring
:
shardingsphere
:
datasource
:
ds0
:
type
:
com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://192.168.1.122:33306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username
:
root
password
:
ll_mysql
hikari
:
driver-class-name
:
${spring.datasource.driver-class-name}
jdbc-url
:
${spring.datasource.url}
username
:
${spring.datasource.username}
password
:
${spring.datasource.password}
pool-name
:
AmytangHikariCP
minimum-idle
:
10
# 最小空闲连接数量
idle-timeout
:
60000
# 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size
:
12
# 连接池最大连接数,默认是10
auto-commit
:
true
#此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime
:
0
#此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
names
:
ds0
rules
:
sharding
:
key-generators
:
snowflake
:
type
:
SNOWFLAKE
sharding-algorithms
:
t-payment-inline
:
props
:
strategy
:
standard
algorithmClassName
:
com.yifu.cloud.plus.v1.ekp.config.OTAStrategyShardingAlgorithm
type
:
CLASS_BASED
tables
:
ekp_social_info
:
actual-data-nodes
:
ds0.ekp_social_info_20$->{23..24}
key-generate-strategy
:
column
:
fd_id
key-generator-name
:
snowflake
table-strategy
:
standard
:
sharding-column
:
fd_3adfe8cb96c41e
sharding-algorithm-name
:
t-payment-inline
mvc
:
pathmatch
:
matching-strategy
:
ant_path_matcher
...
...
@@ -52,6 +76,22 @@ spring:
host
:
192.168.1.65
port
:
22379
password
:
'
@yf_2017'
datasource
:
type
:
com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
username
:
root
password
:
ll_mysql
url
:
jdbc:mysql://192.168.1.122:33306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari
:
driver-class-name
:
${spring.datasource.driver-class-name}
jdbc-url
:
${spring.datasource.url}
username
:
${spring.datasource.username}
password
:
${spring.datasource.password}
minimum-idle
:
10
# 最小空闲连接数量
idle-timeout
:
60000
# 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size
:
12
# 连接池最大连接数,默认是10
auto-commit
:
true
#此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime
:
0
#此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
## spring security 配置
security
:
oauth2
:
...
...
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpFundInfoMapper.xml
View file @
d6265406
...
...
@@ -55,7 +55,7 @@
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<!--
tPaymentInfo合并查询
-->
<!--
查询项目信息
-->
<select
id=
"getAllEkpDeptInfo"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo"
>
SELECT
a.fd_id as fdId,
...
...
@@ -68,7 +68,7 @@
group by fd_3a37fe508071fe
</select>
<!--
tPaymentInfo合并查询
-->
<!--
查询公积金明细信息
-->
<select
id=
"getCostSumInfo"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo"
>
SELECT
round(sum(ifnull(fd_3adfeb52a4d2e2,0)),2) as ygPersonSum,
...
...
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpManagerInfoMapper.xml
0 → 100644
View file @
d6265406
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.ekp.mapper.EkpManagerInfoMapper"
>
<resultMap
id=
"ekpManagerInfoMap"
type=
"com.yifu.cloud.plus.v1.ekp.entity.EkpManagerInfo"
>
<id
property=
"fdId"
column=
"fd_id"
/>
<result
property=
"fd_3adfef5e5b9d34"
column=
"fd_3adfef5e5b9d34"
/>
<result
property=
"fd_3adfef5eb6691c"
column=
"fd_3adfef5eb6691c"
/>
<result
property=
"fd_3adfef7f5d2b52"
column=
"fd_3adfef7f5d2b52"
/>
<result
property=
"fd_3adfef80202ab2"
column=
"fd_3adfef80202ab2"
/>
<result
property=
"fd_3adfef7fc1c886"
column=
"fd_3adfef7fc1c886"
/>
<result
property=
"fd_3adda3037e3bda"
column=
"fd_3adda3037e3bda"
/>
<result
property=
"fd_3adda320daef5a"
column=
"fd_3adda320daef5a"
/>
<result
property=
"fd_3adfef948da848"
column=
"fd_3adfef948da848"
/>
<result
property=
"fd_3adfef94dcdbb4"
column=
"fd_3adfef94dcdbb4"
/>
<result
property=
"fd_3adfef963bae28"
column=
"fd_3adfef963bae28"
/>
<result
property=
"fd_3adfefa3daae72"
column=
"fd_3adfefa3daae72"
/>
<result
property=
"fd_3adfefaaa3bbd0"
column=
"fd_3adfefaaa3bbd0"
/>
<result
property=
"fd_3adfefaaef583e"
column=
"fd_3adfefaaef583e"
/>
<result
property=
"fd_3ae0c23cb3fccc"
column=
"fd_3ae0c23cb3fccc"
/>
<result
property=
"fd_3ae0c23b2e9a92"
column=
"fd_3ae0c23b2e9a92"
/>
<result
property=
"fd_3aead3c68b1078"
column=
"fd_3aead3c68b1078"
/>
<result
property=
"fd_3aeae58b14691c"
column=
"fd_3aeae58b14691c"
/>
<result
property=
"fd_3b0b7231bb5896"
column=
"fd_3b0b7231bb5896"
/>
<result
property=
"fd_3b13b15f5b63fa"
column=
"fd_3b13b15f5b63fa"
/>
<result
property=
"fd_3b13dc864a3052"
column=
"fd_3b13dc864a3052"
/>
<result
property=
"fd_3b13dd215b55b2"
column=
"fd_3b13dd215b55b2"
/>
<result
property=
"fd_3b16e47cb6874c"
column=
"fd_3b16e47cb6874c"
/>
<result
property=
"fd_3b16e47cb6874c_text"
column=
"fd_3b16e47cb6874c_text"
/>
<result
property=
"fd_3b3bf110837a96"
column=
"fd_3b3bf110837a96"
/>
<result
property=
"fd_3b3e43a10ab4b2"
column=
"fd_3b3e43a10ab4b2"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<!--查询项目信息-->
<select
id=
"getEkpDeptInfoByNo"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo"
>
SELECT
a.fd_id as fdId,
a.fd_3b1480cd9dcb60 as settleType,
a.fd_3b15f64dd59a28 as isBpo,
a.fd_3b13b29acea0e6 as socialType,
a.fd_3a2b38c61ef9aa as deptName,
a.fd_3a37fe508071fe as deptNo
from ekp_24a8e6a7fc143bb8c48a a
where a.fd_3a37fe508071fe = #{deptNo} limit 1
</select>
</mapper>
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpRiskInfoMapper.xml
0 → 100644
View file @
d6265406
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.ekp.mapper.EkpRiskInfoMapper"
>
<resultMap
id=
"ekpRiskInfoMap"
type=
"com.yifu.cloud.plus.v1.ekp.entity.EkpRiskInfo"
>
<id
property=
"fdId"
column=
"fd_id"
/>
<result
property=
"fd_3adfef5e5b9d34"
column=
"fd_3adfef5e5b9d34"
/>
<result
property=
"fd_3adfef5eb6691c"
column=
"fd_3adfef5eb6691c"
/>
<result
property=
"fd_3adfef7f5d2b52"
column=
"fd_3adfef7f5d2b52"
/>
<result
property=
"fd_3adfef80202ab2"
column=
"fd_3adfef80202ab2"
/>
<result
property=
"fd_3adfef7fc1c886"
column=
"fd_3adfef7fc1c886"
/>
<result
property=
"fd_3adda3037e3bda"
column=
"fd_3adda3037e3bda"
/>
<result
property=
"fd_3adda320daef5a"
column=
"fd_3adda320daef5a"
/>
<result
property=
"fd_3adfef948da848"
column=
"fd_3adfef948da848"
/>
<result
property=
"fd_3adfef94dcdbb4"
column=
"fd_3adfef94dcdbb4"
/>
<result
property=
"fd_3adfef963bae28"
column=
"fd_3adfef963bae28"
/>
<result
property=
"fd_3adfefa3daae72"
column=
"fd_3adfefa3daae72"
/>
<result
property=
"fd_3adfefaaa3bbd0"
column=
"fd_3adfefaaa3bbd0"
/>
<result
property=
"fd_3adfefaaef583e"
column=
"fd_3adfefaaef583e"
/>
<result
property=
"fd_3ae0c3032cffc8"
column=
"fd_3ae0c3032cffc8"
/>
<result
property=
"fd_3ae0c3044e5958"
column=
"fd_3ae0c3044e5958"
/>
<result
property=
"fd_3aead7204bb594"
column=
"fd_3aead7204bb594"
/>
<result
property=
"fd_3aeae59b70fe5a"
column=
"fd_3aeae59b70fe5a"
/>
<result
property=
"fd_3b0b7210ce9432"
column=
"fd_3b0b7210ce9432"
/>
<result
property=
"fd_3b13b218b76a36"
column=
"fd_3b13b218b76a36"
/>
<result
property=
"fd_3b13b2093b95ec"
column=
"fd_3b13b2093b95ec"
/>
<result
property=
"fd_3b13db120a8224"
column=
"fd_3b13db120a8224"
/>
<result
property=
"fd_3b16e4cd2c9a86_text"
column=
"fd_3b16e4cd2c9a86_text"
/>
<result
property=
"fd_3b16e4cd2c9a86"
column=
"fd_3b16e4cd2c9a86"
/>
<result
property=
"fd_3b3bf0c3198840"
column=
"fd_3b3bf0c3198840"
/>
<result
property=
"fd_3b3e4252b16714"
column=
"fd_3b3e4252b16714"
/>
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<!--查询项目信息-->
<select
id=
"getEkpDeptInfoByNo"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo"
>
SELECT
a.fd_id as fdId,
a.fd_3b1480cd9dcb60 as settleType,
a.fd_3b15f64dd59a28 as isBpo,
a.fd_3b13b2b48cc506 as socialType,
a.fd_3a2b38c61ef9aa as deptName,
a.fd_3a37fe508071fe as deptNo
from ekp_24a8e6a7fc143bb8c48a a
where a.fd_3a37fe508071fe = #{deptNo} limit 1
</select>
</mapper>
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpSalaryInfoMapper.xml
View file @
d6265406
...
...
@@ -118,7 +118,7 @@
<result
property=
"fd_3c3e5ff65115a2"
column=
"fd_3c3e5ff65115a2"
/>
</resultMap>
<!--
tPaymentInfo合并查询
-->
<!--
查询项目信息
-->
<select
id=
"getAllEkpDeptInfo"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo"
>
SELECT
a.fd_id as fdId,
...
...
@@ -131,7 +131,7 @@
group by fd_3a37fe508071fe
</select>
<!--
tPaymentInfo合并查询
-->
<!--
查询工资明细信息
-->
<select
id=
"getCostSumInfo"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo"
>
SELECT
round(sum(ifnull(fd_3af9f2883941b4,0)),2) as ygSum,
...
...
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpSocialInfoMapper.xml
View file @
d6265406
...
...
@@ -81,7 +81,7 @@
<result
property=
"createTime"
column=
"create_time"
/>
</resultMap>
<!--
tPaymentInfo合并查询
-->
<!--
查询项目信息
-->
<select
id=
"getAllEkpDeptInfo"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo"
>
SELECT
a.fd_id as fdId,
...
...
@@ -94,7 +94,7 @@
group by fd_3a37fe508071fe
</select>
<!--
tPaymentInfo合并查询
-->
<!--
查询社保明细信息
-->
<select
id=
"getCostSumInfo"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo"
>
SELECT
round(sum(ifnull(fd_3af9f2883941b4,0)),2) as ygSum,
...
...
@@ -113,4 +113,7 @@
where fd_3adfe8c7e4cf7a = #{card} and fd_3adfe8cb96c41e = #{month}
</select>
<update
id=
"updateSocialStatus"
>
#{sql}
</update>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
d6265406
...
...
@@ -693,8 +693,8 @@
,ifnull(withholidingPersonFund.SALARY_MONEY,'') fd_3b16ce4b7fc42a
,ifnull(withholidingUnitSocial.SALARY_MONEY,'') fd_3bcd41d857b764
,ifnull(withholidingUnitFund.SALARY_MONEY,'') fd_3bcd41d77e4812
,
ifnull(withholidingUnitSocial.SALARY_MONEY,'0')+ifnull(withholidingPersonSocial.SALARY_MONEY,'0'
) social_sum
,
ifnull(withholidingUnitFund.SALARY_MONEY,'0')+ifnull(withholidingPersonFund.SALARY_MONEY,'0')
fund_sum
,
round(ifnull(withholidingUnitSocial.SALARY_MONEY,'0')+ifnull(withholidingPersonSocial.SALARY_MONEY,'0'),2
) social_sum
,
round(ifnull(withholidingUnitFund.SALARY_MONEY,'0')+ifnull(withholidingPersonFund.SALARY_MONEY,'0'),2)
fund_sum
,concat(left(ifnull(a.DEDU_SOCIAL_MONTH,'1970'),4),'-',right(ifnull(a.DEDU_SOCIAL_MONTH,'02'),2)) DEDU_SOCIAL_MONTH
,concat(left(ifnull(a.DEDU_PROVIDENT_MONTH,'1970'),4),'-',right(ifnull(a.DEDU_PROVIDENT_MONTH,'02'),2)) DEDU_PROVIDENT_MONTH
,ifnull(s.BPO_FLAG,'') fd_3b178f0ded2114
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TIncomeMapper.java
View file @
d6265406
...
...
@@ -73,6 +73,8 @@ public interface TIncomeMapper extends BaseMapper<TIncome> {
**/
int
deleteIncomeDetailByApplyNo
(
@Param
(
"applyNo"
)
String
applyNo
);
void
updateIncomeByIdList
(
@Param
(
"list"
)
List
<
String
>
list
);
/**
* @param idSet
* @param dept
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
d6265406
...
...
@@ -2424,15 +2424,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
List
<
TForecastLibrary
>
pushList
;
int
k
=
0
;
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
if
(
j
==
i
-
1
)
{
pushList
=
unPushInfo
.
subList
(
k
,
unPushInfo
.
size
());
}
else
{
pushList
=
unPushInfo
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
initEkpPushSocialParam
(
pushList
,
true
,
selectVoMap
);
synchronized
(
this
)
{
if
(
j
==
i
-
1
)
{
pushList
=
unPushInfo
.
subList
(
k
,
unPushInfo
.
size
());
}
else
{
pushList
=
unPushInfo
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
initEkpPushSocialParam
(
pushList
,
true
,
selectVoMap
);
}
}
}
}
...
...
@@ -2465,15 +2467,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
List
<
TForecastLibrary
>
pushList
;
int
k
=
0
;
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
if
(
j
==
i
-
1
)
{
pushList
=
unPushInfo
.
subList
(
k
,
unPushInfo
.
size
());
}
else
{
pushList
=
unPushInfo
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
initEkpPushFundParam
(
pushList
,
true
,
selectVoMap
);
synchronized
(
this
)
{
if
(
j
==
i
-
1
)
{
pushList
=
unPushInfo
.
subList
(
k
,
unPushInfo
.
size
());
}
else
{
pushList
=
unPushInfo
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
initEkpPushFundParam
(
pushList
,
true
,
selectVoMap
);
}
}
}
}
...
...
@@ -2496,15 +2500,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
List
<
TForecastLibrary
>
pushList
;
int
k
=
0
;
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
if
(
j
==
i
-
1
)
{
pushList
=
library
.
subList
(
k
,
library
.
size
());
}
else
{
pushList
=
library
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
initEkpPushSocialParam
(
pushList
,
synFlag
,
selectVoMap
);
synchronized
(
this
)
{
if
(
j
==
i
-
1
)
{
pushList
=
library
.
subList
(
k
,
library
.
size
());
}
else
{
pushList
=
library
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
initEkpPushSocialParam
(
pushList
,
synFlag
,
selectVoMap
);
}
}
}
}
...
...
@@ -2527,15 +2533,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
List
<
TForecastLibrary
>
pushList
;
int
k
=
0
;
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
if
(
j
==
i
-
1
)
{
pushList
=
library
.
subList
(
k
,
library
.
size
());
}
else
{
pushList
=
library
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
initEkpPushFundParam
(
pushList
,
synFlag
,
selectVoMap
);
synchronized
(
this
)
{
if
(
j
==
i
-
1
)
{
pushList
=
library
.
subList
(
k
,
library
.
size
());
}
else
{
pushList
=
library
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
initEkpPushFundParam
(
pushList
,
synFlag
,
selectVoMap
);
}
}
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
d6265406
...
...
@@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.EkpDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
...
...
@@ -38,7 +39,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
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.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
...
...
@@ -84,6 +84,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
@Autowired
private
TPaymentInfoMapper
tPaymentInfoMapper
;
@Autowired
private
EkpDaprUtils
ekpDaprUtil
;
/**
* 收入明细表简单分页查询
*
...
...
@@ -317,62 +320,61 @@ 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
));
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
//收入更新
List
<
TIncome
>
updateList
=
new
ArrayList
<>();
for
(
TIncome
income
:
list
)
{
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
updateList
.
add
(
income
);
if
(
updateList
.
size
()
>=
CommonConstants
.
FIVES_INT
)
{
baseMapper
.
updateIncomeById
(
updateList
);
updateList
.
clear
();
}
}
else
{
if
(
Common
.
isNotNull
(
map
.
get
(
sendBack
))
&&
map
.
get
(
sendBack
)
>
0
)
{
int
i
=
map
.
get
(
sendBack
)
+
1
;
map
.
put
(
sendBack
,
i
);
idMap
.
put
(
sendBack
,
income
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updateIncomeById
(
updateList
);
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
entry
.
getKey
());
error
.
setNums
(
entry
.
getValue
());
tSendEkpErrorService
.
save
(
error
);
//管理费处理
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TIncome:
:
getFeeType
,
CommonConstants
.
ONE_STRING
));
if
(
count
>
0
)
{
List
<
TIncome
>
list
=
baseMapper
.
selectList
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TIncome:
:
getFeeType
,
CommonConstants
.
ONE_STRING
));
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
ONE_THOUSAND_INT
);
if
(!
list
.
isEmpty
())
{
List
<
TIncome
>
pushList
;
int
k
=
0
;
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
synchronized
(
this
)
{
if
(
j
==
i
-
1
)
{
pushList
=
list
.
subList
(
k
,
list
.
size
());
}
else
{
pushList
=
list
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
doJointSocialTask
.
asynchronousEkpIncomePush
(
pushList
);
}
break
;
}
}
else
{
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
}
}
}
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
idMap
.
get
(
entry
.
getKey
()));
error
.
setTitle
(
entry
.
getKey
());
error
.
setNums
(
entry
.
getValue
());
tSendEkpErrorService
.
save
(
error
);
}
if
(
Common
.
isNotNull
(
updateList
)){
baseMapper
.
updateIncomeById
(
updateList
);
//风险金处理
long
countRisk
=
baseMapper
.
selectCount
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TIncome:
:
getFeeType
,
CommonConstants
.
TWO_STRING
));
if
(
countRisk
>
0
)
{
List
<
TIncome
>
list
=
baseMapper
.
selectList
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TIncome:
:
getFeeType
,
CommonConstants
.
TWO_STRING
));
int
i
=
(
int
)
Math
.
ceil
((
double
)
countRisk
/
CommonConstants
.
ONE_THOUSAND_INT
);
if
(!
list
.
isEmpty
())
{
List
<
TIncome
>
pushList
;
int
k
=
0
;
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
synchronized
(
this
)
{
if
(
j
==
i
-
1
)
{
pushList
=
list
.
subList
(
k
,
list
.
size
());
}
else
{
pushList
=
list
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
doJointSocialTask
.
asynchronousEkpIncomeRiskPush
(
pushList
);
}
}
}
}
}
}
...
...
@@ -384,15 +386,21 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @return: java.lang.String
**/
private
String
getSendBack
(
TIncome
income
)
{
String
sendBack
;
String
sendBack
=
""
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
income
.
getFeeType
()))
{
EkpIncomeParamManage
sendParam
=
new
EkpIncomeParamManage
();
this
.
copyToEkpManage
(
income
,
sendParam
);
sendBack
=
ekpIncomeUtil
.
sendToEkpManage
(
sendParam
);
R
<
String
>
info
=
ekpDaprUtil
.
pushManagerInfoToEkp
(
sendParam
);
if
(!
Common
.
isEmpty
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
sendBack
=
info
.
getData
();
}
}
else
{
EkpIncomeParamRisk
sendParam
=
new
EkpIncomeParamRisk
();
this
.
copyToEkpRisk
(
income
,
sendParam
);
sendBack
=
ekpIncomeUtil
.
sendToEkpRisk
(
sendParam
);
R
<
String
>
info
=
ekpDaprUtil
.
pushRiskInfoToEkp
(
sendParam
);
if
(!
Common
.
isEmpty
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
sendBack
=
info
.
getData
();
}
}
return
sendBack
;
}
...
...
@@ -465,6 +473,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
sendParam
.
setFd_3adda320daef5a
(
"商险"
);
}
else
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"工资"
);
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"公积金"
);
}
else
{
sendParam
.
setFd_3adda320daef5a
(
"社保"
);
}
...
...
@@ -530,6 +540,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
sendParam
.
setFd_3adda320daef5a
(
"商险"
);
}
else
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"工资"
);
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"公积金"
);
}
else
{
sendParam
.
setFd_3adda320daef5a
(
"社保"
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
d6265406
...
...
@@ -83,7 +83,7 @@ public class DoJointSocialTask {
log
.
info
(
"推送收入到EKP-线程开始"
);
try
{
String
sendBack
=
this
.
getSendBack
(
income
);
if
((
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
&&
Common
.
isNotNull
(
income
.
getRedisKey
()))
{
if
((
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
19
)
&&
Common
.
isNotNull
(
income
.
getRedisKey
()))
{
List
<
TIncome
>
list
;
if
(
Common
.
isNotNull
(
income
.
getRedisKey
())
&&
Common
.
isNotNull
(
redisUtil
.
get
(
income
.
getRedisKey
())))
{
list
=
(
List
<
TIncome
>)
redisUtil
.
get
(
income
.
getRedisKey
());
...
...
@@ -94,7 +94,7 @@ public class DoJointSocialTask {
redisUtil
.
set
(
income
.
getRedisKey
(),
list
);
}
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
19
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
...
...
@@ -128,7 +128,7 @@ public class DoJointSocialTask {
log
.
info
(
"推送收入到EKP-线程开始"
);
try
{
String
sendBack
=
this
.
getSendBack
(
income
);
if
((
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
&&
Common
.
isNotNull
(
income
.
getRedisKey
()))
{
if
((
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
19
)
&&
Common
.
isNotNull
(
income
.
getRedisKey
()))
{
List
<
TIncome
>
list
;
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
income
.
getRedisKey
())))
{
list
=
(
List
<
TIncome
>)
redisUtil
.
get
(
income
.
getRedisKey
());
...
...
@@ -139,7 +139,7 @@ public class DoJointSocialTask {
redisUtil
.
set
(
income
.
getRedisKey
(),
list
);
}
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
19
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
...
...
@@ -181,7 +181,7 @@ public class DoJointSocialTask {
log
.
info
(
"推送收入到EKP-线程开始"
);
try
{
String
sendBack
=
this
.
getSendBack
(
income
);
if
((
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
&&
Common
.
isNotNull
(
income
.
getRedisKey
()))
{
if
((
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
19
)
&&
Common
.
isNotNull
(
income
.
getRedisKey
()))
{
List
<
TIncome
>
list
;
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
income
.
getRedisKey
())))
{
list
=
(
List
<
TIncome
>)
redisUtil
.
get
(
income
.
getRedisKey
());
...
...
@@ -192,7 +192,7 @@ public class DoJointSocialTask {
redisUtil
.
set
(
income
.
getRedisKey
(),
list
);
}
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
19
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
...
...
@@ -236,7 +236,7 @@ public class DoJointSocialTask {
try
{
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
19
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
...
...
@@ -276,15 +276,21 @@ public class DoJointSocialTask {
* @return: java.lang.String
**/
private
String
getSendBack
(
TIncome
income
)
{
String
sendBack
;
String
sendBack
=
""
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
income
.
getFeeType
()))
{
EkpIncomeParamManage
sendParam
=
new
EkpIncomeParamManage
();
this
.
copyToEkpManage
(
income
,
sendParam
);
sendBack
=
ekpIncomeUtil
.
sendToEkpManage
(
sendParam
);
R
<
String
>
info
=
ekpDaprUtil
.
pushManagerInfoToEkp
(
sendParam
);
if
(!
Common
.
isEmpty
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
sendBack
=
info
.
getData
();
}
}
else
{
EkpIncomeParamRisk
sendParam
=
new
EkpIncomeParamRisk
();
this
.
copyToEkpRisk
(
income
,
sendParam
);
sendBack
=
ekpIncomeUtil
.
sendToEkpRisk
(
sendParam
);
R
<
String
>
info
=
ekpDaprUtil
.
pushRiskInfoToEkp
(
sendParam
);
if
(!
Common
.
isEmpty
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
sendBack
=
info
.
getData
();
}
}
return
sendBack
;
}
...
...
@@ -323,6 +329,8 @@ public class DoJointSocialTask {
sendParam
.
setFd_3adda320daef5a
(
"商险"
);
}
else
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"工资"
);
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"公积金"
);
}
else
{
sendParam
.
setFd_3adda320daef5a
(
"社保"
);
}
...
...
@@ -388,6 +396,8 @@ public class DoJointSocialTask {
sendParam
.
setFd_3adda320daef5a
(
"商险"
);
}
else
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"工资"
);
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"公积金"
);
}
else
{
sendParam
.
setFd_3adda320daef5a
(
"社保"
);
}
...
...
@@ -672,27 +682,29 @@ public class DoJointSocialTask {
socialParam
.
setYgFlag
(
CommonConstants
.
ZERO_STRING
);
insertList
.
add
(
socialParam
);
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushSocialInfoToEkp
(
insertList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
String
idList
=
vo
.
getPaymentIdSum
();
if
(
Common
.
isNotNull
(
idList
))
{
paymentInfoMapper
.
updateBySocialPaymentList
(
idList
.
substring
(
0
,
idList
.
length
()-
1
));
}
List
<
TPaymentSocialPush
>
list
=
vo
.
getUnPushInfo
();
if
(!
list
.
isEmpty
())
{
socialPushService
.
saveBatch
(
list
);
if
(!
insertList
.
isEmpty
())
{
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushSocialInfoToEkp
(
insertList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
String
idList
=
vo
.
getPaymentIdSum
();
if
(
Common
.
isNotNull
(
idList
))
{
paymentInfoMapper
.
updateBySocialPaymentList
(
idList
.
substring
(
0
,
idList
.
length
()
-
1
));
}
List
<
TPaymentSocialPush
>
list
=
vo
.
getUnPushInfo
();
if
(!
list
.
isEmpty
())
{
socialPushService
.
saveBatch
(
list
);
}
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setCreateUserName
(
"社保实缴费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
"社保明细批量保存失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
save
(
error
);
}
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setCreateUserName
(
"社保实缴费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
"社保明细批量保存失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
save
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
...
...
@@ -842,22 +854,24 @@ public class DoJointSocialTask {
}
paramList
.
add
(
fundParam
);
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushFundInfoToEkp
(
paramList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
if
(!
Common
.
isEmpty
(
vo
.
getPaymentIds
()))
{
paymentInfoMapper
.
batchUpdateFundPaymentByList
(
vo
.
getPaymentIds
());
if
(!
paramList
.
isEmpty
())
{
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushFundInfoToEkp
(
paramList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
if
(!
Common
.
isEmpty
(
vo
.
getPaymentIds
()))
{
paymentInfoMapper
.
batchUpdateFundPaymentByList
(
vo
.
getPaymentIds
());
}
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setCreateUserName
(
"公积金实缴费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
"公积金批量插入失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
save
(
error
);
}
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setCreateUserName
(
"公积金实缴费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
"公积金批量插入失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
save
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
...
...
@@ -1136,21 +1150,23 @@ public class DoJointSocialTask {
socialParam
.
setFd_3b5cc58d1a70fe
(
adress
.
toString
());
insertList
.
add
(
socialParam
);
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushSocialInfoToEkp
(
insertList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
List
<
String
>
idList
=
vo
.
getPaymentIds
();
forecastLibraryMapper
.
updatePushStatus
(
idList
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
"社保预估明细批量保存失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
save
(
error
);
if
(!
insertList
.
isEmpty
())
{
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushSocialInfoToEkp
(
insertList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
List
<
String
>
idList
=
vo
.
getPaymentIds
();
forecastLibraryMapper
.
updatePushStatus
(
idList
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
"社保预估明细批量保存失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
save
(
error
);
}
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
...
...
@@ -1320,21 +1336,23 @@ public class DoJointSocialTask {
fundParam
.
setFd_3b5cc487bb46fa
(
adress
.
toString
());
insertList
.
add
(
fundParam
);
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushFundInfoToEkp
(
insertList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
List
<
String
>
idList
=
vo
.
getPaymentIds
();
forecastLibraryMapper
.
updatePushStatus
(
idList
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"公积金预估费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
"公积金预估明细批量保存失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
save
(
error
);
if
(!
insertList
.
isEmpty
())
{
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushFundInfoToEkp
(
insertList
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
List
<
String
>
idList
=
vo
.
getPaymentIds
();
forecastLibraryMapper
.
updatePushStatus
(
idList
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"公积金预估费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
"公积金预估明细批量保存失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
save
(
error
);
}
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
...
...
@@ -1363,7 +1381,7 @@ public class DoJointSocialTask {
try
{
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
19
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
...
...
@@ -1399,7 +1417,7 @@ public class DoJointSocialTask {
try
{
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
19
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
...
...
@@ -1430,6 +1448,73 @@ public class DoJointSocialTask {
log
.
info
(
"推送收入到EKP结束"
);
}
/**
* @Description: 管理费批量推送
* @Author: huyc
* @Date: 2024-3-19
* @return: void
**/
@Async
public
void
asynchronousEkpIncomePush
(
List
<
TIncome
>
pushList
)
{
List
<
EkpIncomeParamManage
>
incomeList
=
new
ArrayList
<>();
for
(
TIncome
income
:
pushList
)
{
EkpIncomeParamManage
sendParam
=
new
EkpIncomeParamManage
();
this
.
copyToEkpManage
(
income
,
sendParam
);
incomeList
.
add
(
sendParam
);
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
jobPushManagerInfoToEkp
(
incomeList
);
if
(!
Common
.
isEmpty
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
List
<
String
>
idList
=
vo
.
getPaymentIds
();
if
(
Common
.
isNotNull
(
idList
))
{
incomeMapper
.
updateIncomeByIdList
(
idList
);
}
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
pushList
.
get
(
0
).
getId
());
error
.
setTitle
(
"管理费批量推送失败"
);
error
.
setNums
(
1
);
tSendEkpErrorService
.
save
(
error
);
}
}
/**
* @Description: 风险金批量推送
* @Author: huyc
* @Date: 2024-3-19
* @return: void
**/
@Async
public
void
asynchronousEkpIncomeRiskPush
(
List
<
TIncome
>
pushList
)
{
List
<
EkpIncomeParamRisk
>
incomeList
=
new
ArrayList
<>();
for
(
TIncome
income
:
pushList
)
{
EkpIncomeParamRisk
sendParam
=
new
EkpIncomeParamRisk
();
this
.
copyToEkpRisk
(
income
,
sendParam
);
incomeList
.
add
(
sendParam
);
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
jobpushRiskInfoToEkp
(
incomeList
);
if
(!
Common
.
isEmpty
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
EkpSocialPushInfoVo
vo
=
info
.
getData
();
List
<
String
>
idList
=
vo
.
getPaymentIds
();
if
(
Common
.
isNotNull
(
idList
))
{
incomeMapper
.
updateIncomeByIdList
(
idList
);
}
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
pushList
.
get
(
0
).
getId
());
error
.
setTitle
(
"风险金批量推送失败"
);
error
.
setNums
(
1
);
tSendEkpErrorService
.
save
(
error
);
}
}
public
void
asynchronousEkpForecastFundAsso
(
List
<
TForecastLibrary
>
unPushInfo
,
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
)
{
initEkpForecastFund
(
unPushInfo
,
selectVoMap
);
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TIncomeMapper.xml
View file @
d6265406
...
...
@@ -318,4 +318,16 @@
</foreach>
</update>
<!-- ekp收入更新 -->
<update
id=
"updateIncomeByIdList"
>
update t_income p
set p.SEND_STATUS = '1'
,p.SEND_MONTH = DATE_FORMAT(CURRENT_DATE(),'%Y%m')
,p.SEND_TIME = now()
where p.id in
<foreach
item=
"item"
index=
"index"
collection=
"list"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
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