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
5bfe2bfc
Commit
5bfe2bfc
authored
May 26, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公積金批量导入办理
parent
3691d45c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
11 deletions
+30
-11
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+2
-1
FundImportHandleVo.java
...yifu/cloud/plus/v1/yifu/social/vo/FundImportHandleVo.java
+3
-3
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+11
-2
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+1
-1
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+13
-4
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/ExcelAttributeConstants.java
View file @
5bfe2bfc
...
...
@@ -153,5 +153,6 @@ public class ExcelAttributeConstants {
public
static
final
String
CUSTOMER
=
"customer"
;
public
static
final
String
HOUSEHOLD
=
"household"
;
// 派单办理失败类型
public
static
final
String
DISPATCH_HANDLE_REASON
=
"dispatch-audit-add-reason"
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/FundImportHandleVo.java
View file @
5bfe2bfc
...
...
@@ -65,14 +65,14 @@ public class FundImportHandleVo extends RowIndex implements Serializable {
/**
* 办理意见
*/
@ExcelAttribute
(
name
=
"办理意见"
)
@ExcelAttribute
(
name
=
"办理意见"
,
maxLength
=
150
,
errorInfo
=
"办理意见长度不可超过150!"
)
@Schema
(
description
=
"办理意见"
)
@ExcelProperty
(
"办理意见"
)
@ExcelProperty
(
"办理意见"
)
private
String
remark
;
/**
* 失败类型
*/
@ExcelAttribute
(
name
=
"失败类型"
)
@ExcelAttribute
(
name
=
"失败类型"
,
isDataId
=
true
,
isConvert
=
false
,
dataType
=
ExcelAttributeConstants
.
DISPATCH_HANDLE_REASON
)
@Schema
(
description
=
"失败类型"
)
@ExcelProperty
(
"失败类型"
)
private
String
reasonType
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
5bfe2bfc
...
...
@@ -643,7 +643,7 @@ public class TDispatchInfoController {
@Operation
(
summary
=
"单个派增 权限:social_dispatchinfo_add"
,
description
=
"单个派增"
)
@PostMapping
(
"/fundImportHandle"
)
//@PreAuthorize("@pms.hasPermission('fund_import_handle')")
public
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
@RequestBody
MultipartFile
file
)
{
public
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
@RequestBody
MultipartFile
file
,
@RequestParam
(
required
=
true
)
String
mId
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
))
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -659,7 +659,16 @@ public class TDispatchInfoController {
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
//主动释放锁
return
tDispatchInfoService
.
fundImportHandle
(
file
.
getInputStream
());
TDispatchInfo
tDispatchInfo
=
new
TDispatchInfo
();
tDispatchInfo
.
setMId
(
mId
);
tDispatchInfo
.
setMenuInfo
(
mId
);
tDispatchInfo
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
menuUtil
.
setAuthSql
(
user
,
tDispatchInfo
);
if
(
Common
.
isNotNull
(
tDispatchInfo
.
getAuthSql
())
&&
tDispatchInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
tDispatchInfo
.
setAuthSql
(
tDispatchInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
}
tDispatchInfo
.
setCreateBy
(
user
.
getId
());
return
tDispatchInfoService
.
fundImportHandle
(
file
.
getInputStream
(),
tDispatchInfo
);
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
5bfe2bfc
...
...
@@ -111,7 +111,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
**/
R
<
List
<
ErrorMessage
>>
dispatchAdd
(
TDispatchImportVo
importVo
);
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
InputStream
inputStream
);
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
InputStream
inputStream
,
TDispatchInfo
tDispatchInfo
);
R
<
Boolean
>
updateExportSocialFlagById
(
String
id
,
String
status
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
5bfe2bfc
...
...
@@ -5024,7 +5024,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ShardingTransactionType
(
TransactionType
.
BASE
)
@Override
public
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
InputStream
inputStream
)
{
public
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
InputStream
inputStream
,
TDispatchInfo
tDispatchInfo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -5075,7 +5075,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
fundImportHandle
(
cachedDataList
,
errorMessageList
,
user
);
fundImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
tDispatchInfo
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -5093,7 +5093,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Param
* @return
**/
public
void
fundImportHandle
(
List
<
FundImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
)
{
public
void
fundImportHandle
(
List
<
FundImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
TDispatchInfo
dispatchInfo
)
{
if
(!
Common
.
isNotNull
(
excelVOList
))
{
return
;
}
...
...
@@ -5103,6 +5103,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
String
handleStatus
=
"2"
;
SocialHandleSearchVo
tDispatchInfo
=
new
SocialHandleSearchVo
();
tDispatchInfo
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
tDispatchInfo
.
setAuthSql
(
dispatchInfo
.
getAuthSql
());
tDispatchInfo
.
setCreateBy
(
dispatchInfo
.
getCreateBy
());
tDispatchInfo
.
setMId
(
dispatchInfo
.
getMId
());
tDispatchInfo
.
setMenuInfo
(
dispatchInfo
.
getMenuInfo
());
menuUtil
.
setAuthSql
(
user
,
tDispatchInfo
);
if
(
Common
.
isNotNull
(
tDispatchInfo
.
getAuthSql
())
&&
tDispatchInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
tDispatchInfo
.
setAuthSql
(
tDispatchInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
...
...
@@ -5133,6 +5137,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getHandleStatus
()))
{
flag
=
CommonConstants
.
ZERO_INT
;
handleStatus
=
CommonConstants
.
ONE_STRING
;
excel
.
setReasonType
(
CommonConstants
.
EMPTY_STRING
);
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getHandleStatus
()))
{
flag
=
CommonConstants
.
ONE_INT
;
...
...
@@ -5143,10 +5148,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
FUND_IMPORT_HANDLE_NOT_EXITS
),
excel
));
continue
;
}
if
(
Common
.
isEmpty
(
excel
.
getRemark
())){
excel
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
}
try
{
// 执行数据插入操作 组装
messageList
=
addBatchApplyHandle
(
Collections
.
singletonList
(
dispatch
.
getId
()),
CommonConstants
.
ONE_STRING
,
user
,
flag
,
handleStatus
,
excel
.
getReasonType
(),
null
,
excel
.
getReasonType
()+
CommonConstants
.
COLON_STRING
+
excel
.
getRemark
());
,
flag
,
handleStatus
,
(
Common
.
isEmpty
(
excel
.
getReasonType
())?
""
:
excel
.
getReasonType
()+
CommonConstants
.
COLON_STRING
)
+
excel
.
getRemark
(),
null
,
excel
.
getReasonType
());
if
(
Common
.
isNotNull
(
messageList
)){
errorMessage
=
messageList
.
get
(
CommonConstants
.
ZERO_INT
);
errorMessage
.
setData
(
excel
);
...
...
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