|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.glxp.api.controller.trace;
|
|
|
|
package com.glxp.api.controller.trace;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
@ -12,8 +13,10 @@ import com.glxp.api.controller.BaseController;
|
|
|
|
import com.glxp.api.entity.trace.TraceManuOrderEntity;
|
|
|
|
import com.glxp.api.entity.trace.TraceManuOrderEntity;
|
|
|
|
import com.glxp.api.entity.trace.TraceOrderEntity;
|
|
|
|
import com.glxp.api.entity.trace.TraceOrderEntity;
|
|
|
|
import com.glxp.api.entity.trace.TraceRecordLogEntity;
|
|
|
|
import com.glxp.api.entity.trace.TraceRecordLogEntity;
|
|
|
|
|
|
|
|
import com.glxp.api.req.trace.TraceOrderDetailRequest;
|
|
|
|
import com.glxp.api.req.trace.TraceRecordRequest;
|
|
|
|
import com.glxp.api.req.trace.TraceRecordRequest;
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
|
|
|
|
import com.glxp.api.res.trace.TraceOrderResponse;
|
|
|
|
import com.glxp.api.res.trace.TraceRecordResponse;
|
|
|
|
import com.glxp.api.res.trace.TraceRecordResponse;
|
|
|
|
import com.glxp.api.res.trace.TraceSearchReponse;
|
|
|
|
import com.glxp.api.res.trace.TraceSearchReponse;
|
|
|
|
import com.glxp.api.service.trace.TraceManuOrderService;
|
|
|
|
import com.glxp.api.service.trace.TraceManuOrderService;
|
|
|
@ -23,6 +26,7 @@ import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
|
|
|
|
|
|
import org.apache.regexp.RE;
|
|
|
|
import org.bouncycastle.util.encoders.UTF8;
|
|
|
|
import org.bouncycastle.util.encoders.UTF8;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@ -68,7 +72,12 @@ public class TraceRecordController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(traceRecordRequest.getRecordCode())) {
|
|
|
|
if (StrUtil.isNotEmpty(traceRecordRequest.getRecordCode())) {
|
|
|
|
TraceRecordLogEntity traceRecordLogEntity = traceRecordService.getOne(new QueryWrapper<TraceRecordLogEntity>().eq("recordCode", traceRecordRequest.getRecordCode()));
|
|
|
|
TraceRecordLogEntity traceRecordLogEntity = traceRecordService.getOne(new QueryWrapper<TraceRecordLogEntity>().eq("recordCode", traceRecordRequest.getRecordCode()));
|
|
|
|
List<TraceOrderEntity> traceOrderEntities = traceOrderService.findByProductIdFk(traceRecordLogEntity.getTraceProductIdFk());
|
|
|
|
if (traceRecordLogEntity == null) {
|
|
|
|
|
|
|
|
return ResultVOUtils.error(500, "查询记录不存在!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
TraceOrderDetailRequest traceOrderDetailRequest = new TraceOrderDetailRequest();
|
|
|
|
|
|
|
|
traceOrderDetailRequest.setTraceProductIdFk(traceRecordLogEntity.getTraceProductIdFk());
|
|
|
|
|
|
|
|
List<TraceOrderResponse> traceOrderEntities = traceOrderService.filterJoin(traceOrderDetailRequest);
|
|
|
|
List<TraceManuOrderEntity> traceManuOrderEntities = traceManuOrderService.list(new QueryWrapper<TraceManuOrderEntity>().eq("traceProductIdFk", traceRecordLogEntity.getTraceProductIdFk()));
|
|
|
|
List<TraceManuOrderEntity> traceManuOrderEntities = traceManuOrderService.list(new QueryWrapper<TraceManuOrderEntity>().eq("traceProductIdFk", traceRecordLogEntity.getTraceProductIdFk()));
|
|
|
|
TraceSearchReponse traceSearchReponse = new TraceSearchReponse();
|
|
|
|
TraceSearchReponse traceSearchReponse = new TraceSearchReponse();
|
|
|
|
traceSearchReponse.setTraceOrderEntities(traceOrderEntities);
|
|
|
|
traceSearchReponse.setTraceOrderEntities(traceOrderEntities);
|
|
|
|