下拉数据-全部和分车型(不含年款)
This commit is contained in:
+11
-3
@@ -81,9 +81,9 @@ public class OtaManageApplyEOController extends JeroController<OtaManageApplyEO,
|
|||||||
*/
|
*/
|
||||||
@AutoLog(value = "下拉数据-软件版本,适用车型,市场")
|
@AutoLog(value = "下拉数据-软件版本,适用车型,市场")
|
||||||
@ApiOperation(value="下拉数据-软件版本,适用车型,市场", notes="下拉数据-软件版本,适用车型,市场")
|
@ApiOperation(value="下拉数据-软件版本,适用车型,市场", notes="下拉数据-软件版本,适用车型,市场")
|
||||||
@GetMapping(value = "/getOtaCarList")
|
@GetMapping(value = "/getPullDownList")
|
||||||
public Result<?> getOtaCarList() {
|
public Result<?> getPullDownList() {
|
||||||
Map<String, Object> result = otaManageApplyEOService.getOtaCarList();
|
Map<String, Object> result = otaManageApplyEOService.getPullDownList();
|
||||||
return Result.OK(result);
|
return Result.OK(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,4 +141,12 @@ public class OtaManageApplyEOController extends JeroController<OtaManageApplyEO,
|
|||||||
return super.exportXls(request, otaManageApplyEO, OtaManageApplyEO.class, "数据对接表");
|
return super.exportXls(request, otaManageApplyEO, OtaManageApplyEO.class, "数据对接表");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AutoLog(value = "下拉数据-全部和分车型(不含年款)")
|
||||||
|
@ApiOperation(value="下拉数据-全部和分车型(不含年款)", notes="下拉数据-全部和分车型(不含年款)")
|
||||||
|
@GetMapping(value = "/getCarList")
|
||||||
|
public Result<?> getCarList() {
|
||||||
|
List<String> result = otaManageApplyEOService.getCarList();
|
||||||
|
return Result.OK(result);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-1
@@ -84,5 +84,11 @@ public interface IOtaManageApplyEOService extends IService<OtaManageApplyEO> {
|
|||||||
* 下拉数据-软件版本,适用车型,市场
|
* 下拉数据-软件版本,适用车型,市场
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String,Object> getOtaCarList();
|
Map<String,Object> getPullDownList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
下拉数据-全部和分车型(不含年款)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> getCarList();
|
||||||
}
|
}
|
||||||
|
|||||||
+37
-1
@@ -24,6 +24,7 @@ import java.util.Collections;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -222,7 +223,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String,Object> getOtaCarList() {
|
public Map<String,Object> getPullDownList() {
|
||||||
List<OtaManageApplyEO> otaManageApplyEOS = otaManageApplyEOMapper.getOtaCarList();
|
List<OtaManageApplyEO> otaManageApplyEOS = otaManageApplyEOMapper.getOtaCarList();
|
||||||
Map<String,Object> result = new HashMap<>();
|
Map<String,Object> result = new HashMap<>();
|
||||||
if(!otaManageApplyEOS.isEmpty()){
|
if(!otaManageApplyEOS.isEmpty()){
|
||||||
@@ -262,4 +263,39 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下拉数据-全部和分车型(不含年款)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<String> getCarList() {
|
||||||
|
List<OtaManageApplyEO> otaManageApplyEOS = otaManageApplyEOMapper.getOtaCarList();
|
||||||
|
List<String> result = new LinkedList<>();
|
||||||
|
result.add("全部");
|
||||||
|
if(!otaManageApplyEOS.isEmpty()){
|
||||||
|
|
||||||
|
//适用车型 appliedVehicleProject
|
||||||
|
List<String> appliedVehicleProjectList = otaManageApplyEOS.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getAppliedVehicleProject()))
|
||||||
|
.map(OtaManageApplyEO::getAppliedVehicleProject).distinct().collect(Collectors.toList());
|
||||||
|
//过滤掉特殊的适用车型
|
||||||
|
// List<String> otaNameList = OtaCarEnum.getOtaNameList();
|
||||||
|
|
||||||
|
Set<String> carSet = new HashSet<>();//适用车型
|
||||||
|
Set<String> marketSet = new HashSet<>();//市场
|
||||||
|
for (String appliedVehicleProject : appliedVehicleProjectList) {
|
||||||
|
for (String s : appliedVehicleProject.split(",")) {
|
||||||
|
String[] split = s.split(" ");
|
||||||
|
if (split.length == 2) {
|
||||||
|
result.add(s);
|
||||||
|
} else if (split.length == 3) {
|
||||||
|
result.add(split[0]+" "+split[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = result.stream().distinct().collect(Collectors.toList());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user