| | |
| | | package cn.iocoder.yudao.module.hrm.service.approval.listener; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.iocoder.yudao.module.bpm.api.event.BpmProcessInstanceStatusEvent; |
| | | import cn.iocoder.yudao.module.hrm.dal.dataobject.approval.HrmTransferApplicationDO; |
| | | import cn.iocoder.yudao.module.hrm.dal.mysql.approval.HrmTransferApplicationMapper; |
| | |
| | | /** |
| | | * 调岗申请审批的结果监听器实现类 |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | |
| | | |
| | | @Override |
| | | public void onApplicationEvent(BpmProcessInstanceStatusEvent event) { |
| | | // 只处理调岗审批分类/流程 key 的事件,避免其它模块相同 businessKey 误触发 |
| | | String approveCode = HrmTransferApplicationService.APPROVE_CATEGORY_CODE; |
| | | if (!StrUtil.equals(event.getProcessDefinitionKey(), approveCode) |
| | | && !StrUtil.equals(event.getProcessDefinitionCategory(), approveCode)) { |
| | | return; |
| | | } |
| | | // 通过 businessKey 查询调岗申请 |
| | | Long applicationId; |
| | | try { |