Commit 9a0c5b1b by huluobin

# update

parent ec36f072
......@@ -20,13 +20,6 @@ public interface CostService {
void setPrimaryDepartment(List<CostDomain> costDomains);
/**
* 获取所有费用单
*
* @return allCost
*/
CostPageResult getAllCost(Integer pageNum, Integer pageSize, Integer userId, String projectTypes);
/**
* 根据 costNo 获取 cost
*
* @param costNo costNo
......
......@@ -7,7 +7,9 @@ import com.blt.other.module.auth.dao.OaDepartmentMapper;
import com.blt.other.module.auth.dao.OaUserMapper;
import com.blt.other.module.auth.model.OaDepartment;
import com.blt.other.module.auth.model.OaUser;
import com.blt.other.module.cost.dao.CostCurrentReviewerMapper;
import com.blt.other.module.cost.dao.SpecDepartmentCheckConfigMapper;
import com.blt.other.module.cost.model.CostCurrentReviewer;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.model.CostTemplate;
import com.blt.other.module.sys.dao.DepartmentReviewerMapper;
......@@ -44,6 +46,8 @@ public class DepartmentCheckState extends CostState {
OaUserMapper oaUserMapper;
@Resource
SpecDepartmentCheckConfigMapper specDepartmentCheckConfigMapper;
@Resource
CostCurrentReviewerMapper costCurrentReviewerMapper;
@Transactional(rollbackFor = Exception.class)
@Override
......@@ -80,7 +84,10 @@ public class DepartmentCheckState extends CostState {
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain);
costLogService.saveByManage(costDomain.getCostNo(), "部门审核自动通过", CostLogDomain.DEPARTMENT_AUTO_PASS);
List<CostCurrentReviewer> costCurrentReviewerList = costCurrentReviewerMapper.selectByCostNo(costDomain.getCostNo());
costLogService.saveByManage(costDomain.getCostNo(), "部门审核自动通过,当前审核人:" + costCurrentReviewerList.stream().map(CostCurrentReviewer::getUsername)
.collect(Collectors.joining()), CostLogDomain.DEPARTMENT_AUTO_PASS);
//流转状态
nextState(hrCheckState);
......@@ -96,7 +103,9 @@ public class DepartmentCheckState extends CostState {
costDomain.setCostStatus(CostDomain.STATUS_HR_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain);
costLogService.saveByManage(costDomain.getCostNo(), "部门自动审核通过", CostLogDomain.DEPARTMENT_AUTO_PASS);
List<CostCurrentReviewer> costCurrentReviewerList = costCurrentReviewerMapper.selectByCostNo(costDomain.getCostNo());
costLogService.saveByManage(costDomain.getCostNo(), "部门审核自动通过,当前审核人:" + costCurrentReviewerList.stream().map(CostCurrentReviewer::getUsername)
.collect(Collectors.joining()), CostLogDomain.DEPARTMENT_AUTO_PASS);
//流转状态
nextState(hrCheckState);
......
......@@ -44,8 +44,10 @@ public class FinalCheckState extends CostState {
costDomain.setCostStatus(CostDomain.STATUS_UN_PAY);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain);
costLogService.saveByManage(costDomain.getCostNo(), "最终审核自动通过", CostLogDomain.FINAL_AUTO_PASS);
List<CostCurrentReviewer> costCurrentReviewerList = costCurrentReviewerMapper.selectByCostNo(costDomain.getCostNo());
costLogService.saveByManage(costDomain.getCostNo(), "最终审核自动通过,当前审核人:" + costCurrentReviewerList.stream().map(CostCurrentReviewer::getUsername)
.collect(Collectors.joining()), CostLogDomain.DEPARTMENT_AUTO_PASS);
//流转状态
nextState(unPayState);
//通知财务系统
......
......@@ -4,8 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.blt.other.common.exception.BizRuntimeException;
import com.blt.other.database.model.CostCompanyDomain;
import com.blt.other.database.model.CostLogDomain;
import com.blt.other.module.auth.service.IOaUserService;
import com.blt.other.module.cost.dao.CostCompanyDao;
import com.blt.other.module.cost.dao.CostCurrentReviewerMapper;
import com.blt.other.module.cost.model.CostCurrentReviewer;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.model.CostTemplate;
import com.blt.other.module.sys.model.CostReviewer;
......@@ -33,6 +34,8 @@ public class FinancialCheckState extends CostState {
FinalCheckState finalCheckState;
@Resource
CostCompanyDao costCompanyDao;
@Resource
CostCurrentReviewerMapper costCurrentReviewerMapper;
@Override
void nextState(CostState costState) {
......@@ -58,8 +61,10 @@ public class FinancialCheckState extends CostState {
costDomain.setCostStatus(CostDomain.STATUS_FINAL_CHECK);
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain);
costLogService.saveByManage(costDomain.getCostNo(), "财务自动审核通过", CostLogDomain.FINANCIAL_AUTO_PASS);
List<CostCurrentReviewer> costCurrentReviewerList = costCurrentReviewerMapper.selectByCostNo(costDomain.getCostNo());
costLogService.saveByManage(costDomain.getCostNo(), "财务自动审核通过,当前审核人:" + costCurrentReviewerList.stream().map(CostCurrentReviewer::getUsername)
.collect(Collectors.joining()), CostLogDomain.DEPARTMENT_AUTO_PASS);
//流转状态
nextState(finalCheckState);
//发布到总线尝试下个环节的自动审核
......
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