diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/head/service/impl/HeadCustomEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/head/service/impl/HeadCustomEOServiceImpl.java index 038a8549d..ec756581e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/head/service/impl/HeadCustomEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/head/service/impl/HeadCustomEOServiceImpl.java @@ -6,6 +6,8 @@ import com.jero.common.constant.enums.CutEnum; import com.jero.common.system.vo.LoginUser; import com.jero.modules.cert.collect.entity.ParamsConfigEO; import com.jero.modules.cert.collect.service.IParamsConfigEOService; +import com.jero.modules.cert.report.entity.ParamsReportConfigEO; +import com.jero.modules.cert.report.service.IParamsReportConfigEOService; import com.jero.modules.head.entity.HeadCustomEO; import com.jero.modules.head.enums.AffirmFlagEnum; import com.jero.modules.head.enums.headCustomEnum; @@ -39,6 +41,8 @@ import java.util.stream.IntStream; public class HeadCustomEOServiceImpl extends ServiceImpl implements IHeadCustomEOService { @Autowired private IParamsConfigEOService paramsConfigEOService; + @Autowired + private IParamsReportConfigEOService paramsReportConfigEOService; /** * 保存 @@ -299,8 +303,7 @@ public class HeadCustomEOServiceImpl extends ServiceImpl headCustomVOOneList) { - if((headCustomEnum.PARAMETER_COLLECTION_LIST.getName().equals(moduleFlag) - || headCustomEnum.REPORT_DATABASE_DETAILS.getName().equals(moduleFlag)) + if(headCustomEnum.PARAMETER_COLLECTION_LIST.getName().equals(moduleFlag) && !headCustomVOOneList.isEmpty()){ List paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); if(!paramsConfigEOList.isEmpty()){ @@ -309,7 +312,6 @@ public class HeadCustomEOServiceImpl extends ServiceImpl StringUtils.isNotBlank(e.getTitle()) && (e.getTitle().contains("查看") || e.getTitle().contains("View"))); - int count=1; List headCustomVOList = new LinkedList<>(); for (ParamsConfigEO paramsConfigEO : paramsConfigEOList) { HeadCustomVO headCustomVO = new HeadCustomVO(); @@ -322,6 +324,28 @@ public class HeadCustomEOServiceImpl extends ServiceImpl paramsConfigEOList = paramsReportConfigEOService.queryList(paramsManifestId); + if(!paramsConfigEOList.isEmpty()){ + int index = IntStream.range(0, headCustomVOOneList.size()) + .filter(x -> headCustomVOOneList.get(x).getTitle().equals("查看") + || headCustomVOOneList.get(x).getTitle().equals("View")).findFirst().orElse(-1); + headCustomVOOneList.removeIf(e-> StringUtils.isNotBlank(e.getTitle()) + && (e.getTitle().contains("查看") || e.getTitle().contains("View"))); + List headCustomVOList = new LinkedList<>(); + for (ParamsReportConfigEO paramsReportConfigEO : paramsConfigEOList) { + HeadCustomVO headCustomVO = new HeadCustomVO(); + headCustomVO.setDb_field_name(paramsReportConfigEO.getId()); + headCustomVO.setDb_field_txt(paramsReportConfigEO.getConfigName()); + headCustomVO.setIsLock(paramsReportConfigEO.getIsLock()); + headCustomVO.setType("true"); + headCustomVOList.add(headCustomVO); + } + headCustomVOOneList.addAll(index , headCustomVOList); + } + + } } /**