项目版本下拉选
This commit is contained in:
+8
@@ -149,4 +149,12 @@ public class OtaManageApplyEOController extends JeroController<OtaManageApplyEO,
|
|||||||
return Result.OK(result);
|
return Result.OK(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AutoLog(value = "项目版本下拉数据")
|
||||||
|
@ApiOperation(value="项目版本下拉数据", notes="项目版本下拉数据")
|
||||||
|
@GetMapping(value = "/getProjectVersionList")
|
||||||
|
public Result<?> getProjectVersionList(String carMarket) {
|
||||||
|
List<VersionVO> result = otaManageApplyEOService.getProjectVersionList(carMarket);
|
||||||
|
return Result.OK(result);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.modules.ota.vo.VersionVO;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -15,6 +16,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -162,6 +164,10 @@ public class OtaManageApplyEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "认证批准")
|
@ApiModelProperty(value = "认证批准")
|
||||||
private Date attestationEndTime;
|
private Date attestationEndTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "项目版本下拉选项")
|
||||||
|
private List<VersionVO> versionVOList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -24,11 +24,10 @@ public interface OtaManageApplyEOMapper extends BaseMapper<OtaManageApplyEO> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 分车型列表-分页列表查询
|
* 分车型列表-分页列表查询
|
||||||
* @param page
|
|
||||||
* @param otaManageApplyEO
|
* @param otaManageApplyEO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Page<OtaManageApplyEO> getOtaCarPage(Page<OtaManageApplyEO> page, @Param("otaManageApplyEO") OtaManageApplyEO otaManageApplyEO);
|
List<OtaManageApplyEO> getOtaCarPage(@Param("otaManageApplyEO") OtaManageApplyEO otaManageApplyEO);
|
||||||
|
|
||||||
List<VersionVO> getByAppliedVehicleProject(@Param("appliedVehicleProject") String appliedVehicleProject);
|
List<VersionVO> getByAppliedVehicleProject(@Param("appliedVehicleProject") String appliedVehicleProject);
|
||||||
|
|
||||||
@@ -36,4 +35,6 @@ public interface OtaManageApplyEOMapper extends BaseMapper<OtaManageApplyEO> {
|
|||||||
|
|
||||||
List<OtaManageReceiveNsdpEO> getReleaseDate(@Param("plannedBpLaunchBatchList") List<String> plannedBpLaunchBatchList);
|
List<OtaManageReceiveNsdpEO> getReleaseDate(@Param("plannedBpLaunchBatchList") List<String> plannedBpLaunchBatchList);
|
||||||
|
|
||||||
|
List<VersionVO> getProjectVersion(@Param("car") String car, @Param("market") String market);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-2
@@ -73,9 +73,9 @@
|
|||||||
<!-- </select>-->
|
<!-- </select>-->
|
||||||
<select id="getOtaCarPage" resultType="com.jero.modules.ota.entity.OtaManageApplyEO">
|
<select id="getOtaCarPage" resultType="com.jero.modules.ota.entity.OtaManageApplyEO">
|
||||||
select omr.*,
|
select omr.*,
|
||||||
oma.project_version,oma.attestation_schedule.oma.match_status,oma.remark,
|
oma.project_version,oma.attestation_schedule,oma.match_status,oma.remark
|
||||||
from ota_manage_receive omr
|
from ota_manage_receive omr
|
||||||
left join ota_manage_apply oma on oma.issue_key = omr.issue_key
|
left join ota_manage_apply oma on oma.issue_key = omr.id
|
||||||
<where>
|
<where>
|
||||||
1=1
|
1=1
|
||||||
<if test="otaManageApplyEO.issueKey != null and otaManageApplyEO.issueKey != ''">
|
<if test="otaManageApplyEO.issueKey != null and otaManageApplyEO.issueKey != ''">
|
||||||
@@ -109,4 +109,17 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getProjectVersion" resultType="com.jero.modules.ota.vo.VersionVO">
|
||||||
|
SELECT
|
||||||
|
plb.id projectId,plb.target_market market,plb.studio_engineer studio,plb.project_version versionNumber,
|
||||||
|
pni.project_name car,
|
||||||
|
pyni.year_name yearName from project_library_base plb
|
||||||
|
join project_name_info pni on pni.id = plb.project_name_id
|
||||||
|
join project_year_name_info pyni on pyni.project_name_id = pni.id
|
||||||
|
where plb.target_market =#{market}
|
||||||
|
and pni.project_name =#{car}
|
||||||
|
GROUP BY plb.id
|
||||||
|
ORDER BY project_version asc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+7
@@ -91,4 +91,11 @@ public interface IOtaManageApplyEOService extends IService<OtaManageApplyEO> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<String> getCarList();
|
List<String> getCarList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param carMarket
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<VersionVO> getProjectVersionList(String carMarket);
|
||||||
}
|
}
|
||||||
|
|||||||
+45
-14
@@ -199,23 +199,38 @@ 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);
|
List<OtaManageApplyEO> otaManageApplyEOList = otaManageApplyEOMapper.getOtaCarPage(otaManageApplyEO);
|
||||||
Page<OtaManageApplyEO> otaCarPage = otaManageApplyEOMapper.getOtaCarPage(page, otaManageApplyEO);
|
List<OtaManageApplyEO> list = new ArrayList<>();
|
||||||
List<OtaManageApplyEO> records = otaCarPage.getRecords();
|
String carMarket = otaManageApplyEO.getAppliedVehicleProject();
|
||||||
if(!records.isEmpty()){
|
if(StringUtils.isNotBlank(carMarket) && !"全部".equals(carMarket) && !otaManageApplyEOList.isEmpty()){
|
||||||
List<String> appliedVehicleProjectList = records.stream().filter(e-> StringUtils.isNotBlank(e.getAppliedVehicleProject()))
|
|
||||||
.map(OtaManageApplyEO::getAppliedVehicleProject).distinct()
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
|
|
||||||
List<String> list = new ArrayList<>();
|
String[] conditionSplit = carMarket.split(" ");
|
||||||
for (String appliedVehicleProject : appliedVehicleProjectList) {
|
|
||||||
list.addAll(Arrays.asList(appliedVehicleProject.split(",")));
|
for (OtaManageApplyEO manageApplyEO : otaManageApplyEOList) {
|
||||||
|
String appliedVehicleProject = manageApplyEO.getAppliedVehicleProject();
|
||||||
|
if(StringUtils.isNotBlank(appliedVehicleProject)){
|
||||||
|
String[] appliedVehicleProjectArr = appliedVehicleProject.split(",");
|
||||||
|
for (String appliedVehicleProjectTemp : appliedVehicleProjectArr) {
|
||||||
|
String[] split = appliedVehicleProjectTemp.split(" ");
|
||||||
|
if(split.length == 1){
|
||||||
|
list.add(manageApplyEO);
|
||||||
|
}else if(split.length == 2){
|
||||||
|
if(Arrays.equals(conditionSplit, split)){
|
||||||
|
list.add(manageApplyEO);
|
||||||
|
}
|
||||||
|
}else if(split.length == 3){
|
||||||
|
List<String> listTemp = Arrays.asList(split);
|
||||||
|
List<String> conditionList = Arrays.asList(conditionSplit);
|
||||||
|
if(listTemp.containsAll(conditionList)){
|
||||||
|
list.add(manageApplyEO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Page pages = PageUtil.getPages(pageNo, pageSize, list);
|
||||||
return null;
|
return pages;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -298,4 +313,20 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
result = result.stream().distinct().collect(Collectors.toList());
|
result = result.stream().distinct().collect(Collectors.toList());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VersionVO> getProjectVersionList(String carMarket) {
|
||||||
|
List<VersionVO> versionVOList = new LinkedList<>();
|
||||||
|
if(StringUtils.isNotBlank(carMarket)){
|
||||||
|
//根据适用车型查询项目版本
|
||||||
|
String[] conditionSplit = carMarket.split(" ");
|
||||||
|
String car = conditionSplit[0];
|
||||||
|
String market = conditionSplit[1];
|
||||||
|
versionVOList = otaManageApplyEOMapper.getProjectVersion(car, market);
|
||||||
|
for (VersionVO versionVO : versionVOList) {
|
||||||
|
versionVO.setVersionName(versionVO.getCar() + "-" + versionVO.getYearName() + "-" + versionVO.getMarket() + "-" +versionVO.getVersionNumber());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return versionVOList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.jero.modules.ota.vo;
|
package com.jero.modules.ota.vo;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -9,10 +10,11 @@ import java.util.Date;
|
|||||||
* @date 2023/8/9 11:28
|
* @date 2023/8/9 11:28
|
||||||
* @auth zhn
|
* @auth zhn
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class VersionVO {
|
public class VersionVO {
|
||||||
|
|
||||||
@ApiModelProperty(value = "版本")
|
@ApiModelProperty(value = "项目id")
|
||||||
private String version;
|
private String projectId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "认证开始")
|
@ApiModelProperty(value = "认证开始")
|
||||||
private Date attestationStartTime;
|
private Date attestationStartTime;
|
||||||
@@ -22,4 +24,24 @@ public class VersionVO {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "认证批准")
|
@ApiModelProperty(value = "认证批准")
|
||||||
private Date attestationEndTime;
|
private Date attestationEndTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "车型")
|
||||||
|
private String car;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "年款")
|
||||||
|
private String yearName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "市场")
|
||||||
|
private String market;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "版本号")
|
||||||
|
private String versionNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "studio")
|
||||||
|
private String studio;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "项目版本名称")
|
||||||
|
private String versionName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user