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
6097c0b7
Commit
6097c0b7
authored
Aug 31, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
05170560
ec4ce452
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
405 additions
and
7 deletions
+405
-7
EkpIncomeProperties.java
...fu.cloud.plus.v1/yifu/ekp/config/EkpIncomeProperties.java
+33
-0
EkpIncomeUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
+67
-0
EkpIncomeParam.java
...va/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParam.java
+252
-0
ekpIncomeConfig.properties
...-common-ekp/src/main/resources/ekpIncomeConfig.properties
+8
-0
OrderConstants.java
...fu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
+8
-0
TOrderMapper.java
...om/yifu/cloud/plus/v1/yifu/order/mapper/TOrderMapper.java
+4
-2
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+28
-2
TOrderMapper.xml
...yifu-order-biz/src/main/resources/mapper/TOrderMapper.xml
+5
-3
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/config/EkpIncomeProperties.java
0 → 100644
View file @
6097c0b7
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
/**
* @Author fxj
* @Description 薪资明细对接
* @Date 11:57 2022/8/22
* @Param
* @return
**/
@Data
@Component
@PropertySource
(
"classpath:ekpIncomeConfig.properties"
)
@ConfigurationProperties
(
value
=
"income"
,
ignoreInvalidFields
=
false
)
public
class
EkpIncomeProperties
{
String
url
;
String
fdModelId
;
String
fdFlowId
;
String
docStatus
;
String
LoginName
;
String
docSubject
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
0 → 100644
View file @
6097c0b7
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
util
;
import
cn.hutool.json.JSONObject
;
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.vo.EkpIncomeParam
;
import
io.micrometer.core.instrument.util.StringUtils
;
import
lombok.extern.log4j.Log4j2
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.http.*
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.client.RestTemplate
;
/**
* @Author hgw
* @Date 2022-8-31 12:00:07
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties
(
EkpIncomeProperties
.
class
)
public
class
EkpIncomeUtil
{
@Autowired
private
EkpIncomeProperties
ekpProperties
;
public
String
sendToEKP
(
EkpIncomeParam
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
.
getFdModelId
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowId
());
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
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
)
{
log
.
info
(
e
.
getMessage
());
return
null
;
}
}
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpIncomeParam.java
0 → 100644
View file @
6097c0b7
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author hgw
* @Date 2022-8-31 12:02:06
* @Description 收入明细对应参数
* @Version 1.0
*/
@Data
public
class
EkpIncomeParam
implements
Serializable
{
/**
* 项目编码
**/
private
String
fd_3adfedf98ccba2
;
/**
* 项目名称
**/
private
String
fd_3adfedf9d2bf1c
;
/**
* 单号
**/
private
String
fd_3adfedfa4410aa
;
/**
* 客户编码
**/
private
String
fd_3adfedfacd65d6
;
/**
* 客户名称
**/
private
String
fd_3adfedfb174068
;
/**
* 姓名
**/
private
String
fd_3adfedfb5a68a2
;
/**
* 身份证号
**/
private
String
fd_3adfedfb8f76d4
;
/**
* 手机号
**/
private
String
fd_3adfedfbd23ab8
;
/**
* 银行卡号
**/
private
String
fd_3adfedfcb17f1e
;
/**
* 开户行
**/
private
String
fd_3adfedfc453cc4
;
/**
* 工资月份
**/
private
String
fd_3adfee063acff0
;
/**
* 结算月份
**/
private
String
fd_3adfee0690737c
;
/**
* 是否薪资扣税
**/
private
String
fd_3adfee01668666
;
/**
* 社保优先级
**/
private
String
fd_3adfedfed8bb28
;
/**
* 公积金优先级
**/
private
String
fd_3adfedff3a7430
;
/**
* 是否自有员工
**/
private
String
fd_3adfee0009d070
;
/**
* 年终奖扣税方案
**/
private
String
fd_3adfee01dea2fa
;
/**
* 应发工资
**/
private
String
fd_3adfee12cb8840
;
/**
* 个人代扣
**/
private
String
fd_3adfee1374ed7a
;
/**
* 单位社保
**/
private
String
fd_3adfee1e2b2f78
;
/**
* 个人社保
**/
private
String
fd_3adfee1e88723e
;
/**
* 单位公积金
**/
private
String
fd_3adfee1ee24680
;
/**
* 个人公积金
**/
private
String
fd_3adfee1f32fa24
;
/**
* 个税
**/
private
String
fd_3adfee1f901c46
;
/**
* 企业年金单位
**/
private
String
fd_3adfee1ff1ca6a
;
/**
* 企业年金个人
**/
private
String
fd_3adfee203f86b2
;
/**
* 实发合计
**/
private
String
fd_3adfee20fe5ba4
;
/**
* 应收
**/
private
String
fd_3adfee21802434
;
/**
* 收入结算状态
**/
private
String
fd_3adfee4ba5ad36
;
/**
* 收款状态
**/
private
String
fd_3adfee4c0c59ee
;
/**
* 收入结算单号
**/
private
String
fd_3adfee5dd14866
;
/**
* 收款单号
**/
private
String
fd_3adfee5e3d1638
;
/**
* 代扣费用应支出
**/
private
String
fd_3adfeeb34ea0ea
;
/**
* 代扣费用结算状态
**/
private
String
fd_3adfeededfb5a6
;
/**
* 代扣费用付款状态
**/
private
String
fd_3adfeed3a20598
;
/**
* 代扣费用结算单号
**/
private
String
fd_3aea30866d0c30
;
/**
* 代扣费用付款单号
**/
private
String
fd_3aea309696d32e
;
/**
* 个税应支出
**/
private
String
fd_3adfeec6db8766
;
/**
* 个税结算状态
**/
private
String
fd_3adfeef8ef38fc
;
/**
* 个税付款状态
**/
private
String
fd_3adfeedd08222c
;
/**
* 个税支出结算单号
**/
private
String
fd_3aeadede4cea84
;
/**
* 个税支出付款单号
**/
private
String
fd_3aeadee1cf1266
;
/**
* 实发合计应支出
**/
private
String
fd_3adfeec730ec44
;
/**
* 工资实发结算状态
**/
private
String
fd_3adfeef9440ab2
;
/**
* 实发合计付款状态
**/
private
String
fd_3adfeedd5f3cb2
;
/**
* 实发结算单号
**/
private
String
fd_3aeadf17522642
;
/**
* 实发付款单号
**/
private
String
fd_3aeadf17b7d03a
;
/**
* 企业年金单位应支出
**/
private
String
fd_3adfeec782070a
;
/**
* 企业年金单位应结算状态
**/
private
String
fd_3adfeef9b9fb3e
;
/**
* 企业年金单位付款状态
**/
private
String
fd_3adfeeddacf6d4
;
/**
* 年金单位结算单号
**/
private
String
fd_3aeadf182ef6a2
;
/**
* 年金单位付款单号
**/
private
String
fd_3aeadf1892fdb2
;
/**
* 企业年金个人应支出
**/
private
String
fd_3adfeec7ccdd1c
;
/**
* 企业年金个人结算状态
**/
private
String
fd_3adfeefa1eba32
;
/**
* 企业年金个人付款状态
**/
private
String
fd_3adfeede08d430
;
/**
* 年金个人结算单号
**/
private
String
fd_3aeadf191c62a0
;
/**
* 年金个人付款单号
**/
private
String
fd_3aeadf1992544c
;
/**
* 暂停发
**/
private
String
fd_3af9d49d165e90
;
/**
* 税务主体
**/
private
String
fd_3afab1895feea2
;
}
yifu-common/yifu-common-ekp/src/main/resources/ekpIncomeConfig.properties
0 → 100644
View file @
6097c0b7
ekp.url
=
http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
ekp.fdModelId
=
181d7633ff8bc797276d0d3a54e80ad6
ekp.fdFlowId
=
182b40249c1bc940d7226b941c7a4183
ekp.docStatus
=
20
ekp.LoginName
=
admin
ekp.docSubject
=
\u6536\u5165\u
660E
\u
7EC6
\u6570\u
636E
\u
63A5
\u
53E3
yifu-order/yifu-order-api/src/main/java/com/yifu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
View file @
6097c0b7
...
...
@@ -38,6 +38,14 @@ public class OrderConstants {
* 订单编号不能为空
*/
public
static
final
String
ORDER_NO_IS_EMPTY
=
"订单编号不能为空"
;
/**
* 订单不存在
*/
public
static
final
String
ORDER_NO_NOT_EXIST
=
"订单不存在"
;
/**
* 订单已存在
*/
public
static
final
String
ORDER_NO_IS_EXIST
=
"订单已存在"
;
/**
* 下单人不能为空
*/
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/mapper/TOrderMapper.java
View file @
6097c0b7
...
...
@@ -28,9 +28,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> {
* @author licancan
* @param page
* @param param
* @param userName
* @return {@link IPage<OrderListVO>}
*/
IPage
<
OrderListVO
>
getOrderPageList
(
Page
<
OrderListParam
>
page
,
@Param
(
"param"
)
OrderListParam
param
);
IPage
<
OrderListVO
>
getOrderPageList
(
Page
<
OrderListParam
>
page
,
@Param
(
"param"
)
OrderListParam
param
,
@Param
(
"userName"
)
String
userName
);
/**
* 导出勾选查询结果
...
...
@@ -46,9 +47,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> {
*
* @author licancan
* @param param
* @param userName
* @return {@link List< OrderListVO>}
*/
List
<
OrderListVO
>
getOrderList
(
@Param
(
"param"
)
OrderListParam
param
);
List
<
OrderListVO
>
getOrderList
(
@Param
(
"param"
)
OrderListParam
param
,
@Param
(
"userName"
)
String
userName
);
/**
* 通过id查询详情
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
6097c0b7
...
...
@@ -67,7 +67,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*/
@Override
public
IPage
<
OrderListVO
>
getOrderPageList
(
Page
<
OrderListParam
>
page
,
OrderListParam
param
)
{
IPage
<
OrderListVO
>
orderList
=
baseMapper
.
getOrderPageList
(
page
,
param
);
YifuUser
user
=
SecurityUtils
.
getUser
();
IPage
<
OrderListVO
>
orderList
=
baseMapper
.
getOrderPageList
(
page
,
param
,
user
.
getUsername
());
return
orderList
;
}
...
...
@@ -80,11 +81,12 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*/
@Override
public
List
<
OrderListVO
>
getOrderList
(
OrderListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
OrderListVO
>
list
;
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
list
=
baseMapper
.
getOrderListBySelect
(
param
.
getIdList
());
}
else
{
list
=
baseMapper
.
getOrderList
(
param
);
list
=
baseMapper
.
getOrderList
(
param
,
user
.
getUsername
()
);
}
return
list
;
}
...
...
@@ -191,6 +193,14 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
Common
.
isEmpty
(
orderNo
)){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
TOrder
one
=
this
.
getOne
(
Wrappers
.<
TOrder
>
query
().
lambda
()
.
eq
(
TOrder:
:
getOrderNo
,
orderNo
)
.
eq
(
TOrder:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
one
).
isPresent
()){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_NOT_EXIST
);
}
if
(
Common
.
isEmpty
(
replyContent
)
&&
ArrayUtils
.
isEmpty
(
file
)){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY
);
}
...
...
@@ -299,6 +309,14 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
TOrder
one
=
this
.
getOne
(
Wrappers
.<
TOrder
>
query
().
lambda
()
.
eq
(
TOrder:
:
getOrderNo
,
vo
.
getOrderNo
())
.
eq
(
TOrder:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EXIST
);
}
if
(
Common
.
isEmpty
(
vo
.
getCreateName
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NAME_IS_EMPTY
);
}
...
...
@@ -383,6 +401,14 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
TOrder
one
=
this
.
getOne
(
Wrappers
.<
TOrder
>
query
().
lambda
()
.
eq
(
TOrder:
:
getOrderNo
,
vo
.
getOrderNo
())
.
eq
(
TOrder:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
one
).
isPresent
()){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_NOT_EXIST
);
}
if
(
Common
.
isEmpty
(
vo
.
getCreateName
())){
return
R
.
failed
(
OrderConstants
.
REPLY_NAME_IS_EMPTY
);
}
...
...
yifu-order/yifu-order-biz/src/main/resources/mapper/TOrderMapper.xml
View file @
6097c0b7
...
...
@@ -39,6 +39,7 @@
t.ORDER_STATUS as orderStatus
from t_order t
where t.DELETE_FLAG = 0
and #{userName} in (SELECT HANDLE_USER FROM t_order_handler h WHERE h.ORDER_NO = t.ORDER_NO)
<if
test=
"param.orderNo != null and param.orderNo.trim() != ''"
>
and t.ORDER_NO = #{param.orderNo}
</if>
...
...
@@ -60,7 +61,7 @@
<if
test=
"param.orderStatus != null"
>
and t.ORDER_STATUS = #{param.orderStatus}
</if>
ORDER BY t.
ORDER_STATUS,t.
CREATE_TIME DESC
ORDER BY t.CREATE_TIME DESC
</select>
<select
id=
"getOrderListBySelect"
resultType=
"com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO"
>
...
...
@@ -77,7 +78,7 @@
<foreach
collection=
"idList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
ORDER BY t.
ORDER_STATUS,t.
CREATE_TIME DESC
ORDER BY t.CREATE_TIME DESC
</select>
<select
id=
"getOrderList"
resultType=
"com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO"
>
...
...
@@ -91,6 +92,7 @@
t.ORDER_STATUS as orderStatus
from t_order t
where t.DELETE_FLAG = 0
and #{userName} in (SELECT HANDLE_USER FROM t_order_handler h WHERE h.ORDER_NO = t.ORDER_NO)
<if
test=
"param.orderNo != null and param.orderNo.trim() != ''"
>
and t.ORDER_NO = #{param.orderNo}
</if>
...
...
@@ -112,7 +114,7 @@
<if
test=
"param.orderStatus != null"
>
and t.ORDER_STATUS = #{param.orderStatus}
</if>
ORDER BY t.
ORDER_STATUS,t.
CREATE_TIME DESC
ORDER BY t.CREATE_TIME DESC
</select>
<select
id=
"getOrderDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.order.vo.OrderDetailVO"
>
...
...
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