diff --git a/src/main/java/com/glxp/api/controller/trace/UdiTraceController.java b/src/main/java/com/glxp/api/controller/trace/UdiTraceController.java index 58b2251..a995633 100644 --- a/src/main/java/com/glxp/api/controller/trace/UdiTraceController.java +++ b/src/main/java/com/glxp/api/controller/trace/UdiTraceController.java @@ -89,6 +89,15 @@ public class UdiTraceController extends BaseController { return ResultVOUtils.success("发送成功"); } + @PostMapping("/udi/trace/source/task") + public BaseResponse sendTask(@RequestBody MqTaskDelayMessage mqTaskDelayMessage) { + String messageJson = JSON.toJSONString(mqTaskDelayMessage); + System.out.println(messageJson); + rabbitTemplate.convertAndSend(TopicRabbitConfig.TRACE_DELAY_EXCHANGE, TopicRabbitConfig.delaytrace, mqTaskDelayMessage); + return ResultVOUtils.success("发送成功"); + } + + /** * 源头追溯查询 * @@ -186,8 +195,8 @@ public class UdiTraceController extends BaseController { udiTraceService.createSourceTraceTask(traceProductDetailEntity, userCompanyEntity.getId()); } - List traceOrderEntities = traceOrderService.findByProductIdFk(traceRecordLogEntity.getTraceProductIdFk()); - return ResultVOUtils.success(traceOrderEntities); +// List traceOrderEntities = traceOrderService.findByProductIdFk(traceRecordLogEntity.getTraceProductIdFk()); + return ResultVOUtils.success(traceRecordLogEntity.getRecordCode()); } /** @@ -277,8 +286,8 @@ public class UdiTraceController extends BaseController { traceProductDetailEntity = udiTraceService.createTracerProductByBatchNo(traceRecordRequest, 2, 2, basicUdiRelResponse); udiTraceService.createCheckTraceTask(traceProductDetailEntity, userCompanyEntity.getId()); } - List traceOrderEntities = traceOrderService.findByProductIdFk(traceRecordLogEntity.getTraceProductIdFk()); - return ResultVOUtils.success(traceOrderEntities); +// List traceOrderEntities = traceOrderService.findByProductIdFk(traceRecordLogEntity.getTraceProductIdFk()); + return ResultVOUtils.success(traceRecordLogEntity.getRecordCode()); }