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
d9e5f5d3
Commit
d9e5f5d3
authored
Sep 06, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收入优化
parent
7214fabe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
200 additions
and
46 deletions
+200
-46
EkpIncomeUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
+40
-7
EkpSalaryUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
+6
-8
EkpIncomeParam.java
...va/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParam.java
+0
-16
EkpIncomeParamManage.java
.../yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParamManage.java
+29
-0
EkpIncomeParamRisk.java
...om/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParamRisk.java
+29
-0
ekpIncomeConfig.properties
...-common-ekp/src/main/resources/ekpIncomeConfig.properties
+3
-3
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+5
-5
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+88
-7
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
View file @
d9e5f5d3
...
@@ -5,6 +5,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...
@@ -5,6 +5,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpIncomeProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpIncomeProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
import
io.micrometer.core.instrument.util.StringUtils
;
import
io.micrometer.core.instrument.util.StringUtils
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.codehaus.jackson.map.ObjectMapper
;
...
@@ -29,13 +31,12 @@ public class EkpIncomeUtil {
...
@@ -29,13 +31,12 @@ public class EkpIncomeUtil {
/**
/**
* @param param 内容传参
* @param param 内容传参
* @param type 1:管理费2:风险金
* @Description:
* @Description:
* @Author: hgw
* @Author: hgw
* @Date: 2022/9/5 16:12
* @Date: 2022/9/5 16:12
* @return: java.lang.String
* @return: java.lang.String
**/
**/
public
String
sendToE
KP
(
EkpIncomeParam
param
,
String
type
)
{
public
String
sendToE
kpManage
(
EkpIncomeParamManage
param
)
{
log
.
info
(
"推送EKP开始--收入明细数据"
);
log
.
info
(
"推送EKP开始--收入明细数据"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
try
{
try
{
...
@@ -48,13 +49,45 @@ public class EkpIncomeUtil {
...
@@ -48,13 +49,45 @@ public class EkpIncomeUtil {
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getDocSubject
());
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getDocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelIdManage
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelIdManage
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowIdManage
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowIdManage
());
wholeForm
.
add
(
"formValues"
,
formValues
);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword") 是VO,则使用APPLICATION_JSON
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<>(
wholeForm
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
))
{
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
}
else
{
}
else
{
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelIdRisk
()
);
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowIdRisk
())
;
return
body
;
}
}
}
catch
(
Exception
e
)
{
log
.
info
(
e
.
getMessage
());
return
null
;
}
}
public
String
sendToEkpRisk
(
EkpIncomeParamRisk
param
)
{
log
.
info
(
"推送EKP开始--收入明细数据"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
param
);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject
loginName
=
new
JSONObject
();
loginName
.
append
(
"LoginName"
,
ekpProperties
.
getLoginName
());
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getDocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelIdRisk
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowIdRisk
());
wholeForm
.
add
(
"formValues"
,
formValues
);
wholeForm
.
add
(
"formValues"
,
formValues
);
HttpHeaders
headers
=
new
HttpHeaders
();
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
View file @
d9e5f5d3
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
util
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
util
;
import
cn.hutool.json.JSONObject
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
...
@@ -12,7 +13,6 @@ import org.springframework.http.*;
...
@@ -12,7 +13,6 @@ import org.springframework.http.*;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
cn.hutool.json.JSONObject
;
/**
/**
* @Author fxj
* @Author fxj
...
@@ -35,25 +35,23 @@ public class EkpSalaryUtil {
...
@@ -35,25 +35,23 @@ public class EkpSalaryUtil {
//把ModelingAppModelParameterAddForm转换成MultiValueMap
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject
loginName
=
new
JSONObject
();
JSONObject
loginName
=
new
JSONObject
();
loginName
.
append
(
"LoginName"
,
ekpProperties
.
getLoginName
());
loginName
.
append
(
"LoginName"
,
ekpProperties
.
getLoginName
());
String
loginData
=
new
ObjectMapper
().
writeValueAsString
(
loginName
);
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") )
;
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") )
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getDocSubject
());
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getDocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
//wholeForm.add("docCreator", loginData)
;
//wholeForm.add("docCreator", loginData)
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelId
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelId
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowId
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowId
());
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"))
;
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"))
wholeForm
.
add
(
"formValues"
,
formValues
);
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") )
System
.
out
.
println
(
"wholeForm:"
+
wholeForm
);
HttpHeaders
headers
=
new
HttpHeaders
();
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>
>(
wholeForm
,
headers
);
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<>(
wholeForm
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
String
body
=
obj
.
getBody
();
String
body
=
obj
.
getBody
();
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParam.java
View file @
d9e5f5d3
...
@@ -48,14 +48,6 @@ public class EkpIncomeParam implements Serializable {
...
@@ -48,14 +48,6 @@ public class EkpIncomeParam implements Serializable {
* 身份证号
* 身份证号
**/
**/
private
String
fd_3adfef94dcdbb4
;
private
String
fd_3adfef94dcdbb4
;
/**
* 生成月份
**/
private
String
fd_3ae0c3032cffc8
;
/**
* 结算月份
**/
private
String
fd_3ae0c3044e5958
;
/**
/**
* 管理费、风险金金额
* 管理费、风险金金额
**/
**/
...
@@ -72,12 +64,4 @@ public class EkpIncomeParam implements Serializable {
...
@@ -72,12 +64,4 @@ public class EkpIncomeParam implements Serializable {
* 收款状态
* 收款状态
**/
**/
private
String
fd_3adfefaaef583e
;
private
String
fd_3adfefaaef583e
;
/**
* 结算单号
**/
private
String
fd_3aead7204bb594
;
/**
* 收款单号
**/
private
String
fd_3aeae59b70fe5a
;
}
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParamManage.java
0 → 100644
View file @
d9e5f5d3
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
/**
* @Author hgw
* @Date 2022-9-6 15:06:24
* @Description 收入明细对应参数
* @Version 1.0
*/
@Data
public
class
EkpIncomeParamManage
extends
EkpIncomeParam
{
/**
* 生成月份
**/
private
String
fd_3ae0c23b2e9a92
;
/**
* 结算月份
**/
private
String
fd_3ae0c23cb3fccc
;
/**
* 结算单号
**/
private
String
fd_3aead3c68b1078
;
/**
* 收款单号
**/
private
String
fd_3aeae58b14691c
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParamRisk.java
0 → 100644
View file @
d9e5f5d3
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
/**
* @Author hgw
* @Date 2022-9-6 15:06:24
* @Description 收入明细对应参数
* @Version 1.0
*/
@Data
public
class
EkpIncomeParamRisk
extends
EkpIncomeParam
{
/**
* 生成月份
**/
private
String
fd_3ae0c3032cffc8
;
/**
* 结算月份
**/
private
String
fd_3ae0c3044e5958
;
/**
* 结算单号
**/
private
String
fd_3aead7204bb594
;
/**
* 收款单号
**/
private
String
fd_3aeae59b70fe5a
;
}
yifu-common/yifu-common-ekp/src/main/resources/ekpIncomeConfig.properties
View file @
d9e5f5d3
income.url
=
http://119.96.227.251
.
8080/api/sys-modeling/appModelRestService/addModel
income.url
=
http://119.96.227.251
:
8080/api/sys-modeling/appModelRestService/addModel
income.fdModelIdManage
=
181d76db26e419a88dba97b0c406689e
income.fdModelIdManage
=
181d76db26e419a88dba97b0c406689e
income.fdFlowIdManage
=
182d3b6e522b2690119e70d4ff082136
income.fdFlowIdManage
=
182d3b6e522b2690119e70d4ff082136
income.fdModelIdRisk
=
181d76db26e41
9a88dba97b0c406689e
income.fdModelIdRisk
=
181d76db26e41
12e14b9bb4274d06ba1
income.fdFlowIdRisk
=
182d3b
6e522b2690119e70d4ff082136
income.fdFlowIdRisk
=
182d3b
dadab3a52be024e154e99b5f8b
income.docStatus
=
20
income.docStatus
=
20
income.loginName
=
admin
income.loginName
=
admin
income.docSubject
=
\u6536\u5165\u
660E
\u
7EC6
\u6570\u
636E
\u
63A5
\u
53E3
income.docSubject
=
\u6536\u5165\u
660E
\u
7EC6
\u6570\u
636E
\u
63A5
\u
53E3
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
d9e5f5d3
...
@@ -444,7 +444,7 @@
...
@@ -444,7 +444,7 @@
<!-- 获取薪资明细 -->
<!-- 获取薪资明细 -->
<select
id=
"getEkpSalaryParamList"
resultMap=
"ekpSalaryParamVoMap"
>
<select
id=
"getEkpSalaryParamList"
resultMap=
"ekpSalaryParamVoMap"
>
select
select
a.id
fd_id
a.id
,ifnull(a.DEPT_NO,'') fd_3adfedf98ccba2
,ifnull(a.DEPT_NO,'') fd_3adfedf98ccba2
,ifnull(a.DEPT_NAME,'') fd_3adfedf9d2bf1c
,ifnull(a.DEPT_NAME,'') fd_3adfedf9d2bf1c
,'' fd_3adfedfa4410aa
,'' fd_3adfedfa4410aa
...
@@ -462,16 +462,16 @@
...
@@ -462,16 +462,16 @@
,if(a.FUND_PRIORITY='1','缴纳月','生成月') fd_3adfedff3a7430
,if(a.FUND_PRIORITY='1','缴纳月','生成月') fd_3adfedff3a7430
,if(a.OWN_FLAG='1','是','否') fd_3adfee0009d070
,if(a.OWN_FLAG='1','是','否') fd_3adfee0009d070
,if(a.ANNUAL_BONUS_TYPE='1','单独','合并') fd_3adfee01dea2fa
,if(a.ANNUAL_BONUS_TYPE='1','单独','合并') fd_3adfee01dea2fa
,ifnull(a.RELAY_SALARY,'') fd_3adfee12cb8840
,ifnull(a.RELAY_SALARY,'
0
') fd_3adfee12cb8840
,ifnull(pdeduction.SALARY_MONEY,'') fd_3adfee1374ed7a
,ifnull(pdeduction.SALARY_MONEY,'
0
') fd_3adfee1374ed7a
,ifnull(ifnull(withholidingUnitSocial.SALARY_MONEY,unitSocial.SALARY_MONEY),'') fd_3adfee1e2b2f78
,ifnull(ifnull(withholidingUnitSocial.SALARY_MONEY,unitSocial.SALARY_MONEY),'') fd_3adfee1e2b2f78
,ifnull(ifnull(withholidingPersonSocial.SALARY_MONEY,personalSocial.SALARY_MONEY),'') fd_3adfee1e88723e
,ifnull(ifnull(withholidingPersonSocial.SALARY_MONEY,personalSocial.SALARY_MONEY),'') fd_3adfee1e88723e
,ifnull(ifnull(withholidingUnitFund.SALARY_MONEY,unitFund.SALARY_MONEY),'') fd_3adfee1ee24680
,ifnull(ifnull(withholidingUnitFund.SALARY_MONEY,unitFund.SALARY_MONEY),'') fd_3adfee1ee24680
,ifnull(ifnull(withholidingPersonFund.SALARY_MONEY,personalFund.SALARY_MONEY),'') fd_3adfee1f32fa24
,ifnull(ifnull(withholidingPersonFund.SALARY_MONEY,personalFund.SALARY_MONEY),'') fd_3adfee1f32fa24
,ifnull(a.SALARY_TAX,'') fd_3adfee1f901c46
,ifnull(a.SALARY_TAX,'
0
') fd_3adfee1f901c46
,'' fd_3adfee1ff1ca6a
,'' fd_3adfee1ff1ca6a
,'' fd_3adfee203f86b2
,'' fd_3adfee203f86b2
,ifnull(a.ACTUAL_SALARY,'') fd_3adfee20fe5ba4
,ifnull(a.ACTUAL_SALARY,'
0
') fd_3adfee20fe5ba4
,'' fd_3adfee21802434
,'' fd_3adfee21802434
,'' fd_3adfee4ba5ad36
,'' fd_3adfee4ba5ad36
,'' fd_3adfee4c0c59ee
,'' fd_3adfee4c0c59ee
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
d9e5f5d3
...
@@ -32,6 +32,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...
@@ -32,6 +32,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper
;
...
@@ -272,10 +274,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -272,10 +274,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
public
void
pushDetail
()
{
public
void
pushDetail
()
{
List
<
TIncome
>
list
=
baseMapper
.
selectList
(
Wrappers
.<
TIncome
>
query
().
lambda
()
List
<
TIncome
>
list
=
baseMapper
.
selectList
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
));
String
sendBack
;
for
(
TIncome
income
:
list
)
{
for
(
TIncome
income
:
list
)
{
EkpIncomeParam
sendParam
=
new
EkpIncomeParam
();
sendBack
=
this
.
getSendBack
(
income
);
this
.
copyToEkp
(
income
,
sendParam
);
String
sendBack
=
ekpIncomeUtil
.
sendToEKP
(
sendParam
,
income
.
getFeeType
());
income
.
setSendTime
(
new
Date
());
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
...
@@ -286,15 +287,34 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -286,15 +287,34 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
}
}
}
/**
* @param income
* @Description: 判断类型发送
* @Author: hgw
* @Date: 2022/9/6 15:15
* @return: java.lang.String
**/
private
String
getSendBack
(
TIncome
income
)
{
String
sendBack
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
income
.
getFeeType
()))
{
EkpIncomeParamManage
sendParam
=
new
EkpIncomeParamManage
();
this
.
copyToEkpManage
(
income
,
sendParam
);
sendBack
=
ekpIncomeUtil
.
sendToEkpManage
(
sendParam
);
}
else
{
EkpIncomeParamRisk
sendParam
=
new
EkpIncomeParamRisk
();
this
.
copyToEkpRisk
(
income
,
sendParam
);
sendBack
=
ekpIncomeUtil
.
sendToEkpRisk
(
sendParam
);
}
return
sendBack
;
}
// 复制并保存
// 复制并保存
private
boolean
saveIncome
(
TIncomeDetail
tIncomeDetail
)
{
private
boolean
saveIncome
(
TIncomeDetail
tIncomeDetail
)
{
TIncome
income
=
new
TIncome
();
TIncome
income
=
new
TIncome
();
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
this
.
save
(
income
);
this
.
save
(
income
);
EkpIncomeParam
sendParam
=
new
EkpIncomeParam
();
String
sendBack
=
this
.
getSendBack
(
income
);
this
.
copyToEkp
(
income
,
sendParam
);
String
sendBack
=
ekpIncomeUtil
.
sendToEKP
(
sendParam
,
income
.
getFeeType
());
income
.
setSendTime
(
new
Date
());
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
...
@@ -312,7 +332,68 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -312,7 +332,68 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @Date: 2022/9/5 16:57
* @Date: 2022/9/5 16:57
* @return: void
* @return: void
**/
**/
private
void
copyToEkp
(
TIncome
income
,
EkpIncomeParam
sendParam
)
{
private
void
copyToEkpManage
(
TIncome
income
,
EkpIncomeParamManage
sendParam
)
{
// 项目编码
sendParam
.
setFd_3adfef5e5b9d34
(
income
.
getDeptNo
());
// 项目名称
sendParam
.
setFd_3adfef5eb6691c
(
income
.
getDeptName
());
// 单号
sendParam
.
setFd_3adfef7f5d2b52
(
""
);
// 客户编码
sendParam
.
setFd_3adfef80202ab2
(
income
.
getUnitNo
());
// 客户名称
sendParam
.
setFd_3adfef7fc1c886
(
income
.
getUnitName
());
// 类型:单选(人,人次,比例,固定值,总额)
// feeMode收费方式:1按比例2金额-人数3金额-人次
if
(
CommonConstants
.
ONE_STRING
.
equals
(
income
.
getFeeMode
()))
{
sendParam
.
setFd_3adda3037e3bda
(
"比例"
);
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
income
.
getFeeMode
()))
{
sendParam
.
setFd_3adda3037e3bda
(
"人"
);
}
else
{
sendParam
.
setFd_3adda3037e3bda
(
"人次"
);
}
// 产生来源:单选(社保,工资,商险)
// sourceType1社保2公积金3商险4薪资
if
(
CommonConstants
.
THREE_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"商险"
);
}
else
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
income
.
getSourceType
()))
{
sendParam
.
setFd_3adda320daef5a
(
"工资"
);
}
else
{
sendParam
.
setFd_3adda320daef5a
(
"社保"
);
}
// 姓名
sendParam
.
setFd_3adfef948da848
(
income
.
getEmpName
());
// 身份证号
sendParam
.
setFd_3adfef94dcdbb4
(
income
.
getEmpIdcard
());
// 生成月份
if
(
Common
.
isEmpty
(
income
.
getCreateMonth
())
||
income
.
getCreateMonth
().
length
()
!=
6
)
{
sendParam
.
setFd_3ae0c23b2e9a92
(
"1970-02"
);
}
else
{
sendParam
.
setFd_3ae0c23b2e9a92
(
income
.
getCreateMonth
().
substring
(
0
,
4
)
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
income
.
getCreateMonth
().
substring
(
4
,
6
));
}
// 结算月份
if
(
Common
.
isEmpty
(
income
.
getPayMonth
())
||
income
.
getPayMonth
().
length
()
!=
6
)
{
sendParam
.
setFd_3ae0c23cb3fccc
(
"1970-02"
);
}
else
{
sendParam
.
setFd_3ae0c23cb3fccc
(
income
.
getPayMonth
().
substring
(
0
,
4
)
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
income
.
getPayMonth
().
substring
(
4
,
6
));
}
// 管理费、风险金金额
sendParam
.
setFd_3adfef963bae28
(
String
.
valueOf
(
income
.
getMoney
()));
// 应收
sendParam
.
setFd_3adfefa3daae72
(
String
.
valueOf
(
income
.
getMoney
()));
// 结算状态
sendParam
.
setFd_3adfefaaa3bbd0
(
"未结算"
);
// 收款状态
sendParam
.
setFd_3adfefaaef583e
(
"未收"
);
// 结算单号
sendParam
.
setFd_3aead3c68b1078
(
""
);
// 收款单号
sendParam
.
setFd_3aeae58b14691c
(
""
);
}
private
void
copyToEkpRisk
(
TIncome
income
,
EkpIncomeParamRisk
sendParam
)
{
// 项目编码
// 项目编码
sendParam
.
setFd_3adfef5e5b9d34
(
income
.
getDeptNo
());
sendParam
.
setFd_3adfef5e5b9d34
(
income
.
getDeptNo
());
// 项目名称
// 项目名称
...
...
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