|
@@ -220,10 +220,10 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
String[] idArr = ids.split(",");
|
|
|
|
|
|
- //执行中的不允许删除
|
|
|
+ //未执行和已中止的可以删除
|
|
|
List<SimulationManualProjectPo> pos = simulationProjectMapper.selectProjectNowRunState(idArr);
|
|
|
for(SimulationManualProjectPo p : pos){
|
|
|
- if(!isEmpty(p.getNowRunState()) && !ProjectRunStateEnum.NOT_START.getCode().equals(p.getNowRunState())){
|
|
|
+ if(!isEmpty(p.getNowRunState()) && !ProjectRunStateEnum.NOT_START.getCode().equals(p.getNowRunState()) && !ProjectRunStateEnum.DISCONTINUE.getCode().equals(p.getNowRunState())){
|
|
|
return new ResponseBodyVO(ResponseBodyVO.Response.SERVER_FAILURE,"数据不支持删除");
|
|
|
}
|
|
|
}
|
|
@@ -306,16 +306,22 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
String s = getEvaluationLevel(po);
|
|
|
|
|
|
//算法配置
|
|
|
- String algorithmId = po.getAlgorithm();
|
|
|
- AlgorithmPO algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmBaseInfoById(algorithmId).get(0);
|
|
|
+ AlgorithmPO algorithmBaseInfoVo = getAlgorithmInfo(po);
|
|
|
|
|
|
//车辆配置
|
|
|
VehiclePO vehicleBaseInfoVo = null;
|
|
|
String vehicleConfigId = po.getVehicle();
|
|
|
- List<ConfigPO> configVehicleVOS = simulationProjectMapper.selectConfigVehicle(vehicleConfigId);
|
|
|
+
|
|
|
+ ConfigPO configPO = new ConfigPO();
|
|
|
+ configPO.setId(vehicleConfigId);
|
|
|
+ List<ConfigPO> configVehicleVOS = simulationProjectMapper.selectConfigVehicle(configPO);
|
|
|
if(!isEmpty(configVehicleVOS)){
|
|
|
ConfigPO configVehicleVO = configVehicleVOS.get(0);
|
|
|
- vehicleBaseInfoVo = simulationProjectMapper.selectVehicleBaseInfoById(configVehicleVO.getVehicleId()).get(0);
|
|
|
+ List<VehiclePO> vehiclePOS = simulationProjectMapper.selectVehicleBaseInfoById(configVehicleVO.getVehicleId());
|
|
|
+ if(!isEmpty(vehiclePOS)){
|
|
|
+ vehicleBaseInfoVo = vehiclePOS.get(0);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
/*String vehicleImage = vehicleBaseInfoVo.getVehicleImage();
|
|
|
if(!isEmpty(vehicleImage)){
|
|
@@ -506,9 +512,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
return new ResponseBodyVO(ResponseBodyVO.Response.SERVER_FAILURE, "没有获取到数据");
|
|
|
}
|
|
|
//算法配置
|
|
|
- String algorithmId = po.getAlgorithm();
|
|
|
- AlgorithmPO algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmBaseInfoById(algorithmId).get(0);
|
|
|
-
|
|
|
+ AlgorithmPO algorithmBaseInfoVo = getAlgorithmInfo(po);
|
|
|
|
|
|
ProjectReportVo projectReportVo = new ProjectReportVo();
|
|
|
projectReportVo.setAlgorithmName(algorithmBaseInfoVo.getAlgorithmName());
|
|
@@ -618,7 +622,32 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS, projectReportVo);
|
|
|
}
|
|
|
|
|
|
+ private AlgorithmPO getAlgorithmInfo(SimulationManualProjectPo po){
|
|
|
+ AlgorithmPO algorithmBaseInfoVo = null;
|
|
|
+ String algorithmId = po.getAlgorithm();
|
|
|
+ String algorithmType = po.getAlgorithmType();
|
|
|
+ //第三方算法平台
|
|
|
+ if("3".equals(algorithmType)){
|
|
|
+ String sort = "algorithmId-desc";
|
|
|
+ Integer page = 1;
|
|
|
+ Integer size = 1;//全部
|
|
|
+
|
|
|
+ String urlParam = "&algorithmId"+algorithmId+"&page=" + page+ "&size=" + size+ "&sort=" + sort;
|
|
|
+ List<DropDownVo> otherAlgorithmInfo = getOtherAlgorithmInfo(urlParam);
|
|
|
+ if(StringUtil.isNotEmpty(otherAlgorithmInfo)){
|
|
|
+ DropDownVo dropDownVo = otherAlgorithmInfo.get(0);
|
|
|
+ algorithmBaseInfoVo = new AlgorithmPO();
|
|
|
+ algorithmBaseInfoVo.setAlgorithmName(dropDownVo.getName());
|
|
|
+ algorithmBaseInfoVo.setDescription(dropDownVo.getDescription());
|
|
|
+ }
|
|
|
|
|
|
+ }else{
|
|
|
+ AlgorithmPO algorithmPO = new AlgorithmPO();
|
|
|
+ algorithmPO.setId(algorithmId);
|
|
|
+ algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmBaseInfoById(algorithmPO).get(0);
|
|
|
+ }
|
|
|
+ return algorithmBaseInfoVo;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -813,30 +842,18 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
Integer size = 999;//全部
|
|
|
|
|
|
String urlParam = "&page=" + page+ "&size=" + size+ "&sort=" + sort;
|
|
|
- ResponseBodyVO algorithmBody = algoPlatformService.getAlgorithmList(urlParam);
|
|
|
-
|
|
|
- //解析数据
|
|
|
- Map jsonMap = JsonUtil.jsonToMap((String) algorithmBody.getInfo());
|
|
|
- Map<String, Object> dataMap = (Map<String, Object>) jsonMap.get("data");
|
|
|
- List<Map<String, String>> contentList = (List<Map<String, String>>) dataMap.get("content");
|
|
|
- Integer totalElements = (Integer) dataMap.get("totalElements");
|
|
|
- if(totalElements > 0){
|
|
|
- for (Map<String, String> content: contentList) {
|
|
|
- DropDownVo dropDownVo = new DropDownVo();
|
|
|
- dropDownVo.setId(content.get("algorithmId"));
|
|
|
- dropDownVo.setName(content.get("algorithmName"));
|
|
|
- algorithmList.add(dropDownVo);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ algorithmList = getOtherAlgorithmInfo(urlParam);
|
|
|
|
|
|
}else{
|
|
|
- List<AlgorithmPO> algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmBaseInfoById(null);
|
|
|
+ AlgorithmPO algorithmPO = new AlgorithmPO();
|
|
|
+ algorithmPO.setCreateUserId(AuthUtil.getCurrentUserId());
|
|
|
+ List<AlgorithmPO> algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmBaseInfoById(algorithmPO);
|
|
|
|
|
|
for(AlgorithmPO v : algorithmBaseInfoVo){
|
|
|
DropDownVo dropDownVo = new DropDownVo();
|
|
|
dropDownVo.setId(v.getId());
|
|
|
dropDownVo.setName(v.getAlgorithmName());
|
|
|
+ dropDownVo.setDescription(v.getDescription());
|
|
|
algorithmList.add(dropDownVo);
|
|
|
}
|
|
|
|
|
@@ -847,14 +864,46 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
result.add(algorithmDropDown);
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取第三方算法信息
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private List<DropDownVo> getOtherAlgorithmInfo(String query){
|
|
|
+
|
|
|
+ List<DropDownVo> algorithmList = new ArrayList<>();
|
|
|
+
|
|
|
+ ResponseBodyVO algorithmBody = algoPlatformService.getAlgorithmList(query);
|
|
|
+
|
|
|
+ //解析数据
|
|
|
+ Map jsonMap = JsonUtil.jsonToMap((String) algorithmBody.getInfo());
|
|
|
+ Map<String, Object> dataMap = (Map<String, Object>) jsonMap.get("data");
|
|
|
+ List<Map<String, String>> contentList = (List<Map<String, String>>) dataMap.get("content");
|
|
|
+ Integer totalElements = (Integer) dataMap.get("totalElements");
|
|
|
+ if(totalElements > 0){
|
|
|
+ for (Map<String, String> content: contentList) {
|
|
|
+ DropDownVo dropDownVo = new DropDownVo();
|
|
|
+ dropDownVo.setId(content.get("algorithmId"));
|
|
|
+ dropDownVo.setName(content.get("algorithmName"));
|
|
|
+ dropDownVo.setDescription(content.get("description"));
|
|
|
+ algorithmList.add(dropDownVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return algorithmList;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private void setVehicleDropDown(List<DropDownTypeVo> result){
|
|
|
- List<ConfigPO> vehicleBaseInfoVo = simulationProjectMapper.selectConfigVehicle(null);
|
|
|
+ ConfigPO configPO = new ConfigPO();
|
|
|
+ configPO.setCreateUserId(AuthUtil.getCurrentUserId());
|
|
|
+ List<ConfigPO> vehicleBaseInfoVo = simulationProjectMapper.selectConfigVehicle(configPO);
|
|
|
List<DropDownVo> vehicleList = new ArrayList<>();
|
|
|
for(ConfigPO v : vehicleBaseInfoVo){
|
|
|
DropDownVo dropDownVo = new DropDownVo();
|
|
|
dropDownVo.setId(v.getId());
|
|
|
dropDownVo.setName(v.getConfigName());
|
|
|
-
|
|
|
+ dropDownVo.setDescription(v.getDescription());
|
|
|
//获取传感器信息
|
|
|
List<ConfigSensorPO> configSensorVos = simulationProjectMapper.selectConfigSensor(v.getId());
|
|
|
String sensor = "";
|
|
@@ -877,7 +926,9 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
result.add(vehicleDropDown);
|
|
|
}
|
|
|
private void setScenePackageDropDown(List<DropDownTypeVo> result){
|
|
|
- List<ScenePackagePO> scenePackageBaseVo = simulationProjectMapper.selectScenePackageBaseById(null);
|
|
|
+ ScenePackagePO scenePackagePO = new ScenePackagePO();
|
|
|
+ scenePackagePO.setCreateUserId(AuthUtil.getCurrentUserId());
|
|
|
+ List<ScenePackagePO> scenePackageBaseVo = simulationProjectMapper.selectScenePackageBaseById(scenePackagePO);
|
|
|
List<DropDownVo> scenePackageList = new ArrayList<>();
|
|
|
for(ScenePackagePO v : scenePackageBaseVo){
|
|
|
DropDownVo dropDownVo = new DropDownVo();
|
|
@@ -916,7 +967,10 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
Date createTime = vo.getCreateTime();
|
|
|
vo.setCreateTimeFmt(getRqStr(createTime, 2));
|
|
|
String algorithm = vo.getAlgorithm();
|
|
|
- List<AlgorithmPO> algorithmBaseInfoVos = simulationProjectMapper.selectAlgorithmBaseInfoById(algorithm);
|
|
|
+
|
|
|
+ AlgorithmPO algorithmPO = new AlgorithmPO();
|
|
|
+ algorithmPO.setId(algorithm);
|
|
|
+ List<AlgorithmPO> algorithmBaseInfoVos = simulationProjectMapper.selectAlgorithmBaseInfoById(algorithmPO);
|
|
|
if(!isEmpty(algorithmBaseInfoVos)){
|
|
|
AlgorithmPO algorithmBaseInfoVo = algorithmBaseInfoVos.get(0);
|
|
|
vo.setAlgorithm(algorithmBaseInfoVo.getAlgorithmName());
|
|
@@ -931,6 +985,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
vo.setProjectName(po.getProjectName());
|
|
|
vo.setProjectDescribe(po.getProjectDescribe());
|
|
|
vo.setAlgorithm(po.getAlgorithm());
|
|
|
+ vo.setAlgorithmType(po.getAlgorithmType());
|
|
|
vo.setVehicle(po.getVehicle());
|
|
|
vo.setScene(po.getScene());
|
|
|
vo.setMaxSimulationTime(po.getMaxSimulationTime());
|
|
@@ -1985,7 +2040,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
List<SubScListVo> subListScoreLi = vo.getSubListScoreLi();
|
|
|
|
|
|
-
|
|
|
+// Map<String, Integer> m = new LinkedHashMap<>();
|
|
|
+ List<String[]> list = new ArrayList<>();
|
|
|
for(SubScListVo slv : subListScoreLi){
|
|
|
String[] slsi = new String[size];
|
|
|
for(int i=0;i<size;i++){
|
|
@@ -1994,17 +2050,35 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
//目前最多支持到6级指标
|
|
|
for(int i=0; i<size-4; i++){
|
|
|
if(i==0){
|
|
|
- slsi[i] = slv.getSublistName1();
|
|
|
+ if(slv.getSublistName1() != null){
|
|
|
+ slsi[i] = slv.getSublistName1();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==1){
|
|
|
- slsi[i] = slv.getSublistName2();
|
|
|
+ if(slv.getSublistName2() != null){
|
|
|
+ slsi[i] = slv.getSublistName2();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==2){
|
|
|
- slsi[i] = slv.getSublistName3();
|
|
|
+ if(slv.getSublistName3() != null){
|
|
|
+ slsi[i] = slv.getSublistName3();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==3){
|
|
|
- slsi[i] = slv.getSublistName4();
|
|
|
+ if(slv.getSublistName4() != null){
|
|
|
+ slsi[i] = slv.getSublistName4();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==4){
|
|
|
- slsi[i] = slv.getSublistName5();
|
|
|
+ if(slv.getSublistName5() != null){
|
|
|
+ slsi[i] = slv.getSublistName5();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==5){
|
|
|
- slsi[i] = slv.getSublistName6();
|
|
|
+ if(slv.getSublistName6() != null){
|
|
|
+ slsi[i] = slv.getSublistName6();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
slsi[size-4] = slv.getSceneNum();
|
|
@@ -2012,8 +2086,81 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
slsi[size-2] = slv.getLastScore();
|
|
|
slsi[size-1] = slv.getFirstScore();
|
|
|
|
|
|
- addDataList(pdfPTable2, font, slsi);
|
|
|
+/* //合并计数
|
|
|
+ if(m.get(slv.getSublistName1()) == null){
|
|
|
+ m.put(slv.getSublistName1(), 1);
|
|
|
+ }else{
|
|
|
+ m.put(slv.getSublistName1(), m.get(slv.getSublistName1())+1);
|
|
|
+ }*/
|
|
|
+ list.add(slsi);
|
|
|
+
|
|
|
+// addDataList(pdfPTable2, font, slsi);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/* //添加数据(合并单元格)
|
|
|
+ int rowIndex=0;//行坐标
|
|
|
+ for(int i=0; i<list.size();i++){
|
|
|
+ String[] strings = list.get(i);
|
|
|
+ for(int j=0; j<strings.length; j++){
|
|
|
+ //rowIndex,0 合并操作
|
|
|
+ if(i == rowIndex && j ==0 ){
|
|
|
+ PdfPCell pdfPCell = new PdfPCell(new Paragraph(strings[j],defaultFont(font)));
|
|
|
+ Integer integer = m.get(strings[j]);//合并行数
|
|
|
+ pdfPCell.setRowspan(integer);
|
|
|
+ rowIndex += integer;//定位到下一次合并行坐标之前
|
|
|
+ pdfPTable2.addCell(pdfPCell);
|
|
|
+
|
|
|
+ }
|
|
|
+ //未到下一次合并行,不加第一列
|
|
|
+ else if(i<rowIndex && j !=0){
|
|
|
+
|
|
|
+ PdfPCell pdfPCell = new PdfPCell(new Paragraph(strings[j],defaultFont(font)));
|
|
|
+ pdfPTable2.addCell(pdfPCell);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }*/
|
|
|
+
|
|
|
+ Map map = getSceneScListCombineCoord(subListScoreLi, size);
|
|
|
+
|
|
|
+ List<CombineCoordVo> combineCoordList = (List<CombineCoordVo>) map.get("combineCoordList");
|
|
|
+ List<String> skipCoordList = (List<String>) map.get("skipCoordList");
|
|
|
+
|
|
|
+ boolean b = false;
|
|
|
+ int num = 0;
|
|
|
+ for(int i=0; i<list.size();i++){
|
|
|
+ String[] strings = list.get(i);
|
|
|
+ for(int j=0; j<strings.length; j++){
|
|
|
+ String coord = i+","+j;
|
|
|
+
|
|
|
+ //是否要跳过
|
|
|
+ boolean contains = skipCoordList.contains(coord);
|
|
|
+ if(contains){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ PdfPCell pdfPCell = new PdfPCell(new Paragraph(strings[j],defaultFont(font)));
|
|
|
+ pdfPCell.setRowspan(num);
|
|
|
+ //是否要合并
|
|
|
+ for(CombineCoordVo v : combineCoordList){
|
|
|
+ if(coord.equals(v.getCoord())){
|
|
|
+ b = true;
|
|
|
+ num = v.getRepetitionNum();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(b){
|
|
|
+ pdfPTable2.addCell(pdfPCell);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
document.add(pdfPTable2);
|
|
|
|
|
|
/*
|
|
@@ -2047,17 +2194,35 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
//目前最多支持到6级指标
|
|
|
for(int i=0; i<size2-5; i++){
|
|
|
if(i==0){
|
|
|
- ssli[i] = sslv.getSublistName1();
|
|
|
+ if(sslv.getSublistName1() != null){
|
|
|
+ ssli[i] = sslv.getSublistName1();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==1){
|
|
|
- ssli[i] = sslv.getSublistName2();
|
|
|
+ if(sslv.getSublistName2() != null){
|
|
|
+ ssli[i] = sslv.getSublistName2();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==2){
|
|
|
- ssli[i] = sslv.getSublistName3();
|
|
|
+ if(sslv.getSublistName3() != null){
|
|
|
+ ssli[i] = sslv.getSublistName3();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==3){
|
|
|
- ssli[i] = sslv.getSublistName4();
|
|
|
+ if(sslv.getSublistName4() != null){
|
|
|
+ ssli[i] = sslv.getSublistName4();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==4){
|
|
|
- ssli[i] = sslv.getSublistName5();
|
|
|
+ if(sslv.getSublistName5() != null){
|
|
|
+ ssli[i] = sslv.getSublistName5();
|
|
|
+ }
|
|
|
+
|
|
|
}else if(i==5){
|
|
|
- ssli[i] = sslv.getSublistName6();
|
|
|
+ if(sslv.getSublistName6() != null){
|
|
|
+ ssli[i] = sslv.getSublistName6();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
ssli[size2-5] = sslv.getSceneId();
|
|
@@ -2078,6 +2243,160 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取所有要合并的下标、每个下标索要合并的行数、要跳过创建表格的下标
|
|
|
+ */
|
|
|
+ private Map getSceneScListCombineCoord(List<SubScListVo> voList, int size){
|
|
|
+ int sublistNameSize = size-4;//指标最大级数
|
|
|
+ HashMap<String, Object> resultMap = new HashMap<>();
|
|
|
+ Map<String, CombineCoordVo> map = new HashMap<>();
|
|
|
+ List<String> skipCoordList= new ArrayList<>(); //要跳过的格子下标
|
|
|
+
|
|
|
+ for(int i=0; i<voList.size(); i++){
|
|
|
+ SubScListVo vo = voList.get(i);
|
|
|
+ if(sublistNameSize == 1){
|
|
|
+ //一级
|
|
|
+ String sublistName1 = vo.getSublistName1();
|
|
|
+ if(!isEmpty(sublistName1)){
|
|
|
+ setCoord(map, sublistName1,i+",0", skipCoordList);
|
|
|
+ }
|
|
|
+
|
|
|
+ }else if(sublistNameSize == 2){
|
|
|
+ //二级
|
|
|
+ String sublistName1 = vo.getSublistName1();
|
|
|
+ String sublistName2 = vo.getSublistName2();
|
|
|
+
|
|
|
+ if(!isEmpty(sublistName1)){
|
|
|
+ setCoord(map, sublistName1,i+",0", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName2)){
|
|
|
+ setCoord(map, sublistName2,i+",1", skipCoordList);
|
|
|
+ }
|
|
|
+
|
|
|
+ }else if(sublistNameSize == 3){
|
|
|
+ //三级
|
|
|
+ String sublistName1 = vo.getSublistName1();
|
|
|
+ String sublistName2 = vo.getSublistName2();
|
|
|
+ String sublistName3 = vo.getSublistName3();
|
|
|
+
|
|
|
+ if(!isEmpty(sublistName1)){
|
|
|
+ setCoord(map, sublistName1,i+",0", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName2)){
|
|
|
+ setCoord(map, sublistName2,i+",1", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName3)){
|
|
|
+ setCoord(map, sublistName3,i+",2", skipCoordList);
|
|
|
+ }
|
|
|
+ }else if(sublistNameSize == 4){
|
|
|
+ //四级
|
|
|
+ String sublistName1 = vo.getSublistName1();
|
|
|
+ String sublistName2 = vo.getSublistName2();
|
|
|
+ String sublistName3 = vo.getSublistName3();
|
|
|
+ String sublistName4 = vo.getSublistName4();
|
|
|
+
|
|
|
+ if(!isEmpty(sublistName1)){
|
|
|
+ setCoord(map, sublistName1,i+",0", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName2)){
|
|
|
+ setCoord(map, sublistName2,i+",1", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName3)){
|
|
|
+ setCoord(map, sublistName3,i+",2", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName4)){
|
|
|
+ setCoord(map, sublistName4,i+",3", skipCoordList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }else if(sublistNameSize == 5){
|
|
|
+ //五级
|
|
|
+ String sublistName1 = vo.getSublistName1();
|
|
|
+ String sublistName2 = vo.getSublistName2();
|
|
|
+ String sublistName3 = vo.getSublistName3();
|
|
|
+ String sublistName4 = vo.getSublistName4();
|
|
|
+ String sublistName5 = vo.getSublistName5();
|
|
|
+
|
|
|
+ if(!isEmpty(sublistName1)){
|
|
|
+ setCoord(map, sublistName1,i+",0", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName2)){
|
|
|
+ setCoord(map, sublistName2,i+",1", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName3)){
|
|
|
+ setCoord(map, sublistName3,i+",2", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName4)){
|
|
|
+ setCoord(map, sublistName4,i+",3", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName5)){
|
|
|
+ setCoord(map, sublistName5,i+",4", skipCoordList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }else if(sublistNameSize == 6){
|
|
|
+ //六级
|
|
|
+ String sublistName1 = vo.getSublistName1();
|
|
|
+ String sublistName2 = vo.getSublistName2();
|
|
|
+ String sublistName3 = vo.getSublistName3();
|
|
|
+ String sublistName4 = vo.getSublistName4();
|
|
|
+ String sublistName5 = vo.getSublistName5();
|
|
|
+ String sublistName6 = vo.getSublistName6();
|
|
|
+
|
|
|
+ if(!isEmpty(sublistName1)){
|
|
|
+ setCoord(map, sublistName1,i+",0", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName2)){
|
|
|
+ setCoord(map, sublistName2,i+",1", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName3)){
|
|
|
+ setCoord(map, sublistName3,i+",2", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName4)){
|
|
|
+ setCoord(map, sublistName4,i+",3", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName5)){
|
|
|
+ setCoord(map, sublistName5,i+",4", skipCoordList);
|
|
|
+ }
|
|
|
+ if(!isEmpty(sublistName6)){
|
|
|
+ setCoord(map, sublistName6,i+",5", skipCoordList);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ List<CombineCoordVo> combineCoordVoList = new ArrayList<>();
|
|
|
+
|
|
|
+ for(String k : map.keySet()){
|
|
|
+ combineCoordVoList.add(map.get(k));
|
|
|
+ }
|
|
|
+
|
|
|
+ resultMap.put("combineCoordList", combineCoordVoList);
|
|
|
+ resultMap.put("skipCoordList", skipCoordList);
|
|
|
+
|
|
|
+ return resultMap;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private void setCoord(Map<String, CombineCoordVo> map, String key, String coord, List<String> skipCoordList){
|
|
|
+ CombineCoordVo value = map.get(key);
|
|
|
+ if(value != null){
|
|
|
+ //坐标不变,合并行数+1
|
|
|
+ value.setRepetitionNum(value.getRepetitionNum()+1);
|
|
|
+ skipCoordList.add(coord);
|
|
|
+ }else{
|
|
|
+ //新增
|
|
|
+ CombineCoordVo combineCoordVo = new CombineCoordVo();
|
|
|
+ combineCoordVo.setCoord(coord);
|
|
|
+ combineCoordVo.setRepetitionNum(1);
|
|
|
+ map.put(key,combineCoordVo);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public String selectProjectReportIdByAlgorithmId(String algorithmId) {
|
|
|
SimulationManualProjectPo po = simulationProjectMapper.selectProjectReportIdByAlgorithmId(algorithmId);
|
|
@@ -2138,8 +2457,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
* @param dataList
|
|
|
*/
|
|
|
private void addDataList(PdfPTable pdfPTable, BaseFont font, String[] dataList){
|
|
|
- for(String title : dataList){
|
|
|
- PdfPCell pdfPCell = new PdfPCell(new Paragraph(title,defaultFont(font)));
|
|
|
+ for(String data : dataList){
|
|
|
+ PdfPCell pdfPCell = new PdfPCell(new Paragraph(data,defaultFont(font)));
|
|
|
pdfPTable.addCell(pdfPCell);
|
|
|
|
|
|
}
|