Merge remote-tracking branch 'origin/dev_20230808_OTA' into dev_20230808_OTA
This commit is contained in:
+10
-6
@@ -167,16 +167,16 @@ public class OtaManageApplyEOController extends JeroController<OtaManageApplyEO,
|
|||||||
@AutoLog(value = "项目版本下拉数据")
|
@AutoLog(value = "项目版本下拉数据")
|
||||||
@ApiOperation(value="项目版本下拉数据", notes="项目版本下拉数据")
|
@ApiOperation(value="项目版本下拉数据", notes="项目版本下拉数据")
|
||||||
@GetMapping(value = "/getProjectVersionList")
|
@GetMapping(value = "/getProjectVersionList")
|
||||||
public Result<?> getProjectVersionList(String carMarket) {
|
public Result<?> getProjectVersionList(String carMarket,String cut) {
|
||||||
List<VersionVO> result = otaManageApplyEOService.getProjectVersionList(carMarket);
|
List<VersionVO> result = otaManageApplyEOService.getProjectVersionList(carMarket,cut);
|
||||||
return Result.OK(result);
|
return Result.OK(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "全车型和分车型详情")
|
@AutoLog(value = "全车型和分车型详情")
|
||||||
@ApiOperation(value="分车型详情", notes="分车型详情")
|
@ApiOperation(value="分车型详情", notes="分车型详情")
|
||||||
@GetMapping(value = "/getVersionInfo")
|
@GetMapping(value = "/getVersionInfo")
|
||||||
public Result<?> getVersionInfo(String vdr) {
|
public Result<?> getVersionInfo(String vdr,String car) {
|
||||||
List<VersionVO> result = otaManageApplyEOService.getVersionInfo(vdr);
|
List<VersionVO> result = otaManageApplyEOService.getVersionInfo(vdr,car);
|
||||||
return Result.OK(result);
|
return Result.OK(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,8 +292,12 @@ public class OtaManageApplyEOController extends JeroController<OtaManageApplyEO,
|
|||||||
@ApiOperation(value = "通过软件版本和项目ID查询状态", notes = "通过软件版本和项目ID查询状态")
|
@ApiOperation(value = "通过软件版本和项目ID查询状态", notes = "通过软件版本和项目ID查询状态")
|
||||||
@GetMapping(value = "/getStatisticalStatus")
|
@GetMapping(value = "/getStatisticalStatus")
|
||||||
public Result<?> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut) {
|
public Result<?> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut) {
|
||||||
Map<String, Object> res = otaManageApplyEOService.getStatisticalStatus(projectId, plannedBpLaunchBatch, cut);
|
List<Map<String, Object>> res = otaManageApplyEOService.getStatisticalStatus(projectId, plannedBpLaunchBatch, cut);
|
||||||
return Result.OK("操作成功!", res);
|
if(!res.isEmpty()){
|
||||||
|
return Result.OK("操作成功!", res.get(0));
|
||||||
|
}else{
|
||||||
|
return Result.OK("操作成功!", new HashMap<>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -61,7 +61,7 @@
|
|||||||
omr.homologation_impact,omr.homologation,
|
omr.homologation_impact,omr.homologation,
|
||||||
omr.impact_cn_homo,omr.impact_eu_homo,
|
omr.impact_cn_homo,omr.impact_eu_homo,
|
||||||
omr.master_domain,omr.applied_vehicle_project,
|
omr.master_domain,omr.applied_vehicle_project,
|
||||||
oma.id,oma.project_version,oma.attestation_schedule,oma.match_status,oma.remark
|
oma.id,oma.project_version,oma.attestation_schedule,oma.match_status,oma.remark,oma.vehicle_type
|
||||||
from ota_manage_receive omr
|
from ota_manage_receive omr
|
||||||
left join ota_manage_apply oma on oma.vdr = omr.id
|
left join ota_manage_apply oma on oma.vdr = omr.id
|
||||||
<where>
|
<where>
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
ptp.certification_submission,
|
ptp.certification_submission,
|
||||||
oma.attestation_schedule,
|
oma.attestation_schedule,
|
||||||
oma.project_version,
|
oma.project_version,
|
||||||
pni.project_name,
|
pni.project_name car,
|
||||||
pyni.year_name
|
pyni.year_name
|
||||||
FROM
|
FROM
|
||||||
project_library_base plb
|
project_library_base plb
|
||||||
|
|||||||
+3
-3
@@ -102,14 +102,14 @@ public interface IOtaManageApplyEOService extends IService<OtaManageApplyEO> {
|
|||||||
* @param carMarket
|
* @param carMarket
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<VersionVO> getProjectVersionList(String carMarket);
|
List<VersionVO> getProjectVersionList(String carMarket,String cut);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全车型和分车型详情
|
* 全车型和分车型详情
|
||||||
* @param vdr
|
* @param vdr
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<VersionVO> getVersionInfo(String vdr);
|
List<VersionVO> getVersionInfo(String vdr,String car);
|
||||||
|
|
||||||
void issueNotice(String id);
|
void issueNotice(String id);
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ public interface IOtaManageApplyEOService extends IService<OtaManageApplyEO> {
|
|||||||
|
|
||||||
List<OtaManageApplyEO> getVdrListByProject(String projectId, String cut);
|
List<OtaManageApplyEO> getVdrListByProject(String projectId, String cut);
|
||||||
|
|
||||||
Map<String, Object> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut);
|
List<Map<String, Object>> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut);
|
||||||
|
|
||||||
ModelAndView otaExportXls(HttpServletRequest request, OtaManageApplyEO otaManageApplyEO);
|
ModelAndView otaExportXls(HttpServletRequest request, OtaManageApplyEO otaManageApplyEO);
|
||||||
|
|
||||||
|
|||||||
+347
-197
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.common.util.DateUtils;
|
import com.jero.common.util.DateUtils;
|
||||||
import com.jero.common.util.oConvertUtils;
|
import com.jero.common.util.oConvertUtils;
|
||||||
@@ -31,13 +32,16 @@ import com.jero.modules.ota.vo.VersionVO;
|
|||||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
import com.jero.modules.project.entity.ProjectTaskPlanning;
|
import com.jero.modules.project.entity.ProjectTaskPlanning;
|
||||||
import com.jero.modules.project.enums.CertificationProgressEnum;
|
import com.jero.modules.project.enums.CertificationProgressEnum;
|
||||||
|
import com.jero.modules.project.enums.ComplianceFlowStatusEnum;
|
||||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||||
import com.jero.modules.project.service.impl.ProjectTaskPlanningServiceImpl;
|
import com.jero.modules.project.service.impl.ProjectTaskPlanningServiceImpl;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
import com.jero.modules.system.entity.SysUser;
|
import com.jero.modules.system.entity.SysUser;
|
||||||
import com.jero.modules.system.entity.SysUserRole;
|
import com.jero.modules.system.entity.SysUserRole;
|
||||||
|
import com.jero.modules.system.enums.DicCodeEnum;
|
||||||
import com.jero.modules.system.enums.RoleEnum;
|
import com.jero.modules.system.enums.RoleEnum;
|
||||||
import com.jero.modules.system.mapper.SysUserRoleMapper;
|
import com.jero.modules.system.mapper.SysUserRoleMapper;
|
||||||
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
import com.jero.modules.system.service.impl.SysBaseApiImpl;
|
import com.jero.modules.system.service.impl.SysBaseApiImpl;
|
||||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||||
@@ -102,6 +106,8 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IOtaManagePermissionService otaManagePermissionService;
|
private IOtaManagePermissionService otaManagePermissionService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysDictService sysDictService;
|
||||||
|
|
||||||
@Value(value = "${jero.path.upload}")
|
@Value(value = "${jero.path.upload}")
|
||||||
private String upLoadPath;
|
private String upLoadPath;
|
||||||
@@ -196,13 +202,13 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
List<OtaManageApplyEO> dataList = new ArrayList<>();
|
List<OtaManageApplyEO> dataList = new ArrayList<>();
|
||||||
|
|
||||||
//去跟manager和studio权限
|
//去跟manager和studio权限
|
||||||
if(otaManager){
|
if (otaManager) {
|
||||||
dataList = otaManageApplyEOList;
|
dataList = otaManageApplyEOList;
|
||||||
}else{
|
} else {
|
||||||
LambdaQueryWrapper<OtaManagePermission> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OtaManagePermission> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(OtaManagePermission::getUserId,currentUser.getId());
|
wrapper.eq(OtaManagePermission::getUserId, currentUser.getId());
|
||||||
List<OtaManagePermission> managePermissionList = otaManagePermissionService.list(wrapper);
|
List<OtaManagePermission> managePermissionList = otaManagePermissionService.list(wrapper);
|
||||||
if(!managePermissionList.isEmpty()){
|
if (!managePermissionList.isEmpty()) {
|
||||||
List<String> applyIdList = managePermissionList.stream().map(OtaManagePermission::getApplyId).distinct().collect(Collectors.toList());
|
List<String> applyIdList = managePermissionList.stream().map(OtaManagePermission::getApplyId).distinct().collect(Collectors.toList());
|
||||||
List<OtaManageApplyEO> collect = otaManageApplyEOList.stream().filter(e -> applyIdList.contains(e.getPlannedBpLaunchBatch())).collect(Collectors.toList());
|
List<OtaManageApplyEO> collect = otaManageApplyEOList.stream().filter(e -> applyIdList.contains(e.getPlannedBpLaunchBatch())).collect(Collectors.toList());
|
||||||
dataList = collect;
|
dataList = collect;
|
||||||
@@ -223,21 +229,21 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
|
|
||||||
List<OtaManageApplyEO> otaManageApplyEOS = dataList.stream()
|
List<OtaManageApplyEO> otaManageApplyEOS = dataList.stream()
|
||||||
.filter(e -> plannedBpLaunchBatch.equals(e.getPlannedBpLaunchBatch())).collect(Collectors.toList());
|
.filter(e -> plannedBpLaunchBatch.equals(e.getPlannedBpLaunchBatch())).collect(Collectors.toList());
|
||||||
if(!otaManageApplyEOS.isEmpty()){
|
if (!otaManageApplyEOS.isEmpty()) {
|
||||||
//发布时间
|
//发布时间
|
||||||
manageApplyEO.setReleaseDate(otaManageApplyEOS.get(0).getReleaseDate());
|
manageApplyEO.setReleaseDate(otaManageApplyEOS.get(0).getReleaseDate());
|
||||||
|
|
||||||
List<String> appliedVehicleProjectList = otaManageApplyEOS.stream()
|
List<String> appliedVehicleProjectList = otaManageApplyEOS.stream()
|
||||||
.filter(e->StringUtils.isNotBlank(e.getAppliedVehicleProject()))
|
.filter(e -> StringUtils.isNotBlank(e.getAppliedVehicleProject()))
|
||||||
.map(OtaManageApplyEO::getAppliedVehicleProject).collect(Collectors.toList());
|
.map(OtaManageApplyEO::getAppliedVehicleProject).collect(Collectors.toList());
|
||||||
List<String> carList = new ArrayList<>();
|
List<String> carList = new ArrayList<>();
|
||||||
for (String appliedVehicleProject : appliedVehicleProjectList) {
|
for (String appliedVehicleProject : appliedVehicleProjectList) {
|
||||||
carList.addAll(Arrays.asList(appliedVehicleProject.split(",")));
|
carList.addAll(Arrays.asList(appliedVehicleProject.split(",")));
|
||||||
}
|
}
|
||||||
if(!carList.isEmpty()){
|
if (!carList.isEmpty()) {
|
||||||
//适用车型
|
//适用车型
|
||||||
carList = carList.stream().distinct().collect(Collectors.toList());
|
carList = carList.stream().distinct().collect(Collectors.toList());
|
||||||
manageApplyEO.setAppliedVehicleProject(StringUtils.join(carList,","));
|
manageApplyEO.setAppliedVehicleProject(StringUtils.join(carList, ","));
|
||||||
//市场
|
//市场
|
||||||
for (String appliedVehicleProject : carList) {
|
for (String appliedVehicleProject : carList) {
|
||||||
Set<String> marketSet = new HashSet<>();
|
Set<String> marketSet = new HashSet<>();
|
||||||
@@ -280,6 +286,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OTA管理列表和全车型列表-分页列表查询
|
* OTA管理列表和全车型列表-分页列表查询
|
||||||
*
|
*
|
||||||
@@ -639,6 +646,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
String[] conditionSplit = carMarket.split(" ");
|
String[] conditionSplit = carMarket.split(" ");
|
||||||
|
|
||||||
for (OtaManageApplyEO manageApplyEO : otaManageApplyEOList) {
|
for (OtaManageApplyEO manageApplyEO : otaManageApplyEOList) {
|
||||||
|
if (StringUtils.isNotEmpty(manageApplyEO.getVehicleType()) && !manageApplyEO.getVehicleType().equals(otaManageApplyEO.getAppliedVehicleProject())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (StringUtils.isEmpty(manageApplyEO.getId()) || manageApplyEO.getId().length() < 20) {
|
if (StringUtils.isEmpty(manageApplyEO.getId()) || manageApplyEO.getId().length() < 20) {
|
||||||
manageApplyEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
manageApplyEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
}
|
}
|
||||||
@@ -668,7 +678,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
List<VersionVO> vprojectVersionList = getProjectVersionList(otaManageApplyEO.getAppliedVehicleProject());
|
List<VersionVO> vprojectVersionList = getProjectVersionList(otaManageApplyEO.getAppliedVehicleProject(), null);
|
||||||
//项目版本id
|
//项目版本id
|
||||||
List<String> projectVersionList = list.stream()
|
List<String> projectVersionList = list.stream()
|
||||||
.map(OtaManageApplyEO::getProjectVersion).distinct().collect(Collectors.toList());
|
.map(OtaManageApplyEO::getProjectVersion).distinct().collect(Collectors.toList());
|
||||||
@@ -680,6 +690,14 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
List<ProjectTaskPlanning> projectTaskPlanningList = projectTaskPlanningService.queryList(StringUtils.join(projectVersionList, ","));
|
List<ProjectTaskPlanning> projectTaskPlanningList = projectTaskPlanningService.queryList(StringUtils.join(projectVersionList, ","));
|
||||||
boolean isDisabled = isDisabled();
|
boolean isDisabled = isDisabled();
|
||||||
for (OtaManageApplyEO manageApplyEO : list) {
|
for (OtaManageApplyEO manageApplyEO : list) {
|
||||||
|
if (StringUtils.isBlank(manageApplyEO.getVehicleType())) {
|
||||||
|
manageApplyEO.setVehicleType(otaManageApplyEO.getAppliedVehicleProject());
|
||||||
|
manageApplyEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
manageApplyEO.setProjectVersion(null);
|
||||||
|
manageApplyEO.setAttestationSchedule(null);
|
||||||
|
manageApplyEO.setMatchStatus(null);
|
||||||
|
manageApplyEO.setRemark("--");
|
||||||
|
}
|
||||||
if (StringUtils.isNotBlank(manageApplyEO.getProjectVersion())) {
|
if (StringUtils.isNotBlank(manageApplyEO.getProjectVersion())) {
|
||||||
List<ProjectTaskPlanning> taskPlanningList = projectTaskPlanningList.stream()
|
List<ProjectTaskPlanning> taskPlanningList = projectTaskPlanningList.stream()
|
||||||
.filter(e -> manageApplyEO.getProjectVersion().equals(e.getProjectId())).collect(Collectors.toList());
|
.filter(e -> manageApplyEO.getProjectVersion().equals(e.getProjectId())).collect(Collectors.toList());
|
||||||
@@ -693,12 +711,22 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
manageApplyEO.setCertificationSubmission(certificationSubmission);
|
manageApplyEO.setCertificationSubmission(certificationSubmission);
|
||||||
}
|
}
|
||||||
//设置studio
|
//设置studio
|
||||||
|
boolean havePro = false;
|
||||||
for (ProjectLibraryBase pro : projectList) {
|
for (ProjectLibraryBase pro : projectList) {
|
||||||
if (pro.getId().equals(manageApplyEO.getProjectVersion())) {
|
if (pro.getId().equals(manageApplyEO.getProjectVersion())) {
|
||||||
manageApplyEO.setStudio(pro.getStudioEngineer());
|
manageApplyEO.setStudio(pro.getStudioEngineer());
|
||||||
|
havePro = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!havePro){
|
||||||
|
//找不到项目的话
|
||||||
|
manageApplyEO.setProjectVersion(null);
|
||||||
|
manageApplyEO.setStudio(null);
|
||||||
|
manageApplyEO.setAttestationEndTime(null);
|
||||||
|
manageApplyEO.setAttestationStartTime(null);
|
||||||
|
manageApplyEO.setCertificationSubmission(null);
|
||||||
|
}
|
||||||
if (StringUtils.isNotEmpty(manageApplyEO.getStudio())) {
|
if (StringUtils.isNotEmpty(manageApplyEO.getStudio())) {
|
||||||
if (CollectionUtils.isNotEmpty(studioEngineerUserInfo)) {
|
if (CollectionUtils.isNotEmpty(studioEngineerUserInfo)) {
|
||||||
String studioEngineerUserName = studioEngineerUserInfo.stream().filter(studioEngineerUser -> {
|
String studioEngineerUserName = studioEngineerUserInfo.stream().filter(studioEngineerUser -> {
|
||||||
@@ -717,9 +745,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
manageApplyEO.setProjectVersionText(collect.get(0).getCar() + "-" + collect.get(0).getYearName() + "-" + collect.get(0).getMarket());
|
manageApplyEO.setProjectVersionText(collect.get(0).getCar() + "-" + collect.get(0).getYearName() + "-" + collect.get(0).getMarket());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
manageApplyEO.setDisabled(isDisabled);
|
manageApplyEO.setDisabled(isDisabled || OtaStatusEnum.LOCKED.getKey().equals(manageApplyEO.getMatchStatus()));
|
||||||
if (StringUtils.isBlank(manageApplyEO.getRemark())) {
|
if (StringUtils.isBlank(manageApplyEO.getRemark())) {
|
||||||
manageApplyEO.setRemark("-");
|
manageApplyEO.setRemark("--");
|
||||||
}
|
}
|
||||||
if (OtaHomoImpactEnum.YES.getValue().equals(manageApplyEO.getHomologationImpact())
|
if (OtaHomoImpactEnum.YES.getValue().equals(manageApplyEO.getHomologationImpact())
|
||||||
|| OtaHomoImpactEnum.INTER_VALID.getValue().equals(manageApplyEO.getHomologationImpact())) {
|
|| OtaHomoImpactEnum.INTER_VALID.getValue().equals(manageApplyEO.getHomologationImpact())) {
|
||||||
@@ -803,7 +831,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<String> getCarList(String cut,String plannedBpLaunchBatch) {
|
public List<String> getCarList(String cut, String plannedBpLaunchBatch) {
|
||||||
List<OtaManageApplyEO> otaManageApplyEOS = this.getBaseMapper().getOtaCarList(plannedBpLaunchBatch);
|
List<OtaManageApplyEO> otaManageApplyEOS = this.getBaseMapper().getOtaCarList(plannedBpLaunchBatch);
|
||||||
List<String> result = new LinkedList<>();
|
List<String> result = new LinkedList<>();
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
@@ -838,7 +866,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<VersionVO> getProjectVersionList(String carMarket) {
|
public List<VersionVO> getProjectVersionList(String carMarket, String cut) {
|
||||||
|
|
||||||
List<VersionVO> result = new LinkedList<>();
|
List<VersionVO> result = new LinkedList<>();
|
||||||
if (StringUtils.isNotBlank(carMarket)) {
|
if (StringUtils.isNotBlank(carMarket)) {
|
||||||
@@ -874,9 +902,36 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
});
|
});
|
||||||
result.addAll(collect);
|
result.addAll(collect);
|
||||||
}
|
}
|
||||||
|
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||||
for (VersionVO versionVO : result) {
|
for (VersionVO versionVO : result) {
|
||||||
versionVO.setVersionName(versionVO.getCar() + "-" + versionVO.getYearName() + "-" + versionVO.getMarket() + "-" + versionVO.getVersionNumber());
|
List<DictModel> dictModelList = new ArrayList<>();
|
||||||
|
for (String s : versionVO.getMarket().split(",")) {
|
||||||
|
List<DictModel> dictModelListTemp = targetMarketList.stream()
|
||||||
|
.filter(e -> s.equals(e.getValue())).collect(Collectors.toList());
|
||||||
|
dictModelList.addAll(dictModelListTemp);
|
||||||
|
}
|
||||||
|
String targetMarket = "";
|
||||||
|
if(dictModelList.size() != 0){
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (DictModel dictModel : dictModelList) {
|
||||||
|
sb.append(dictModel.getTextEn()+",");
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(sb)){
|
||||||
|
targetMarket = sb.substring(0,sb.length()-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
versionVO.setVersionName(versionVO.getCar() + "-" + versionVO.getYearName() + "-" + targetMarket + "-" + versionVO.getVersionNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ComplianceFlowStatusEnum
|
||||||
|
VersionVO versionVO = new VersionVO();
|
||||||
|
versionVO.setProjectId("busheji");
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
versionVO.setVersionName("不涉及");
|
||||||
|
} else {
|
||||||
|
versionVO.setVersionName(ComplianceFlowStatusEnum.UNINVOLVED.getEnName());
|
||||||
|
}
|
||||||
|
result.add(versionVO);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -889,7 +944,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<VersionVO> getVersionInfo(String vdr) {
|
public List<VersionVO> getVersionInfo(String vdr, String car) {
|
||||||
//认证进度数据字典 certification_progress
|
//认证进度数据字典 certification_progress
|
||||||
List<SysDictItem> regionDictList = sysDictItemServiceImpl.selectItemsByDictCode("certification_progress");
|
List<SysDictItem> regionDictList = sysDictItemServiceImpl.selectItemsByDictCode("certification_progress");
|
||||||
|
|
||||||
@@ -924,6 +979,11 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (result.isEmpty()) {
|
||||||
|
VersionVO versionVO = new VersionVO();
|
||||||
|
versionVO.setVersionName(car);
|
||||||
|
result.add(versionVO);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1058,79 +1118,121 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean paramsEquals(String str1, String str2) {
|
||||||
|
if (null == str1 && null == str2) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return StringUtils.equals(str1, str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> queryProjectName(List<OtaManageApplyEO> list) {
|
||||||
|
Map<String, String> res = new HashMap<>();
|
||||||
|
List<String> idList = list.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getProjectVersion()))
|
||||||
|
.map(OtaManageApplyEO::getProjectVersion).distinct().collect(Collectors.toList());
|
||||||
|
List<ProjectLibraryBase> proList = projectLibraryBaseService.getListByIds(idList);
|
||||||
|
for (ProjectLibraryBase plb : proList) {
|
||||||
|
res.put(plb.getId(), plb.getShowName());
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void temporarySave(List<OtaManageApplyEO> list, String cut) {
|
public void temporarySave(List<OtaManageApplyEO> list, String cut) {
|
||||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
List<String> idList = list.stream()
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
.filter(e -> StringUtils.isNotBlank(e.getId()))
|
List<String> idList = list.stream()
|
||||||
.map(OtaManageApplyEO::getId).distinct().collect(Collectors.toList());
|
.filter(e -> StringUtils.isNotBlank(e.getId()))
|
||||||
|
.map(OtaManageApplyEO::getId).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
//已存在的数据
|
//已存在的数据
|
||||||
List<OtaManageApplyEO> omaOldList = this.getBaseMapper().selectBatchIds(idList);
|
List<OtaManageApplyEO> omaOldList = this.getBaseMapper().selectBatchIds(idList);
|
||||||
//历史记录
|
List<OtaManageApplyEO> queryProNameList = new ArrayList<>();
|
||||||
List<OtaManageHistory> hisList = new ArrayList<>();
|
queryProNameList.addAll(omaOldList);
|
||||||
|
queryProNameList.addAll(list);
|
||||||
|
Map<String, String> proNameMap = queryProjectName(queryProNameList);
|
||||||
|
//历史记录
|
||||||
|
List<OtaManageHistory> hisList = new ArrayList<>();
|
||||||
|
List<OtaManageApplyEO> saveList = new ArrayList<>();
|
||||||
|
|
||||||
for (OtaManageApplyEO oma : list) {
|
for (OtaManageApplyEO oma : list) {
|
||||||
boolean flag = false;
|
if (oma.getId().length() < 20) {
|
||||||
for (OtaManageApplyEO omaOld : omaOldList) {
|
continue;
|
||||||
flag = true;
|
|
||||||
if (StringUtils.equals(oma.getProjectVersionText(), omaOld.getProjectVersionText())
|
|
||||||
|| StringUtils.equals(oma.getAttestationSchedule(), omaOld.getAttestationSchedule())
|
|
||||||
|| StringUtils.equals(oma.getRemark(), omaOld.getRemark())) {
|
|
||||||
OtaManageHistory his = new OtaManageHistory();
|
|
||||||
his.setApplyId(oma.getId());
|
|
||||||
StringBuilder conSb = new StringBuilder();
|
|
||||||
StringBuilder conSbEn = new StringBuilder();
|
|
||||||
conSb.append(user.getUsername()).append("编辑了 VDR:").append(oma.getVdr());
|
|
||||||
conSbEn.append(user.getUsername()).append("edited VDR:").append(oma.getVdr());
|
|
||||||
if (StringUtils.equals(oma.getProjectVersionText(), omaOld.getProjectVersionText())) {
|
|
||||||
conSb.append(" 修改了 ").append("项目版本 由 ").append(omaOld.getProjectVersionText()).append(" 改为 ").append(oma.getProjectVersionText());
|
|
||||||
conSbEn.append(" modified ").append("Project Version from ").append(omaOld.getProjectVersionText()).append(" to ").append(oma.getProjectVersionText());
|
|
||||||
}
|
|
||||||
if (StringUtils.equals(oma.getAttestationSchedule(), omaOld.getAttestationSchedule())) {
|
|
||||||
conSb.append(" 修改了 ").append("认证进度 由 ").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getName()).append(" 改为 ").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName());
|
|
||||||
conSbEn.append(" modified ").append("Homologation Progress from ").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getValue()).append(" to ").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getValue());
|
|
||||||
}
|
|
||||||
if (StringUtils.equals(oma.getRemark(), omaOld.getRemark())) {
|
|
||||||
conSb.append(" 修改了 ").append("备注 由 ").append(omaOld.getRemark()).append(" 改为 ").append(oma.getRemark());
|
|
||||||
conSbEn.append(" modified ").append("Remark from ").append(omaOld.getRemark()).append(" to ").append(oma.getRemark());
|
|
||||||
}
|
|
||||||
his.setContentCn(conSb.toString());
|
|
||||||
his.setContentEn(conSbEn.toString());
|
|
||||||
hisList.add(his);
|
|
||||||
}
|
}
|
||||||
break;
|
boolean flag = false;
|
||||||
|
for (OtaManageApplyEO omaOld : omaOldList) {
|
||||||
|
if (omaOld.getId().equals(oma.getId())) {
|
||||||
|
flag = true;
|
||||||
|
if (!paramsEquals(oma.getProjectVersion(), omaOld.getProjectVersion())
|
||||||
|
|| !paramsEquals(oma.getAttestationSchedule(), omaOld.getAttestationSchedule())
|
||||||
|
|| !paramsEquals(oma.getRemark(), omaOld.getRemark())) {
|
||||||
|
OtaManageHistory his = new OtaManageHistory();
|
||||||
|
his.setApplyId(oma.getId());
|
||||||
|
StringBuilder conSb = new StringBuilder();
|
||||||
|
StringBuilder conSbEn = new StringBuilder();
|
||||||
|
conSb.append(user.getUsername()).append(" : ");
|
||||||
|
conSbEn.append(user.getUsername()).append(" : ");
|
||||||
|
if (!paramsEquals(oma.getProjectVersion(), omaOld.getProjectVersion())) {
|
||||||
|
oma.setMatchStatus(OtaStatusEnum.TO_BE_MATCHED.getKey());
|
||||||
|
conSb.append("‘项目版本’ 由 ‘").append(proNameMap.get(omaOld.getProjectVersion())).append("’ 改为 ‘").append(proNameMap.get(oma.getProjectVersion())).append("‘.");
|
||||||
|
conSbEn.append("‘Project Version‘ change from ‘").append(omaOld.getProjectVersionText()).append("‘ to ‘").append(oma.getProjectVersionText()).append("‘.");
|
||||||
|
}
|
||||||
|
if (!paramsEquals(oma.getAttestationSchedule(), omaOld.getAttestationSchedule())) {
|
||||||
|
oma.setMatchStatus(OtaStatusEnum.TO_BE_MATCHED.getKey());
|
||||||
|
conSb.append("’认证进度’ 由 ’").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getName())
|
||||||
|
.append("’ 改为 ’").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName()).append("‘.");
|
||||||
|
conSbEn.append("’Homologation Progress’ change from ’").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getValue())
|
||||||
|
.append("’ to ’").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getValue()).append("‘.");
|
||||||
|
}
|
||||||
|
if (!paramsEquals(oma.getRemark(), omaOld.getRemark()) && (StringUtils.isNotEmpty(oma.getRemark()) && !oma.getRemark().equals("--"))) {
|
||||||
|
conSb.append("’备注’ 由 ’").append(omaOld.getRemark()).append("’ 改为 ’").append(oma.getRemark()).append("‘.");
|
||||||
|
conSbEn.append("’Remark’ change from ’").append(omaOld.getRemark()).append("’ to ’").append(oma.getRemark()).append("‘.");
|
||||||
|
}
|
||||||
|
his.setContentCn(conSb.toString());
|
||||||
|
his.setContentEn(conSbEn.toString());
|
||||||
|
hisList.add(his);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!flag) {
|
||||||
|
if (StringUtils.isNotEmpty(oma.getProjectVersion())
|
||||||
|
|| StringUtils.isNotEmpty(oma.getAttestationSchedule())
|
||||||
|
|| (StringUtils.isNotEmpty(oma.getRemark()) && !oma.getRemark().equals("--"))) {
|
||||||
|
OtaManageHistory his = new OtaManageHistory();
|
||||||
|
his.setApplyId(oma.getId());
|
||||||
|
StringBuilder conSb = new StringBuilder();
|
||||||
|
StringBuilder conSbEn = new StringBuilder();
|
||||||
|
conSb.append(user.getUsername()).append(" : ");
|
||||||
|
conSbEn.append(user.getUsername()).append(" : ");
|
||||||
|
if (StringUtils.isNotEmpty(oma.getProjectVersion())) {
|
||||||
|
conSb.append("‘项目版本‘ 由 ‘null‘").append(" 改为 ‘").append(proNameMap.get(oma.getProjectVersion())).append("‘.");
|
||||||
|
conSbEn.append("‘Project Version‘ change from ‘null‘").append(" to ‘").append(proNameMap.get(oma.getProjectVersion())).append("‘.");
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(oma.getAttestationSchedule())) {
|
||||||
|
conSb.append("‘认证进度‘ 由 ‘null‘").append(" 改为 ‘").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName()).append("‘.");
|
||||||
|
conSbEn.append("‘Homologation Progress‘ change from ‘null‘").append(" to ‘").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getValue()).append("‘.");
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(oma.getRemark()) && !oma.getRemark().equals("--")) {
|
||||||
|
conSb.append("‘备注‘ 由 ‘null‘").append(" 改为 ‘").append(oma.getRemark()).append("‘.");
|
||||||
|
conSbEn.append("‘Remark‘ change from ‘null‘").append(" to ‘").append(oma.getRemark()).append("‘.");
|
||||||
|
}
|
||||||
|
his.setContentCn(conSb.toString());
|
||||||
|
his.setContentEn(conSbEn.toString());
|
||||||
|
hisList.add(his);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
saveList.add(oma);
|
||||||
}
|
}
|
||||||
if (!flag) {
|
if (saveList.size() > 0) {
|
||||||
if (StringUtils.isNotEmpty(oma.getProjectVersionText())
|
List<String> delList = saveList.stream()
|
||||||
|| StringUtils.isNotEmpty(oma.getAttestationSchedule())
|
.filter(e -> StringUtils.isNotBlank(e.getId()))
|
||||||
|| StringUtils.isNotEmpty(oma.getRemark())) {
|
.map(OtaManageApplyEO::getId).distinct().collect(Collectors.toList());
|
||||||
OtaManageHistory his = new OtaManageHistory();
|
this.deleteByIds(delList);
|
||||||
his.setApplyId(oma.getId());
|
this.saveOrUpdateBatch(saveList);
|
||||||
StringBuilder conSb = new StringBuilder();
|
otaManageHistoryService.saveBatch(hisList);
|
||||||
StringBuilder conSbEn = new StringBuilder();
|
|
||||||
conSb.append(user.getUsername()).append("编辑了 VDR:").append(oma.getVdr());
|
|
||||||
conSbEn.append(user.getUsername()).append("edited VDR:").append(oma.getVdr());
|
|
||||||
if (StringUtils.isNotEmpty(oma.getProjectVersionText())) {
|
|
||||||
conSb.append(" 修改了 ").append("项目版本 由 空").append(" 改为 ").append(oma.getProjectVersionText());
|
|
||||||
conSbEn.append(" modified ").append("Project Version from null").append(" to ").append(oma.getProjectVersionText());
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotEmpty(oma.getAttestationSchedule())) {
|
|
||||||
conSb.append(" 修改了 ").append("认证进度 由 空").append(" 改为 ").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName());
|
|
||||||
conSbEn.append(" modified ").append("Homologation Progress from null").append(" to ").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getValue());
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotEmpty(oma.getRemark())) {
|
|
||||||
conSb.append(" 修改了 ").append("备注 由 空").append(" 改为 ").append(oma.getRemark());
|
|
||||||
conSbEn.append(" modified ").append("Remark from null").append(" to ").append(oma.getRemark());
|
|
||||||
}
|
|
||||||
his.setContentCn(conSb.toString());
|
|
||||||
his.setContentEn(conSbEn.toString());
|
|
||||||
hisList.add(his);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.saveOrUpdateBatch(list);
|
|
||||||
otaManageHistoryService.saveBatch(hisList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1172,48 +1274,67 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
@Override
|
@Override
|
||||||
public List<String> updateVdrBatch(List<OtaManageApplyEO> list, String projectVersion, String attestationSchedule, String remark, String cut) {
|
public List<String> updateVdrBatch(List<OtaManageApplyEO> list, String projectVersion, String attestationSchedule, String remark, String cut) {
|
||||||
ProjectLibraryBase plb = projectLibraryBaseService.selectById(projectVersion);
|
ProjectLibraryBase plb = projectLibraryBaseService.selectById(projectVersion);
|
||||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
||||||
//历史记录
|
|
||||||
List<OtaManageHistory> hisList = new ArrayList<>();
|
|
||||||
List<String> msgList = new ArrayList<>();
|
List<String> msgList = new ArrayList<>();
|
||||||
|
List<OtaManageApplyEO> changeList = new ArrayList<>();
|
||||||
|
boolean isStudio = isStudio();
|
||||||
|
boolean isOtaManager = isOtaManager();
|
||||||
for (OtaManageApplyEO oma : list) {
|
for (OtaManageApplyEO oma : list) {
|
||||||
StringBuilder conOtaCn = new StringBuilder();
|
|
||||||
StringBuilder conOtaEn = new StringBuilder();
|
|
||||||
conOtaCn.append(user.getUsername() + " 批量编辑了 VDR: ").append(oma.getVdr());
|
|
||||||
conOtaEn.append(user.getUsername() + " edited VDR: ").append(oma.getVdr());
|
|
||||||
boolean isChanged = false;
|
boolean isChanged = false;
|
||||||
if (isStudio() && (StringUtils.isEmpty(oma.getMatchStatus()) || oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_MATCHED.getKey()))) {
|
if (StringUtils.isNotEmpty(projectVersion)) {
|
||||||
if (StringUtils.isNotEmpty(projectVersion)) {
|
if (isStudio) {
|
||||||
isChanged = true;
|
if (StringUtils.isEmpty(oma.getMatchStatus())
|
||||||
oma.setProjectVersion(projectVersion);
|
|| oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_MATCHED.getKey())
|
||||||
conOtaCn.append(" 修改了 ").append("项目版本 ").append(" 改为 ").append(plb.getShowName());
|
|| oma.getMatchStatus().equals(OtaStatusEnum.REJECTED.getKey())) {
|
||||||
conOtaEn.append(" modified ").append("Project Version change to ").append(plb.getShowName());
|
isChanged = true;
|
||||||
}
|
oma.setProjectVersion(projectVersion);
|
||||||
if (StringUtils.isNotEmpty(attestationSchedule)) {
|
} else {
|
||||||
isChanged = true;
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
oma.setAttestationSchedule(attestationSchedule);
|
msgList.add("VDR:" + oma.getVdr() + " 状态必须为" + OtaStatusEnum.TO_BE_MATCHED.getNameCN() + " 或 " + OtaStatusEnum.REJECTED.getNameCN() + "!");
|
||||||
conOtaCn.append(" 修改了 ").append("认证进度 ").append(" 改为 ").append(CertificationProgressEnum.getByValue(attestationSchedule).getName());
|
} else {
|
||||||
conOtaEn.append(" modified ").append("Homologation Progress change to ").append(CertificationProgressEnum.getByValue(attestationSchedule).getValue());
|
msgList.add("VDR:" + oma.getVdr() + " The state must be" + OtaStatusEnum.TO_BE_MATCHED.getNameEN() + " or " + OtaStatusEnum.REJECTED.getNameEN() + "!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
msgList.add("VDR:" + oma.getVdr() + " 只有Studio角色可以编辑项目版本!");
|
||||||
|
} else {
|
||||||
|
msgList.add("VDR:" + oma.getVdr() + " Only Studio roles can edit Project Version!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isStudio() || isOtaManager()) {
|
if (StringUtils.isNotEmpty(attestationSchedule)) {
|
||||||
if (StringUtils.isNotEmpty(remark)) {
|
if (isStudio) {
|
||||||
isChanged = true;
|
if (StringUtils.isEmpty(oma.getMatchStatus())
|
||||||
oma.setRemark(remark);
|
|| oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_MATCHED.getKey())
|
||||||
conOtaCn.append(" 修改了 ").append("备注 ").append(" 改为 ").append(remark);
|
|| oma.getMatchStatus().equals(OtaStatusEnum.REJECTED.getKey())) {
|
||||||
conOtaEn.append(" modified ").append("Remark change to ").append(remark);
|
isChanged = true;
|
||||||
|
oma.setAttestationSchedule(attestationSchedule);
|
||||||
|
} else {
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
msgList.add("VDR:" + oma.getVdr() + " 状态必须为" + OtaStatusEnum.TO_BE_MATCHED.getNameCN() + " 或 " + OtaStatusEnum.REJECTED.getNameCN() + "!");
|
||||||
|
} else {
|
||||||
|
msgList.add("VDR:" + oma.getVdr() + " The state must be" + OtaStatusEnum.TO_BE_MATCHED.getNameEN() + " or " + OtaStatusEnum.REJECTED.getNameEN() + "!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
msgList.add("VDR:" + oma.getVdr() + " 只有Studio角色可以编辑认证进度!");
|
||||||
|
} else {
|
||||||
|
msgList.add("VDR:" + oma.getVdr() + " Only Studio roles can edit Homologation Progress!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotEmpty(remark) && !remark.equals("--")) {
|
||||||
|
isChanged = true;
|
||||||
|
oma.setRemark(remark);
|
||||||
|
}
|
||||||
if (isChanged) {
|
if (isChanged) {
|
||||||
OtaManageHistory his = new OtaManageHistory();
|
changeList.add(oma);
|
||||||
his.setApplyId(oma.getId());
|
|
||||||
his.setContentCn(conOtaCn.toString());
|
|
||||||
his.setContentEn(conOtaEn.toString());
|
|
||||||
hisList.add(his);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.saveOrUpdateBatch(list);
|
if (CollectionUtils.isNotEmpty(changeList)) {
|
||||||
otaManageHistoryService.saveBatch(hisList);
|
this.temporarySave(changeList, cut);
|
||||||
|
}
|
||||||
return msgList;
|
return msgList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1321,103 +1442,132 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
receiveList = receiveList.stream()
|
receiveList = receiveList.stream()
|
||||||
.collect(Collectors.collectingAndThen(Collectors
|
.collect(Collectors.collectingAndThen(Collectors
|
||||||
.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getPlannedBpLaunchBatch()))), ArrayList::new));
|
.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getPlannedBpLaunchBatch()))), ArrayList::new));
|
||||||
for (OtaManageApplyEO rec : receiveList) {
|
String name = "";
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
String market = "";
|
||||||
rec.setAppliedVehicleProject("全部");
|
ProjectLibraryBase plb = projectLibraryBaseService.selectById(projectId);
|
||||||
|
if (ObjectUtils.isNotEmpty(plb)) {
|
||||||
|
if (StringUtils.isNotEmpty(plb.getProjectName()) && plb.getProjectName().equals("FORCE")) {
|
||||||
|
name = "Force";
|
||||||
} else {
|
} else {
|
||||||
rec.setAppliedVehicleProject("All");
|
name = plb.getProjectName();
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotEmpty(plb.getTargetMarket())) {
|
||||||
|
String[] marketStrs = plb.getTargetMarket().split(",");
|
||||||
|
if (marketStrs[0].equals("china")) {
|
||||||
|
market = "CN";
|
||||||
|
} else if (marketStrs[0].equals("UK")) {
|
||||||
|
market = "RHD";
|
||||||
|
} else {
|
||||||
|
market = marketStrs[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (OtaManageApplyEO rec : receiveList) {
|
||||||
|
rec.setAppliedVehicleProject(name + " " + market);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return receiveList;
|
return receiveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut) {
|
public List<Map<String, Object>> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut) {
|
||||||
List<OtaManageApplyEO> receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch);
|
List<OtaManageApplyEO> receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch);
|
||||||
int total = receiveList.size();
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
//匹配状态
|
if (!receiveList.isEmpty()) {
|
||||||
int toBeMatched = 0;//待匹配
|
List<String> plannedBpLaunchBatchList = receiveList.stream()
|
||||||
int toBeApproved = 0;//待审批
|
.filter(e -> StringUtils.isNotBlank(e.getPlannedBpLaunchBatch()))
|
||||||
int locked = 0;//锁定
|
.map(OtaManageApplyEO::getPlannedBpLaunchBatch).distinct().collect(Collectors.toList());
|
||||||
int rejected = 0;//退回
|
|
||||||
//认证进度
|
|
||||||
int notStart = 0;//未开始
|
|
||||||
int inProgress = 0;//进行中
|
|
||||||
int testPassed = 0;//实验通过
|
|
||||||
int testFailed = 0;//实验失败
|
|
||||||
int notSubmitted = 0;//部件报告未提交
|
|
||||||
int submitted = 0;//部件报告已提交
|
|
||||||
int stored = 0;//部件报告已入库
|
|
||||||
|
|
||||||
for (OtaManageApplyEO oma : receiveList) {
|
for (String s : plannedBpLaunchBatchList) {
|
||||||
if (StringUtils.isBlank(oma.getMatchStatus()) || oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_MATCHED.getKey())) {
|
List<OtaManageApplyEO> otaManageApplyEOList = receiveList.stream()
|
||||||
toBeMatched++;
|
.filter(e -> s.equals(e.getPlannedBpLaunchBatch())).collect(Collectors.toList());
|
||||||
} else if (oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey())) {
|
|
||||||
toBeApproved++;
|
int total = otaManageApplyEOList.size();
|
||||||
} else if (oma.getMatchStatus().equals(OtaStatusEnum.LOCKED.getKey())) {
|
//匹配状态
|
||||||
locked++;
|
int toBeMatched = 0;//待匹配
|
||||||
} else if (oma.getMatchStatus().equals(OtaStatusEnum.REJECTED.getKey())) {
|
int toBeApproved = 0;//待审批
|
||||||
rejected++;
|
int locked = 0;//锁定
|
||||||
} else {
|
int rejected = 0;//退回
|
||||||
toBeMatched++;
|
//认证进度
|
||||||
}
|
int notStart = 0;//未开始
|
||||||
if (StringUtils.isBlank(oma.getAttestationSchedule()) || oma.getAttestationSchedule().equals(CertificationProgressEnum.NOT_START.getValue())) {
|
int inProgress = 0;//进行中
|
||||||
notStart++;
|
int testPassed = 0;//实验通过
|
||||||
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.IN_PROGRESS.getValue())) {
|
int testFailed = 0;//实验失败
|
||||||
inProgress++;
|
int notSubmitted = 0;//部件报告未提交
|
||||||
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.TEST_PASSED.getValue())) {
|
int submitted = 0;//部件报告已提交
|
||||||
testPassed++;
|
int stored = 0;//部件报告已入库
|
||||||
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.TEST_FAILED.getValue())) {
|
|
||||||
testFailed++;
|
for (OtaManageApplyEO oma : otaManageApplyEOList) {
|
||||||
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue())) {
|
if (StringUtils.isBlank(oma.getMatchStatus()) || oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_MATCHED.getKey())) {
|
||||||
notSubmitted++;
|
toBeMatched++;
|
||||||
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue())) {
|
} else if (oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey())) {
|
||||||
submitted++;
|
toBeApproved++;
|
||||||
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue())) {
|
} else if (oma.getMatchStatus().equals(OtaStatusEnum.LOCKED.getKey())) {
|
||||||
stored++;
|
locked++;
|
||||||
} else {
|
} else if (oma.getMatchStatus().equals(OtaStatusEnum.REJECTED.getKey())) {
|
||||||
notStart++;
|
rejected++;
|
||||||
|
} else {
|
||||||
|
toBeMatched++;
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(oma.getAttestationSchedule()) || oma.getAttestationSchedule().equals(CertificationProgressEnum.NOT_START.getValue())) {
|
||||||
|
notStart++;
|
||||||
|
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.IN_PROGRESS.getValue())) {
|
||||||
|
inProgress++;
|
||||||
|
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.TEST_PASSED.getValue())) {
|
||||||
|
testPassed++;
|
||||||
|
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.TEST_FAILED.getValue())) {
|
||||||
|
testFailed++;
|
||||||
|
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue())) {
|
||||||
|
notSubmitted++;
|
||||||
|
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue())) {
|
||||||
|
submitted++;
|
||||||
|
} else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue())) {
|
||||||
|
stored++;
|
||||||
|
} else {
|
||||||
|
notStart++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> statisticalMap = new HashMap<>();
|
||||||
|
statisticalMap.put("plannedBpLaunchBatch", s);
|
||||||
|
statisticalMap.put("allCount", total);
|
||||||
|
List<Map<String, Object>> matchStatusMapList = new ArrayList<>();
|
||||||
|
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_MATCHED.getKey(), toBeMatched));
|
||||||
|
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_APPROVED.getKey(), toBeApproved));
|
||||||
|
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.LOCKED.getKey(), locked));
|
||||||
|
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.REJECTED.getKey(), rejected));
|
||||||
|
statisticalMap.put("matchStatusMapList", matchStatusMapList);
|
||||||
|
|
||||||
|
Map<String, Object> matchStatusMap = new HashMap<>();
|
||||||
|
matchStatusMap.put(OtaStatusEnum.TO_BE_MATCHED.getKey(), toBeMatched);
|
||||||
|
matchStatusMap.put(OtaStatusEnum.TO_BE_APPROVED.getKey(), toBeApproved);
|
||||||
|
matchStatusMap.put(OtaStatusEnum.LOCKED.getKey(), locked);
|
||||||
|
matchStatusMap.put(OtaStatusEnum.REJECTED.getKey(), rejected);
|
||||||
|
statisticalMap.put("matchStatusMap", matchStatusMap);
|
||||||
|
|
||||||
|
List<Map<String, Object>> attestationScheduleMapList = new ArrayList<>();
|
||||||
|
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.NOT_START.getValue(), notStart));
|
||||||
|
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.IN_PROGRESS.getValue(), inProgress));
|
||||||
|
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.TEST_PASSED.getValue(), testPassed));
|
||||||
|
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.TEST_FAILED.getValue(), testFailed));
|
||||||
|
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue(), notSubmitted));
|
||||||
|
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue(), submitted));
|
||||||
|
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue(), stored));
|
||||||
|
statisticalMap.put("attestationScheduleMapList", attestationScheduleMapList);
|
||||||
|
|
||||||
|
Map<String, Object> attestationScheduleMap = new HashMap<>();
|
||||||
|
attestationScheduleMap.put(CertificationProgressEnum.NOT_START.getValue().replace(" ", "_"), notStart);
|
||||||
|
attestationScheduleMap.put(CertificationProgressEnum.IN_PROGRESS.getValue().replace(" ", "_"), inProgress);
|
||||||
|
attestationScheduleMap.put(CertificationProgressEnum.TEST_PASSED.getValue().replace(" ", "_"), testPassed);
|
||||||
|
attestationScheduleMap.put(CertificationProgressEnum.TEST_FAILED.getValue().replace(" ", "_"), testFailed);
|
||||||
|
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue().replace(" ", "_"), notSubmitted);
|
||||||
|
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue().replace(" ", "_"), submitted);
|
||||||
|
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue().replace(" ", "_"), stored);
|
||||||
|
statisticalMap.put("attestationScheduleMap", attestationScheduleMap);
|
||||||
|
result.add(statisticalMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
Map<String, Object> statisticalMap = new HashMap<>();
|
|
||||||
statisticalMap.put("allCount", total);
|
|
||||||
List<Map<String, Object>> matchStatusMapList = new ArrayList<>();
|
|
||||||
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_MATCHED.getKey(), toBeMatched));
|
|
||||||
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_APPROVED.getKey(), toBeApproved));
|
|
||||||
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.LOCKED.getKey(), locked));
|
|
||||||
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.REJECTED.getKey(), rejected));
|
|
||||||
statisticalMap.put("matchStatusMapList", matchStatusMapList);
|
|
||||||
|
|
||||||
Map<String, Object> matchStatusMap = new HashMap<>();
|
|
||||||
matchStatusMap.put(OtaStatusEnum.TO_BE_MATCHED.getKey(), toBeMatched);
|
|
||||||
matchStatusMap.put(OtaStatusEnum.TO_BE_APPROVED.getKey(), toBeApproved);
|
|
||||||
matchStatusMap.put(OtaStatusEnum.LOCKED.getKey(), locked);
|
|
||||||
matchStatusMap.put(OtaStatusEnum.REJECTED.getKey(), rejected);
|
|
||||||
statisticalMap.put("matchStatusMap", matchStatusMap);
|
|
||||||
|
|
||||||
List<Map<String, Object>> attestationScheduleMapList = new ArrayList<>();
|
|
||||||
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.NOT_START.getValue(), notStart));
|
|
||||||
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.IN_PROGRESS.getValue(), inProgress));
|
|
||||||
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.TEST_PASSED.getValue(), testPassed));
|
|
||||||
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.TEST_FAILED.getValue(), testFailed));
|
|
||||||
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue(), notSubmitted));
|
|
||||||
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue(), submitted));
|
|
||||||
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue(), stored));
|
|
||||||
statisticalMap.put("attestationScheduleMapList", attestationScheduleMapList);
|
|
||||||
|
|
||||||
Map<String, Object> attestationScheduleMap = new HashMap<>();
|
|
||||||
attestationScheduleMap.put(CertificationProgressEnum.NOT_START.getValue().replace(" ", "_"), notStart);
|
|
||||||
attestationScheduleMap.put(CertificationProgressEnum.IN_PROGRESS.getValue().replace(" ", "_"), inProgress);
|
|
||||||
attestationScheduleMap.put(CertificationProgressEnum.TEST_PASSED.getValue().replace(" ", "_"), testPassed);
|
|
||||||
attestationScheduleMap.put(CertificationProgressEnum.TEST_FAILED.getValue().replace(" ", "_"), testFailed);
|
|
||||||
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue().replace(" ", "_"), notSubmitted);
|
|
||||||
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue().replace(" ", "_"), submitted);
|
|
||||||
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue().replace(" ", "_"), stored);
|
|
||||||
statisticalMap.put("attestationScheduleMap", attestationScheduleMap);
|
|
||||||
|
|
||||||
return statisticalMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, Object> wrapStatMap(String key, String val, String keyStr, Object valObj) {
|
private Map<String, Object> wrapStatMap(String key, String val, String keyStr, Object valObj) {
|
||||||
@@ -1479,7 +1629,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
@Override
|
@Override
|
||||||
public ModelAndView allCarExportXls(HttpServletRequest request, OtaManageApplyEO otaManageApplyEO) {
|
public ModelAndView allCarExportXls(HttpServletRequest request, OtaManageApplyEO otaManageApplyEO) {
|
||||||
// Step.2 获取导出数据
|
// Step.2 获取导出数据
|
||||||
List<OtaManageApplyEO> pageList = getOtaPage(otaManageApplyEO);
|
List<OtaManageApplyEO> pageList = getAllCarPage(otaManageApplyEO);
|
||||||
List<OtaManageApplyEO> exportList = null;
|
List<OtaManageApplyEO> exportList = null;
|
||||||
|
|
||||||
// 过滤选中数据
|
// 过滤选中数据
|
||||||
|
|||||||
+4
@@ -26,4 +26,8 @@ public interface ProjectLibraryBaseMapper extends BaseMapper<ProjectLibraryBase>
|
|||||||
List<ProjectLibraryBase> queryById(String id);
|
List<ProjectLibraryBase> queryById(String id);
|
||||||
|
|
||||||
ProjectLibraryBase selectProjectName(@Param("projectLibraryId") String projectLibraryId);
|
ProjectLibraryBase selectProjectName(@Param("projectLibraryId") String projectLibraryId);
|
||||||
|
|
||||||
|
List<ProjectLibraryBase> getListByIds(@Param("idList") List<String> idList);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -290,4 +290,14 @@
|
|||||||
WHERE
|
WHERE
|
||||||
plb.id = #{projectLibraryId}
|
plb.id = #{projectLibraryId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getListByIds" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
|
||||||
|
|
||||||
|
<include refid="select_item"/>
|
||||||
|
where plb.id in
|
||||||
|
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
order by plb.create_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+2
@@ -186,4 +186,6 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
|
|||||||
Result<?> overallReplacementUser(JSONObject json);
|
Result<?> overallReplacementUser(JSONObject json);
|
||||||
|
|
||||||
List<ProjectLibraryBase> queryList(List<String> projectIdList);
|
List<ProjectLibraryBase> queryList(List<String> projectIdList);
|
||||||
|
|
||||||
|
List<ProjectLibraryBase> getListByIds(List<String> projectIdList);
|
||||||
}
|
}
|
||||||
|
|||||||
+102
@@ -22,6 +22,8 @@ import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
|||||||
import com.jero.modules.dummy.enums.OrderEnum;
|
import com.jero.modules.dummy.enums.OrderEnum;
|
||||||
import com.jero.modules.enums.DictCodeEnum;
|
import com.jero.modules.enums.DictCodeEnum;
|
||||||
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
||||||
|
import com.jero.modules.ota.entity.OtaManageApplyEO;
|
||||||
|
import com.jero.modules.ota.service.impl.OtaManageApplyEOServiceImpl;
|
||||||
import com.jero.modules.project.entity.*;
|
import com.jero.modules.project.entity.*;
|
||||||
import com.jero.modules.project.enums.*;
|
import com.jero.modules.project.enums.*;
|
||||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||||
@@ -48,6 +50,7 @@ import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
|
|||||||
import com.jero.modules.top.entity.TopProjectEO;
|
import com.jero.modules.top.entity.TopProjectEO;
|
||||||
import com.jero.modules.top.service.ITopProjectEOService;
|
import com.jero.modules.top.service.ITopProjectEOService;
|
||||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||||
|
import javafx.beans.binding.ObjectBinding;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||||
@@ -173,6 +176,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProjectLibraryStatisticsService projectLibraryStatisticsService;
|
private IProjectLibraryStatisticsService projectLibraryStatisticsService;
|
||||||
|
@Autowired
|
||||||
|
private OtaManageApplyEOServiceImpl otaManageApplyEOService;
|
||||||
|
|
||||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
private static DecimalFormat df = new DecimalFormat("#.00");
|
private static DecimalFormat df = new DecimalFormat("#.00");
|
||||||
@@ -2576,6 +2581,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
|||||||
this.exportRegulatoryManagement(workbook,params);
|
this.exportRegulatoryManagement(workbook,params);
|
||||||
this.exportCertificationManagement(workbook,params);
|
this.exportCertificationManagement(workbook,params);
|
||||||
this.exportParameterCollecting(workbook,params);
|
this.exportParameterCollecting(workbook,params);
|
||||||
|
this.exportOtaCollecting(workbook,params);
|
||||||
try {
|
try {
|
||||||
response.setHeader("Content-Disposition",
|
response.setHeader("Content-Disposition",
|
||||||
"attachment; filename=" + fileName);
|
"attachment; filename=" + fileName);
|
||||||
@@ -3107,6 +3113,93 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void exportOtaCollecting(HSSFWorkbook workbook, Map<String, Object> params) {
|
||||||
|
String cut = (String) params.get("cut");
|
||||||
|
String sheetName = "OTA状态";
|
||||||
|
String firstTitle = "匹配状态统计,OTA认证进度统计";
|
||||||
|
String secondTitle = "软件版本,待匹配,待审批,锁定,退回,未开始,进行中,实验通过,实验失败,部件报告未提交,部件报告已提交,部件报告已入库";
|
||||||
|
if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||||
|
sheetName = "OTA status";
|
||||||
|
firstTitle = "Matching state statistics,OTA authentication progress statistics";
|
||||||
|
secondTitle = "Software version," +
|
||||||
|
"To be matched," +
|
||||||
|
"To be approved," +
|
||||||
|
"lock," +
|
||||||
|
"Reject,"+
|
||||||
|
"Not started," +
|
||||||
|
"Ongoing," +
|
||||||
|
"Test Passed," +
|
||||||
|
"Test Failed," +
|
||||||
|
"Component report not submitted," +
|
||||||
|
"Component report submitted," +
|
||||||
|
"Component report has been stored";
|
||||||
|
}
|
||||||
|
HSSFSheet sheet = workbook.createSheet(sheetName);
|
||||||
|
//合并单元格 起始行,结束行,起始列,结束列
|
||||||
|
CellRangeAddress region1 = new CellRangeAddress(0, 0, 1, 4);
|
||||||
|
sheet.addMergedRegion(region1);
|
||||||
|
CellRangeAddress region2 = new CellRangeAddress(0, 0, 5, 11);
|
||||||
|
sheet.addMergedRegion(region2);
|
||||||
|
|
||||||
|
String[] firstTitleArr = firstTitle.split(",");
|
||||||
|
String[] secondTitleArr = secondTitle.split(",");
|
||||||
|
Row firstRow = sheet.createRow(0);
|
||||||
|
Row secondRow = sheet.createRow(1);
|
||||||
|
|
||||||
|
CellStyle cellStyleTitle = workbook.createCellStyle();
|
||||||
|
cellStyleTitle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
for (int i = 0; i <= 11; i++){
|
||||||
|
sheet.setColumnWidth(i, 3500);
|
||||||
|
Cell firstRowCell = firstRow.createCell(i);
|
||||||
|
firstRowCell.setCellStyle(cellStyleTitle);
|
||||||
|
if(i == 1){
|
||||||
|
firstRowCell.setCellValue(firstTitleArr[0]);
|
||||||
|
}else if(i==5){
|
||||||
|
firstRowCell.setCellValue(firstTitleArr[1]);
|
||||||
|
}
|
||||||
|
Cell secondRowCell = secondRow.createCell(i);
|
||||||
|
secondRowCell.setCellValue(secondTitleArr[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
String projectLibraryId = (String) params.get("projectLibraryId");
|
||||||
|
List<Map<String, Object>> mapList = otaManageApplyEOService.getStatisticalStatus(projectLibraryId, null, cut);
|
||||||
|
|
||||||
|
if(ObjectUtils.isNotEmpty(mapList)){
|
||||||
|
int dataIndex = 2;
|
||||||
|
for (Map<String, Object> map : mapList) {
|
||||||
|
String plannedBpLaunchBatch = (String) map.get("plannedBpLaunchBatch");
|
||||||
|
Map<String, Object> matchStatusMap = (Map<String, Object>)map.get("matchStatusMap");
|
||||||
|
Map<String, Object> attestationScheduleMap = (Map<String, Object>)map.get("attestationScheduleMap");
|
||||||
|
|
||||||
|
String.valueOf(matchStatusMap.get("locked"));
|
||||||
|
String locked = String.valueOf(matchStatusMap.get("locked"));
|
||||||
|
String rejected = String.valueOf(matchStatusMap.get("rejected"));
|
||||||
|
String to_be_approved = String.valueOf(matchStatusMap.get("to_be_approved"));
|
||||||
|
String to_be_matched = String.valueOf(matchStatusMap.get("to_be_matched"));
|
||||||
|
String Component_report_has_been_stored = String.valueOf(attestationScheduleMap.get("Component_report_has_been_stored"));
|
||||||
|
String Component_report_not_submitted = String.valueOf(attestationScheduleMap.get("Component_report_not_submitted"));
|
||||||
|
String Component_report_submitted = String.valueOf(attestationScheduleMap.get("Component_report_submitted"));
|
||||||
|
String In_progress = String.valueOf(attestationScheduleMap.get("In_progress"));
|
||||||
|
String Not_start =String.valueOf(attestationScheduleMap.get("Not_start"));
|
||||||
|
String Test_failed = String.valueOf(attestationScheduleMap.get("Test_failed"));
|
||||||
|
String Test_passed = String.valueOf(attestationScheduleMap.get("Test_passed"));
|
||||||
|
Row dataRow = sheet.createRow(dataIndex);
|
||||||
|
dataRow.createCell(0).setCellValue(plannedBpLaunchBatch);
|
||||||
|
dataRow.createCell(1).setCellValue(to_be_matched);
|
||||||
|
dataRow.createCell(2).setCellValue(to_be_approved);
|
||||||
|
dataRow.createCell(3).setCellValue(locked);
|
||||||
|
dataRow.createCell(4).setCellValue(rejected);
|
||||||
|
dataRow.createCell(5).setCellValue(Not_start);
|
||||||
|
dataRow.createCell(6).setCellValue(In_progress);
|
||||||
|
dataRow.createCell(7).setCellValue(Test_passed);
|
||||||
|
dataRow.createCell(8).setCellValue(Test_failed);
|
||||||
|
dataRow.createCell(9).setCellValue(Component_report_not_submitted);
|
||||||
|
dataRow.createCell(10).setCellValue(Component_report_submitted);
|
||||||
|
dataRow.createCell(11).setCellValue(Component_report_has_been_stored);
|
||||||
|
dataIndex ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出认证参数收集-设置数据
|
* 导出认证参数收集-设置数据
|
||||||
@@ -3432,6 +3525,15 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
|||||||
List<ProjectLibraryBase> res = this.list(queryWrapper);
|
List<ProjectLibraryBase> res = this.list(queryWrapper);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProjectLibraryBase> getListByIds(List<String> projectIdList) {
|
||||||
|
List<ProjectLibraryBase> res = new ArrayList<>();
|
||||||
|
if(CollectionUtils.isNotEmpty(projectIdList)){
|
||||||
|
res = this.getBaseMapper().getListByIds(projectIdList);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<div class='detail-box'>
|
<div class='detail-box'>
|
||||||
<span class='detail-text'>{{item.versionName}}</span>
|
<span class='detail-text' style="width: 300px">{{item.versionName}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|||||||
Reference in New Issue
Block a user