Commit fcb801a0 by liyanlin

总经办审核,调整为5000以上经过总经办审核,5000以下随机

parent 6a06614e
...@@ -62,7 +62,7 @@ public class GeneralManagerCheckState extends CostState { ...@@ -62,7 +62,7 @@ public class GeneralManagerCheckState extends CostState {
if (!costDomain.getCostStatus().equals(CostDomain.STATUS_MANAGER_CHECK)) { if (!costDomain.getCostStatus().equals(CostDomain.STATUS_MANAGER_CHECK)) {
throw new BizRuntimeException("invalid status"); throw new BizRuntimeException("invalid status");
} }
//小于1w的自动审核 //小于5k的自动审核
if (this.autoPass(costDomain)) { if (this.autoPass(costDomain)) {
costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK); costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now()); costDomain.setLastModifyDate(LocalDateTime.now());
...@@ -84,8 +84,8 @@ public class GeneralManagerCheckState extends CostState { ...@@ -84,8 +84,8 @@ public class GeneralManagerCheckState extends CostState {
if (currentUserId != null) { if (currentUserId != null) {
//目前限定铭哥能审核 //目前限定铭哥能审核
if (currentUserId == 681 || currentUserId == 2346) { if (currentUserId == 681 || currentUserId == 2346) {
//大于等于1w需要铭哥审批 //大于等于5需要铭哥审批
if (costDomain.getAmountRmb().compareTo(new BigDecimal("10000")) >= 0) { if (costDomain.getAmountRmb().compareTo(new BigDecimal("5000")) >= 0) {
costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK); costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now()); costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain); costDao.updateById(costDomain);
...@@ -159,10 +159,10 @@ public class GeneralManagerCheckState extends CostState { ...@@ -159,10 +159,10 @@ public class GeneralManagerCheckState extends CostState {
List<CostCurrentReviewer> costCurrentReviewerList = costCurrentReviewerMapper.selectByCostNo(costDomain.getCostNo()); List<CostCurrentReviewer> costCurrentReviewerList = costCurrentReviewerMapper.selectByCostNo(costDomain.getCostNo());
if (costLogDomain != null if (costLogDomain != null
&& costCurrentReviewerList && costCurrentReviewerList
.stream() .stream()
.map(CostCurrentReviewer::getOaUserId) .map(CostCurrentReviewer::getOaUserId)
.collect(Collectors.toList()) .collect(Collectors.toList())
.contains(costLogDomain.getUpdateUserid())) { .contains(costLogDomain.getUpdateUserid())) {
//部门审核人和总经办审核人是同一个人,总经办审核人自动通过。 //部门审核人和总经办审核人是同一个人,总经办审核人自动通过。
return true; return true;
} }
...@@ -183,21 +183,21 @@ public class GeneralManagerCheckState extends CostState { ...@@ -183,21 +183,21 @@ public class GeneralManagerCheckState extends CostState {
return true; return true;
} }
//小于1w不需要总经办审批,特殊情况除外; //小于5k不需要总经办审批,特殊情况除外;
if (costDomain.getAmountRmb().compareTo(new BigDecimal("10000")) < 0) { if (costDomain.getAmountRmb().compareTo(new BigDecimal("5000")) < 0) {
//特殊情况:5000(含)-1w(不含)的每天随机抽取三个订单 //特殊情况:0(含)-5k(不含)的每天随机抽取三个订单
if (costDomain.getAmountRmb().compareTo(new BigDecimal("5000")) >= 0) { //if (costDomain.getAmountRmb().compareTo(new BigDecimal("5000")) >= 0) {
Integer times = APPROVE_TIMES.get(LocalDate.now()); Integer times = APPROVE_TIMES.get(LocalDate.now());
if (times == null) { if (times == null) {
APPROVE_TIMES = new ConcurrentHashMap<LocalDate, Integer>() {{ APPROVE_TIMES = new ConcurrentHashMap<LocalDate, Integer>() {{
put(LocalDate.now(), 1); put(LocalDate.now(), 1);
}}; }};
} else if (times < 3 && LocalDateTime.now().getSecond() % 3 == 0) { } else if (times < 3 && LocalDateTime.now().getSecond() % 3 == 0) {
APPROVE_TIMES.put(LocalDate.now(), ++times); APPROVE_TIMES.put(LocalDate.now(), ++times);
} else
return true;
} else } else
return true; return true;
/*} else
return true;*/
} }
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment