Browse Source

修改104号模型

main
sjh 1 year ago
parent
commit
d348467861
  1. 5
      src/main/java/com/biutag/supervision/pojo/entity/StatisticsDepart.java
  2. 6
      src/main/java/com/biutag/supervision/service/ModelClueService.java

5
src/main/java/com/biutag/supervision/pojo/entity/StatisticsDepart.java

@ -1,13 +1,10 @@
package com.biutag.supervision.pojo.entity; package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.time.LocalDateTime;
@Setter @Setter
@Getter @Getter
public class StatisticsDepart { public class StatisticsDepart {
@ -26,7 +23,7 @@ public class StatisticsDepart {
// //
@TableField("groupId") @TableField("groupId")
private String groupId; private Long groupId;
// //
@TableField("pid") @TableField("pid")

6
src/main/java/com/biutag/supervision/service/ModelClueService.java

@ -1052,7 +1052,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
List<String> params = parseSqlForModel2(param); List<String> params = parseSqlForModel2(param);
String sql = "select a.gxdwdm, a.gxdwmc, a.num anum, b.num bnum from ((SELECT gxdwdm, gxdwmc, COUNT(*) AS num from dwd_asj_zhtx_jjd where bjsj BETWEEN '" + params.get(0) + " 00:00:00' AND '" + params.get(1) + " 00:00:00' 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) a join (SELECT gxdwdm, gxdwmc, COUNT(*) num from dwd_asj_zhtx_jjd where bjsj BETWEEN '" + params.get(0) + " 00:00:00' AND '" + params.get(1) + " 00:00:00' AND (ysjqxzdm LIKE '01%' OR ysjqxzdm LIKE'02%' OR ysjqxzdm LIKE'06%') and bjfsdm = '0101' GROUP BY gxdwdm, gxdwmc) b on a.gxdwdm = b.gxdwdm);"; String sql = "select a.gxdwdm, a.gxdwmc, a.num anum, b.num bnum from ((SELECT gxdwdm, gxdwmc, COUNT(*) AS num from dwd_asj_zhtx_jjd where bjsj BETWEEN '" + params.get(0) + " 00:00:00' AND '" + params.get(1) + " 00:00:00' 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) a join (SELECT gxdwdm, gxdwmc, COUNT(*) num from dwd_asj_zhtx_jjd where bjsj BETWEEN '" + params.get(0) + " 00:00:00' AND '" + params.get(1) + " 00:00:00' AND (ysjqxzdm LIKE '01%' OR ysjqxzdm LIKE'02%' OR ysjqxzdm LIKE'06%') and bjfsdm = '0101' GROUP BY gxdwdm, gxdwmc) b on a.gxdwdm = b.gxdwdm);";
List<Map<String, Object>> jjdmaps = modelClueDataMapper.selectByUniqueKeys(sql); List<Map<String, Object>> jjdmaps = modelClueDataMapper.selectByUniqueKeys(sql);
System.out.println("模型104查询数据库完毕"); System.out.println("模型104查询数据库完毕,结果数量:" + jjdmaps.size());
if (jjdmaps.isEmpty()) { if (jjdmaps.isEmpty()) {
return; return;
} }
@ -1091,7 +1091,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
.map(Map.Entry::getKey) .map(Map.Entry::getKey)
.toList(); .toList();
for (String department : highPercentageDepartments) { for (String department : highPercentageDepartments) {
if (departNumMap.get(department) < 10) { if (departNumMap.get(department) < 10L) {
continue; continue;
} }
ModelClue newModelClue = new ModelClue(); ModelClue newModelClue = new ModelClue();
@ -1102,7 +1102,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
if (supExternalDepart.getInternalId() != null) { if (supExternalDepart.getInternalId() != null) {
newModelClue.setInvolveDepartId(supExternalDepart.getInternalId()); newModelClue.setInvolveDepartId(supExternalDepart.getInternalId());
StatisticsDepart statisticsDepart = statisticsDepartMapper.selectOne(new QueryWrapper<StatisticsDepart>().eq("departId", supExternalDepart.getInternalId()).last("LIMIT 1")); StatisticsDepart statisticsDepart = statisticsDepartMapper.selectOne(new QueryWrapper<StatisticsDepart>().eq("departId", supExternalDepart.getInternalId()).last("LIMIT 1"));
if (statisticsDepart == null || statisticsDepart.getLevel() == null || statisticsDepart.getLevel() != 10L) { if (statisticsDepart == null || statisticsDepart.getGroupId() == null || statisticsDepart.getGroupId() != 10L) {
continue; continue;
} }
} }

Loading…
Cancel
Save