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
78e6d343
Commit
78e6d343
authored
Oct 13, 2021
by
liyanlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5k-1w单随机抽取给总经办审核
parent
07d7ca8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
GeneralManagerCheckState.java
...cost/service/impl/costcheck/GeneralManagerCheckState.java
+24
-6
No files found.
cost-service/src/main/java/com/blt/other/module/cost/service/impl/costcheck/GeneralManagerCheckState.java
View file @
78e6d343
...
@@ -19,10 +19,10 @@ import org.springframework.stereotype.Component;
...
@@ -19,10 +19,10 @@ import org.springframework.stereotype.Component;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.Locale
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -46,6 +46,9 @@ public class GeneralManagerCheckState extends CostState {
...
@@ -46,6 +46,9 @@ public class GeneralManagerCheckState extends CostState {
@Resource
@Resource
CostTypeDao
costTypeDao
;
CostTypeDao
costTypeDao
;
//审批次数
static
Map
<
LocalDate
,
Integer
>
APPROVE_TIMES
=
new
ConcurrentHashMap
<>();
@Override
@Override
public
void
handle
()
{
public
void
handle
()
{
CostDomain
costDomain
=
costContext
.
costDomain
;
CostDomain
costDomain
=
costContext
.
costDomain
;
...
@@ -149,9 +152,6 @@ public class GeneralManagerCheckState extends CostState {
...
@@ -149,9 +152,6 @@ public class GeneralManagerCheckState extends CostState {
}
}
private
boolean
autoPass
(
CostDomain
costDomain
)
{
private
boolean
autoPass
(
CostDomain
costDomain
)
{
if
(
costDomain
.
getAmountRmb
().
compareTo
(
new
BigDecimal
(
"10000"
))
<
0
)
{
return
true
;
}
if
(
costDomain
.
getCostForm
().
equals
(
2
))
{
if
(
costDomain
.
getCostForm
().
equals
(
2
))
{
//收款不需要审核
//收款不需要审核
return
true
;
return
true
;
...
@@ -168,6 +168,24 @@ public class GeneralManagerCheckState extends CostState {
...
@@ -168,6 +168,24 @@ public class GeneralManagerCheckState extends CostState {
||
costTypeDomain
.
getTypeName
().
contains
(
"车辆使用费"
))
{
||
costTypeDomain
.
getTypeName
().
contains
(
"车辆使用费"
))
{
return
true
;
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
;
}
else
return
true
;
}
return
false
;
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