From e1091ee4ea683162c2e5eb0f289b28bdafce7706 Mon Sep 17 00:00:00 2001 From: dengjun Date: Tue, 2 Jan 2024 15:03:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=85=B3=E5=AF=BC=E5=85=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/haitonggauto/rtosc/query/CargoQuery.java | 5 +++++ .../java/com/haitonggauto/rtosc/handler/ExportInHandler.java | 1 + .../com/haitonggauto/rtosc/handler/ExportLoadHandler.java | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nuzar-customer-client/src/main/java/com/haitonggauto/rtosc/query/CargoQuery.java b/nuzar-customer-client/src/main/java/com/haitonggauto/rtosc/query/CargoQuery.java index 887fd1c..04cbbda 100644 --- a/nuzar-customer-client/src/main/java/com/haitonggauto/rtosc/query/CargoQuery.java +++ b/nuzar-customer-client/src/main/java/com/haitonggauto/rtosc/query/CargoQuery.java @@ -1,5 +1,7 @@ package com.haitonggauto.rtosc.query; +import com.haitonggauto.rtosc.common.db.anno.DbQuery; +import com.haitonggauto.rtosc.common.db.enums.SqlSymbol; import com.haitonggauto.rtosc.common.db.query.BaseQuery; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -14,4 +16,7 @@ public class CargoQuery extends BaseQuery { @ApiModelProperty(value = "车架号") private String vin; + + @ApiModelProperty(value = "品牌ID") + private String brandId; } diff --git a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java index 4108e84..f214e59 100644 --- a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java +++ b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java @@ -460,6 +460,7 @@ public class ExportInHandler implements BaseHandler { queryWrapper.eq(query.getId() != null, CustomerExportInCargo::getExportInId, query.getId()); queryWrapper.like(StringUtils.isNotEmpty(query.getVin()), CustomerExportInCargo::getVin, query.getVin()); queryWrapper.in(CollectionUtils.isNotEmpty(query.getIds()), CustomerExportInCargo::getExportInId, query.getIds()); + queryWrapper.exists(StringUtils.isNotEmpty(query.getBrandId()), "select id from customer_export_in where customer_export_in.id=customer_export_in_cargo.export_in_id and customer_export_in.brand_id={0}", query.getBrandId()); if (query.getCargoType() != null) { queryWrapper.eq(CustomerExportInCargo::getCargoType, query.getCargoType()); } diff --git a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportLoadHandler.java b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportLoadHandler.java index ed9643a..b32ae8e 100644 --- a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportLoadHandler.java +++ b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportLoadHandler.java @@ -1061,11 +1061,11 @@ public class ExportLoadHandler implements BaseHandler { return v; }).collect(Collectors.toList()); List rst = shpApi.checkVinRepeat(req); + existVins.clear(); if (CollectionUtils.isNotEmpty(rst)) { // 再次过滤出重复的 List sCollect = rst.stream().filter(ss -> ss.getIsRepetition()).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(sCollect)) { - existVins.clear(); existVins.addAll(sCollect.stream().map(ss -> ss.getVinCode()).collect(Collectors.toList())); } } @@ -1514,11 +1514,11 @@ public class ExportLoadHandler implements BaseHandler { return v; }).collect(Collectors.toList()); List rst = shpApi.checkVinRepeat(req); + existVins.clear(); if (CollectionUtils.isNotEmpty(rst)) { // 再次过滤出重复的 List sCollect = rst.stream().filter(ss -> ss.getIsRepetition()).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(sCollect)) { - existVins.clear(); existVins.addAll(sCollect.stream().map(ss -> ss.getVinCode()).collect(Collectors.toList())); } }