fix:物料检化验测试获取流程节点
This commit is contained in:
@@ -0,0 +1,48 @@
|
|||||||
|
package com.zt.plat.module.qms.resource.material.listener;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.module.bpm.api.task.BpmTaskApi;
|
||||||
|
import com.zt.plat.module.bpm.api.task.dto.BpmTaskRespDTO;
|
||||||
|
import com.zt.plat.module.qms.resource.material.service.MaterialLifecycleService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||||
|
import org.apache.rocketmq.spring.core.RocketMQListener;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
//@RequiredArgsConstructor
|
||||||
|
//@RocketMQMessageListener(
|
||||||
|
// topic = "ASSAY_RESULT_CALLBACK_TOPIC", // 检化验结果主题
|
||||||
|
// consumerGroup = "ASSAY_RESULT_CALLBACK_CONSUMER",
|
||||||
|
// selectorExpression = "material_assay_result_callback" // 标签
|
||||||
|
//)
|
||||||
|
//public class MaterialAssayResultListener implements RocketMQListener<Object> {
|
||||||
|
public class MaterialAssayResultListener {
|
||||||
|
|
||||||
|
/*@Autowired
|
||||||
|
private MaterialLifecycleService materialLifecycleService;*/
|
||||||
|
@Autowired
|
||||||
|
private BpmTaskApi bpmTaskApi;
|
||||||
|
|
||||||
|
public void bpmTest() {
|
||||||
|
log.info("收到检化验结果回调:");
|
||||||
|
CommonResult<List<BpmTaskRespDTO>> taskListRes = bpmTaskApi.getTaskListByProcessInstanceId("2614cd91-2c1c-11f1-8770-005056c00001");
|
||||||
|
log.info("任务数量 {} ,任务详情 {}", taskListRes.getData().size(), taskListRes.getData());
|
||||||
|
|
||||||
|
// 处理当前节点
|
||||||
|
for (BpmTaskRespDTO currentTask : taskListRes.getData()) {
|
||||||
|
log.info("当前节点信息:");
|
||||||
|
log.info(" - 任务名称:{}", currentTask.getName());
|
||||||
|
log.info(" - 处理人:{}", currentTask.getAssignee());
|
||||||
|
log.info(" - 状态:{}", currentTask.getStatus());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user