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
78450ec3
Commit
78450ec3
authored
Jul 12, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
aa4cf195
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
14 deletions
+51
-14
ErrorCodes.java
.../cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
+4
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+2
-0
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+4
-3
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+2
-2
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+37
-7
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+2
-2
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
View file @
78450ec3
...
...
@@ -603,4 +603,8 @@ public interface ErrorCodes {
* 派减异常: 单减公积金,是否同步终止合同、减项、减档不能为是
*/
String
EMP_DISPATCH_FUND_NOT_EMPTY_SIGNLE
=
"emp.dispatch.fund.not.empty.signle"
;
/**
* 公积金未派减,请核实!
*/
String
EMP_DISPATCH_SIGNLE_REDUCE
=
"emp.dispatch.signle.reduce"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
78450ec3
...
...
@@ -231,6 +231,8 @@ social.import.same.info=\u8BE5\u6570\u636E\u5DF2\u5904\u7406\uFF0C\u8BF7\u52FF\u
emp.dispatch.fund.not.empty.change
=
\u5355\u
51CF
\u
793E
\u
4FDD
\u
FF0C
\u
5B58
\u5728\u
6B63
\u
5E38/
\u
5BA1
\u6279\u
4E2D
\u7684\u
516C
\u
79EF
\u
91D1
\u
FF0C
\u7981\u
6B62
\u
201C
\u
540C
\u
6B65
\u
7EC8
\u
6B62
\u5408\u
540C
\u3001\u
51CF
\u9879\u3001\u
51CF
\u6863\u
201D
emp.dispatch.fund.not.empty.signle
=
\u5355\u
51CF
\u
516C
\u
79EF
\u
91D1
\u
FF0C
\u
662F
\u5426\u
540C
\u
6B65
\u
7EC8
\u
6B62
\u5408\u
540C
\u3001\u
51CF
\u9879\u3001\u
51CF
\u6863\u
4E0D
\u
80FD
\u
4E3A
\u
662F
emp.dispatch.signle.reduce
=
\u
516C
\u
79EF
\u
91D1
\u
672A
\u
6D3E
\u
51CF
\u
FF0C
\u
8BF7
\u6838\u
5B9E
\u
FF01
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
78450ec3
...
...
@@ -415,7 +415,8 @@ public class TDispatchInfoController {
@SysLog
(
"派单信息记录表 批量导入-派减"
)
@PostMapping
(
"/importListReduce"
)
//@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo-batch-reduce')")
public
R
<
List
<
ErrorMessage
>>
importListReduce
(
@RequestBody
MultipartFile
file
,
@RequestParam
(
required
=
false
)
String
orderId
){
public
R
<
List
<
ErrorMessage
>>
importListReduce
(
@RequestBody
MultipartFile
file
,
@RequestParam
(
required
=
false
)
String
orderId
,
@RequestParam
(
required
=
false
)
String
flag
){
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -431,7 +432,7 @@ public class TDispatchInfoController {
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
//主动释放锁
return
tDispatchInfoService
.
importReduceDiy
(
file
.
getInputStream
(),
orderId
);
return
tDispatchInfoService
.
importReduceDiy
(
file
.
getInputStream
(),
orderId
,
flag
);
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
...
...
@@ -457,7 +458,7 @@ public class TDispatchInfoController {
list
.
add
(
excelVOList
);
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
tDispatchInfoService
.
batchReduceDispatch
(
list
,
errorMessageList
,
user
,
orderId
);
tDispatchInfoService
.
batchReduceDispatch
(
list
,
errorMessageList
,
user
,
orderId
,
null
);
return
R
.
ok
(
errorMessageList
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
78450ec3
...
...
@@ -67,11 +67,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
orderId
,
Map
<
String
,
String
>
idCardMap
);
R
<
List
<
ErrorMessage
>>
importReduceDiy
(
InputStream
inputStream
,
String
orderId
);
R
<
List
<
ErrorMessage
>>
importReduceDiy
(
InputStream
inputStream
,
String
orderId
,
String
flag
);
@Transactional
@ShardingTransactionType
(
TransactionType
.
BASE
)
void
batchReduceDispatch
(
List
<
TDispatchReduceVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
orderId
);
void
batchReduceDispatch
(
List
<
TDispatchReduceVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
orderId
,
String
flag
);
R
<
Boolean
>
removeByIdDiy
(
String
id
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
78450ec3
...
...
@@ -2765,7 +2765,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ShardingTransactionType
(
TransactionType
.
BASE
)
public
R
<
List
<
ErrorMessage
>>
importReduceDiy
(
InputStream
inputStream
,
String
orderId
)
{
public
R
<
List
<
ErrorMessage
>>
importReduceDiy
(
InputStream
inputStream
,
String
orderId
,
String
flag
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -2814,7 +2814,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
batchReduceDispatch
(
cachedDataList
,
errorMessageList
,
user
,
orderId
);
batchReduceDispatch
(
cachedDataList
,
errorMessageList
,
user
,
orderId
,
flag
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -2826,7 +2826,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
@Override
public
void
batchReduceDispatch
(
List
<
TDispatchReduceVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
orderId
)
{
public
void
batchReduceDispatch
(
List
<
TDispatchReduceVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
orderId
,
String
flag
)
{
if
(!
Common
.
isNotNull
(
excelVOList
)){
return
;
}
...
...
@@ -2836,16 +2837,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
List
<
String
>
codes
=
new
ArrayList
<>();
// 初始化参数
initIdcard
(
excelVOList
,
idcards
,
codes
);
// 通过身份证和项目编码获取档案&项目档案&最新合同
Map
<
String
,
DispatchEmpVo
>
empVoMap
=
getDispatchEmpVo
(
idcards
,
codes
);
// 通过身份证查询社保&公积金&社保公积金查询信息: 身份证维度唯一
Map
<
String
,
TSocialFundInfo
>
socialFundMap
=
getSocialFundMap
(
idcards
);
TSocialFundInfo
socialFund
;
TDispatchReduceVo
excel
;
//批量派减:校验待派减人员五险一金缴纳情况,若有公积金未派减,则会显示社保已派减,公积金未派减,并弹窗提示有派减失败数据,可同步导出派减数据表单
//flag为1时 单独派减社保时校验公积金是否可用
if
(
Common
.
isNotNull
(
flag
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
flag
))
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
socialFund
=
null
;
excel
=
excelVOList
.
get
(
i
);
if
(
Common
.
isNotNull
(
socialFundMap
))
{
socialFund
=
socialFundMap
.
get
(
excel
.
getEmpIdcard
());
}
//单减社保,判断是否有正常的公积金
if
(
Common
.
isNotNull
(
excel
.
getSocialReduceDate
())
&&
Common
.
isEmpty
(
excel
.
getFundReduceDate
())
&&
Common
.
isNotNull
(
socialFund
)
&&
(
CommonConstants
.
THREE_STRING
.
equals
(
socialFund
.
getFundStatus
())
||
CommonConstants
.
EIGHT_STRING
.
equals
(
socialFund
.
getFundStatus
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialFund
.
getFundStatus
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getFundStatus
())
||
CommonConstants
.
FIVE_STRING
.
equals
(
socialFund
.
getFundStatus
())
||
CommonConstants
.
SIX_STRING
.
equals
(
socialFund
.
getFundStatus
())))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SIGNLE_REDUCE
),
CommonConstants
.
RED
,
CommonConstants
.
ONE_STRING
));
}
}
if
(!
errorMessageList
.
isEmpty
()
&&
errorMessageList
.
stream
().
anyMatch
(
e
->
CommonConstants
.
ONE_STRING
.
equals
(
e
.
getName
())))
{
return
;
}
}
// 通过身份证和项目编码获取档案&项目档案&最新合同
Map
<
String
,
DispatchEmpVo
>
empVoMap
=
getDispatchEmpVo
(
idcards
,
codes
);
// 获取项目编码数据 以供校验
Map
<
String
,
ProjectSetInfoVo
>
projectVoMap
=
getProjectVoMap
(
codes
);
DispatchEmpVo
empVo
;
TDispatchInfo
dispatch
;
TDispatchReduceVo
excel
;
TSocialFundInfo
socialFund
;
ProjectSetInfoVo
setInfoVo
;
// 是否SSC:SSC派单组-1659015946137583618L SSC审核组-1659016108176130049L
long
roleId
=
1659015946137583618L
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
78450ec3
...
...
@@ -434,7 +434,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduceVo
.
setChangeContractAndEmployee
(
preInfo
.
getChangeContractAndEmployee
());
List
<
TDispatchReduceVo
>
dispatchImportList
=
new
ArrayList
<>();
dispatchImportList
.
add
(
dispatchReduceVo
);
dispatchInfoService
.
batchReduceDispatch
(
dispatchImportList
,
errorMessageList
,
user
,
null
);
dispatchInfoService
.
batchReduceDispatch
(
dispatchImportList
,
errorMessageList
,
user
,
null
,
null
);
// 处理派减结果
errorMessage
=
handleDispatchAddRes
(
preInfo
,
errorMessageList
);
if
(
null
!=
errorMessage
){
...
...
@@ -620,7 +620,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
dispatchReduceVo
.
setChangeContractAndEmployee
(
pre
.
getChangeContractAndEmployee
());
List
<
TDispatchReduceVo
>
dispatchImportList
=
new
ArrayList
<>();
dispatchImportList
.
add
(
dispatchReduceVo
);
dispatchInfoService
.
batchReduceDispatch
(
dispatchImportList
,
errorMessageList
,
user
,
null
);
dispatchInfoService
.
batchReduceDispatch
(
dispatchImportList
,
errorMessageList
,
user
,
null
,
null
);
//处理派减结果
handleDispatchAddRes
(
pre
,
errorMessageList
);
...
...
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