dongyukun
9 天以前 e88fba9645a57535d858ce48da8e9d9a3dc84adc
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.bpm.service.oa.listener;
H 2
3 import com.iailab.module.bpm.event.BpmProcessInstanceStatusEvent;
4 import com.iailab.module.bpm.event.BpmProcessInstanceStatusEventListener;
5 import com.iailab.module.bpm.service.oa.BpmOALeaveService;
6 import com.iailab.module.bpm.service.oa.BpmOALeaveServiceImpl;
7 import org.springframework.stereotype.Component;
8
9 import javax.annotation.Resource;
10
11 /**
12  * OA 请假单的结果的监听器实现类
13  *
14  * @author iailab
15  */
16 @Component
17 public class BpmOALeaveStatusListener extends BpmProcessInstanceStatusEventListener {
18
19     @Resource
20     private BpmOALeaveService leaveService;
21
22     @Override
23     protected String getProcessDefinitionKey() {
24         return BpmOALeaveServiceImpl.PROCESS_KEY;
25     }
26
27     @Override
28     protected void onEvent(BpmProcessInstanceStatusEvent event) {
29         leaveService.updateLeaveStatus(Long.parseLong(event.getBusinessKey()), event.getStatus());
30     }
31
32 }