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
e5835abe
Commit
e5835abe
authored
Jan 16, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-含风险项目商险不购买申请提交
parent
49299532
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
TInsuranceUnpurchaseApplyServiceImpl.java
...ry/service/impl/TInsuranceUnpurchaseApplyServiceImpl.java
+20
-15
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TInsuranceUnpurchaseApplyServiceImpl.java
View file @
e5835abe
...
...
@@ -164,21 +164,6 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
String
applyNo
=
getCode
();
//获取明细当日最大申请编号
String
applyDetail
=
baseMapper
.
getMaxInusuranceDetailCode
();
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
if
(
Common
.
isNotNull
(
tInsuranceUnpurchaseApply
.
getDeptNo
()))
{
List
<
String
>
deptList
=
CommonConstants
.
deptList
;
tInsuranceUnpurchaseApply
.
setCompanyFlag
(
deptList
.
stream
().
noneMatch
(
e
->
e
.
equals
(
user
.
getDeptName
()))
?
CommonConstants
.
ZERO_STRING
:
CommonConstants
.
ONE_STRING
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tInsuranceUnpurchaseApply
.
getReasonType
()))
{
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TInsuranceUnpurchaseApply
>
query
().
lambda
()
.
eq
(
TInsuranceUnpurchaseApply:
:
getDeptNo
,
tInsuranceUnpurchaseApply
.
getDeptNo
())
.
eq
(
TInsuranceUnpurchaseApply:
:
getReasonType
,
tInsuranceUnpurchaseApply
.
getReasonType
())
.
eq
(
TInsuranceUnpurchaseApply:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
tInsuranceUnpurchaseApply
.
setAuditFlag
(
count
>
0
?
CommonConstants
.
ZERO_STRING
:
CommonConstants
.
ONE_STRING
);
tInsuranceUnpurchaseApply
.
setStatus
(
count
>
0
?
CommonConstants
.
THREE_STRING
:
tInsuranceUnpurchaseApply
.
getStatus
());
}
}
//暂存不做校验
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tInsuranceUnpurchaseApply
.
getSaveFlag
()))
{
tInsuranceUnpurchaseApply
.
setCreateTime
(
null
);
...
...
@@ -221,6 +206,8 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
if
(
Common
.
isNotNull
(
personList
)
&&
!
personList
.
isEmpty
()
&&
personList
.
stream
().
noneMatch
(
e
->
CommonConstants
.
ONE_STRING
.
equals
(
e
.
getCode
())))
{
tInsuranceUnpurchaseApply
.
setUnbuyNum
(
String
.
valueOf
(
personList
.
size
()));
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
setValue
(
tInsuranceUnpurchaseApply
,
user
);
if
(
Common
.
isNotNull
(
tInsuranceUnpurchaseApply
.
getId
()))
{
//同倩倩确认申请时间实时更新
tInsuranceUnpurchaseApply
.
setCreateTime
(
LocalDateTime
.
now
());
...
...
@@ -358,6 +345,24 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
return
personList
;
}
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
private
void
setValue
(
TInsuranceUnpurchaseApply
tInsuranceUnpurchaseApply
,
YifuUser
user
)
{
if
(
Common
.
isNotNull
(
tInsuranceUnpurchaseApply
.
getDeptNo
()))
{
List
<
String
>
deptList
=
CommonConstants
.
deptList
;
tInsuranceUnpurchaseApply
.
setCompanyFlag
(
deptList
.
stream
().
noneMatch
(
e
->
e
.
equals
(
user
.
getDeptName
()))
?
CommonConstants
.
ZERO_STRING
:
CommonConstants
.
ONE_STRING
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tInsuranceUnpurchaseApply
.
getReasonType
()))
{
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TInsuranceUnpurchaseApply
>
query
().
lambda
()
.
eq
(
TInsuranceUnpurchaseApply:
:
getDeptNo
,
tInsuranceUnpurchaseApply
.
getDeptNo
())
.
eq
(
TInsuranceUnpurchaseApply:
:
getReasonType
,
tInsuranceUnpurchaseApply
.
getReasonType
())
.
eq
(
TInsuranceUnpurchaseApply:
:
getStatus
,
CommonConstants
.
THREE_STRING
)
.
eq
(
TInsuranceUnpurchaseApply:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
tInsuranceUnpurchaseApply
.
setAuditFlag
(
count
>
0
?
CommonConstants
.
ZERO_STRING
:
CommonConstants
.
ONE_STRING
);
tInsuranceUnpurchaseApply
.
setStatus
(
count
>
0
?
CommonConstants
.
THREE_STRING
:
tInsuranceUnpurchaseApply
.
getStatus
());
}
}
}
private
void
initValue
(
TInsuranceUnpurchaseApply
tInsuranceUnpurchaseApply
,
TInsuranceUnpurchasePerson
person
)
{
person
.
setParnetId
(
tInsuranceUnpurchaseApply
.
getId
());
person
.
setApplyNo
(
tInsuranceUnpurchaseApply
.
getApplyNo
());
...
...
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