Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
c38a602a
Commit
c38a602a
authored
Jun 04, 2026
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整批量派单自定义备案基数校验及兼职工伤兼容处理
Co-authored-by:
Cursor
<
cursoragent@cursor.com
>
parent
469988d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
26 deletions
+43
-26
TDispatchImportVo.java
.../yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
+12
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+31
-26
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
View file @
c38a602a
...
...
@@ -573,5 +573,17 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 订单ID
*/
private
String
orderId
;
/**
* 是否兼职工伤派单(导入运行时计算,非 Excel 列)
*/
@ExcelIgnore
@Schema
(
description
=
"是否兼职工伤派单"
)
private
Boolean
partTimeInjury
;
/**
* 是否部分失败项重新派单(导入运行时计算,非 Excel 列)
*/
@ExcelIgnore
@Schema
(
description
=
"是否部分失败项重新派单"
)
private
Boolean
dispatchPart
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
c38a602a
...
...
@@ -549,16 +549,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TSocialFundInfo
socialFund
;
TDispatchImportVo
excel
;
EmpDispatchAddVo
addVo
=
new
EmpDispatchAddVo
();
// 失败项派单
boolean
dispatchPart
=
false
;
// 兼职工伤
boolean
injury
=
false
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
dispatchPart
=
false
;
injury
=
false
;
empVo
=
null
;
excel
=
excelVOList
.
get
(
i
);
excel
.
setPartTimeInjury
(
Boolean
.
FALSE
);
excel
.
setDispatchPart
(
Boolean
.
FALSE
);
if
(
idCardMap
.
get
(
excel
.
getEmpIdcard
())
!=
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"身份证【"
+
excel
.
getEmpIdcard
()
+
"】与第"
+
idCardMap
.
get
(
excel
.
getEmpIdcard
())
+
"行重复,未导入"
));
excelVOTemp
.
put
(
excel
.
getRowIndex
().
toString
(),
excel
.
getEmpIdcard
());
...
...
@@ -581,7 +580,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&&
(
CommonConstants
.
FOUR_STRING
.
equals
(
socialFund
.
getSocialStatus
())
||
CommonConstants
.
TWELVE_STRING
.
equals
(
socialFund
.
getSocialStatus
())))
{
// 部分失败
dispatchPart
=
true
;
excel
.
setDispatchPart
(
Boolean
.
TRUE
)
;
}
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
()))
{
if
(
Common
.
isNullOrZero
(
excel
.
getRecordBase
()))
{
...
...
@@ -604,9 +603,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&&
Common
.
isEmpty
(
excel
.
getBigailmentStart
())
&&
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
())
&&
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
excel
.
getWorkInjuryCardinal
()))
<
0
);
excel
.
setPartTimeInjury
(
injury
?
Boolean
.
TRUE
:
Boolean
.
FALSE
);
}
// 失败项社保派单 和已有派单户不一致
if
(
dispatchPart
&&
Common
.
isNotNull
(
socialFund
)
if
(
Boolean
.
TRUE
.
equals
(
excel
.
getDispatchPart
())
&&
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
socialFund
.
getSocialHouseholdName
())
&&
Common
.
isNotNull
(
excel
.
getSocialHousehold
())
&&
!
socialFund
.
getSocialHouseholdName
().
equals
(
excel
.
getSocialHousehold
()))
{
...
...
@@ -615,7 +615,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue
;
}
// 失败项重新派单的缴纳方式不一样
if
(
dispatchPart
&&
Common
.
isNotNull
(
socialFund
)
if
(
Boolean
.
TRUE
.
equals
(
excel
.
getDispatchPart
())
&&
Common
.
isNotNull
(
socialFund
)
&&
!
socialFund
.
getPaymentType
().
equals
(
excel
.
getPaymentType
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_PAYMENT_TYPE_NOT_SAME
)));
excelVOTemp
.
put
(
excel
.
getRowIndex
().
toString
(),
excel
.
getEmpIdcard
());
...
...
@@ -666,7 +666,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 初始化新增信息:档案、项目档案、员工合同
initAddInfo
(
empAddsMap
,
contractsMap
,
projectsMap
,
empVo
,
excel
,
user
,
setInfoVo
,
socialSet
,
projectsUpdateMap
);
// 新增社保
initSocialAddInfo
(
socialsMap
,
empVo
,
socialSet
,
excel
,
socialFundMap
,
dispatchPart
,
setInfoVo
);
initSocialAddInfo
(
socialsMap
,
empVo
,
socialSet
,
excel
,
socialFundMap
,
setInfoVo
);
// 新增公积金
if
(
initFundAddInfo
(
errorMessageList
,
fundsMap
,
empVo
,
fundSet
,
excel
))
{
excelVOTemp
.
put
(
excel
.
getRowIndex
().
toString
(),
excel
.
getEmpIdcard
());
...
...
@@ -692,7 +692,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
addVo
.
setProjectsUpdateMap
(
projectsUpdateMap
);
R
<
EmpDispatchAddVo
>
res
=
archivesDaprUtil
.
addDispatchInfo
(
addVo
);
// 开始插入各种数据了
insertAllInfo
(
excelVOList
,
errorMessageList
,
empVoMap
,
res
,
socialsMap
,
fundsMap
,
socialFundAddMap
,
dispatchMap
,
excelVOTemp
,
dispatchPart
,
injury
);
insertAllInfo
(
excelVOList
,
errorMessageList
,
empVoMap
,
res
,
socialsMap
,
fundsMap
,
socialFundAddMap
,
dispatchMap
,
excelVOTemp
);
// 清理map list 等数据
// Common.clear(excelVOList);
Common
.
clear
(
empAddsMap
);
...
...
@@ -729,8 +729,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map
<
String
,
TProvidentFund
>
fundsMap
,
Map
<
String
,
TSocialFundInfo
>
socialFundAddMap
,
Map
<
String
,
TDispatchInfo
>
dispatchMap
,
Map
<
String
,
String
>
excelVOTemp
,
boolean
dispatchPart
,
boolean
injury
)
{
Map
<
String
,
String
>
excelVOTemp
)
{
Map
<
String
,
EmpAddDispatchVo
>
empAddsMap
=
null
;
Map
<
String
,
EmpContractDispatchVo
>
contractsMap
=
null
;
Map
<
String
,
EmpProjectDispatchVo
>
projectsMap
=
null
;
...
...
@@ -824,7 +823,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
dispatch
))
{
socialFund
.
setDispatchId
(
dispatch
.
getId
());
}
initSocialFundAndInsert
(
emp
,
social
,
fund
,
socialFund
,
project
,
dispatchPart
,
injury
,
dispatch
);
initSocialFundAndInsert
(
emp
,
social
,
fund
,
socialFund
,
project
,
Boolean
.
TRUE
.
equals
(
excel
.
getDispatchPart
()),
Boolean
.
TRUE
.
equals
(
excel
.
getPartTimeInjury
()),
dispatch
);
}
// 生成预付数据
if
(
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
socialFund
.
getId
()))
{
...
...
@@ -1779,7 +1780,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
SysBaseSetInfo
socialSet
,
TDispatchImportVo
excel
,
Map
<
String
,
TSocialFundInfo
>
socialFundMap
,
boolean
dispatchPart
,
ProjectSetInfoVo
setInfoVo
)
{
TSocialInfo
social
;
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
()))
{
...
...
@@ -1999,7 +1999,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
,
social
.
getPersonalMedicalMoney
()
,
social
.
getPersonalUnemploymentMoney
()));
// 处理部分办理失败的情况
initHandleStatus
(
excel
,
socialFundMap
,
social
,
dispatchPart
);
initHandleStatus
(
excel
,
socialFundMap
,
social
);
//单独处理工伤派增时对应的各种数据
handleInjury
(
social
);
// 派增社保时,从项目信息中获取"我司到款单位"
...
...
@@ -2079,8 +2079,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
void
initHandleStatus
(
TDispatchImportVo
excel
,
Map
<
String
,
TSocialFundInfo
>
socialFundMap
,
TSocialInfo
social
,
boolean
dispatchPart
)
{
TSocialInfo
social
)
{
boolean
dispatchPart
=
Boolean
.
TRUE
.
equals
(
excel
.
getDispatchPart
());
TSocialFundInfo
socialFund
;
if
(
Common
.
isNotNull
(
socialFundMap
))
{
socialFund
=
socialFundMap
.
get
(
excel
.
getEmpIdcard
());
...
...
@@ -2862,11 +2862,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 自定义 各项基数配置与备案基数不一致,就提示(不含大病)
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
()))
{
boolean
flag
=
Common
.
isBlankToBigDecimalZero
(
excel
.
getPensionCardinal
()).
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
Common
.
isBlankToBigDecimalZero
(
excel
.
getMedicalCardinal
()).
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
Common
.
isBlankToBigDecimalZero
(
excel
.
getUnemploymentCardinal
()).
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
Common
.
isBlankToBigDecimalZero
(
excel
.
getWorkInjuryCardinal
()).
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
Common
.
isBlankToBigDecimalZero
(
excel
.
getBirthCardinal
()).
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
;
boolean
flag
=
(
null
!=
excel
.
getPensionCardinal
()
&&
excel
.
getPensionCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)
||
(
null
!=
excel
.
getMedicalCardinal
()
&&
excel
.
getMedicalCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)
||
(
null
!=
excel
.
getUnemploymentCardinal
()
&&
excel
.
getUnemploymentCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)
||
(
null
!=
excel
.
getWorkInjuryCardinal
()
&&
excel
.
getWorkInjuryCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)
||
(
null
!=
excel
.
getBirthCardinal
()
&&
excel
.
getBirthCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)
;
if
(
flag
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_BASE_RECORD_ERROR
)));
return
true
;
...
...
@@ -9600,13 +9600,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
paymentType
))
{
// 自定义: 5个险种基数 = 备案基数(不含大病)
BigDecimal
recordBase
=
Common
.
isBlankToBigDecimalZero
(
excel
.
getRecordBase
());
excel
.
setPensionCardinal
(
recordBase
);
excel
.
setMedicalCardinal
(
recordBase
);
excel
.
setUnemploymentCardinal
(
recordBase
);
excel
.
setWorkInjuryCardinal
(
recordBase
);
excel
.
setBirthCardinal
(
recordBase
);
if
(
Boolean
.
TRUE
.
equals
(
excel
.
getPartTimeInjury
()))
{
// 兼职工伤: 仅工伤基数 = 备案基数,其余险种不赋值
excel
.
setWorkInjuryCardinal
(
recordBase
);
}
else
{
excel
.
setPensionCardinal
(
recordBase
);
excel
.
setMedicalCardinal
(
recordBase
);
excel
.
setUnemploymentCardinal
(
recordBase
);
excel
.
setWorkInjuryCardinal
(
recordBase
);
excel
.
setBirthCardinal
(
recordBase
);
}
// 不赋值大病基数,保持原有逻辑(在第1902-1951行)
}
}
}
}
\ No newline at end of file
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