diff --git a/src/main/java/com/biutag/supervision/service/ModelClueService.java b/src/main/java/com/biutag/supervision/service/ModelClueService.java index db20327..677400d 100644 --- a/src/main/java/com/biutag/supervision/service/ModelClueService.java +++ b/src/main/java/com/biutag/supervision/service/ModelClueService.java @@ -1048,7 +1048,7 @@ public class ModelClueService extends ServiceImpl { private void getModelCluesForModel104(String param, List modelClues) { System.out.println("模型104开始查询数据库"); List params = parseSqlForModel2(param); - String sql = "SELECT gxdwdm, gxdwmc, COUNT(*) AS zjjs from dwd_asj_zhtx_jjd where bjsj BETWEEN '" + params.get(0) + " 00:00:00' AND '" + params.get(1) + " 00:00:00' AND jqjb != '04' AND (ysjqxzdm LIKE '01%' OR ysjqxzdm LIKE'02%' OR ysjqxzdm LIKE'06%') AND (bjxldm NOT LIKE '01%' AND bjxldm NOT LIKE '02%' AND bjxldm NOT LIKE '06%') GROUP BY gxdwdm, gxdwmc;"; + String sql = "SELECT gxdwdm, gxdwmc, COUNT(*) AS zjjs from dwd_asj_zhtx_jjd where bjsj BETWEEN '" + params.get(0) + " 00:00:00' AND '" + params.get(1) + " 00:00:00' AND jqjb != '04' AND (ysjqxzdm LIKE '01%' OR ysjqxzdm LIKE'02%' OR ysjqxzdm LIKE'06%') AND (bjxldm NOT LIKE '01%' AND bjxldm NOT LIKE '02%' AND bjxldm NOT LIKE '06%') and bjfsdm = '0101' GROUP BY gxdwdm, gxdwmc;"; List> jjdmaps = modelClueDataMapper.selectByUniqueKeys(sql); System.out.println("模型104查询数据库完毕"); if (jjdmaps.isEmpty()) { @@ -1085,7 +1085,7 @@ public class ModelClueService extends ServiceImpl { BigDecimal sumOfPercentages = departPercentageMap.values().stream() .reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal avgPercentage = sumOfPercentages.divide(BigDecimal.valueOf(departPercentageMap.size()), 3, RoundingMode.HALF_UP); - BigDecimal multiply = avgPercentage.multiply(new BigDecimal("0.5")); + BigDecimal multiply = avgPercentage.multiply(new BigDecimal("1.5")); List highPercentageDepartments = departPercentageMap.entrySet().stream() .filter(entry -> entry.getValue().compareTo(multiply) > 0) .map(Map.Entry::getKey)