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
ddf5e235
Commit
ddf5e235
authored
Mar 18, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
明细接口改造
parent
a4d3365b
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
157 additions
and
10 deletions
+157
-10
EkpDaprUtils.java
...ifu/cloud/plus/v1/yifu/common/dapr/util/EkpDaprUtils.java
+12
-5
TEkpRiskInfoController.java
.../cloud/plus/v1/ekp/controller/TEkpRiskInfoController.java
+17
-0
EkpRiskInfoMapper.java
.../com/yifu/cloud/plus/v1/ekp/mapper/EkpRiskInfoMapper.java
+8
-0
EkpRiskInfoService.java
...om/yifu/cloud/plus/v1/ekp/service/EkpRiskInfoService.java
+2
-0
EkpManagerInfoServiceImpl.java
...d/plus/v1/ekp/service/impl/EkpManagerInfoServiceImpl.java
+1
-1
EkpRiskInfoServiceImpl.java
...loud/plus/v1/ekp/service/impl/EkpRiskInfoServiceImpl.java
+95
-2
EkpRiskInfoMapper.xml
...u-ekp-biz/src/main/resources/mapper/EkpRiskInfoMapper.xml
+14
-0
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+4
-1
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+4
-1
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/EkpDaprUtils.java
View file @
ddf5e235
...
...
@@ -5,10 +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.EkpIncomeParamManage
;
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
;
...
...
@@ -61,7 +58,6 @@ public class EkpDaprUtils {
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/ekpSalaryPush/inner/pushSalaryInfoToEkp"
,
JSON
.
toJSONString
(
unPushList
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huyc
* @Description 新增管理费明细数据
...
...
@@ -72,4 +68,15 @@ public class EkpDaprUtils {
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 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
);
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/TEkpRiskInfoController.java
View file @
ddf5e235
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
controller
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpRiskInfoService
;
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
;
...
...
@@ -20,4 +24,17 @@ import org.springframework.web.bind.annotation.RestController;
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
);
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/mapper/EkpRiskInfoMapper.java
View file @
ddf5e235
...
...
@@ -2,7 +2,9 @@ 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
;
/**
*
...
...
@@ -13,4 +15,10 @@ import org.apache.ibatis.annotations.Mapper;
@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/service/EkpRiskInfoService.java
View file @
ddf5e235
...
...
@@ -2,6 +2,7 @@ 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.yifu.ekp.vo.EkpIncomeParamRisk
;
/**
*
...
...
@@ -11,4 +12,5 @@ import com.yifu.cloud.plus.v1.ekp.entity.EkpRiskInfo;
*/
public
interface
EkpRiskInfoService
extends
IService
<
EkpRiskInfo
>
{
String
pushRiskInfoToEkp
(
EkpIncomeParamRisk
incomeParam
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpManagerInfoServiceImpl.java
View file @
ddf5e235
...
...
@@ -25,7 +25,7 @@ import java.util.Optional;
public
class
EkpManagerInfoServiceImpl
extends
ServiceImpl
<
EkpManagerInfoMapper
,
EkpManagerInfo
>
implements
EkpManagerInfoService
{
/**
* //@Description:
工资
明细推送至ekp
* //@Description:
管理费
明细推送至ekp
* //@Author: huyc
* //@Date: 2024-3-14
* //@return: void
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpRiskInfoServiceImpl.java
View file @
ddf5e235
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.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.Optional
;
/**
*
*
* @author huyc
* @date 2024-03-13 16:14:37
*/
...
...
@@ -18,4 +24,91 @@ import org.springframework.stereotype.Service;
@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
;
}
}
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/resources/mapper/EkpRiskInfoMapper.xml
View file @
ddf5e235
...
...
@@ -52,4 +52,18 @@
<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-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
ddf5e235
...
...
@@ -399,7 +399,10 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
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
;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
ddf5e235
...
...
@@ -287,7 +287,10 @@ public class DoJointSocialTask {
}
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
;
}
...
...
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