Merge remote-tracking branch 'origin/dev_20230912_Platform' into dev_20230912_Platform

This commit is contained in:
zyx.net
2023-09-28 10:05:57 +08:00
3 changed files with 42 additions and 24 deletions
@@ -10676,6 +10676,7 @@ public class PlatformProjectLawsInventoryEOServiceImpl extends ServiceImpl<Platf
map.put("uuid",problemManagementEO.getId());
map.put("id",problemManagementEO.getId());
map.put("flag",DataEnum.NEW.getValue());
map.put("projectId",problemManagementEO.getProjectId());
List<DictModel> dictModelList = problemTypeList.stream().filter(e -> e.getValue().equals(problemManagementEO.getProblemType())).collect(Collectors.toList());
@@ -2519,7 +2519,7 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
HSSFWorkbook workbook = new HSSFWorkbook();
this.exportRegulatoryManagement(workbook,params);
this.exportCertificationManagement(workbook,params);
this.exportParameterCollecting(workbook,params);
// this.exportParameterCollecting(workbook,params);
// this.exportOtaCollecting(workbook,params);
try {
response.setHeader("Content-Disposition",
@@ -2775,23 +2775,37 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
*/
private void exportCertificationManagement(HSSFWorkbook workbook,Map<String,Object> params){
String cut = (String) params.get("cut");
// String sheetName = "认证活动管理";
// String firstTitle = "认证任务确认," +
// "Pre-Homo," +
// "认证进度";
// String secondTitle = "责任领域(一级)," +
// "未发起,待确认,接受,拒绝,完成度," +
// "未发起,待确认,审查通过,审查退回,完成度," +
// "未开始,进行中,实验通过,实验失败,部件报告未上传,部件报告已上传,部件报告已入库,完成度";
// if(StringUtils.equals(cut,CutEnum.EN.getValue())){
// sheetName = "Certification Activity Management";
// firstTitle = "Authentication task confirmation," +
// "Pre-Homo," +
// "Certification progress";
// secondTitle = "Area of responsibility (level 1)," +
// "Not launched,To be confirmed,Accept,Refuse,Degree of completion," +
// "Not launched,To be confirmed,Review of the adoption,Review return,Degree of completion," +
// "Not started,In progress,Experiment passed,Experiment failed,Parts report not uploaded,Parts report uploaded,Parts report in stock,Degree of completion";
// }
String sheetName = "认证活动管理";
String firstTitle = "认证任务确认," +
"Pre-Homo," +
"认证进度";
"Pre-Homo";
String secondTitle = "责任领域(一级)," +
"未发起,待确认,接受,拒绝,完成度," +
"未发起,待确认,审查通过,审查退回,完成度," +
"未开始,进行中,实验通过,实验失败,部件报告未上传,部件报告已上传,部件报告已入库,完成度";
"未发起,待确认,审查通过,审查退回,完成度";
if(StringUtils.equals(cut,CutEnum.EN.getValue())){
sheetName = "Certification Activity Management";
firstTitle = "Authentication task confirmation," +
"Pre-Homo," +
"Certification progress";
"Pre-Homo";
secondTitle = "Area of responsibility (level 1)," +
"Not launched,To be confirmed,Accept,Refuse,Degree of completion," +
"Not launched,To be confirmed,Review of the adoption,Review return,Degree of completion," +
"Not started,In progress,Experiment passed,Experiment failed,Parts report not uploaded,Parts report uploaded,Parts report in stock,Degree of completion";
"Not launched,To be confirmed,Review of the adoption,Review return,Degree of completion";
}
HSSFSheet sheet = workbook.createSheet(sheetName);
@@ -2800,10 +2814,10 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
sheet.addMergedRegion(region1);
CellRangeAddress region2 = new CellRangeAddress(0, 0, 6, 10);
sheet.addMergedRegion(region2);
CellRangeAddress region3 = new CellRangeAddress(0, 0, 11, 18);
sheet.addMergedRegion(region3);
CellRangeAddress region4 = new CellRangeAddress(0, 0, 19, 23);
sheet.addMergedRegion(region4);
// CellRangeAddress region3 = new CellRangeAddress(0, 0, 11, 18);
// sheet.addMergedRegion(region3);
// CellRangeAddress region4 = new CellRangeAddress(0, 0, 19, 23);
// sheet.addMergedRegion(region4);
String[] firstTitleArr = firstTitle.split(",");
String[] secondTitleArr = secondTitle.split(",");
@@ -2812,7 +2826,7 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
CellStyle cellStyleTitle = workbook.createCellStyle();
cellStyleTitle.setAlignment(HorizontalAlignment.CENTER);
for (int i = 0; i <= 18; i++){
for (int i = 0; i <= 10; i++){
sheet.setColumnWidth(i, 3500);
Cell firstRowCell = firstRow.createCell(i);
firstRowCell.setCellStyle(cellStyleTitle);
@@ -2822,9 +2836,10 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
firstRowCell.setCellValue(firstTitleArr[1]);
}else if(i==11){
firstRowCell.setCellValue(firstTitleArr[2]);
}else if(i==19){
firstRowCell.setCellValue(firstTitleArr[3]);
}
// else if(i==19){
// firstRowCell.setCellValue(firstTitleArr[3]);
// }
Cell secondRowCell = secondRow.createCell(i);
secondRowCell.setCellValue(secondTitleArr[i]);
}
@@ -2943,20 +2958,20 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
double certificationProgressSubmitAmount = (double) certificationProgressSubmitMap.get("amount");
Map<String, Object> certificationProgressStoredMap = (Map<String, Object>)certificationProgressMap.get(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue());
double certificationProgressStoredAmount = (double) certificationProgressStoredMap.get("amount");
dataRow.createCell(11).setCellValue(certificationProgressNotStartAmount);
dataRow.createCell(12).setCellValue(certificationProgressInProgressAmount);
dataRow.createCell(13).setCellValue(certificationProgressTestPassedAmount);
dataRow.createCell(14).setCellValue(certificationProgressTestFailedAmount);
dataRow.createCell(15).setCellValue(certificationProgressNotSubmitAmount);
dataRow.createCell(16).setCellValue(certificationProgressSubmitAmount);
dataRow.createCell(17).setCellValue(certificationProgressStoredAmount);
// dataRow.createCell(11).setCellValue(certificationProgressNotStartAmount);
// dataRow.createCell(12).setCellValue(certificationProgressInProgressAmount);
// dataRow.createCell(13).setCellValue(certificationProgressTestPassedAmount);
// dataRow.createCell(14).setCellValue(certificationProgressTestFailedAmount);
// dataRow.createCell(15).setCellValue(certificationProgressNotSubmitAmount);
// dataRow.createCell(16).setCellValue(certificationProgressSubmitAmount);
// dataRow.createCell(17).setCellValue(certificationProgressStoredAmount);
double certificationProgressCount = certificationProgressNotStartAmount + certificationProgressInProgressAmount
+ certificationProgressTestPassedAmount + certificationProgressTestFailedAmount
+ certificationProgressNotSubmitAmount + certificationProgressSubmitAmount
+ certificationProgressStoredAmount;
double certificationProgressPercentage = (certificationProgressTestPassedAmount / certificationProgressCount) * 100;
String certificationProgressPercentageStr = (certificationProgressPercentage != 0 && (certificationProgressCount !=0 )) ? df.format(certificationProgressPercentage) : "0";
dataRow.createCell(18).setCellValue(certificationProgressPercentageStr + percentSign);
// dataRow.createCell(18).setCellValue(certificationProgressPercentageStr + percentSign);
}
/**
@@ -13,6 +13,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description: 平台件合规认证计划
@@ -137,6 +138,7 @@ public class PlatformTaskPlanningEOServiceImpl extends ServiceImpl<PlatformTaskP
}
}
}
taskPlanningEOList = taskPlanningEOList.stream().filter(e->ObjectUtils.isNotEmpty(e.getNodeTime())).collect(Collectors.toList());
return taskPlanningEOList;
}
}