Commit 06a7c311584aab675c783a3972ddca4557732b15
1 parent
bcdb4fff
AI工单监听 调用回调 接口更新事件状态
Showing
1 changed file
with
5 additions
and
2 deletions
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/listener/BpmProcessTaskAutoCompleteAIListener.java
| ... | ... | @@ -3,6 +3,7 @@ package com.zteits.urbanops.module.workorder.service.garden.listener; |
| 3 | 3 | import com.zteits.urbanops.module.bpm.api.event.BpmProcessInstanceStatusEvent; |
| 4 | 4 | import com.zteits.urbanops.module.bpm.api.event.BpmProcessInstanceStatusEventListener; |
| 5 | 5 | import com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant; |
| 6 | +import com.zteits.urbanops.module.workorder.service.eventinfo.EventInfoService; | |
| 6 | 7 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; |
| 7 | 8 | import jakarta.annotation.Resource; |
| 8 | 9 | import lombok.extern.slf4j.Slf4j; |
| ... | ... | @@ -19,6 +20,8 @@ import org.springframework.stereotype.Component; |
| 19 | 20 | public class BpmProcessTaskAutoCompleteAIListener extends BpmProcessInstanceStatusEventListener { |
| 20 | 21 | @Resource |
| 21 | 22 | private BpmGardenService gardenService; |
| 23 | + @Resource | |
| 24 | + private EventInfoService eventService; | |
| 22 | 25 | @Override |
| 23 | 26 | protected String getProcessDefinitionKey() { |
| 24 | 27 | |
| ... | ... | @@ -29,8 +32,8 @@ public class BpmProcessTaskAutoCompleteAIListener extends BpmProcessInstanceStat |
| 29 | 32 | @Override |
| 30 | 33 | protected void onEvent(BpmProcessInstanceStatusEvent event) { |
| 31 | 34 | log.info("业务ID:"+event.getBusinessKey()+",业务状态"+event.getStatus()); |
| 32 | - // TODO 调用阿虎接口 传 event.getBusinessKey() | |
| 33 | 35 | gardenService.updateWorkOrderStatus(Long.parseLong(event.getBusinessKey()), event.getStatus()); |
| 34 | - | |
| 36 | + log.info("更新事件表状态,业务ID:"+event.getBusinessKey()+",业务状态"+event.getStatus()); | |
| 37 | + eventService.bpmAiCallBack(event.getBusinessKey(),event.getStatus()); | |
| 35 | 38 | } |
| 36 | 39 | } | ... | ... |