Commit b4f96d9a by huluobin

update

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