Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
Overview
Overview
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
huluobin
bailuntec-cost
Commits
fcb801a0
Commit
fcb801a0
authored
Dec 08, 2021
by
liyanlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
总经办审核,调整为5000以上经过总经办审核,5000以下随机
parent
6a06614e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
GeneralManagerCheckState.java
...cost/service/impl/costcheck/GeneralManagerCheckState.java
+20
-20
No files found.
cost-service/src/main/java/com/blt/other/module/cost/service/impl/costcheck/GeneralManagerCheckState.java
View file @
fcb801a0
...
...
@@ -62,7 +62,7 @@ public class GeneralManagerCheckState extends CostState {
if
(!
costDomain
.
getCostStatus
().
equals
(
CostDomain
.
STATUS_MANAGER_CHECK
))
{
throw
new
BizRuntimeException
(
"invalid status"
);
}
//小于
1w
的自动审核
//小于
5k
的自动审核
if
(
this
.
autoPass
(
costDomain
))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINANCIAL_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
...
...
@@ -84,8 +84,8 @@ public class GeneralManagerCheckState extends CostState {
if
(
currentUserId
!=
null
)
{
//目前限定铭哥能审核
if
(
currentUserId
==
681
||
currentUserId
==
2346
)
{
//大于等于
1w
需要铭哥审批
if
(
costDomain
.
getAmountRmb
().
compareTo
(
new
BigDecimal
(
"
10
000"
))
>=
0
)
{
//大于等于
5
需要铭哥审批
if
(
costDomain
.
getAmountRmb
().
compareTo
(
new
BigDecimal
(
"
5
000"
))
>=
0
)
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINANCIAL_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
...
...
@@ -159,10 +159,10 @@ public class GeneralManagerCheckState extends CostState {
List
<
CostCurrentReviewer
>
costCurrentReviewerList
=
costCurrentReviewerMapper
.
selectByCostNo
(
costDomain
.
getCostNo
());
if
(
costLogDomain
!=
null
&&
costCurrentReviewerList
.
stream
()
.
map
(
CostCurrentReviewer:
:
getOaUserId
)
.
collect
(
Collectors
.
toList
())
.
contains
(
costLogDomain
.
getUpdateUserid
()))
{
.
stream
()
.
map
(
CostCurrentReviewer:
:
getOaUserId
)
.
collect
(
Collectors
.
toList
())
.
contains
(
costLogDomain
.
getUpdateUserid
()))
{
//部门审核人和总经办审核人是同一个人,总经办审核人自动通过。
return
true
;
}
...
...
@@ -183,21 +183,21 @@ public class GeneralManagerCheckState extends CostState {
return
true
;
}
//小于1w不需要总经办审批,特殊情况除外;
if
(
costDomain
.
getAmountRmb
().
compareTo
(
new
BigDecimal
(
"10000"
))
<
0
)
{
//特殊情况:5000(含)-1w(不含)的每天随机抽取三个订单
if
(
costDomain
.
getAmountRmb
().
compareTo
(
new
BigDecimal
(
"5000"
))
>=
0
)
{
Integer
times
=
APPROVE_TIMES
.
get
(
LocalDate
.
now
());
if
(
times
==
null
)
{
APPROVE_TIMES
=
new
ConcurrentHashMap
<
LocalDate
,
Integer
>()
{{
put
(
LocalDate
.
now
(),
1
);
}};
}
else
if
(
times
<
3
&&
LocalDateTime
.
now
().
getSecond
()
%
3
==
0
)
{
APPROVE_TIMES
.
put
(
LocalDate
.
now
(),
++
times
);
}
else
return
true
;
//小于5k不需要总经办审批,特殊情况除外;
if
(
costDomain
.
getAmountRmb
().
compareTo
(
new
BigDecimal
(
"5000"
))
<
0
)
{
//特殊情况:0(含)-5k(不含)的每天随机抽取三个订单
//if (costDomain.getAmountRmb().compareTo(new BigDecimal("5000")) >= 0) {
Integer
times
=
APPROVE_TIMES
.
get
(
LocalDate
.
now
());
if
(
times
==
null
)
{
APPROVE_TIMES
=
new
ConcurrentHashMap
<
LocalDate
,
Integer
>()
{{
put
(
LocalDate
.
now
(),
1
);
}};
}
else
if
(
times
<
3
&&
LocalDateTime
.
now
().
getSecond
()
%
3
==
0
)
{
APPROVE_TIMES
.
put
(
LocalDate
.
now
(),
++
times
);
}
else
return
true
;
/*} else
return true;*/
}
return
false
;
...
...
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