Commit b4f96d9a by huluobin

update

parent 0fbc0caa
...@@ -45,22 +45,20 @@ public class DepartmentCheckState extends CostState { ...@@ -45,22 +45,20 @@ public class DepartmentCheckState extends CostState {
} }
//如果不需要审核 直接通过 //如果不需要审核 直接通过
if (costContext.currentUserId != null) { OaUser oaUser = oaUserMapper.selectByOaUserId(costDomain.getCreateUserid());
OaUser oaUser = oaUserMapper.selectByOaUserId(currentUserId); OaDepartment oaDepartment = oaDepartmentMapper.selectByDepartmentId(oaUser.getPrimaryDepartmentId());
OaDepartment oaDepartment = oaDepartmentMapper.selectByDepartmentId(oaUser.getPrimaryDepartmentId()); if (costTemplate.shouldDepartmentCheck(costDomain, oaDepartment.getDepartmentMinimumReviewAmount())) {
if (costTemplate.shouldDepartmentCheck(costDomain, oaDepartment.getDepartmentMinimumReviewAmount())) {
costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK); costDomain.setCostStatus(CostDomain.STATUS_FINANCIAL_CHECK);
costDao.updateById(costDomain); costDao.updateById(costDomain);
//流转状态 //流转状态
nextState(financialCheckState); nextState(financialCheckState);
costSubscribe.subscribe(costContext); costSubscribe.subscribe(costContext);
costLogService.saveByManage(costDomain.getCostNo(), "部门审核自动通过", CostLogDomain.DEPARTMENT_AUTO_PASS); costLogService.saveByManage(costDomain.getCostNo(), "部门审核自动通过", CostLogDomain.DEPARTMENT_AUTO_PASS);
return; return;
}
} }
......
...@@ -4,6 +4,7 @@ import com.alibaba.excel.EasyExcel; ...@@ -4,6 +4,7 @@ import com.alibaba.excel.EasyExcel;
import com.bailuntec.api.bailuntec.oa.OaApi; import com.bailuntec.api.bailuntec.oa.OaApi;
import com.bailuntec.api.bailuntec.oa.response.OaDepartmentResp; import com.bailuntec.api.bailuntec.oa.response.OaDepartmentResp;
import com.bailuntec.api.bailuntec.oa.response.OaUserResp; import com.bailuntec.api.bailuntec.oa.response.OaUserResp;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.blt.other.module.auth.model.OaDepartment; import com.blt.other.module.auth.model.OaDepartment;
import com.blt.other.module.auth.model.OaUser; import com.blt.other.module.auth.model.OaUser;
import com.blt.other.module.auth.service.IOaDepartmentService; import com.blt.other.module.auth.service.IOaDepartmentService;
...@@ -75,8 +76,9 @@ public class OtherApplicationTests { ...@@ -75,8 +76,9 @@ public class OtherApplicationTests {
oaUserList.forEach(oaUser -> oaUserList.forEach(oaUser ->
oaUser.setPrimaryDepartmentId(this.getPrimaryDepartment(oaDepartmentMap, oaDepartmentMap.get(oaUser.getDepartmentId())).getDepartmentId())); oaUser.setPrimaryDepartmentId(this.getPrimaryDepartment(oaDepartmentMap, oaDepartmentMap.get(oaUser.getDepartmentId())).getDepartmentId()));
oaUserService.remove(new LambdaQueryWrapper<>());
oaUserService.saveBatch(oaUserList); oaUserService.saveBatch(oaUserList);
oaDepartmentService.saveBatch(oaDepartmentList); // oaDepartmentService.saveBatch(oaDepartmentList);
} }
......
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