修改OTA项目统计
This commit is contained in:
+16
@@ -263,5 +263,21 @@ public class OtaManageApplyEOController extends JeroController<OtaManageApplyEO,
|
||||
return Result.OK("操作成功!", res);
|
||||
}
|
||||
|
||||
@AutoLog(value = "查询项目涉及的VDR版本")
|
||||
@ApiOperation(value = "查询项目涉及的VDR版本", notes = "查询项目涉及的VDR版本")
|
||||
@GetMapping(value = "/getVdrListByProject")
|
||||
public Result<?> getVdrListByProject(String projectId, String cut) {
|
||||
List<OtaManageApplyEO> resList = otaManageApplyEOService.getVdrListByProject(projectId, cut);
|
||||
return Result.OK("操作成功!", resList);
|
||||
}
|
||||
|
||||
@AutoLog(value = "通过软件版本和项目ID查询状态")
|
||||
@ApiOperation(value = "通过软件版本和项目ID查询状态", notes = "通过软件版本和项目ID查询状态")
|
||||
@GetMapping(value = "/getStatisticalStatus")
|
||||
public Result<?> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut) {
|
||||
List<OtaManageApplyEO> resList = otaManageApplyEOService.getStatisticalStatus(projectId, plannedBpLaunchBatch, cut);
|
||||
return Result.OK("操作成功!", resList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -29,6 +29,9 @@ public interface OtaManageApplyEOMapper extends BaseMapper<OtaManageApplyEO> {
|
||||
*/
|
||||
List<OtaManageApplyEO> getOtaCarPage(@Param("otaManageApplyEO") OtaManageApplyEO otaManageApplyEO);
|
||||
|
||||
List<OtaManageApplyEO> getReceiveByVdr(@Param("vdrList") List<String> vdrList);
|
||||
|
||||
|
||||
List<VersionVO> getByAppliedVehicleProject(@Param("appliedVehicleProject") String appliedVehicleProject);
|
||||
|
||||
List<OtaManageApplyEO> getOtaCarList();
|
||||
|
||||
+7
-28
@@ -43,34 +43,13 @@
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<!-- <select id="getOtaPage" resultType="com.jero.modules.ota.entity.OtaManageApplyEO">-->
|
||||
<!-- select * from ota_manage_receive-->
|
||||
<!-- <where>-->
|
||||
<!-- <if test="otaManageApplyEO.plannedBpLaunchBatch != null and otaManageApplyEO.plannedBpLaunchBatch != ''">-->
|
||||
<!-- planned_bp_launch_batch_ =#{otaManageApplyEO.plannedBpLaunchBatch}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="otaManageApplyEO.appliedVehicleProject != null and otaManageApplyEO.appliedVehicleProject != ''">-->
|
||||
<!-- and applied_vehicle_project LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.appliedVehicleProject}),'%')-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="otaManageApplyEO.market != null and otaManageApplyEO.market != ''">-->
|
||||
<!-- and applied_vehicle_project LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.market}),'%')-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="otaManageApplyEO.issueKey != null and otaManageApplyEO.issueKey != ''">-->
|
||||
<!-- and id LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.issueKey}),'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="otaManageApplyEO.summary != null and otaManageApplyEO.summary != ''">-->
|
||||
<!-- and summary LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.summary}),'%')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="otaManageApplyEO.impactHomo != null and otaManageApplyEO.impactHomo != ''">-->
|
||||
<!-- and (impact_cn_homo LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.impactHomo}),'%')-->
|
||||
<!-- or impact_eu_homo impact_cn_homo LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.impactHomo}),'%'))-->
|
||||
<!-- </if>-->
|
||||
<!-- </where>-->
|
||||
<!-- order by create_time desc-->
|
||||
<!-- </select>-->
|
||||
<select id="getReceiveByVdr" resultType="com.jero.modules.ota.entity.OtaManageApplyEO">
|
||||
select * from ota_manage_receive
|
||||
where id in
|
||||
<foreach collection="vdrList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getOtaCarPage" resultType="com.jero.modules.ota.entity.OtaManageApplyEO">
|
||||
select omr.id as vdr,omr.planned_bp_launch_batch_,omr.update_date,
|
||||
omr.summary,omr.status,
|
||||
|
||||
+4
@@ -119,4 +119,8 @@ public interface IOtaManageApplyEOService extends IService<OtaManageApplyEO> {
|
||||
List<String> confirm(String ids, String cut);
|
||||
|
||||
List<String> reject(String ids, String rejectReason,String cut);
|
||||
|
||||
List<OtaManageApplyEO> getVdrListByProject(String projectId, String cut);
|
||||
|
||||
List<OtaManageApplyEO> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut);
|
||||
}
|
||||
|
||||
+60
-2
@@ -67,6 +67,8 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
private IOtaManageHistoryService otaManageHistoryService;
|
||||
|
||||
|
||||
private static SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
|
||||
|
||||
|
||||
@@ -155,8 +157,6 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
List<OtaManageApplyEO> otaManageApplyEOList = otaManageApplyEOMapper.getOtaList(otaManageApplyEO);
|
||||
if(!otaManageApplyEOList.isEmpty()){
|
||||
List<String> otaNameList = OtaCarEnum.getOtaNameList();
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
List<String> plannedBpLaunchBatchList = otaManageApplyEOList.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getPlannedBpLaunchBatch()))
|
||||
.map(OtaManageApplyEO::getPlannedBpLaunchBatch).distinct().collect(Collectors.toList());
|
||||
@@ -656,6 +656,64 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
return msgList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OtaManageApplyEO> getVdrListByProject(String projectId, String cut) {
|
||||
List<OtaManageApplyEO> res = new ArrayList<>();
|
||||
QueryWrapper<OtaManageApplyEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(OtaManageApplyEO::getProjectVersion, projectId);
|
||||
List<OtaManageApplyEO> otaManageApplyEOS = this.list(queryWrapper);
|
||||
List<String> vdrList = otaManageApplyEOS.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getVdr()))
|
||||
.map(OtaManageApplyEO::getVdr).distinct().collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(vdrList)) {
|
||||
res = otaManageApplyEOMapper.getReceiveByVdr(vdrList);
|
||||
List<String> plannedBpLaunchBatchList = res.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getPlannedBpLaunchBatch()))
|
||||
.map(OtaManageApplyEO::getPlannedBpLaunchBatch).distinct().collect(Collectors.toList());
|
||||
List<OtaManageReceiveNsdpEO> manageReceiveNsdpEOList = otaManageApplyEOMapper.getReleaseDate(plannedBpLaunchBatchList);
|
||||
for (OtaManageApplyEO manageApplyEO : res) {
|
||||
manageApplyEO.setVdr(manageApplyEO.getId());
|
||||
List<OtaManageReceiveNsdpEO> collect = manageReceiveNsdpEOList.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getReleaseName())
|
||||
&& e.getReleaseName().equals(manageApplyEO.getPlannedBpLaunchBatch())).collect(Collectors.toList());
|
||||
if (!collect.isEmpty()) {
|
||||
List<String> releaseDateList = collect.stream().map(OtaManageReceiveNsdpEO::getReleaseDate).distinct().collect(Collectors.toList());
|
||||
List<Integer> list = new ArrayList<>();
|
||||
for (String s : releaseDateList) {
|
||||
list.add(Integer.parseInt(s.replaceAll("-", "")));
|
||||
}
|
||||
Integer max = Collections.max(list);
|
||||
try {
|
||||
//发布时间
|
||||
manageApplyEO.setReleaseName(sdf.format(dateFormat.parse(max.toString())));
|
||||
manageApplyEO.setReleaseNameDate(dateFormat.parse(max.toString()));
|
||||
} catch (ParseException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OtaManageApplyEO> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut) {
|
||||
List<String> plannedBpLaunchBatchList = new ArrayList<>();
|
||||
plannedBpLaunchBatchList.add(plannedBpLaunchBatch);
|
||||
// List<OtaManageApplyEO> receiveList = otaManageApplyEOMapper.getReceiveByplannedBpLaunchBatch(plannedBpLaunchBatchList);
|
||||
// List<String> vdrList = receiveList.stream()
|
||||
// .filter(e -> StringUtils.isNotBlank(e.getId()))
|
||||
// .map(OtaManageApplyEO::getId).distinct().collect(Collectors.toList());
|
||||
// QueryWrapper<OtaManageApplyEO> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.lambda().eq(OtaManageApplyEO::getProjectVersion, projectId);
|
||||
// queryWrapper.lambda().in(OtaManageApplyEO::getVdr, vdrList);
|
||||
// List<OtaManageApplyEO> otaManageApplyEOS = this.list(queryWrapper);
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<OtaManageApplyEO> getListByIds(List<String> idList) {
|
||||
QueryWrapper<OtaManageApplyEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(OtaManageApplyEO::getId, idList);
|
||||
|
||||
Reference in New Issue
Block a user