package com.ots.project.tool.report.MAQNEW.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.Map; @Slf4j @Getter @Setter public class PrimaryLeadershipStyle_V2 extends BaseCondition_V2 { private String name = "PrimaryLeadershipStyle_V2"; @Override public TLibraryCode calculate(Map map, LangTypeEnum langType) { try { String p_task31 = map.get("P_Task31"); String p_people32 = map.get("P_People32"); if (checkParamsIsNull(p_task31, p_people32)) { return null; } Double P_task31 = Double.valueOf(p_task31); Double P_people32 = Double.valueOf(p_people32); String codeId = null; if (P_task31 >= 50 && P_people32 < 50) { codeId = "LIBMAQV225003"; } else if (P_task31 >= 50 && P_people32 >= 50) { codeId = "LIBMAQV225016"; } else if (P_task31 < 50 && P_people32 >= 50) { codeId = "LIBMAQV225026"; } else if (P_task31 < 50 && P_people32 < 50) { codeId = "LIBMAQV225036"; } else { TLibraryCode libraryCode = new TLibraryCode(); String briefContent = "NONE"; libraryCode.setEnglistContent(briefContent); libraryCode.setChineseContent(briefContent); libraryCode.setThaiContent(briefContent); return libraryCode; } return getMaqReportLibrary(map, codeId, langType); } catch (Exception ex) { log.error("PrimaryLeadershipStyle error:{}", ex.getMessage(), ex); return null; } } @Override public Map getMAQwaterDropsImages() { return null; } }