fix:【bpm 工作流】跨进程调用,无法回调 crm 的工作流结果的问题
This commit is contained in:
@@ -1,20 +1,30 @@
|
||||
package cn.iocoder.yudao.module.crm.service.receivable.listener;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.bpm.api.event.BpmProcessInstanceStatusEvent;
|
||||
import cn.iocoder.yudao.module.bpm.api.event.BpmProcessInstanceStatusEventListener;
|
||||
import cn.iocoder.yudao.module.crm.enums.ApiConstants;
|
||||
import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivableService;
|
||||
import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivableServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 回款审批的结果的监听器实现类
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@Component
|
||||
@RestController
|
||||
@Validated
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||
public class CrmReceivableStatusListener extends BpmProcessInstanceStatusEventListener {
|
||||
|
||||
private static final String PREFIX = ApiConstants.PREFIX + "/receivable";
|
||||
|
||||
@Resource
|
||||
private CrmReceivableService receivableService;
|
||||
|
||||
@@ -24,7 +34,8 @@ public class CrmReceivableStatusListener extends BpmProcessInstanceStatusEventLi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(BpmProcessInstanceStatusEvent event) {
|
||||
@PostMapping(PREFIX + "/update-audit-status") // 目的:提供给 bpm-server rpc 调用
|
||||
public void onEvent(@RequestBody BpmProcessInstanceStatusEvent event) {
|
||||
receivableService.updateReceivableAuditStatus(Long.parseLong(event.getBusinessKey()), event.getStatus());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user