Commit bfe861c2 by jianshuqin

增加 广州猫哥饮食文化传播有限公司的主体,总经办的角色换成振兴或者猫哥

parent 7cbe3959
......@@ -101,6 +101,19 @@ public class DepartmentCheckState extends CostState {
}
}
}
//主体广州猫哥饮食文化传播有限公司,审核人陈振兴02【自动审核】金额为5000以下
if ("广州猫哥饮食文化传播有限公司".equals(costDomain.getCompanyName()) && costDomain.getCostForm() != 2) {
if (costCurrentReviewerList != null && costCurrentReviewerList.size() > 0) {
Optional<CostCurrentReviewer> optionalCostCurrentReviewer = costCurrentReviewerList.stream().filter(l -> l.getOaUserId() == 5126).findFirst();
if(optionalCostCurrentReviewer.isPresent()) {
costCurrentReviewer = optionalCostCurrentReviewer.get();
if (costDomain.getAmountRmb().compareTo(new BigDecimal("5000")) < 0) {
costLogService.saveByManage(costDomain.getCostNo(), "人民币金额【" + costDomain.getAmountRmb() + "】少于设定【5000】审核条件", null);
shouldAutoCheck = true;
}
}
}
}
if (costCurrentReviewer == null || shouldAutoCheck) {
//如果不需要审核 直接通过
DepartmentReviewer departmentReviewer = this.getCurrentDepartmentReviewer(oaDepartment.getDepartmentId());
......@@ -287,6 +300,15 @@ public class DepartmentCheckState extends CostState {
}
}
}
//广州猫哥饮食文化传播有限公司的主体,总经办的角色换成振兴或者猫哥随便一个都可以 2025-06-09
if ("广州猫哥饮食文化传播有限公司".equals(costDomain.getCompanyName())) {
for (CostReviewer costReviewer: costReviewerList) {
if (costReviewer.getReviewerUserId() == 681) {
costReviewer.setReviewerUserId(5126);
costReviewer.setReviewerUserName("陈振兴02");
}
}
}
String departmentReviewerNames = costReviewerList.stream().map(CostReviewer::getReviewerUserName).collect(Collectors.joining(","));
log.info("更新当前审核人为部门审核人:{}", departmentReviewerNames);
......
......@@ -83,7 +83,7 @@ public class GeneralManagerCheckState extends CostState {
}
if (currentUserId != null) {
//目前限定铭哥能审核或者主体是啫啫煲鹏哥能审核
if (currentUserId == 681 || ("啫啫煲".equals(costDomain.getCompanyName()) && currentUserId == 720)) {
if (currentUserId == 681 || ("啫啫煲".equals(costDomain.getCompanyName()) && currentUserId == 720) || ("广州猫哥饮食文化传播有限公司".equals(costDomain.getCompanyName()) && currentUserId == 5126)) {
//大于等于5需要铭哥审批
if (costDomain.getAmountRmb().compareTo(new BigDecimal("5000")) >= 0 || ("啫啫煲".equals(costDomain.getCompanyName()) && costDomain.getAmountRmb().compareTo(new BigDecimal("1000")) >= 0)) {
costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK);
......@@ -121,7 +121,7 @@ public class GeneralManagerCheckState extends CostState {
}
//人工审核拒绝
if (currentUserId == 681 || currentUserId == 4828 || ("啫啫煲".equals(costDomain.getCompanyName()) && currentUserId == 720)) {
if (currentUserId == 681 || currentUserId == 4828 || ("啫啫煲".equals(costDomain.getCompanyName()) && currentUserId == 720) || ("广州猫哥饮食文化传播有限公司".equals(costDomain.getCompanyName()) && currentUserId == 5126)) {
ApprovalHistoryDomain approvalHistoryDomain = ApprovalHistoryDomain.builder()
.approvalUserId(currentUserId)
.approvalTime(LocalDateTime.now())
......@@ -142,8 +142,20 @@ public class GeneralManagerCheckState extends CostState {
CostDomain costDomain = costContext.costDomain;
//只查铭哥的ID,啫啫煲的主体,遇到铭哥审批就换鹏哥 2023-06-01
OaUser user = oaUserMapper.selectByOaUserId(("啫啫煲".equals(costDomain.getCompanyName())) ? 720 : 681);
//只查铭哥的ID,广州猫哥饮食文化传播有限公司的主体,总经办的角色换成振兴或者猫哥随便一个都可以 2025-06-09
int userId = 681;
switch (costDomain.getCompanyName()){
case "啫啫煲":
userId = 720;
break;
case "广州猫哥饮食文化传播有限公司":
userId = 5126;
break;
default:
userId = 681;
break;
}
OaUser user = oaUserMapper.selectByOaUserId(userId);
List<CostReviewer> costReviewerList = new ArrayList<>();
costReviewerList.add(CostReviewer.builder()
.reviewerUserId(user.getOaUserId())
......
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