| | |
| | | productTypeMap.put("RuiLin","RuiLin"); |
| | | productTypeMap.put("MAQ", "MAQ"); |
| | | productTypeMap.put("MAQV2", "MAQV2"); |
| | | productTypeMap.put("MAQ-IAR", "MAQ-IAR"); |
| | | productTypeMap.put("SAQ", "SAQ"); |
| | | productTypeMap.put("JAQ", "JAQ"); |
| | | } |
| | | |
| | | /** |
| | | * 设置水滴背景对应图片 |
| | | */ |
| | | private static void setWaterDropAndBar() { |
| | | |
| | | //水滴图片 |
| | | waterDropPictureMap.put("ResponseFidelityDiagnosis", "waterDropDarkBlue.png"); |
| | | waterDropPictureMap.put("ResponseFidelityDiagnosis_V2", "waterDropDarkBlue_V2.png"); |
| | | //SAQ简易版 |
| | | waterDropPictureMap.put("ResponseFidelityDiagnosisSAQGs", "waterDropDarkBlue_V2.png"); |
| | | |
| | | waterDropPictureMap.put("ResponseFidelityDiagnosisSAQ", "waterDropDarkBlue.png"); |
| | | |
| | |
| | | waterDropPictureMap.put("CooperationTeamwork", "waterDropLightBlue.png"); |
| | | waterDropPictureMap.put("Empathetic", "waterDropLightBlue.png"); |
| | | waterDropPictureMap.put("PoliteTactful", "waterDropLightBlue.png"); |
| | | |
| | | //背景导航条 |
| | | barPictureMap.put("ResponseFidelityDiagnosis_waterDrops1", "Bar1.png"); |
| | | barPictureMap.put("ResponseFidelityDiagnosis_V2_waterDrops1", "Bar1_V2.png"); |
| | | barPictureMap.put("ResponseFidelityDiagnosis_waterDrops2", "Bar1.png"); |
| | |
| | | barPictureMap.put("ResponseFidelityDiagnosisSAQ_waterDrops1", "Bar1.png"); |
| | | barPictureMap.put("ResponseFidelityDiagnosisSAQ_waterDrops2", "Bar1.png"); |
| | | barPictureMap.put("ResponseFidelityDiagnosisSAQ_waterDrops3", "Bar2.png"); |
| | | //增加SAQ简易版 |
| | | barPictureMap.put("ResponseFidelityDiagnosisSAQGs_waterDrops1", "Bar1_V2.png"); |
| | | barPictureMap.put("ResponseFidelityDiagnosisSAQGs_waterDrops2", "Bar1_V2.png"); |
| | | barPictureMap.put("ResponseFidelityDiagnosisSAQGs_waterDrops3", "Bar2_V2.png"); |
| | | |
| | | barPictureMap.put("RuilinTestResultValidityDiagnosisContext_waterDrops1", "RuiLin1.png"); |
| | | barPictureMap.put("RuilinTestResultValidityDiagnosisContext_waterDrops2", "RuiLin1.png"); |
| | |
| | | } |
| | | return JsonUtil.toJSONString(map); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取提示语 |
| | | * @param langType 语言 |
| | | * @param contentMapJson 提示语内容 |
| | | * @return |
| | | */ |
| | | public static String getLangString(String langType, String contentMapJson) { |
| | | if (StringUtils.isEmpty(contentMapJson)) { |
| | | return ""; |
| | |
| | | if (StringUtils.isEmpty(langType)) { |
| | | return contentMapJson; |
| | | } |
| | | /** |
| | | * json 转为 map 方便根据key获取对应语言提示语 |
| | | */ |
| | | Map<String, String> contentMap = JsonUtil.parseObject(contentMapJson, HashMap.class); |
| | | if (Objects.isNull(contentMap)) { |
| | | return contentMapJson; |
| | | } |
| | | |
| | | |
| | | //对应语言提示语为空 |
| | | if (StringUtils.isNotEmpty(contentMap.get(langType))) { |
| | | return contentMap.get(langType); |
| | | } else if (StringUtils.isNotEmpty(contentMap.get("English"))) { |
| | | } /*else if (StringUtils.isNotEmpty(contentMap.get("English"))) { |
| | | contentMap.get("English"); |
| | | } |
| | | }*/ |
| | | if (contentMap.isEmpty()) { |
| | | return ""; |
| | | } |
| | | |
| | | return contentMap.values().stream().findFirst().get(); |
| | | } |
| | | |
| | | /** |
| | | * 判断对应语言的提示语是否存在 |
| | | * @param langType 语言 |
| | | * @param contentMapJson 提示语内容 |
| | | * @return |
| | | */ |
| | | public static boolean isLangType(String langType, String contentMapJson) { |
| | | if (StringUtils.isEmpty(contentMapJson)) { |
| | | return false; |
| | | } |
| | | if (StringUtils.isEmpty(langType)) { |
| | | return false; |
| | | } |
| | | /** |
| | | * json 转为 map 方便根据key获取对应语言提示语 |
| | | */ |
| | | Map<String, String> contentMap = JsonUtil.parseObject(contentMapJson, HashMap.class); |
| | | if (Objects.isNull(contentMap)) { |
| | | return false; |
| | | } |
| | | |
| | | //对应语言提示语为空 |
| | | if (StringUtils.isNotEmpty(contentMap.get(langType))) { |
| | | return StringUtils.isNotEmpty(contentMap.get(langType)); |
| | | } /*else if (StringUtils.isNotEmpty(contentMap.get("English"))) { |
| | | contentMap.get("English"); |
| | | }*/ |
| | | if (contentMap.isEmpty()) { |
| | | return false; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | public static String getStringByLang(String langType, String contentMapJson) { |
| | | if (StringUtils.isEmpty(contentMapJson)) { |