From ed1935db2110bd0144882c22d9918a74b7b6031f Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Thu, 24 Aug 2023 09:39:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=95=B0=E6=8D=AE-=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E5=92=8C=E5=88=86=E8=BD=A6=E5=9E=8B=EF=BC=88=E4=B8=8D?= =?UTF-8?q?=E5=90=AB=E5=B9=B4=E6=AC=BE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OtaManageApplyEOController.java | 4 +- .../modules/ota/entity/OtaManageApplyEO.java | 7 ++-- .../ota/mapper/xml/OtaManageApplyEOMapper.xml | 3 ++ .../ota/service/IOtaManageApplyEOService.java | 2 +- .../impl/OtaManageApplyEOServiceImpl.java | 40 ++++++++++++++----- 5 files changed, 40 insertions(+), 16 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaManageApplyEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaManageApplyEOController.java index a3a05f161..def65e5c2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaManageApplyEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaManageApplyEOController.java @@ -147,8 +147,8 @@ public class OtaManageApplyEOController extends JeroController getCarList() { - List result = otaManageApplyEOService.getCarList(); + public Result getCarList(String cut) { + List result = otaManageApplyEOService.getCarList(cut); return Result.OK(result); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageApplyEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageApplyEO.java index 2797314fc..673aa08a4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageApplyEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageApplyEO.java @@ -89,6 +89,9 @@ public class OtaManageApplyEO implements Serializable { @ApiModelProperty(value = "备注") private java.lang.String remark; + @ApiModelProperty(value = "适用车型") + private java.lang.String appliedVehicleProject; + //-------------------------------------------------------- @@ -96,9 +99,7 @@ public class OtaManageApplyEO implements Serializable { @ApiModelProperty(value = "软件版本") private java.lang.String plannedBpLaunchBatch; - @TableField(exist = false) - @ApiModelProperty(value = "适用车型") - private java.lang.String appliedVehicleProject; + @TableField(exist = false) @ApiModelProperty(value = "市场") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/mapper/xml/OtaManageApplyEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/mapper/xml/OtaManageApplyEOMapper.xml index 2a3ea34d4..b0f20f314 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/mapper/xml/OtaManageApplyEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/mapper/xml/OtaManageApplyEOMapper.xml @@ -80,6 +80,9 @@ and (omr.impact_cn_homo LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.impactHomo}),'%') and omr.impact_eu_homo LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.impactHomo}),'%')) + + and omr.applied_vehicle_project LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.appliedVehicleProject}),'%' + order by omr.id desc diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaManageApplyEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaManageApplyEOService.java index efaa5daa8..d615f5dda 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaManageApplyEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaManageApplyEOService.java @@ -88,7 +88,7 @@ public interface IOtaManageApplyEOService extends IService { 下拉数据-全部和分车型(不含年款) * @return */ - List getCarList(); + List getCarList(String cut); /** * diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java index 541020de0..2c7f8c45c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java @@ -6,9 +6,12 @@ import com.jero.common.constant.enums.CutEnum; import com.jero.common.system.vo.LoginUser; import com.jero.common.util.DateUtils; import com.jero.common.util.oConvertUtils; -import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO; import com.jero.modules.dummy.enums.OrderEnum; -import com.jero.modules.ota.entity.*; +import com.jero.modules.ota.entity.OtaManageApplyEO; +import com.jero.modules.ota.entity.OtaManageHistory; +import com.jero.modules.ota.entity.OtaManagePermission; +import com.jero.modules.ota.entity.OtaManageReceive; +import com.jero.modules.ota.entity.OtaManageReceiveNsdpEO; import com.jero.modules.ota.enums.OtaCarEnum; import com.jero.modules.ota.enums.OtaHomoImpactEnum; import com.jero.modules.ota.enums.OtaStatusEnum; @@ -16,13 +19,13 @@ import com.jero.modules.ota.mapper.OtaManageApplyEOMapper; import com.jero.modules.ota.service.IOtaManageApplyEOService; import com.jero.modules.ota.service.IOtaManageHistoryService; import com.jero.modules.ota.service.IOtaManagePermissionService; +import com.jero.modules.ota.service.IOtaManageReceiveService; import com.jero.modules.ota.vo.AllCarExportCnVO; import com.jero.modules.ota.vo.AllCarExportEnVO; import com.jero.modules.ota.vo.OneCarExportCnVO; import com.jero.modules.ota.vo.OneCarExportEnVO; import com.jero.modules.ota.vo.OtaExportCnVO; import com.jero.modules.ota.vo.OtaExportEnVO; -import com.jero.modules.ota.service.IOtaManageReceiveService; import com.jero.modules.ota.vo.VersionVO; import com.jero.modules.project.entity.ProjectLibraryBase; import com.jero.modules.project.entity.ProjectTaskPlanning; @@ -54,7 +57,20 @@ import javax.servlet.http.HttpServletRequest; import java.text.Collator; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; +import java.util.UUID; import java.util.stream.Collectors; /** @@ -746,10 +762,14 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl getCarList() { + public List getCarList(String cut) { List otaManageApplyEOS = this.getBaseMapper().getOtaCarList(); List result = new LinkedList<>(); - result.add("全部"); + if(CutEnum.CN.getValue().equals(cut)){ + result.add("全部"); + }else{ + result.add("All"); + } if (!otaManageApplyEOS.isEmpty()) { //适用车型 appliedVehicleProject @@ -757,15 +777,15 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl StringUtils.isNotBlank(e.getAppliedVehicleProject())) .map(OtaManageApplyEO::getAppliedVehicleProject).distinct().collect(Collectors.toList()); //过滤掉特殊的适用车型 -// List otaNameList = OtaCarEnum.getOtaNameList(); + List otaNameList = OtaCarEnum.getOtaNameList(); - Set carSet = new HashSet<>();//适用车型 - Set marketSet = new HashSet<>();//市场 for (String appliedVehicleProject : appliedVehicleProjectList) { for (String s : appliedVehicleProject.split(",")) { String[] split = s.split(" "); if (split.length == 2) { - result.add(s); + if(!otaNameList.contains(s)){ + result.add(s); + } } else if (split.length == 3) { result.add(split[0] + " " + split[2]); }