| | |
| | | * requestParameters 为要转换为键值对的对象 |
| | | * dynamicPara 转换后的键值对添加到的目标集合 |
| | | */ |
| | | public static void objectToMap(Object requestParameters,Map<String, Object> dynamicPara) throws IllegalAccessException { |
| | | public static void objectToMap(Object requestParameters,Map<String, String> dynamicPara) throws IllegalAccessException { |
| | | // 获取f对象对应类中的所有属性域 |
| | | Field[] fields = requestParameters.getClass().getDeclaredFields(); |
| | | for (Field field : fields) { |
| | |
| | | // 获取在对象f中属性fields[i]对应的对象中的变量 |
| | | Object obj = field.get(requestParameters); |
| | | if (obj != null && StringUtils.isNotBlank(obj.toString()) || CollectionUtil.isNotEmpty((Iterable<?>) obj)) { |
| | | dynamicPara.put(varName, obj); |
| | | dynamicPara.put(varName, obj.toString()); |
| | | // 恢复访问控制权限 |
| | | field.setAccessible(accessFlag); |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.common.enums.ReportTypeEnum; |
| | | import com.ots.common.utils.StringUtils; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.LAQ.condition.*; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import com.ots.project.tool.report.MAQNEW.condition.ScoreCharacteristics_V2; |
| | | import com.ots.project.tool.report.MAQNEW.condition.SimpleMessage_V2; |
| | | import com.ots.project.tool.report.PAQ.condition.Diagnosis; |
| | | import com.ots.project.tool.report.PAQ.condition.DiagnosisTitle; |
| | | import com.ots.project.tool.report.ReportResultData; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Data |
| | | @Slf4j |
| | | public class LAQReport { |
| | | private String questionnaireTaker; |
| | | private String questionnaireID; |
| | | private String reportGenerationDate; |
| | | private String userName; |
| | | private String questionnaireEmail; |
| | | private String questionnaireStartTime; |
| | | private String questionnaireEndTime; |
| | | private ReportTypeEnum reportTypeEnum; |
| | | |
| | | 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<>(); |
| | | |
| | | // 领导一致性指标 |
| | | paramList.add(new AlignmentIndications()); |
| | | paramList.add(new NumericalReasoningHigh()); |
| | | paramList.add(new NumericalReasoningLikely()); |
| | | paramList.add(new AbstractReasoningHigh()); |
| | | paramList.add(new AbstractReasoningLikely()); |
| | | paramList.add(new ScoreInterpretationHigh()); |
| | | paramList.add(new ScoreInterpretationBLA()); |
| | | paramList.add(new OpennessExperience()); |
| | | paramList.add(new Conscientiousness()); |
| | | paramList.add(new Extraversion()); |
| | | paramList.add(new Agreeableness()); |
| | | paramList.add(new EmotionalStability()); |
| | | |
| | | return paramList; |
| | | } |
| | | |
| | | /** |
| | | * 普通文本替换library |
| | | * @return |
| | | */ |
| | | private List<String> getSimpleMessageCoreIds() { |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | /** |
| | | * 获取报告字典替换值 |
| | | * @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()); |
| | | textMap.put("userName", getUserName()); |
| | | 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){ |
| | | //表格多位 计算分数值赋值 例如 |
| | | // 表格的:%ResponseFidelityDiagnosis_V2_0% |
| | | // 表格的:%ResponseFidelityDiagnosis_V2_1% |
| | | // 表格的:%ResponseFidelityDiagnosis_V2_2% |
| | | 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)); |
| | | } |
| | | }); |
| | | textMap.putAll(thaiCalculationMap); |
| | | ReportResultData reportResultData = new ReportResultData(); |
| | | reportResultData.setTextMap(textMap); |
| | | return reportResultData; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.ots.common.enums.CapabilityEnum; |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.common.enums.ReportTypeEnum; |
| | | import com.ots.common.utils.DateUtils; |
| | | import com.ots.common.utils.MapDataUtil; |
| | | import com.ots.common.utils.StringUtils; |
| | |
| | | import com.ots.framework.config.EssConfig; |
| | | import com.ots.project.exam.domain.TReportTemplate; |
| | | import com.ots.project.tool.PdfUtil; |
| | | import com.ots.project.tool.report.LAQ.LAQReport; |
| | | import com.ots.project.tool.report.LAQ.LAQTemplate; |
| | | import com.ots.project.tool.report.MAQ.base.RowData; |
| | | import com.ots.project.tool.report.MAQ.base.SeriesData; |
| | | import com.ots.project.tool.report.MAQNEW.MAQReport_V2; |
| | | import com.ots.project.tool.report.ReportResultData; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ooxml.POIXMLDocument; |
| | | import org.apache.poi.ooxml.POIXMLDocumentPart; |
| | |
| | | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | String dataPath = "D:\\测评系统\\需求\\LAQ\\report\\LAQ表头数据文件.xlsx"; |
| | | String dataPath = "D:\\测评系统\\需求\\2023\\5.领导潜力报告\\report\\LAQ表头数据文件.xlsx"; |
| | | // 获取导入数据 |
| | | File file = new File(dataPath); |
| | | InputStream in = new FileInputStream(file); |
| | |
| | | for (int i = 0; i < laqTemplateList.size(); i++) { |
| | | LAQTemplate laqTemplate = laqTemplateList.get(i); |
| | | //组装报告所用数据 |
| | | Map<String, Object> textMap = new HashMap<>(); |
| | | Map<String, String> textMap = new HashMap<>(); |
| | | textMap.put("sendEmailFileName",laqTemplate.getName()); |
| | | textMap.put("nowDate", DateUtils.getDate()); |
| | | MapDataUtil.objectToMap(laqTemplate,textMap); |
| | | |
| | | LAQReport report = new LAQReport(); |
| | | ReportResultData resultData = report.getTemplateParameters(textMap, ReportTypeEnum.LAQ, LangTypeEnum.codeOf("English")); |
| | | // TReportTemplate template = null; |
| | | // String zipFileName = WordUtil.makeReportFile("D:\\测评系统\\需求\\LAQ\\report\\LAQ英文报告-20230926.docx", template, textMap, new HashMap<>(), deleteStrList); |
| | | // fileNameList.add(zipFileName); |
| | | ZipSecureFile.setMinInflateRatio(0.001); |
| | | try (OutputStream os = new FileOutputStream("D:\\测评系统\\需求\\LAQ\\report\\LAQ.docx");XWPFDocument document = new XWPFDocument(POIXMLDocument.openPackage("D:\\测评系统\\需求\\LAQ\\report\\LAQ英文报告-20230926.docx"))){ |
| | | try (OutputStream os = new FileOutputStream("D:\\测评系统\\需求\\2023\\5.领导潜力报告\\report\\LAQ.docx");XWPFDocument document = new XWPFDocument(POIXMLDocument.openPackage("D:\\测评系统\\需求\\2023\\5.领导潜力报告\\report\\LAQ英文报告-20230926.docx"))){ |
| | | Map<Integer,List<SeriesData>> seriesDatas = initData(textMap); |
| | | changeChart(document,seriesDatas,textMap); |
| | | document.write(os); |
| | |
| | | * @param textMap |
| | | * @return |
| | | */ |
| | | public static Map<Integer,List<SeriesData>> initData(Map<String, Object> textMap){ |
| | | public static Map<Integer,List<SeriesData>> initData(Map<String, String> textMap){ |
| | | Map<Integer,List<SeriesData>> seriesDataMap = new HashMap<>(); |
| | | //获取命中数值 |
| | | BigDecimal olas = (BigDecimal) textMap.get("olas"); |
| | | BigDecimal ca = (BigDecimal) textMap.get("ca"); |
| | | BigDecimal bla = (BigDecimal) textMap.get("bla"); |
| | | BigDecimal nr = (BigDecimal) textMap.get("nr"); |
| | | BigDecimal ar = (BigDecimal) textMap.get("ar"); |
| | | BigDecimal open = (BigDecimal) textMap.get("open"); |
| | | BigDecimal cons = (BigDecimal) textMap.get("cons"); |
| | | BigDecimal extra = (BigDecimal) textMap.get("extra"); |
| | | BigDecimal agree = (BigDecimal) textMap.get("agree"); |
| | | BigDecimal emosta = (BigDecimal) textMap.get("emosta"); |
| | | Double olas = Double.valueOf(textMap.get("olas")); |
| | | Double ca = Double.valueOf(textMap.get("ca")); |
| | | Double bla = Double.valueOf(textMap.get("bla")); |
| | | Double nr = Double.valueOf(textMap.get("nr")); |
| | | Double ar = Double.valueOf(textMap.get("ar")); |
| | | Double open = Double.valueOf(textMap.get("open")); |
| | | Double cons = Double.valueOf(textMap.get("cons")); |
| | | Double extra = Double.valueOf(textMap.get("extra")); |
| | | Double agree = Double.valueOf(textMap.get("agree")); |
| | | Double emosta = Double.valueOf(textMap.get("emosta")); |
| | | |
| | | // 图表1 |
| | | List<SeriesData> seriesDatas = Arrays.asList( |
| | |
| | | * @param seriesDataMap |
| | | * @param textMap 数据源 |
| | | */ |
| | | public static void changeChart(XWPFDocument document, Map<Integer,List<SeriesData>> seriesDataMap, Map<String, Object> textMap) { |
| | | public static void changeChart(XWPFDocument document, Map<Integer,List<SeriesData>> seriesDataMap, Map<String, String> textMap) { |
| | | if(StringUtils.isEmpty(textMap)){ |
| | | return; |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class AbstractReasoningHigh extends BaseCondition_V2 { |
| | | private String name = "AbstractReasoningHigh"; |
| | | private Double AR; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pAR = map.get("ar"); |
| | | if (checkParamsIsNull(pAR)) { |
| | | return null; |
| | | } |
| | | AR = Double.valueOf(pAR); |
| | | boolean LIBLAQ0010 = (AR <= 30); |
| | | boolean LIBLAQ0008 = (30 < AR && AR < 70); |
| | | boolean LIBLAQ0005 = (AR >= 70); |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0010, "LIBLAQ0010"); |
| | | calculateMap.put(LIBLAQ0008, "LIBLAQ0008"); |
| | | calculateMap.put(LIBLAQ0005, "LIBLAQ0005"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | |
| | | TLibraryCode maqReportLibrary = getMaqReportLibrary(map, codeId , langType); |
| | | return maqReportLibrary; |
| | | } catch (Exception ex) { |
| | | log.error("AbstractReasoningHigh error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class AbstractReasoningLikely extends BaseCondition_V2 { |
| | | private String name = "AbstractReasoningLikely"; |
| | | private Double AR; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pAR = map.get("ar"); |
| | | if (checkParamsIsNull(pAR)) { |
| | | return null; |
| | | } |
| | | AR = Double.valueOf(pAR); |
| | | //分数区间计算代码 |
| | | boolean LIBLAQ0150 = (AR <= 30); |
| | | boolean LIBLAQ0140 = (30 < AR && AR < 70); |
| | | boolean LIBLAQ0130 = (AR >= 70); |
| | | |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0130, "LIBLAQ0131,LIBLAQ0132"); |
| | | calculateMap.put(LIBLAQ0140, "LIBLAQ0141,LIBLAQ0142"); |
| | | calculateMap.put(LIBLAQ0150, "LIBLAQ0151,LIBLAQ0151"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | String[] split = codeId.split(","); |
| | | List<TLibraryCode> libcodes = new ArrayList<>(); |
| | | Arrays.stream(split).forEach(item -> { |
| | | libcodes.add(getMaqReportLibrary(map, item, langType)); |
| | | }); |
| | | return libcodes; |
| | | } catch (Exception ex) { |
| | | log.error("AbstractReasoningLikely error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class Agreeableness extends BaseCondition_V2 { |
| | | private String name = "Agreeableness"; |
| | | private Double AGREE; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pAGREE = map.get("agree"); |
| | | if (checkParamsIsNull(pAGREE)) { |
| | | return null; |
| | | } |
| | | AGREE = Double.valueOf(pAGREE); |
| | | //分数区间计算代码 |
| | | boolean LIBLAQ0530 = (AGREE <= 30); |
| | | boolean LIBLAQ0520 = (30 < AGREE && AGREE < 70); |
| | | boolean LIBLAQ0510 = (AGREE >= 70); |
| | | |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0510, "LIBLAQ0511,LIBLAQ0512,LIBLAQ0513,LIBLAQ0514,LIBLAQ0515"); |
| | | calculateMap.put(LIBLAQ0520, "LIBLAQ0521,LIBLAQ0522,LIBLAQ0523,LIBLAQ0524"); |
| | | calculateMap.put(LIBLAQ0530, "LIBLAQ0531,LIBLAQ0532,LIBLAQ0533,LIBLAQ0534,LIBLAQ0535"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | String[] split = codeId.split(","); |
| | | List<TLibraryCode> libcodes = new ArrayList<>(); |
| | | Arrays.stream(split).forEach(item -> { |
| | | libcodes.add(getMaqReportLibrary(map, item, langType)); |
| | | }); |
| | | return libcodes; |
| | | } catch (Exception ex) { |
| | | log.error("Agreeableness error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 领导一致性指标 |
| | | */ |
| | | @Data |
| | | @Slf4j |
| | | public class AlignmentIndications extends BaseCondition_V2 { |
| | | private String name = "AlignmentIndications"; |
| | | private Double OLAS; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String olas = map.get("olas"); |
| | | if (checkParamsIsNull(olas)) { |
| | | return null; |
| | | } |
| | | OLAS = Double.valueOf(olas); |
| | | //分数区间计算代码 |
| | | boolean LIBLAQ0051A = OLAS >= 70; |
| | | boolean LIBLAQ0061A = 30 < OLAS && OLAS < 70; |
| | | boolean LIBLAQ0071A = 30 <= OLAS; |
| | | |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0051A, "LIBLAQ0051,LIBLAQ0052,LIBLAQ0053,LIBLAQ0054"); |
| | | calculateMap.put(LIBLAQ0061A, "LIBLAQ0061,LIBLAQ0062,LIBLAQ0063,LIBLAQ0064,LIBLAQ0065"); |
| | | calculateMap.put(LIBLAQ0071A, "LIBLAQ0071,LIBLAQ0072,LIBLAQ0073"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | String[] split = codeId.split(","); |
| | | List<TLibraryCode> libcodes = new ArrayList<>(); |
| | | Arrays.stream(split).forEach(item -> { |
| | | libcodes.add(getMaqReportLibrary(map, item, langType)); |
| | | }); |
| | | return libcodes; |
| | | } catch (Exception ex) { |
| | | log.error("AlignmentIndications error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class Conscientiousness extends BaseCondition_V2 { |
| | | private String name = "Conscientiousness"; |
| | | private Double CONS; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pCONS = map.get("cons"); |
| | | if (checkParamsIsNull(pCONS)) { |
| | | return null; |
| | | } |
| | | CONS = Double.valueOf(pCONS); |
| | | //分数区间计算代码 |
| | | boolean LIBLAQ0330 = (CONS <= 30); |
| | | boolean LIBLAQ0320 = (30 < CONS && CONS < 70); |
| | | boolean LIBLAQ0310 = (CONS >= 70); |
| | | |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0310, "LIBLAQ0311,LIBLAQ0312,LIBLAQ0313,LIBLAQ0314,LIBLAQ0315"); |
| | | calculateMap.put(LIBLAQ0320, "LIBLAQ0321,LIBLAQ0322,LIBLAQ0323,LIBLAQ0324,LIBLAQ0325,LIBLAQ0326"); |
| | | calculateMap.put(LIBLAQ0330, "LIBLAQ0331,LIBLAQ0332,LIBLAQ0333,LIBLAQ0334,LIBLAQ0335"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | String[] split = codeId.split(","); |
| | | List<TLibraryCode> libcodes = new ArrayList<>(); |
| | | Arrays.stream(split).forEach(item -> { |
| | | libcodes.add(getMaqReportLibrary(map, item, langType)); |
| | | }); |
| | | return libcodes; |
| | | } catch (Exception ex) { |
| | | log.error("Conscientiousness error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class EmotionalStability extends BaseCondition_V2 { |
| | | private String name = "EmotionalStability"; |
| | | private Double EMOSTA; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pEMOSTA = map.get("emosta"); |
| | | if (checkParamsIsNull(pEMOSTA)) { |
| | | return null; |
| | | } |
| | | EMOSTA = Double.valueOf(pEMOSTA); |
| | | //分数区间计算代码 |
| | | boolean LIBLAQ0630 = (EMOSTA <= 30); |
| | | boolean LIBLAQ0620 = (30 < EMOSTA && EMOSTA < 70); |
| | | boolean LIBLAQ0610 = (EMOSTA >= 70); |
| | | |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0610, "LIBLAQ0611,LIBLAQ0612,LIBLAQ0613,LIBLAQ0614"); |
| | | calculateMap.put(LIBLAQ0620, "LIBLAQ0621,LIBLAQ0622,LIBLAQ0623,LIBLAQ0624,LIBLAQ0625"); |
| | | calculateMap.put(LIBLAQ0630, "LIBLAQ0631,LIBLAQ0632,LIBLAQ0633"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | String[] split = codeId.split(","); |
| | | List<TLibraryCode> libcodes = new ArrayList<>(); |
| | | Arrays.stream(split).forEach(item -> { |
| | | libcodes.add(getMaqReportLibrary(map, item, langType)); |
| | | }); |
| | | return libcodes; |
| | | } catch (Exception ex) { |
| | | log.error("EmotionalStability error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class Extraversion extends BaseCondition_V2 { |
| | | private String name = "Extraversion"; |
| | | private Double EXTRA; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pEXTRA = map.get("extra"); |
| | | if (checkParamsIsNull(pEXTRA)) { |
| | | return null; |
| | | } |
| | | EXTRA = Double.valueOf(pEXTRA); |
| | | //分数区间计算代码 |
| | | boolean LIBLAQ0430 = (EXTRA <= 30); |
| | | boolean LIBLAQ0420 = (30 < EXTRA && EXTRA < 70); |
| | | boolean LIBLAQ0410 = (EXTRA >= 70); |
| | | |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0410, "LIBLAQ0411,LIBLAQ0412,LIBLAQ0413,LIBLAQ0414,LIBLAQ0415"); |
| | | calculateMap.put(LIBLAQ0420, "LIBLAQ0421,LIBLAQ0422,LIBLAQ0423,LIBLAQ0424,LIBLAQ0425"); |
| | | calculateMap.put(LIBLAQ0430, "LIBLAQ0431,LIBLAQ0432,LIBLAQ0433,LIBLAQ0434"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | String[] split = codeId.split(","); |
| | | List<TLibraryCode> libcodes = new ArrayList<>(); |
| | | Arrays.stream(split).forEach(item -> { |
| | | libcodes.add(getMaqReportLibrary(map, item, langType)); |
| | | }); |
| | | return libcodes; |
| | | } catch (Exception ex) { |
| | | log.error("Extraversion error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQ.base.BaseCondition; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class NumericalReasoningHigh extends BaseCondition_V2 { |
| | | private String name = "NumericalReasoningHigh"; |
| | | private Double NR; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pNR = map.get("nr"); |
| | | if (checkParamsIsNull(pNR)) { |
| | | return null; |
| | | } |
| | | NR = Double.valueOf(pNR); |
| | | boolean LIBLAQ0010 = (NR <= 30); |
| | | boolean LIBLAQ0008 = (30 < NR && NR < 70); |
| | | boolean LIBLAQ0005 = (NR >= 70); |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0010, "LIBLAQ0010"); |
| | | calculateMap.put(LIBLAQ0008, "LIBLAQ0008"); |
| | | calculateMap.put(LIBLAQ0005, "LIBLAQ0005"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | |
| | | TLibraryCode maqReportLibrary = getMaqReportLibrary(map, codeId , langType); |
| | | return maqReportLibrary; |
| | | } catch (Exception ex) { |
| | | log.error("NumericalReasoningHigh error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class NumericalReasoningLikely extends BaseCondition_V2 { |
| | | private String name = "NumericalReasoningLikely"; |
| | | private Double NR; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String nr = map.get("nr"); |
| | | if (checkParamsIsNull(nr)) { |
| | | return null; |
| | | } |
| | | NR = Double.valueOf(nr); |
| | | //分数区间计算代码 |
| | | boolean LIBLAQ0120 = (NR <= 30); |
| | | boolean LIBLAQ0110 = (30 < NR && NR < 70); |
| | | boolean LIBLAQ0100 = (NR >= 70); |
| | | |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0100, "LIBLAQ0101,LIBLAQ0102"); |
| | | calculateMap.put(LIBLAQ0110, "LIBLAQ0111,LIBLAQ0112"); |
| | | calculateMap.put(LIBLAQ0120, "LIBLAQ0121,LIBLAQ0122"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | String[] split = codeId.split(","); |
| | | List<TLibraryCode> libcodes = new ArrayList<>(); |
| | | Arrays.stream(split).forEach(item -> { |
| | | libcodes.add(getMaqReportLibrary(map, item, langType)); |
| | | }); |
| | | return libcodes; |
| | | } catch (Exception ex) { |
| | | log.error("NumericalReasoningLikely error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class OpennessExperience extends BaseCondition_V2 { |
| | | private String name = "OpennessExperience"; |
| | | private Double OPEN; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pOPEN = map.get("open"); |
| | | if (checkParamsIsNull(pOPEN)) { |
| | | return null; |
| | | } |
| | | OPEN = Double.valueOf(pOPEN); |
| | | //分数区间计算代码 |
| | | boolean LIBLAQ0230 = (OPEN <= 30); |
| | | boolean LIBLAQ0220 = (30 < OPEN && OPEN < 70); |
| | | boolean LIBLAQ0210 = (OPEN >= 70); |
| | | |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0210, "LIBLAQ0211,LIBLAQ0212,LIBLAQ0213,LIBLAQ0214,LIBLAQ0215"); |
| | | calculateMap.put(LIBLAQ0220, "LIBLAQ0221,LIBLAQ0222,LIBLAQ0223"); |
| | | calculateMap.put(LIBLAQ0230, "LIBLAQ0231,LIBLAQ0232,LIBLAQ0233,LIBLAQ0234,LIBLAQ0235"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | String[] split = codeId.split(","); |
| | | List<TLibraryCode> libcodes = new ArrayList<>(); |
| | | Arrays.stream(split).forEach(item -> { |
| | | libcodes.add(getMaqReportLibrary(map, item, langType)); |
| | | }); |
| | | return libcodes; |
| | | } catch (Exception ex) { |
| | | log.error("OpennessExperience error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class ScoreInterpretationBLA extends BaseCondition_V2 { |
| | | private String name = "BehaviorCharacteristicsV1"; |
| | | private Double BLA; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pBLA = map.get("bla"); |
| | | if (checkParamsIsNull(pBLA)) { |
| | | return null; |
| | | } |
| | | BLA = Double.valueOf(pBLA); |
| | | boolean LIBLAQ0163 = (BLA <= 30); |
| | | boolean LIBLAQ0162 = (30 < BLA && BLA < 70); |
| | | boolean LIBLAQ0161 = (BLA >= 70); |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0163, "LIBLAQ0163"); |
| | | calculateMap.put(LIBLAQ0162, "LIBLAQ0162"); |
| | | calculateMap.put(LIBLAQ0161, "LIBLAQ0161"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | |
| | | TLibraryCode maqReportLibrary = getMaqReportLibrary(map, codeId , langType); |
| | | return maqReportLibrary; |
| | | } catch (Exception ex) { |
| | | log.error("BehaviorCharacteristicsV1 error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ots.project.tool.report.LAQ.condition; |
| | | |
| | | import com.ots.common.enums.LangTypeEnum; |
| | | import com.ots.project.exam.domain.TLibraryCode; |
| | | import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @Slf4j |
| | | public class ScoreInterpretationHigh extends BaseCondition_V2 { |
| | | private String name = "NumericalReasoningHigh"; |
| | | private Double BLA; |
| | | |
| | | @Override |
| | | public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) { |
| | | try { |
| | | String pBLA = map.get("bla"); |
| | | if (checkParamsIsNull(pBLA)) { |
| | | return null; |
| | | } |
| | | BLA = Double.valueOf(pBLA); |
| | | boolean LIBLAQ0010 = (BLA <= 30); |
| | | boolean LIBLAQ0008 = (30 < BLA && BLA < 70); |
| | | boolean LIBLAQ0005 = (BLA >= 70); |
| | | Map calculateMap = new HashMap(); |
| | | calculateMap.put(LIBLAQ0010, "LIBLAQ0010"); |
| | | calculateMap.put(LIBLAQ0008, "LIBLAQ0008"); |
| | | calculateMap.put(LIBLAQ0005, "LIBLAQ0005"); |
| | | String codeId = selectTrueObject(calculateMap); |
| | | |
| | | TLibraryCode maqReportLibrary = getMaqReportLibrary(map, codeId , langType); |
| | | return maqReportLibrary; |
| | | } catch (Exception ex) { |
| | | log.error("NumericalReasoningHigh error:{}", ex.getMessage(), ex); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getMAQwaterDropsImages() { |
| | | return null; |
| | | } |
| | | } |