|
|
@@ -0,0 +1,1181 @@
|
|
|
+package com.gyee.generation.service;//package com.gyee.generation.service;
|
|
|
+
|
|
|
+import com.gyee.common.model.StringUtils;
|
|
|
+import com.gyee.generation.init.CacheContext;
|
|
|
+import com.gyee.generation.model.auto.*;
|
|
|
+import com.gyee.generation.service.auto.*;
|
|
|
+import com.gyee.generation.util.DateUtils;
|
|
|
+import com.gyee.generation.util.realtimesource.IEdosUtil;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.math.RoundingMode;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class EquipmentInfoDayTopService {
|
|
|
+
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(EquipmentInfoDayTopService.class);
|
|
|
+ @Resource
|
|
|
+ private IEdosUtil edosUtil;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IProEconEquipmentInfoDay1Service proEconEquipmentInfoDay1Service;
|
|
|
+ @Resource
|
|
|
+ private IProEconEquipmentInfoDay2Service proEconEquipmentInfoDay2Service;
|
|
|
+ @Resource
|
|
|
+ private IProEconEquipmentInfoDay3Service proEconEquipmentInfoDay3Service;
|
|
|
+ @Resource
|
|
|
+ private IProEconEquipmentInfoDay4Service proEconEquipmentInfoDay4Service;
|
|
|
+ @Resource
|
|
|
+ private IProEconEquipmentInfoDay5Service proEconEquipmentInfoDay5Service;
|
|
|
+ @Resource
|
|
|
+ private IProEconEquipmentInfoDayTopService proEconEquipmentInfoDayTopService;
|
|
|
+
|
|
|
+ public void calEquipmentInfoDayTop(Date recordDate) throws Exception {
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
+ c.setTime(recordDate);
|
|
|
+
|
|
|
+
|
|
|
+ //判断是否有重复记录,先删除重复记录
|
|
|
+ List<Integer> idls = proEconEquipmentInfoDayTopService.list().stream()
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate)) == 0
|
|
|
+ && CacheContext.wtmap.containsKey(i.getWindturbineId())).map(ProEconEquipmentInfoDayTop::getId)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ if (idls != null && idls.size() > 0) {
|
|
|
+
|
|
|
+ proEconEquipmentInfoDayTopService.removeByIds(idls);
|
|
|
+ }
|
|
|
+ for (ProBasicPowerstation wp : CacheContext.wpls) {
|
|
|
+
|
|
|
+ List<ProEconEquipmentInfoDayTop> topls = new ArrayList<>();
|
|
|
+ for (ProBasicEquipment wt : CacheContext.wpwtmap.get(wp.getId())) {
|
|
|
+
|
|
|
+
|
|
|
+ ProEconEquipmentInfoDayTop peeidt = new ProEconEquipmentInfoDayTop();
|
|
|
+
|
|
|
+ peeidt.setWindpowerstationId(wt.getWindpowerstationId());
|
|
|
+ peeidt.setLineId(wt.getLineId());
|
|
|
+ peeidt.setProjectId(wt.getProjectId());
|
|
|
+ peeidt.setWindturbineId(wt.getId());
|
|
|
+ peeidt.setRecordDate(DateUtils.truncDay(recordDate));
|
|
|
+ peeidt.setYear(DateUtils.getYear(recordDate));
|
|
|
+ peeidt.setMonth(DateUtils.getMonth(recordDate) + 1);
|
|
|
+
|
|
|
+ List<ProEconEquipmentInfoDay1> pepid1ls = proEconEquipmentInfoDay1Service.list().stream()
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate)) == 0
|
|
|
+ && i.getWindturbineId().equals(wt.getId())
|
|
|
+ ).collect(Collectors.toList());
|
|
|
+
|
|
|
+ if (!pepid1ls.isEmpty()) {
|
|
|
+ ProEconEquipmentInfoDay1 pepid1 = pepid1ls.get(0);
|
|
|
+ //发电量
|
|
|
+ peeidt.setDayfdl(pepid1.getRfdl());
|
|
|
+ peeidt.setMonthfdl(pepid1.getYfdl());
|
|
|
+ peeidt.setYearfdl(pepid1.getNfdl());
|
|
|
+ //理论发电量
|
|
|
+ peeidt.setDayllfdl(pepid1.getRllfdl());
|
|
|
+ peeidt.setMonthllfdl(pepid1.getYllfdl());
|
|
|
+ peeidt.setYearllfdl(pepid1.getNllfdl());
|
|
|
+ //平均风速
|
|
|
+ peeidt.setDayfs(pepid1.getRpjfs());
|
|
|
+ peeidt.setMonthfs(pepid1.getYpjfs());
|
|
|
+ peeidt.setYearfs(pepid1.getNpjfs());
|
|
|
+ //平均功率
|
|
|
+ peeidt.setDaygl(pepid1.getRpjgl());
|
|
|
+ peeidt.setMonthgl(pepid1.getYpjgl());
|
|
|
+ peeidt.setYeargl(pepid1.getNpjgl());
|
|
|
+ //故障损失电量
|
|
|
+ peeidt.setDaygzssdl(pepid1.getRgzssdl());
|
|
|
+ peeidt.setMonthgzssdl(pepid1.getYgzssdl());
|
|
|
+ peeidt.setYeargzssdl(pepid1.getNgzssdl());
|
|
|
+ //限电损失电量
|
|
|
+ peeidt.setDayxdssdl(pepid1.getRxdtjssdl());
|
|
|
+ peeidt.setMonthxdssdl(pepid1.getYxdtjssdl());
|
|
|
+ peeidt.setYearxdssdl(pepid1.getNxdtjssdl());
|
|
|
+ //维护损失电量
|
|
|
+ peeidt.setDaywhssdl(pepid1.getRjxssdl());
|
|
|
+ peeidt.setMonthwhssdl(pepid1.getYjxssdl());
|
|
|
+ peeidt.setYearwhssdl(pepid1.getNjxssdl());
|
|
|
+ //性能损失电量
|
|
|
+ peeidt.setDayxnssdl(pepid1.getRqxjclssdl());
|
|
|
+ peeidt.setMonthxnssdl(pepid1.getYqxjclssdl());
|
|
|
+ peeidt.setYearxnssdl(pepid1.getNqxjclssdl());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ List<ProEconEquipmentInfoDay2> pepid2ls = proEconEquipmentInfoDay2Service.list().stream()
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate)) == 0
|
|
|
+ && i.getWindturbineId().equals(wt.getId())
|
|
|
+ ).collect(Collectors.toList());
|
|
|
+
|
|
|
+ if (!pepid2ls.isEmpty()) {
|
|
|
+ ProEconEquipmentInfoDay2 pepid2 = pepid2ls.get(0);
|
|
|
+ //故障时间
|
|
|
+ peeidt.setDaygzsj(pepid2.getRgzxsmx());
|
|
|
+ peeidt.setMonthfdl(pepid2.getYgzxsmx());
|
|
|
+ peeidt.setYearfdl(pepid2.getNgzxsmx());
|
|
|
+ //维护时间
|
|
|
+ peeidt.setDaywhsj(pepid2.getRjxxsmx());
|
|
|
+ peeidt.setMonthwhsj(pepid2.getYjxxsmx());
|
|
|
+ peeidt.setYearwhsj(pepid2.getNjxxsmx());
|
|
|
+ //运行时间
|
|
|
+ peeidt.setDayyxsj(pepid2.getRyxxs());
|
|
|
+ peeidt.setMonthyxsj(pepid2.getYyxxs());
|
|
|
+ peeidt.setYearyxsj(pepid2.getNyxxs());
|
|
|
+ //停机时间
|
|
|
+ peeidt.setDaytjsj(pepid2.getRgzxsmx());
|
|
|
+ peeidt.setMonthtjsj(pepid2.getYgzxsmx());
|
|
|
+ peeidt.setYeartjsj(pepid2.getNgzxsmx());
|
|
|
+ //利用小时数
|
|
|
+
|
|
|
+ double defaultpower = 1500.0;
|
|
|
+ if (CacheContext.modelMap.containsKey(wt.getModelId())) {
|
|
|
+ defaultpower = CacheContext.modelMap.get(wt.getModelId()).getPowerProduction();
|
|
|
+ }
|
|
|
+
|
|
|
+ peeidt.setDaylyxs(BigDecimal.valueOf(peeidt.getDayfdl()).divide(new BigDecimal(defaultpower), 2, RoundingMode.HALF_EVEN).doubleValue());
|
|
|
+ peeidt.setMonthlyxs(BigDecimal.valueOf(peeidt.getMonthfdl()).divide(new BigDecimal(defaultpower), 2, RoundingMode.HALF_EVEN).doubleValue());
|
|
|
+ peeidt.setDaylyxs(BigDecimal.valueOf(peeidt.getYearfdl()).divide(new BigDecimal(defaultpower), 2, RoundingMode.HALF_EVEN).doubleValue());
|
|
|
+
|
|
|
+
|
|
|
+ //设备可利用率
|
|
|
+ int dayhours = 24;
|
|
|
+ double temp = StringUtils.round(dayhours - peeidt.getDaygzsj(), 2);
|
|
|
+ peeidt.setDaysbklyl(temp);
|
|
|
+
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ cal.setTime(recordDate);
|
|
|
+ int days = c.get(Calendar.DAY_OF_MONTH);
|
|
|
+
|
|
|
+ dayhours = 24 * days;
|
|
|
+ temp = StringUtils.round(dayhours - peeidt.getMonthgzsj(), 2);
|
|
|
+ peeidt.setMonthsbklyl(temp);
|
|
|
+
|
|
|
+ days = c.get(Calendar.DAY_OF_YEAR);
|
|
|
+ dayhours = 24 * days;
|
|
|
+ temp = StringUtils.round(dayhours - peeidt.getYeargzsj(), 2);
|
|
|
+ peeidt.setYearsbklyl(temp);
|
|
|
+
|
|
|
+
|
|
|
+ //等效可用系数
|
|
|
+ dayhours = 24;
|
|
|
+ temp = StringUtils.round(dayhours - peeidt.getDaygzsj() - peeidt.getDaywhsj(), 2);
|
|
|
+ peeidt.setDaydxkyxs(temp);
|
|
|
+
|
|
|
+ cal = Calendar.getInstance();
|
|
|
+ cal.setTime(recordDate);
|
|
|
+ days = c.get(Calendar.DAY_OF_MONTH);
|
|
|
+
|
|
|
+ dayhours = 24 * days;
|
|
|
+ temp = StringUtils.round(dayhours - peeidt.getMonthgzsj() - peeidt.getMonthwhsj(), 2);
|
|
|
+ peeidt.setMonthdxkyxs(temp);
|
|
|
+
|
|
|
+ days = c.get(Calendar.DAY_OF_YEAR);
|
|
|
+ dayhours = 24 * days;
|
|
|
+ temp = StringUtils.round(dayhours - peeidt.getYeargzsj() - peeidt.getMonthwhsj(), 2);
|
|
|
+ peeidt.setYeardxkyxs(temp);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ProEconEquipmentInfoDay4> pepid4ls = proEconEquipmentInfoDay4Service.list().stream()
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate)) == 0
|
|
|
+ && i.getWindturbineId().equals(wt.getId())
|
|
|
+ ).collect(Collectors.toList());
|
|
|
+
|
|
|
+ if (!pepid4ls.isEmpty()) {
|
|
|
+ ProEconEquipmentInfoDay4 pepid4 = pepid4ls.get(0);
|
|
|
+ //拟合优度
|
|
|
+ peeidt.setDaynhyd(pepid4.getRnhyd());
|
|
|
+ peeidt.setMonthnhyd(pepid4.getYnhyd());
|
|
|
+ peeidt.setYearnhyd(pepid4.getNnhyd());
|
|
|
+ //有效风时数
|
|
|
+ peeidt.setDayyxfss(pepid4.getRyxfss());
|
|
|
+ peeidt.setMonthyxfss(pepid4.getYyxfss());
|
|
|
+ peeidt.setYearyxfss(pepid4.getNyxfss());
|
|
|
+ //小风切入
|
|
|
+ peeidt.setDayxfqr(pepid4.getRxfqrfs());
|
|
|
+ peeidt.setMonthxfqr(pepid4.getYxfqrfs());
|
|
|
+ peeidt.setYearxfqr(pepid4.getNxfqrfs());
|
|
|
+ //静风频率
|
|
|
+
|
|
|
+ int dayhours = 24;
|
|
|
+ double temp = BigDecimal.valueOf(pepid4.getRjfsc()).divide(new BigDecimal(dayhours), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
|
|
|
+ peeidt.setDayjfpl(temp);
|
|
|
+
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ cal.setTime(recordDate);
|
|
|
+ int days = c.get(Calendar.DAY_OF_MONTH);
|
|
|
+
|
|
|
+ dayhours = 24 * days;
|
|
|
+ temp = BigDecimal.valueOf(pepid4.getYjfsc()).divide(new BigDecimal(dayhours), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
|
|
|
+ peeidt.setMonthjfpl(temp);
|
|
|
+
|
|
|
+ days = c.get(Calendar.DAY_OF_YEAR);
|
|
|
+ dayhours = 24 * days;
|
|
|
+ temp = BigDecimal.valueOf(pepid4.getNjfsc()).divide(new BigDecimal(dayhours), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
|
|
|
+ peeidt.setYearjfpl(temp);
|
|
|
+
|
|
|
+
|
|
|
+ //功率一致性系数
|
|
|
+ peeidt.setDayglyzxxs(pepid4.getRglyzxxs());
|
|
|
+ peeidt.setMonthglyzxxs(pepid4.getYglyzxxs());
|
|
|
+ peeidt.setYearglyzxxs(pepid4.getNglyzxxs());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ topls.add(peeidt);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // Map<指标, Map<风机编号,ProEconEquipmentInfoDayTop>>
|
|
|
+ Map<String, Map<String, ProEconEquipmentInfoDayTop>> ordermap = new HashMap<>();
|
|
|
+
|
|
|
+ List<String> filedls = initialFiled();
|
|
|
+ //遍历循环排序,将序号赋值给rank,再通过风机编号转为,MAP
|
|
|
+ orderObject(topls,ordermap,filedls);
|
|
|
+
|
|
|
+
|
|
|
+ for (ProEconEquipmentInfoDayTop top : topls) {
|
|
|
+
|
|
|
+ calLevels(top, topls.size(), ordermap, "day");
|
|
|
+ calLevels(top, topls.size(), ordermap, "month");
|
|
|
+ calLevels(top, topls.size(), ordermap, "year");
|
|
|
+
|
|
|
+ proEconEquipmentInfoDayTopService.save(top);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private void orderObject(List<ProEconEquipmentInfoDayTop> topls, Map<String, Map<String, ProEconEquipmentInfoDayTop>> ordermap, List<String> filedls) {
|
|
|
+
|
|
|
+
|
|
|
+ //遍历循环排序,将序号赋值给rank,再通过风机编号转为,MAP
|
|
|
+ for (String str : filedls) {
|
|
|
+
|
|
|
+
|
|
|
+ List<ProEconEquipmentInfoDayTop> ls = new ArrayList<>();
|
|
|
+
|
|
|
+
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = new HashMap<>();
|
|
|
+
|
|
|
+ switch (str) {
|
|
|
+ case "dayfs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDayfs).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthfs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthfs).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yearfs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYearfs).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "dayxnssdl":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDayxnssdl)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthxnssdl":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthxnssdl)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yearxnssdl":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYearxnssdl)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "daylyxs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDaylyxs).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthlyxs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthlyxs).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yearlyxs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYearlyxs).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "daynhyd":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDaynhyd)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthnhyd":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthnhyd)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yearnhyd":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYearnhyd)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "daysbklyl":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDaysbklyl).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthsbklyl":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthsbklyl).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yearsbklyl":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYearsbklyl).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "daydxkyxs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDaydxkyxs).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthdxkyxs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthdxkyxs).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yeardxkyxs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYeardxkyxs).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "dayyxfss":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDayyxfss).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthyxfss":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthyxfss).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yearyxfss":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYearyxfss).reversed()).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "dayxfqr":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDayxfqr)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthxfqr":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthxfqr)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yearxfqr":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYearxfqr)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "dayjfpl":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDayjfpl)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthjfpl":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthjfpl)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yearjfpl":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYearjfpl)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "dayglyzxxs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getDayglyzxxs)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "monthglyzxxs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getMonthglyzxxs)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ case "yearglyzxxs":
|
|
|
+ ls = topls.stream()
|
|
|
+ .sorted(Comparator.comparing(ProEconEquipmentInfoDayTop::getYearglyzxxs)).collect(Collectors.toList());
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(str.contains("day")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> result = new HashMap<>();
|
|
|
+ for (int i = 0; i < ls.size(); i++) {
|
|
|
+ ProEconEquipmentInfoDayTop po = ls.get(i);
|
|
|
+ po.setDayRank(i + 1);
|
|
|
+ result.putIfAbsent(po.getWindturbineId(), po);
|
|
|
+ }
|
|
|
+ map = result;
|
|
|
+
|
|
|
+ }else if(str.contains("month")){
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> result = new HashMap<>();
|
|
|
+ for (int i = 0; i < ls.size(); i++) {
|
|
|
+ ProEconEquipmentInfoDayTop po = ls.get(i);
|
|
|
+ po.setMonthRank(i + 1);
|
|
|
+ result.putIfAbsent(po.getWindturbineId(), po);
|
|
|
+ }
|
|
|
+ map = result;
|
|
|
+
|
|
|
+ }else{
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> result = new HashMap<>();
|
|
|
+ for (int i = 0; i < ls.size(); i++) {
|
|
|
+ ProEconEquipmentInfoDayTop po = ls.get(i);
|
|
|
+ po.setYearRank(i + 1);
|
|
|
+ result.putIfAbsent(po.getWindturbineId(), po);
|
|
|
+ }
|
|
|
+ map = result;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ ordermap.put(str, map);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void calLevels(ProEconEquipmentInfoDayTop top, Integer size, Map<String, Map<String, ProEconEquipmentInfoDayTop>> ordermap, String type) {
|
|
|
+ double m = 10;
|
|
|
+ double d = m / (double) size;
|
|
|
+ double temp = 0;
|
|
|
+
|
|
|
+ //切入风速
|
|
|
+ double xfqrValue = 0;
|
|
|
+ //性能损失电量
|
|
|
+ double xnssdlValue = 0;
|
|
|
+ //拟合优度
|
|
|
+ double nhydValue = 0;
|
|
|
+ //功率一致性系数
|
|
|
+ double glyzxxsValue = 0;
|
|
|
+ //利用小时
|
|
|
+ double lyxsValue = 0;
|
|
|
+ //设备可利用率
|
|
|
+ double sbklylValue = 0;
|
|
|
+ //等效可利用系数
|
|
|
+ double dxkyxsValue = 0;
|
|
|
+ //有效风时数
|
|
|
+ double yxfssValue = 0;
|
|
|
+ //风速
|
|
|
+ double fsValue = 0;
|
|
|
+ //静风频率
|
|
|
+ double jfplValue = 0;
|
|
|
+
|
|
|
+ //切入风速
|
|
|
+ if (ordermap.containsKey(type + "xfqr")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "xfqr");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDayxfqr();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthxfqr();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYearxfqr();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value >= 5) {
|
|
|
+ xfqrValue = 0;
|
|
|
+ } else if (value <= 3.5) {
|
|
|
+ xfqrValue = m;
|
|
|
+ } else {
|
|
|
+
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ xfqrValue = StringUtils.round(temp, 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //性能损失电量
|
|
|
+ if (ordermap.containsKey(type + "xnssdl")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "xnssdl");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDayxnssdl();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthxnssdl();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYearxnssdl();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (value >= top.getDayfdl()) {
|
|
|
+ xnssdlValue = 0;
|
|
|
+ } else if (value <= 0) {
|
|
|
+ xnssdlValue = m;
|
|
|
+ } else {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ xnssdlValue = StringUtils.round(temp, 0);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //拟合优度
|
|
|
+ if (ordermap.containsKey(type + "nhyd")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "nhyd");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDaynhyd();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthnhyd();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYearnhyd();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ //拟合优度
|
|
|
+ if (value >= 0.5) {
|
|
|
+ nhydValue = 0;
|
|
|
+ } else if (value <= 0.15) {
|
|
|
+ nhydValue = m;
|
|
|
+ } else {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ nhydValue = StringUtils.round(temp, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //功率一致性系数
|
|
|
+ if (ordermap.containsKey(type + "glyzxxs")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "glyzxxs");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDayglyzxxs();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthglyzxxs();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYearglyzxxs();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value >= 50) {
|
|
|
+ glyzxxsValue = 0;
|
|
|
+ } else if (value <= 15) {
|
|
|
+ glyzxxsValue = m;
|
|
|
+ } else {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ glyzxxsValue = StringUtils.round(temp, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //利用小时
|
|
|
+ if (ordermap.containsKey(type + "lyxs")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "lyxs");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDaylyxs();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthlyxs();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYearlyxs();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value <= 0) {
|
|
|
+ lyxsValue = 0;
|
|
|
+ } else {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ lyxsValue = StringUtils.round(temp, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //设备可利用率
|
|
|
+ if (ordermap.containsKey(type + "sbklyl")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "sbklyl");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDaysbklyl();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthsbklyl();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYearsbklyl();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value < 90) {
|
|
|
+ sbklylValue = 0;
|
|
|
+ } else if (value >= 99.8) {
|
|
|
+ sbklylValue = m;
|
|
|
+ } else {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ sbklylValue = StringUtils.round(temp, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //等效可用系数
|
|
|
+ if (ordermap.containsKey(type + "dxkyxs")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "dxkyxs");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDaydxkyxs();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthdxkyxs();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYeardxkyxs();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value < 90) {
|
|
|
+ dxkyxsValue = 0;
|
|
|
+ } else if (value >= 99.8) {
|
|
|
+ dxkyxsValue = m;
|
|
|
+ } else {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ dxkyxsValue = StringUtils.round(temp, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //有效风时数
|
|
|
+ if (ordermap.containsKey(type + "yxfss")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "yxfss");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDayyxfss();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthyxfss();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYearyxfss();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value <= 0) {
|
|
|
+ yxfssValue = 0;
|
|
|
+ } else {
|
|
|
+ if (type.equals("day")) {
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ } else if (type.equals("month")) {
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ } else {
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ }
|
|
|
+ yxfssValue = StringUtils.round(temp, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //平均风速
|
|
|
+ if (ordermap.containsKey(type + "fs")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "fs");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDayfs();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthfs();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYearfs();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value <= 0) {
|
|
|
+ fsValue = 0;
|
|
|
+ } else {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ fsValue = StringUtils.round(temp, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //静风频率
|
|
|
+ if (ordermap.containsKey(type + "jfpl")) {
|
|
|
+ Map<String, ProEconEquipmentInfoDayTop> map = ordermap.get(type + "jfpl");
|
|
|
+ if (map.containsKey(top.getWindturbineId())) {
|
|
|
+ ProEconEquipmentInfoDayTop rtop = map.get(top.getWindturbineId());
|
|
|
+
|
|
|
+
|
|
|
+ double value = 0.0;
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ value = top.getDayjfpl();
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ value = top.getMonthjfpl();
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ value = top.getYearjfpl();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value <= 0) {
|
|
|
+ jfplValue = 0;
|
|
|
+ } else {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+ temp = d * (size - rtop.getDayRank());
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+ temp = d * (size - rtop.getMonthRank());
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+ temp = d * (size - rtop.getYearRank());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ jfplValue = StringUtils.round(temp, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Double total = xfqrValue + xnssdlValue + nhydValue + glyzxxsValue + lyxsValue + sbklylValue + dxkyxsValue + yxfssValue + fsValue + jfplValue;
|
|
|
+
|
|
|
+ if (total >= 95) {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+
|
|
|
+ top.setDayLevel("AAA");
|
|
|
+ top.setDayScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+
|
|
|
+ top.setMonthLevel("AAA");
|
|
|
+ top.setMonthScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+
|
|
|
+ top.setYearLevel("AAA");
|
|
|
+ top.setYearScore(total);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else if (total >= 85) {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+
|
|
|
+ top.setDayLevel("AA");
|
|
|
+ top.setDayScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+
|
|
|
+ top.setMonthLevel("AA");
|
|
|
+ top.setMonthScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+
|
|
|
+ top.setYearLevel("AA");
|
|
|
+ top.setYearScore(total);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else if (total >= 80) {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+
|
|
|
+ top.setDayLevel("A");
|
|
|
+ top.setDayScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+
|
|
|
+ top.setMonthLevel("A");
|
|
|
+ top.setMonthScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+
|
|
|
+ top.setYearLevel("A");
|
|
|
+ top.setYearScore(total);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else if (total >= 75) {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+
|
|
|
+ top.setDayLevel("BBB");
|
|
|
+ top.setDayScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+
|
|
|
+ top.setMonthLevel("BBB");
|
|
|
+ top.setMonthScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+
|
|
|
+ top.setYearLevel("BBB");
|
|
|
+ top.setYearScore(total);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else if (total >= 65) {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+
|
|
|
+ top.setDayLevel("BB");
|
|
|
+ top.setDayScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+
|
|
|
+ top.setMonthLevel("BB");
|
|
|
+ top.setMonthScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+
|
|
|
+ top.setYearLevel("BB");
|
|
|
+ top.setYearScore(total);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ } else if (total >= 60) {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+
|
|
|
+ top.setDayLevel("B");
|
|
|
+ top.setDayScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+
|
|
|
+ top.setMonthLevel("B");
|
|
|
+ top.setMonthScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+
|
|
|
+ top.setYearLevel("B");
|
|
|
+ top.setYearScore(total);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else if (total >= 40) {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+
|
|
|
+ top.setDayLevel("C");
|
|
|
+ top.setDayScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+
|
|
|
+ top.setMonthLevel("C");
|
|
|
+ top.setMonthScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+
|
|
|
+ top.setYearLevel("C");
|
|
|
+ top.setYearScore(total);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ switch (type) {
|
|
|
+ case "day":
|
|
|
+
|
|
|
+ top.setDayLevel("C-");
|
|
|
+ top.setDayScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "month":
|
|
|
+
|
|
|
+ top.setMonthLevel("C-");
|
|
|
+ top.setMonthScore(total);
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "year":
|
|
|
+
|
|
|
+ top.setYearLevel("C-");
|
|
|
+ top.setYearScore(total);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<String> initialFiled() {
|
|
|
+ List<String> filedls = new ArrayList<>();
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("dayfs");
|
|
|
+
|
|
|
+ filedls.add("monthfs");
|
|
|
+
|
|
|
+ filedls.add("yearfs");
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("dayxnssdl");
|
|
|
+
|
|
|
+ filedls.add("monthxnssdl");
|
|
|
+
|
|
|
+ filedls.add("yearxnssdl");
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("daylyxs");
|
|
|
+
|
|
|
+ filedls.add("monthlyxs");
|
|
|
+
|
|
|
+ filedls.add("yearlyxs");
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("daynhyd");
|
|
|
+
|
|
|
+ filedls.add("monthnhyd");
|
|
|
+
|
|
|
+ filedls.add("yearnhyd");
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("daysbklyl");
|
|
|
+
|
|
|
+ filedls.add("monthsbklyl");
|
|
|
+
|
|
|
+ filedls.add("yearsbklyl");
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("daydxkyxs");
|
|
|
+
|
|
|
+ filedls.add("monthdxkyxs");
|
|
|
+
|
|
|
+ filedls.add("yeardxkyxs");
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("dayyxfss");
|
|
|
+
|
|
|
+ filedls.add("monthyxfss");
|
|
|
+
|
|
|
+ filedls.add("yearyxfss");
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("dayxfqr");
|
|
|
+
|
|
|
+ filedls.add("monthxfqr");
|
|
|
+
|
|
|
+ filedls.add("yearxfqr");
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("dayjfpl");
|
|
|
+
|
|
|
+ filedls.add("monthjfpl");
|
|
|
+
|
|
|
+ filedls.add("yearjfpl");
|
|
|
+
|
|
|
+
|
|
|
+ filedls.add("dayglyzxxs");
|
|
|
+
|
|
|
+ filedls.add("monthglyzxxs");
|
|
|
+
|
|
|
+ filedls.add("yearglyzxxs");
|
|
|
+
|
|
|
+ return filedls;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|