|
|
|
@ -1,13 +1,16 @@
|
|
|
|
|
package com.glxp.api.controller.trace;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.lang.UUID;
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
|
|
|
|
import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.config.rabbit.TopicRabbitConfig;
|
|
|
|
|
import com.glxp.api.constant.Constant;
|
|
|
|
|
import com.glxp.api.controller.BaseController;
|
|
|
|
|
import com.glxp.api.entity.basic.UdiEntity;
|
|
|
|
@ -24,11 +27,14 @@ import com.glxp.api.service.basic.BasicUdiRelService;
|
|
|
|
|
import com.glxp.api.service.sup.UserCompanyService;
|
|
|
|
|
import com.glxp.api.service.system.SystemParamConfigService;
|
|
|
|
|
import com.glxp.api.service.trace.*;
|
|
|
|
|
import com.glxp.api.util.DateUtil;
|
|
|
|
|
import com.glxp.api.util.GennerOrderUtils;
|
|
|
|
|
import com.glxp.api.util.udi.FilterUdiUtils;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
|
@ -40,12 +46,15 @@ import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
@Api(tags = "UDI追溯相关接口")
|
|
|
|
|
@ApiIgnore
|
|
|
|
|
@RestController
|
|
|
|
|
@Slf4j
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
public class UdiTraceController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -74,7 +83,15 @@ public class UdiTraceController extends BaseController {
|
|
|
|
|
SystemParamConfigService systemParamConfigService;
|
|
|
|
|
@Resource
|
|
|
|
|
RabbitPushService rabbitPushService;
|
|
|
|
|
@Resource
|
|
|
|
|
private final RabbitTemplate rabbitTemplate;
|
|
|
|
|
|
|
|
|
|
@GetMapping("/udi/trace/source/sendUDI")
|
|
|
|
|
public BaseResponse sendUdi(@RequestBody TraceRecordRequest traceRecordRequest) {
|
|
|
|
|
String messageJson = JSON.toJSONString(traceRecordRequest);
|
|
|
|
|
rabbitTemplate.convertAndSend("trace.topic.exchange", TopicRabbitConfig.common, messageJson);
|
|
|
|
|
return ResultVOUtils.success("发送成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 源头追溯查询
|
|
|
|
|