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