From fb2ee921d9b3ae8c82a004a2f72b7f71713b8e0c Mon Sep 17 00:00:00 2001 From: zhijie <1003392067@qq.com> Date: 星期二, 01 六月 2021 22:31:48 +0800 Subject: [PATCH] 代码注释添加 --- src/main/java/com/ots/project/tool/report/MAQNEW/MAQReport_V2.java | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ots/project/tool/report/MAQNEW/MAQReport_V2.java b/src/main/java/com/ots/project/tool/report/MAQNEW/MAQReport_V2.java index d849f40..3c17d5b 100644 --- a/src/main/java/com/ots/project/tool/report/MAQNEW/MAQReport_V2.java +++ b/src/main/java/com/ots/project/tool/report/MAQNEW/MAQReport_V2.java @@ -34,9 +34,21 @@ private Map otherParams; private LangTypeEnum langType; + + /** + * 鏍规嵁鎶ュ憡绫诲瀷鍒濆鍖栨暟鎹� + * @param reportTypeEnum + * @return + */ public List<BaseCondition_V2> getParamList(ReportTypeEnum reportTypeEnum) { return init(reportTypeEnum); } + + /** + * 鏍规嵁鎶ュ憡绫诲瀷鍒濆鍖栨墍鏈� + * @param reportTypeEnum + * @return + */ private List<BaseCondition_V2> init(ReportTypeEnum reportTypeEnum) { List<BaseCondition_V2> paramList = new ArrayList<>(); @@ -187,13 +199,21 @@ conditionVOList.add(new MAQConditionVO_V2("People_Orientation_32", "P_People32", "LIBMAQV2320")); return conditionVOList; } - + + /** + * 鑾峰彇鎶ュ憡瀛楀吀鏇挎崲鍊� + * @param thaiCalculationMap + * @param type + * @param langType + * @return + */ public ReportResultData getTemplateParameters(Map<String, String> thaiCalculationMap, ReportTypeEnum type, LangTypeEnum langType) { this.reportTypeEnum = type; this.langType = langType; Map textMap = new HashMap(); Map waterDropsMap = new HashMap(); + //鍩烘湰淇℃伅瀛楁 textMap.put("questionnaireTaker", getQuestionnaireTaker()); textMap.put("questionnaireID", getQuestionnaireID()); textMap.put("reportGenerationDate", getReportGenerationDate()); @@ -201,18 +221,28 @@ textMap.put("questionnaireEmail", getQuestionnaireEmail()); textMap.put("questionnaireStartTime", getQuestionnaireStartTime()); textMap.put("questionnaireEndTime", getQuestionnaireEndTime()); - + //鏍规嵁鎶ュ憡绫诲瀷鑾峰彇鎶ュ憡瀛楀吀 getParamList(type).stream().forEach(p -> { + //鑾峰彇瀵瑰簲璇█鎶ュ憡瀛楀吀 TLibraryCode calculate = p.calculate(thaiCalculationMap, langType); List<TLibraryCode> tLibraryCodes = p.calculateList(thaiCalculationMap, langType); if(tLibraryCodes != null && tLibraryCodes.size() > 0){ + //琛ㄦ牸澶氫綅 璁$畻鍒嗘暟鍊艰祴鍊� 渚嬪 + // 琛ㄦ牸鐨勶細%P_Regula19_XX1% + // 琛ㄦ牸鐨勶細%P_Regula19_XX2% + // 琛ㄦ牸鐨勶細%P_Regula19_XX3% + // 琛ㄦ牸鐨勶細%P_Regula19_XX4% + // 琛ㄦ牸鐨勶細%P_Regula19_XX5% + // 琛ㄦ牸鐨勶細%P_Regula19_XX6% for (int i = 0; i < tLibraryCodes.size(); i++) { TLibraryCode tLibraryCode = tLibraryCodes.get(i); textMap.put(p.getName() + "_" + i, Objects.isNull(tLibraryCode) || StringUtils.isBlank(tLibraryCode.getLangTypeContext(langType)) ? "N/A NONE" : tLibraryCode.getLangTypeContext(langType)); } }else{ + //鏅�氭姤鍛婂瓧鍏歌祴鍊� textMap.put(p.getName(), Objects.isNull(calculate) || StringUtils.isBlank(calculate.getLangTypeContext(langType)) ? "N/A NONE" : calculate.getLangTypeContext(langType)); } + //姘存淮闆嗗悎 if (Objects.nonNull(p.getMAQwaterDropsImages())) { waterDropsMap.putAll(p.getMAQwaterDropsImages()); } -- Gitblit v1.9.1