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
f9a6b095
Commit
f9a6b095
authored
May 11, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公积金导入批量办理
parent
4877fb6d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
30 deletions
+74
-30
FundImportHandleVo.java
...yifu/cloud/plus/v1/yifu/social/vo/FundImportHandleVo.java
+11
-4
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+3
-3
TDispatchInfoMapper.java
...cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
+1
-1
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+22
-6
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+37
-16
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/FundImportHandleVo.java
View file @
f9a6b095
...
...
@@ -63,11 +63,18 @@ public class FundImportHandleVo extends RowIndex implements Serializable {
@ExcelProperty
(
"公积金"
)
private
String
handleStatus
;
/**
*
失败原因
*
办理意见
*/
@ExcelAttribute
(
name
=
"
失败原因
"
)
@Schema
(
description
=
"
失败原因
"
)
@ExcelProperty
(
"
失败原因
"
)
@ExcelAttribute
(
name
=
"
办理意见
"
)
@Schema
(
description
=
"
办理意见
"
)
@ExcelProperty
(
"
办理意见
"
)
private
String
remark
;
/**
* 失败类型
*/
@ExcelAttribute
(
name
=
"失败类型"
)
@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 @
f9a6b095
...
...
@@ -593,7 +593,7 @@ public class TDispatchInfoController {
@SneakyThrows
@Operation
(
summary
=
"单个派增 权限:social_dispatchinfo_add"
,
description
=
"单个派增"
)
@PostMapping
(
"/fundImportHandle"
)
@PreAuthorize
(
"@pms.hasPermission('fund_import_handle')"
)
//
@PreAuthorize("@pms.hasPermission('fund_import_handle')")
public
R
<
List
<
ErrorMessage
>>
fundImportHandle
(
@RequestBody
MultipartFile
file
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
))
{
...
...
@@ -627,7 +627,7 @@ public class TDispatchInfoController {
*/
@Operation
(
summary
=
"社保花名册导出标识变更为否"
,
description
=
"社保花名册导出标识变更为否"
)
@SysLog
(
"社保花名册导出标识变更为否"
)
@P
utMapping
@P
ostMapping
(
"/updateExportSocialFlagById"
)
public
R
<
Boolean
>
updateExportSocialFlagById
(
@RequestParam
(
value
=
"id"
)
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
...
...
@@ -641,7 +641,7 @@ public class TDispatchInfoController {
*/
@Operation
(
summary
=
"公积金变更清册导出标识变更为否"
,
description
=
"公积金变更清册导出标识变更为否"
)
@SysLog
(
"公积金变更清册导出标识变更为否"
)
@P
utMapping
@P
ostMapping
(
"/updateExportFundFlagById"
)
public
R
<
Boolean
>
updateExportFundFlagById
(
@RequestParam
(
value
=
"id"
)
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
View file @
f9a6b095
...
...
@@ -122,7 +122,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
* @return
**/
List
<
TDispatchInfo
>
getTDispatchFundHandleNoPage
(
@Param
(
"tDispatchInfo"
)
SocialHandleSearchVo
tDispatchInfo
,
@Param
(
"idCards"
)
List
<
String
>
idCards
);
@Param
(
"idCards"
)
List
<
String
>
idCards
,
@Param
(
"idsStr"
)
List
<
String
>
idsStr
);
/**
* @Author fxj
* @Description 公积金补交清册
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
f9a6b095
...
...
@@ -4992,12 +4992,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
data
.
setRowIndex
(
rowIndex
+
1
);
ErrorMessage
errorMessage
=
util1
.
checkEntity
(
data
,
data
.
getRowIndex
());
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessage
.
setData
(
data
);
errorMessageList
.
add
(
errorMessage
);
}
else
{
cachedDataList
.
add
(
data
);
}
if
(
cachedDataList
.
size
()
>=
BATCH_COUNT
)
{
saveData
();
// 存储完成清理 list
cachedDataList
=
ListUtils
.
newArrayListWithExpectedSize
(
BATCH_COUNT
);
}
...
...
@@ -5047,18 +5049,25 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
tDispatchInfo
.
setCreateBy
(
user
.
getId
());
List
<
TDispatchInfo
>
dispatchInfos
=
baseMapper
.
getTDispatchFundHandleNoPage
(
tDispatchInfo
,
excelVOList
.
stream
()
.
map
(
FundImportHandleVo:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()));
.
map
(
FundImportHandleVo:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
())
,
null
);
Map
<
String
,
TDispatchInfo
>
dispatchMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
dispatchInfos
))
{
dispatchMap
=
dispatchInfos
.
stream
().
collect
(
Collectors
.
toMap
(
TDispatchInfo:
:
getEmpIdcard
,
TDispatchInfo
->
TDispatchInfo
));
}
TDispatchInfo
dispatch
;
ErrorMessage
errorMessage
=
null
;
List
<
ErrorMessage
>
messageList
=
null
;
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
excel
=
excelVOList
.
get
(
i
);
if
(
Common
.
isEmpty
(
excel
)
||
(!
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getHandleStatus
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getHandleStatus
())))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
CommonConstants
.
PARAM_INFO_ERROR
)));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
CommonConstants
.
PARAM_INFO_ERROR
),
excel
));
continue
;
}
// 办理失败,原因必填
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getReasonType
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
FUND_IMPORT_HANDLE_REASON_NOT_EMPY
),
excel
));
continue
;
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getHandleStatus
()))
{
...
...
@@ -5071,16 +5080,23 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
dispatch
=
dispatchMap
.
get
(
excel
.
getEmpIdcard
());
if
(
Common
.
isEmpty
(
dispatch
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
FUND_IMPORT_HANDLE_NOT_EXITS
)));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
FUND_IMPORT_HANDLE_NOT_EXITS
)
,
excel
));
continue
;
}
try
{
// 执行数据插入操作 组装
errorMessageList
.
addAll
(
addBatchApplyHandle
(
Collections
.
singletonList
(
dispatch
.
getId
()),
CommonConstants
.
ONE_STRING
,
user
,
flag
,
handleStatus
,
null
,
null
,
excel
.
getRemark
()));
messageList
=
addBatchApplyHandle
(
Collections
.
singletonList
(
dispatch
.
getId
()),
CommonConstants
.
ONE_STRING
,
user
,
flag
,
handleStatus
,
excel
.
getReasonType
(),
null
,
excel
.
getReasonType
()+
CommonConstants
.
COLON_STRING
+
excel
.
getRemark
());
if
(
Common
.
isNotNull
(
messageList
)){
errorMessage
=
messageList
.
get
(
CommonConstants
.
ZERO_INT
);
errorMessage
.
setData
(
excel
);
}
else
{
errorMessage
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
CommonConstants
.
GREEN
,
excel
);
}
errorMessageList
.
add
(
errorMessage
);
}
catch
(
Exception
e
)
{
log
.
error
(
"批量导入办理异常:"
,
e
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_FAILED
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_FAILED
,
excel
));
}
}
}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
f9a6b095
...
...
@@ -1068,7 +1068,11 @@
a.PROVIDENT_HOUSEHOLD_NAME,a.EXPORT_FUND_FLAG
FROM t_dispatch_info a
left join t_provident_fund f on a.FUND_ID = f.id
<include
refid=
"where_getFundRecord"
/>
<where>
<include
refid=
"where_getFundRecord"
/>
group by a.id
order by a.APPLY_NO desc
</where>
</select>
<!--tDispatchInfo 公积金办理数据查询 2023-05-08-->
...
...
@@ -1078,7 +1082,18 @@
a.PROVIDENT_HOUSEHOLD_NAME
FROM t_dispatch_info a
left join t_provident_fund f on a.FUND_ID = f.id
<include
refid=
"where_getFundRecord"
/>
<where>
<include
refid=
"where_getFundRecord"
/>
<if
test=
"idCards != null and idCards.size > 0"
>
AND a.emp_idcard in
<foreach
item=
"items"
index=
"index"
collection=
"idCards"
open=
"("
separator=
","
close=
")"
>
#{items}
</foreach>
</if>
group by a.id
order by a.APPLY_NO desc
</where>
</select>
<!--tDispatchInfo 公积金变更清册cout-->
...
...
@@ -1089,7 +1104,11 @@
a.id
FROM t_dispatch_info a
left join t_provident_fund f on a.FUND_ID = f.id
<include
refid=
"where_getFundRecord"
/>
) a
<where>
<include
refid=
"where_getFundRecord"
/>
group by a.id
order by a.APPLY_NO desc
</where>
) a
</select>
<!--tDispatchInfo 公积金变更清册查询-->
<select
id=
"getFundRecordList"
resultMap=
"fundHandleMap"
>
...
...
@@ -1120,13 +1139,21 @@
a.REDUCE_REASON
FROM t_dispatch_info a
left join t_provident_fund f on a.FUND_ID = f.id
<include
refid=
"where_getFundRecord"
/>
<where>
<include
refid=
"where_getFundRecord"
/>
group by a.id
order by a.APPLY_NO desc
</where>
</select>
<update
id=
"updateFundRecords"
>
update t_dispatch_info a
left join t_provident_fund f on a.FUND_ID = f.id
set a.EXPORT_SOCIAL_FLAG = 1
<include
refid=
"where_getFundRecord"
/>
<where>
<include
refid=
"where_getFundRecord"
/>
group by a.id
order by a.APPLY_NO desc
</where>
</update>
<!--tDispatchInfo 公积金补交清册-->
<select
id=
"getFundSupplementaryRecords"
resultMap=
"fundSupplementaryMap"
>
...
...
@@ -1141,7 +1168,11 @@
f.EMP_NAME
FROM t_dispatch_info a
left join t_provident_fund f on a.FUND_ID = f.id
<include
refid=
"where_getFundRecord"
/>
<where>
<include
refid=
"where_getFundRecord"
/>
group by a.id
order by a.APPLY_NO desc
</where>
</select>
<sql
id=
"where_getSocialRecordRoster"
>
<where>
...
...
@@ -1267,7 +1298,6 @@
</sql>
<sql
id=
"where_getFundRecord"
>
<where>
a.DELETE_FLAG = 0
<if
test=
"idsStr != null and idsStr.size > 0"
>
AND a.ID in
...
...
@@ -1275,12 +1305,6 @@
#{items}
</foreach>
</if>
<if
test=
"idsStr != null and idsStr.size > 0"
>
AND a.emp_idcard in
<foreach
item=
"items"
index=
"index"
collection=
"idCards"
open=
"("
separator=
","
close=
")"
>
#{items}
</foreach>
</if>
/** 社保办理状态:0待办理/1已办理2办理失败3已派减4 办理中 5 部分办理失败 派单社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 4 办理中 **/
/*社保代办理 1.派单审核通过 2.派增(type=0):待办理(social_handle_status='0') or 派减(type=1):已办理完成或部分办理失败 且已派减*/
AND a.fund_id is not null
...
...
@@ -1391,9 +1415,6 @@
AND a.EXPORT_FUND_FLAG = ${tDispatchInfo.exportFundFlag}
</if>
</if>
group by a.id
order by a.APPLY_NO desc
</where>
</sql>
<!-- 获取当日最大的编码 -->
...
...
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