临时提交
This commit is contained in:
+14
@@ -73,6 +73,20 @@ public class OtaManageApplyEOController extends JeroController<OtaManageApplyEO,
|
|||||||
IPage<OtaManageApplyEO> pageList = otaManageApplyEOService.getOtaCarPage(otaManageApplyEO,pageNo,pageSize);
|
IPage<OtaManageApplyEO> pageList = otaManageApplyEOService.getOtaCarPage(otaManageApplyEO,pageNo,pageSize);
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* OTA下拉数据
|
||||||
|
*
|
||||||
|
* @param otaManageApplyEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "OTA下拉数据")
|
||||||
|
@ApiOperation(value="OTA下拉数据", notes="OTA下拉数据")
|
||||||
|
@GetMapping(value = "/getOtaCarList")
|
||||||
|
public Result<?> getOtaCarList(OtaManageApplyEO otaManageApplyEO) {
|
||||||
|
|
||||||
|
List<String> otaCarList = otaManageApplyEOService.getOtaCarList(otaManageApplyEO);
|
||||||
|
return Result.OK(otaCarList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-5
@@ -88,11 +88,7 @@ public class OtaManageApplyEO implements Serializable {
|
|||||||
/**软件版本*/
|
/**软件版本*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "软件版本")
|
@ApiModelProperty(value = "软件版本")
|
||||||
private java.lang.String softwareVersion;
|
private java.lang.String plannedBpLaunchBatch;
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@ApiModelProperty(value = "平台")
|
|
||||||
private java.lang.String platform;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "适用车型")
|
@ApiModelProperty(value = "适用车型")
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.jero.modules.ota.enums;
|
||||||
|
|
||||||
|
public enum OtaCarEnum {
|
||||||
|
|
||||||
|
|
||||||
|
ALL("All", "All"),
|
||||||
|
CN_ALL("CN All", "EU All"),
|
||||||
|
EU_ALL("EU All", "EU All");
|
||||||
|
|
||||||
|
String name;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
OtaCarEnum(String name, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static OtaCarEnum getOtaTitleEnum(String name) {
|
||||||
|
for (OtaCarEnum e : values()) {
|
||||||
|
if (e.getName().equals(name)) {
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
@@ -29,4 +29,6 @@ public interface OtaManageApplyEOMapper extends BaseMapper<OtaManageApplyEO> {
|
|||||||
|
|
||||||
List<VersionVO> getByAppliedVehicleProject(@Param("appliedVehicleProject") String appliedVehicleProject);
|
List<VersionVO> getByAppliedVehicleProject(@Param("appliedVehicleProject") String appliedVehicleProject);
|
||||||
|
|
||||||
|
List<OtaManageApplyEO> getOtaCarList(@Param("otaManageApplyEO") OtaManageApplyEO otaManageApplyEO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+22
@@ -78,4 +78,26 @@
|
|||||||
<select id="getByAppliedVehicleProject" resultType="com.jero.modules.ota.vo.VersionVO">
|
<select id="getByAppliedVehicleProject" resultType="com.jero.modules.ota.vo.VersionVO">
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getOtaCarList" resultType="com.jero.modules.ota.entity.OtaManageApplyEO">
|
||||||
|
select * from ota_manage_receive
|
||||||
|
<where>
|
||||||
|
1=1
|
||||||
|
<if test="otaManageApplyEO.appliedVehicleProject != null and otaManageApplyEO.appliedVehicleProject != ''">
|
||||||
|
and ts.applied_vehicle_project LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.appliedVehicleProject}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="otaManageApplyEO.issueKey != null and otaManageApplyEO.issueKey != ''">
|
||||||
|
and ts.issue_key LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.issueKey}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="otaManageApplyEO.summary != null and otaManageApplyEO.summary != ''">
|
||||||
|
and ts.summary LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.summary}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="otaManageApplyEO.impactHomo != null and otaManageApplyEO.impactHomo != ''">
|
||||||
|
and (ts.impact_cn_homo LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.impactHomo}),'%')
|
||||||
|
or impact_eu_homo ts.impact_cn_homo LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.impactHomo}),'%'))
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+7
-1
@@ -48,7 +48,7 @@ public interface IOtaManageApplyEOService extends IService<OtaManageApplyEO> {
|
|||||||
void deleteByIds(List<String> ids);
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询通过适用车型查询
|
* 通过适用车型查询
|
||||||
*
|
*
|
||||||
* @param appliedVehicleProject
|
* @param appliedVehicleProject
|
||||||
* @return
|
* @return
|
||||||
@@ -79,4 +79,10 @@ public interface IOtaManageApplyEOService extends IService<OtaManageApplyEO> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage<OtaManageApplyEO> getOtaCarPage(OtaManageApplyEO otaManageApplyEO,Integer pageNo,Integer pageSize);
|
IPage<OtaManageApplyEO> getOtaCarPage(OtaManageApplyEO otaManageApplyEO,Integer pageNo,Integer pageSize);
|
||||||
|
/**
|
||||||
|
* OTA下拉数据
|
||||||
|
* @param otaManageApplyEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> getOtaCarList(OtaManageApplyEO otaManageApplyEO);
|
||||||
}
|
}
|
||||||
|
|||||||
+33
-2
@@ -7,12 +7,15 @@ import com.jero.modules.ota.entity.OtaManageApplyEO;
|
|||||||
import com.jero.modules.ota.mapper.OtaManageApplyEOMapper;
|
import com.jero.modules.ota.mapper.OtaManageApplyEOMapper;
|
||||||
import com.jero.modules.ota.service.IOtaManageApplyEOService;
|
import com.jero.modules.ota.service.IOtaManageApplyEOService;
|
||||||
import com.jero.modules.ota.vo.VersionVO;
|
import com.jero.modules.ota.vo.VersionVO;
|
||||||
|
import com.jero.modules.system.util.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 数据对接表
|
* @Description: 数据对接表
|
||||||
@@ -75,7 +78,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过适用车型查询
|
||||||
*
|
*
|
||||||
* @param appliedVehicleProject
|
* @param appliedVehicleProject
|
||||||
* @return
|
* @return
|
||||||
@@ -121,8 +124,36 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
@Override
|
@Override
|
||||||
public IPage<OtaManageApplyEO> getOtaCarPage(OtaManageApplyEO otaManageApplyEO, Integer pageNo, Integer pageSize) {
|
public IPage<OtaManageApplyEO> getOtaCarPage(OtaManageApplyEO otaManageApplyEO, Integer pageNo, Integer pageSize) {
|
||||||
Page<OtaManageApplyEO> page = new Page<OtaManageApplyEO>(pageNo, pageSize);
|
Page<OtaManageApplyEO> page = new Page<OtaManageApplyEO>(pageNo, pageSize);
|
||||||
otaManageApplyEOMapper.getOtaCarPage(page, otaManageApplyEO);
|
Page<OtaManageApplyEO> otaCarPage = otaManageApplyEOMapper.getOtaCarPage(page, otaManageApplyEO);
|
||||||
|
List<OtaManageApplyEO> records = otaCarPage.getRecords();
|
||||||
|
if(!records.isEmpty()){
|
||||||
|
List<String> appliedVehicleProjectList = records.stream().filter(e-> StringUtils.isNotBlank(e.getAppliedVehicleProject()))
|
||||||
|
.map(OtaManageApplyEO::getAppliedVehicleProject).distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
for (String appliedVehicleProject : appliedVehicleProjectList) {
|
||||||
|
list.addAll(Arrays.asList(appliedVehicleProject.split(",")));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getOtaCarList(OtaManageApplyEO otaManageApplyEO) {
|
||||||
|
List<OtaManageApplyEO> otaManageApplyEOS = otaManageApplyEOMapper.getOtaCarList(otaManageApplyEO);
|
||||||
|
if(!otaManageApplyEOS.isEmpty()){
|
||||||
|
List<String> appliedVehicleProjectList = otaManageApplyEOS.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getAppliedVehicleProject()))
|
||||||
|
.map(OtaManageApplyEO::getAppliedVehicleProject).distinct().collect(Collectors.toList());
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
for (String appliedVehicleProject : appliedVehicleProjectList) {
|
||||||
|
list.addAll(Arrays.asList(appliedVehicleProject.split(",")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user