OTA管理-添加扩展任务数量
This commit is contained in:
@@ -1313,6 +1313,10 @@ UPDATE `platform_task_planning` SET `create_by` = NULL, `create_time` = NULL, `u
|
|||||||
--项目库添加平台件类型字段 2023-10-18
|
--项目库添加平台件类型字段 2023-10-18
|
||||||
ALTER TABLE `project_library_base` ADD COLUMN `platform_type` varchar(255) NULL COMMENT '平台件类型' AFTER `remark`;
|
ALTER TABLE `project_library_base` ADD COLUMN `platform_type` varchar(255) NULL COMMENT '平台件类型' AFTER `remark`;
|
||||||
|
|
||||||
|
--ota_manage_receive_nsdp添加数量字段 2023-10-18
|
||||||
|
ALTER TABLE `ota_manage_receive_nsdp`
|
||||||
|
ADD COLUMN `extension_item_count` int(10) NULL COMMENT '扩展任务数量' AFTER `created_at`;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
@@ -229,5 +229,9 @@ public class OtaManageApplyEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "中英文切换")
|
@ApiModelProperty(value = "中英文切换")
|
||||||
private String cut;
|
private String cut;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "扩展任务数量")
|
||||||
|
private Integer extensionItemCount;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-8
@@ -1,22 +1,19 @@
|
|||||||
package com.jero.modules.ota.entity;
|
package com.jero.modules.ota.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
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 lombok.Data;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
|
||||||
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.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -113,4 +110,7 @@ public class OtaManageReceiveNsdp implements Serializable {
|
|||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private java.lang.String orderBy;
|
private java.lang.String orderBy;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "扩展任务数量")
|
||||||
|
private java.lang.Integer extensionItemCount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ package com.jero.modules.ota.job;
|
|||||||
|
|
||||||
import com.jero.modules.ota.entity.OtaManageReceive;
|
import com.jero.modules.ota.entity.OtaManageReceive;
|
||||||
import com.jero.modules.ota.entity.OtaManageReceiveNsdp;
|
import com.jero.modules.ota.entity.OtaManageReceiveNsdp;
|
||||||
|
import com.jero.modules.ota.enums.OtaHomoImpactEnum;
|
||||||
import com.jero.modules.ota.service.IOtaManageReceiveNsdpService;
|
import com.jero.modules.ota.service.IOtaManageReceiveNsdpService;
|
||||||
import com.jero.modules.ota.service.IOtaManageReceiveService;
|
import com.jero.modules.ota.service.IOtaManageReceiveService;
|
||||||
import com.jero.modules.system.util.StringUtils;
|
import com.jero.modules.system.util.StringUtils;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.quartz.Job;
|
import org.quartz.Job;
|
||||||
import org.quartz.JobExecutionContext;
|
import org.quartz.JobExecutionContext;
|
||||||
import org.quartz.JobExecutionException;
|
import org.quartz.JobExecutionException;
|
||||||
@@ -247,6 +249,26 @@ public class OtaDataUpdate implements Job {
|
|||||||
if (CollectionUtils.isNotEmpty(dateUpdateList)) {
|
if (CollectionUtils.isNotEmpty(dateUpdateList)) {
|
||||||
otaManageReceiveService.updateBatchById(dateUpdateList);
|
otaManageReceiveService.updateBatchById(dateUpdateList);
|
||||||
}
|
}
|
||||||
|
//扩展任务数量的值为Homo Extension - Paperwork和Homo Extension - Retest的数量和
|
||||||
|
List<OtaManageReceive> otaManageReceiveList = otaManageReceiveService.queryList();
|
||||||
|
List<OtaManageReceiveNsdp> otaManageReceiveNsdpList = otaManageReceiveNsdpService.queryList();
|
||||||
|
for (OtaManageReceiveNsdp otaManageReceiveNsdp : otaManageReceiveNsdpList) {
|
||||||
|
List<OtaManageReceive> collect = otaManageReceiveList.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getPlannedBpLaunchBatch())
|
||||||
|
&& e.getPlannedBpLaunchBatch().equals(otaManageReceiveNsdp.getReleaseName())).collect(Collectors.toList());
|
||||||
|
List<OtaManageReceive> collect1 = collect.stream()
|
||||||
|
.filter(e -> OtaHomoImpactEnum.HOMOEX_PAPERWORK.getValue().equals(e.getHomologationImpact())
|
||||||
|
|| OtaHomoImpactEnum.HOMOEX_RETEST.getValue().equals(e.getHomologationImpact())).collect(Collectors.toList());
|
||||||
|
if(ObjectUtils.isNotEmpty(collect1)){
|
||||||
|
otaManageReceiveNsdp.setExtensionItemCount(collect1.size());
|
||||||
|
}else{
|
||||||
|
otaManageReceiveNsdp.setExtensionItemCount(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
otaManageReceiveNsdpService.updateBatchById(otaManageReceiveNsdpList);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println("===============================OtaDataUpdate定时任务结束===============================");
|
System.out.println("===============================OtaDataUpdate定时任务结束===============================");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-70
@@ -219,7 +219,13 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
Set<String> marketSet = new HashSet<>();
|
Set<String> marketSet = new HashSet<>();
|
||||||
//车型
|
//车型
|
||||||
Set<String> vehicleSet = new HashSet<>();
|
Set<String> vehicleSet = new HashSet<>();
|
||||||
|
int extensionItemCount = 0;
|
||||||
for (OtaManageReceiveNsdp omrn : valList) {
|
for (OtaManageReceiveNsdp omrn : valList) {
|
||||||
|
if(ObjectUtils.isEmpty(omrn.getExtensionItemCount())){
|
||||||
|
extensionItemCount = 0;
|
||||||
|
}else{
|
||||||
|
extensionItemCount = omrn.getExtensionItemCount();
|
||||||
|
}
|
||||||
//找到最快来临的发布时间
|
//找到最快来临的发布时间
|
||||||
try {
|
try {
|
||||||
if(StringUtils.isNotBlank(omrn.getReleaseDate())){
|
if(StringUtils.isNotBlank(omrn.getReleaseDate())){
|
||||||
@@ -275,6 +281,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
oma.setCreatedAt(omrn.getCreatedAt());
|
oma.setCreatedAt(omrn.getCreatedAt());
|
||||||
oma.setReleaseType(omrn.getReleaseType());
|
oma.setReleaseType(omrn.getReleaseType());
|
||||||
|
oma.setExtensionItemCount(extensionItemCount);
|
||||||
resList.add(oma);
|
resList.add(oma);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -306,76 +313,6 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
dataList = collect;
|
dataList = collect;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List<OtaManageApplyEO> result = new ArrayList<>();
|
|
||||||
// if (!dataList.isEmpty()) {
|
|
||||||
// List<String> otaNameList = OtaCarEnum.getOtaNameList();
|
|
||||||
// List<String> plannedBpLaunchBatchList = dataList.stream()
|
|
||||||
// .filter(e -> StringUtils.isNotBlank(e.getPlannedBpLaunchBatch()))
|
|
||||||
// .map(OtaManageApplyEO::getPlannedBpLaunchBatch).distinct().collect(Collectors.toList());
|
|
||||||
// if (!plannedBpLaunchBatchList.isEmpty()) {
|
|
||||||
// for (String plannedBpLaunchBatch : plannedBpLaunchBatchList) {
|
|
||||||
// OtaManageApplyEO manageApplyEO = new OtaManageApplyEO();
|
|
||||||
// manageApplyEO.setPlannedBpLaunchBatch(plannedBpLaunchBatch);
|
|
||||||
// manageApplyEO.setId(plannedBpLaunchBatch);
|
|
||||||
//
|
|
||||||
// List<OtaManageApplyEO> otaManageApplyEOS = dataList.stream()
|
|
||||||
// .filter(e -> plannedBpLaunchBatch.equals(e.getPlannedBpLaunchBatch())).collect(Collectors.toList());
|
|
||||||
// if (!otaManageApplyEOS.isEmpty()) {
|
|
||||||
// //发布时间
|
|
||||||
// manageApplyEO.setReleaseDate(otaManageApplyEOS.get(0).getReleaseDate());
|
|
||||||
//
|
|
||||||
// List<String> appliedVehicleProjectList = otaManageApplyEOS.stream()
|
|
||||||
// .filter(e -> StringUtils.isNotBlank(e.getAppliedVehicleProject()))
|
|
||||||
// .map(OtaManageApplyEO::getAppliedVehicleProject).collect(Collectors.toList());
|
|
||||||
// List<String> carList = new ArrayList<>();
|
|
||||||
// for (String appliedVehicleProject : appliedVehicleProjectList) {
|
|
||||||
// carList.addAll(Arrays.asList(appliedVehicleProject.split(",")));
|
|
||||||
// }
|
|
||||||
// if (!carList.isEmpty()) {
|
|
||||||
// //适用车型
|
|
||||||
// carList = carList.stream().distinct().collect(Collectors.toList());
|
|
||||||
// manageApplyEO.setAppliedVehicleProject(StringUtils.join(carList, ","));
|
|
||||||
// //市场
|
|
||||||
// Set<String> marketSet = new HashSet<>();
|
|
||||||
// for (String appliedVehicleProject : carList) {
|
|
||||||
// if(otaNameList.contains(appliedVehicleProject)){
|
|
||||||
// marketSet.add(appliedVehicleProject);
|
|
||||||
// }else{
|
|
||||||
// for (String s : appliedVehicleProject.split(",")) {
|
|
||||||
// String[] split = s.split(" ");
|
|
||||||
// if (split.length == 2) {
|
|
||||||
// if (!otaNameList.contains(s)) {
|
|
||||||
// marketSet.add(split[1]);
|
|
||||||
// }
|
|
||||||
// } else if (split.length == 3) {
|
|
||||||
// if (!otaNameList.contains(s)) {
|
|
||||||
// marketSet.add(split[2]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (!marketSet.isEmpty()) {
|
|
||||||
// manageApplyEO.setMarket(StringUtils.join(marketSet, ","));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// result.add(manageApplyEO);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (ObjectUtils.isNotEmpty(otaManageApplyEO.getSoftwareIssueTimeStart())) {
|
|
||||||
// result = result.stream()
|
|
||||||
// .filter(e -> StringUtils.isNotBlank(e.getReleaseDate())
|
|
||||||
// && (e.getReleaseNameDate().after(otaManageApplyEO.getSoftwareIssueTimeStart())
|
|
||||||
// || e.getReleaseNameDate().equals(otaManageApplyEO.getSoftwareIssueTimeStart()))).collect(Collectors.toList());
|
|
||||||
// }
|
|
||||||
// if (ObjectUtils.isNotEmpty(otaManageApplyEO.getSoftwareIssueTimeEnd())) {
|
|
||||||
// result = result.stream().filter(e -> StringUtils.isNotBlank(e.getReleaseDate())
|
|
||||||
// && (e.getReleaseNameDate().before(otaManageApplyEO.getSoftwareIssueTimeEnd())
|
|
||||||
// || e.getReleaseNameDate().equals(otaManageApplyEO.getSoftwareIssueTimeEnd()))).collect(Collectors.toList());
|
|
||||||
// }
|
|
||||||
if (!dataList.isEmpty()) {
|
if (!dataList.isEmpty()) {
|
||||||
//表头排序
|
//表头排序
|
||||||
heartSort(otaManageApplyEO, dataList);
|
heartSort(otaManageApplyEO, dataList);
|
||||||
|
|||||||
Reference in New Issue
Block a user