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
19be885b
Commit
19be885b
authored
Mar 19, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
明细接口改造
parent
83211816
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
329 additions
and
54 deletions
+329
-54
EkpDaprUtils.java
...ifu/cloud/plus/v1/yifu/common/dapr/util/EkpDaprUtils.java
+23
-0
TEkpManagerInfoController.java
...oud/plus/v1/ekp/controller/TEkpManagerInfoController.java
+16
-0
TEkpRiskInfoController.java
.../cloud/plus/v1/ekp/controller/TEkpRiskInfoController.java
+17
-0
EkpManagerInfoService.java
...yifu/cloud/plus/v1/ekp/service/EkpManagerInfoService.java
+6
-0
EkpRiskInfoService.java
...om/yifu/cloud/plus/v1/ekp/service/EkpRiskInfoService.java
+6
-0
EkpManagerInfoServiceImpl.java
...d/plus/v1/ekp/service/impl/EkpManagerInfoServiceImpl.java
+66
-2
EkpRiskInfoServiceImpl.java
...loud/plus/v1/ekp/service/impl/EkpRiskInfoServiceImpl.java
+64
-0
TIncomeMapper.java
.../yifu/cloud/plus/v1/yifu/social/mapper/TIncomeMapper.java
+2
-0
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+50
-52
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+67
-0
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 @
19be885b
...
...
@@ -69,6 +69,17 @@ public class EkpDaprUtils {
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 新增风险金明细数据
...
...
@@ -79,4 +90,16 @@ public class EkpDaprUtils {
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-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/TEkpManagerInfoController.java
View file @
19be885b
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
;
...
...
@@ -10,6 +11,8 @@ 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
;
/**
*
*
...
...
@@ -36,4 +39,17 @@ public class TEkpManagerInfoController {
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
View file @
19be885b
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
;
...
...
@@ -10,6 +11,8 @@ 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
;
/**
*
...
...
@@ -37,4 +40,18 @@ public class TEkpRiskInfoController {
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/service/EkpManagerInfoService.java
View file @
19be885b
...
...
@@ -2,7 +2,11 @@ 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
;
/**
*
...
...
@@ -13,4 +17,6 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage;
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
View file @
19be885b
...
...
@@ -2,7 +2,11 @@ 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
;
/**
*
...
...
@@ -13,4 +17,6 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
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/impl/EkpManagerInfoServiceImpl.java
View file @
19be885b
...
...
@@ -6,6 +6,7 @@ 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
;
...
...
@@ -14,6 +15,8 @@ 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
;
/**
...
...
@@ -66,11 +69,72 @@ public class EkpManagerInfoServiceImpl extends ServiceImpl<EkpManagerInfoMapper,
int
i
=
baseMapper
.
insert
(
managerInfo
);
return
i
<=
0
?
null
:
managerInfo
.
getFdId
();
}
catch
(
Exception
e
)
{
log
.
error
(
"管理费明细推送失败:"
,
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
());
...
...
@@ -109,7 +173,7 @@ public class EkpManagerInfoServiceImpl extends ServiceImpl<EkpManagerInfoMapper,
//收款状态
managerInfo
.
setFd_3adfefaaef583e
(
"未收"
);
//单号
managerInfo
.
setFd_3adfef7f5d2b52
(
"GLF"
+
LocalDateTimeUtils
.
formatTime
(
LocalDateTime
.
now
(),
DateUtil
.
DATE_PATTERN
)
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
View file @
19be885b
...
...
@@ -6,6 +6,7 @@ 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
;
...
...
@@ -14,6 +15,8 @@ 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
;
/**
...
...
@@ -70,6 +73,67 @@ public class EkpRiskInfoServiceImpl extends ServiceImpl<EkpRiskInfoMapper, EkpRi
}
}
/**
* //@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
());
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TIncomeMapper.java
View file @
19be885b
...
...
@@ -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/TIncomeServiceImpl.java
View file @
19be885b
...
...
@@ -39,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
;
...
...
@@ -321,62 +320,61 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
@Override
public
void
pushDetail
()
{
//管理费处理
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
));
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
()
==
19
)
{
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
();
}
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TIncome:
:
getFeeType
,
CommonConstants
.
ONE_STRING
));
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_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
{
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
);
}
break
;
pushList
=
list
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
doJointSocialTask
.
asynchronousEkpIncomePush
(
pushList
);
}
}
}
}
}
//风险金处理
long
countRisk
=
baseMapper
.
selectCount
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TIncome:
:
getFeeType
,
CommonConstants
.
ZERO_STRING
));
if
(
countRisk
>
0
)
{
List
<
TIncome
>
list
=
baseMapper
.
selectList
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TIncome:
:
getFeeType
,
CommonConstants
.
ZERO_STRING
));
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_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
{
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
pushList
=
list
.
subList
(
k
,
k
+
1000
);
}
k
=
k
+
1000
;
if
(
Common
.
isNotNull
(
pushList
))
{
//推送数据封装并推送
doJointSocialTask
.
asynchronousEkpIncomeRiskPush
(
pushList
);
}
}
}
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
);
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
19be885b
...
...
@@ -1444,6 +1444,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 @
19be885b
...
...
@@ -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