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
474bc11c
Commit
474bc11c
authored
Sep 07, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
错误信息记录表
parent
69c1e0ba
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
81 additions
and
10 deletions
+81
-10
EkpIncomeUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
+4
-4
EkpSalaryUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
+2
-2
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+14
-0
TSendEkpError.java
.../yifu/cloud/plus/v1/yifu/social/entity/TSendEkpError.java
+3
-1
TSendEkpErrorMapper.java
...cloud/plus/v1/yifu/social/mapper/TSendEkpErrorMapper.java
+9
-1
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+20
-0
TSendEkpErrorServiceImpl.java
...v1/yifu/social/service/impl/TSendEkpErrorServiceImpl.java
+13
-1
TSendEkpErrorMapper.xml
...ial-biz/src/main/resources/mapper/TSendEkpErrorMapper.xml
+16
-1
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpIncomeUtil.java
View file @
474bc11c
...
...
@@ -63,14 +63,14 @@ public class EkpIncomeUtil {
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
))
{
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
return
EkpConstants
.
SEND_FAILED
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
)
{
log
.
info
(
e
.
getMessage
());
return
null
;
return
e
.
getMessage
()
;
}
}
public
String
sendToEkpRisk
(
EkpIncomeParamRisk
param
)
{
...
...
@@ -100,14 +100,14 @@ public class EkpIncomeUtil {
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
))
{
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
return
EkpConstants
.
SEND_FAILED
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
)
{
log
.
info
(
e
.
getMessage
());
return
null
;
return
e
.
getMessage
()
;
}
}
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
View file @
474bc11c
...
...
@@ -57,14 +57,14 @@ public class EkpSalaryUtil {
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
return
EkpConstants
.
SEND_FAILED
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
){
log
.
info
(
e
.
getMessage
());
return
null
;
return
e
.
getMessage
()
;
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
474bc11c
...
...
@@ -48,6 +48,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo
;
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.vo.TIncomeDetailReturnVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -527,6 +528,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
account
=
new
TSalaryAccount
();
account
.
setId
(
sendParam
.
getFd_3b10af838eab5c
());
sendBack
=
ekpSalaryUtil
.
sendToEKP
(
sendParam
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
ekpSalaryUtil
.
sendToEKP
(
sendParam
);
}
account
.
setSendTime
(
sendTime
);
account
.
setSendUser
(
user
.
getId
());
account
.
setSendUserName
(
user
.
getNickname
());
...
...
@@ -536,6 +540,16 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
account
.
setEkpId
(
sendBack
);
}
else
{
sendStatus
=
false
;
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
ONE_STRING
);
error
.
setCreateUserName
(
s
.
getCreateName
());
error
.
setLinkId
(
account
.
getId
());
error
.
setTitle
(
sendBack
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tsendekperror/inner/saveError"
,
error
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
accountList
.
add
(
account
);
}
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSendEkpError.java
View file @
474bc11c
...
...
@@ -21,6 +21,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -47,7 +48,7 @@ public class TSendEkpError {
private
String
title
;
@ExcelAttribute
(
name
=
"类型"
)
@ExcelProperty
(
"类型(1薪资明细2预估明细3缴费明细4
薪资实时收入5定时收入6派单实时收入7预估定时收入8缴费定时收入9商险实
时收入)"
)
@ExcelProperty
(
"类型(1薪资明细2预估明细3缴费明细4
实时收入5定
时收入)"
)
private
String
type
;
@ExcelAttribute
(
name
=
"创建日"
)
...
...
@@ -60,6 +61,7 @@ public class TSendEkpError {
@ExcelAttribute
(
name
=
"创建时间"
)
@ExcelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@ExcelAttribute
(
name
=
"创建人姓名"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TSendEkpErrorMapper.java
View file @
474bc11c
...
...
@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* error存储
...
...
@@ -29,5 +30,12 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public
interface
TSendEkpErrorMapper
extends
BaseMapper
<
TSendEkpError
>
{
/**
* @param tSendEkpError
* @Description: 查找对应类型的1条数据来更新
* @Author: hgw
* @Date: 2022/9/7 16:56
* @return: com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
**/
TSendEkpError
getByTitleTypeDay
(
@Param
(
"tSendEkpError"
)
TSendEkpError
tSendEkpError
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
474bc11c
...
...
@@ -29,16 +29,20 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
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.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.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.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.IncomeExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeVo
;
...
...
@@ -66,6 +70,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
@Autowired
private
TIncomeDetailService
tIncomeDetailService
;
@Autowired
private
TSendEkpErrorService
tSendEkpErrorService
;
@Autowired
private
EkpIncomeUtil
ekpIncomeUtil
;
...
...
@@ -315,11 +322,24 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
this
.
save
(
income
);
String
sendBack
=
this
.
getSendBack
(
income
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
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
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FOUR_STRING
);
error
.
setCreateUserName
(
"收入表推送"
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
sendBack
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
return
this
.
updateById
(
income
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSendEkpErrorServiceImpl.java
View file @
474bc11c
...
...
@@ -17,6 +17,8 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSendEkpErrorMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
...
...
@@ -41,7 +43,17 @@ public class TSendEkpErrorServiceImpl extends ServiceImpl<TSendEkpErrorMapper, T
**/
@Override
public
boolean
saveError
(
TSendEkpError
tSendEkpError
)
{
// 类型、创建日不可为空
if
(
Common
.
isEmpty
(
tSendEkpError
.
getType
())
||
Common
.
isEmpty
(
tSendEkpError
.
getCreateDay
()))
{
return
false
;
}
TSendEkpError
error
=
baseMapper
.
getByTitleTypeDay
(
tSendEkpError
);
if
(
error
==
null
)
{
return
this
.
save
(
tSendEkpError
);
}
else
{
error
.
setNums
(
error
.
getNums
()+
CommonConstants
.
ONE_INT
);
return
this
.
updateById
(
error
);
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TSendEkpErrorMapper.xml
View file @
474bc11c
...
...
@@ -23,7 +23,7 @@
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.social.mapper.TSendEkpErrorMapper"
>
<resultMap
id=
"t
Income
Map"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError"
>
<resultMap
id=
"t
SendEkpError
Map"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"type"
column=
"TYPE"
/>
...
...
@@ -51,6 +51,9 @@
<if
test=
"tSendEkpError.title != null and tSendEkpError.title.trim() != ''"
>
AND a.TITLE = #{tSendEkpError.title}
</if>
<if
test=
"tSendEkpError.title == null or tSendEkpError.title.trim() == ''"
>
AND a.TITLE is null
</if>
<if
test=
"tSendEkpError.type != null and tSendEkpError.type.trim() != ''"
>
AND a.TYPE = #{tSendEkpError.type}
</if>
...
...
@@ -59,4 +62,16 @@
</if>
</if>
</sql>
<!-- 查找对应类型的1条数据来更新 -->
<select
id=
"getByTitleTypeDay"
resultMap=
"tSendEkpErrorMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_provident_fund a
<where>
1=1
<include
refid=
"tSendEkpError_where"
/>
</where>
limit 1
</select>
</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