Merge remote-tracking branch 'origin/dev_20230808_OTA' into dev_20230808_OTA
This commit is contained in:
+8
@@ -149,4 +149,12 @@ public class OtaManageApplyEOController extends JeroController<OtaManageApplyEO,
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+20
-3
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.modules.ota.vo.VersionVO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -15,6 +16,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -60,12 +62,12 @@ public class OtaManageApplyEO implements Serializable {
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
@ApiModelProperty(value = "VDR")
|
||||
@ApiModelProperty(value = "外键")
|
||||
private java.lang.String issueKey;
|
||||
|
||||
/**项目版本*/
|
||||
@Excel(name = "项目版本", width = 15)
|
||||
@ApiModelProperty(value = "项目版本")
|
||||
@ApiModelProperty(value = "项目版本-id")
|
||||
private java.lang.String projectVersion;
|
||||
|
||||
/**认证进度*/
|
||||
@@ -85,7 +87,10 @@ public class OtaManageApplyEO implements Serializable {
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
/**软件版本*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "VDR")
|
||||
private java.lang.String vdr;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "软件版本")
|
||||
private java.lang.String plannedBpLaunchBatch;
|
||||
@@ -150,6 +155,10 @@ public class OtaManageApplyEO implements Serializable {
|
||||
@ApiModelProperty(value = "R&H Studio")
|
||||
private java.lang.String studio;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "R&H Studio中文名")
|
||||
private java.lang.String studioText;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "认证开始")
|
||||
private Date attestationStartTime;
|
||||
@@ -162,6 +171,14 @@ public class OtaManageApplyEO implements Serializable {
|
||||
@ApiModelProperty(value = "认证批准")
|
||||
private Date attestationEndTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "项目版本下拉选项")
|
||||
private List<VersionVO> versionVOList;
|
||||
|
||||
@ApiModelProperty(value = "项目版本-中文")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String projectVersionText;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -24,11 +24,10 @@ public interface OtaManageApplyEOMapper extends BaseMapper<OtaManageApplyEO> {
|
||||
|
||||
/**
|
||||
* 分车型列表-分页列表查询
|
||||
* @param page
|
||||
* @param otaManageApplyEO
|
||||
* @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);
|
||||
|
||||
@@ -36,4 +35,6 @@ public interface OtaManageApplyEOMapper extends BaseMapper<OtaManageApplyEO> {
|
||||
|
||||
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 id="getOtaCarPage" resultType="com.jero.modules.ota.entity.OtaManageApplyEO">
|
||||
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
|
||||
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>
|
||||
1=1
|
||||
<if test="otaManageApplyEO.issueKey != null and otaManageApplyEO.issueKey != ''">
|
||||
@@ -109,4 +109,17 @@
|
||||
</foreach>
|
||||
</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>
|
||||
|
||||
+7
@@ -91,4 +91,11 @@ public interface IOtaManageApplyEOService extends IService<OtaManageApplyEO> {
|
||||
* @return
|
||||
*/
|
||||
List<String> getCarList();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param carMarket
|
||||
* @return
|
||||
*/
|
||||
List<VersionVO> getProjectVersionList(String carMarket);
|
||||
}
|
||||
|
||||
+91
-12
@@ -3,7 +3,7 @@ package com.jero.modules.ota.service.impl;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hankcs.hanlp.dependency.nnparser.util.Log;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.PageUtil;
|
||||
import com.jero.modules.ota.entity.OtaManageApplyEO;
|
||||
import com.jero.modules.ota.entity.OtaManageReceiveNsdpEO;
|
||||
@@ -11,6 +11,9 @@ import com.jero.modules.ota.enums.OtaCarEnum;
|
||||
import com.jero.modules.ota.mapper.OtaManageApplyEOMapper;
|
||||
import com.jero.modules.ota.service.IOtaManageApplyEOService;
|
||||
import com.jero.modules.ota.vo.VersionVO;
|
||||
import com.jero.modules.project.entity.ProjectTaskPlanning;
|
||||
import com.jero.modules.project.service.impl.ProjectTaskPlanningServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysBaseApiImpl;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -41,6 +44,10 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
|
||||
@Autowired
|
||||
private OtaManageApplyEOMapper otaManageApplyEOMapper;
|
||||
@Autowired
|
||||
private ProjectTaskPlanningServiceImpl projectTaskPlanningService;
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -134,6 +141,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
if(!plannedBpLaunchBatchList.isEmpty()){
|
||||
List<OtaManageReceiveNsdpEO> manageReceiveNsdpEOList = otaManageApplyEOMapper.getReleaseDate(plannedBpLaunchBatchList);
|
||||
for (OtaManageApplyEO manageApplyEO : otaManageApplyEOList) {
|
||||
manageApplyEO.setVdr(manageApplyEO.getId());
|
||||
List<OtaManageReceiveNsdpEO> collect = manageReceiveNsdpEOList.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getReleaseName())
|
||||
&& e.getReleaseName().equals(manageApplyEO.getPlannedBpLaunchBatch())).collect(Collectors.toList());
|
||||
@@ -199,23 +207,78 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
*/
|
||||
@Override
|
||||
public IPage<OtaManageApplyEO> getOtaCarPage(OtaManageApplyEO otaManageApplyEO, Integer pageNo, Integer pageSize) {
|
||||
Page<OtaManageApplyEO> page = new Page<OtaManageApplyEO>(pageNo, pageSize);
|
||||
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<OtaManageApplyEO> otaManageApplyEOList = otaManageApplyEOMapper.getOtaCarPage(otaManageApplyEO);
|
||||
List<OtaManageApplyEO> list = new ArrayList<>();
|
||||
String carMarket = otaManageApplyEO.getAppliedVehicleProject();
|
||||
if(StringUtils.isNotBlank(carMarket) && !"全部".equals(carMarket) && !otaManageApplyEOList.isEmpty()){
|
||||
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String appliedVehicleProject : appliedVehicleProjectList) {
|
||||
list.addAll(Arrays.asList(appliedVehicleProject.split(",")));
|
||||
String[] conditionSplit = carMarket.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!list.isEmpty()){
|
||||
//项目版本id
|
||||
List<String> projectVersionList = list.stream()
|
||||
.map(OtaManageApplyEO::getProjectVersion).distinct().collect(Collectors.toList());
|
||||
//studio
|
||||
List<String> userIdList = list.stream().map(OtaManageApplyEO::getStudio).distinct().collect(Collectors.toList());
|
||||
List<LoginUser> loginUserList = new ArrayList<>();
|
||||
if(!userIdList.isEmpty()){
|
||||
loginUserList = sysBaseApi.queryAllUserByIds(userIdList.toArray(new String[userIdList.size()]));
|
||||
}
|
||||
|
||||
|
||||
List<ProjectTaskPlanning> projectTaskPlanningList = projectTaskPlanningService.queryList(StringUtils.join(projectVersionList,","));
|
||||
for (OtaManageApplyEO manageApplyEO : list) {
|
||||
if(StringUtils.isNotBlank(manageApplyEO.getProjectVersion())){
|
||||
List<ProjectTaskPlanning> taskPlanningList = projectTaskPlanningList.stream()
|
||||
.filter(e -> manageApplyEO.getProjectVersion().equals(e.getProjectId())).collect(Collectors.toList());
|
||||
//设置认证开始,认证批准,认证申报
|
||||
if(!taskPlanningList.isEmpty()){
|
||||
Date attestationStartTime = taskPlanningList.get(0).getAttestationStartTime();//认证开始
|
||||
Date attestationEndTime = taskPlanningList.get(0).getAttestationEndTime();//认证批准
|
||||
Date certificationSubmission = taskPlanningList.get(0).getCertificationSubmission();//认证申报
|
||||
manageApplyEO.setAttestationStartTime(attestationStartTime);
|
||||
manageApplyEO.setAttestationEndTime(attestationEndTime);
|
||||
manageApplyEO.setCertificationSubmission(certificationSubmission);
|
||||
}
|
||||
//设置studio
|
||||
if(StringUtils.isNotBlank(manageApplyEO.getStudio())){
|
||||
List<LoginUser> userList = loginUserList.stream()
|
||||
.filter(e -> manageApplyEO.getStudio().equals(e.getId())).collect(Collectors.toList());
|
||||
if(!userList.isEmpty()){
|
||||
manageApplyEO.setStudioText(userList.get(0).getUsername());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
|
||||
Page pages = PageUtil.getPages(pageNo, pageSize, list);
|
||||
return pages;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -298,4 +361,20 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
result = result.stream().distinct().collect(Collectors.toList());
|
||||
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;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@@ -9,10 +10,11 @@ import java.util.Date;
|
||||
* @date 2023/8/9 11:28
|
||||
* @auth zhn
|
||||
*/
|
||||
@Data
|
||||
public class VersionVO {
|
||||
|
||||
@ApiModelProperty(value = "版本")
|
||||
private String version;
|
||||
@ApiModelProperty(value = "项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty(value = "认证开始")
|
||||
private Date attestationStartTime;
|
||||
@@ -22,4 +24,24 @@ public class VersionVO {
|
||||
|
||||
@ApiModelProperty(value = "认证批准")
|
||||
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