|
|
@ -1,28 +1,38 @@ |
|
|
|
package com.kms.yxgh.common.enums; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.kms.system.domain.SysXzqh; |
|
|
|
import com.kms.system.service.SysXzqhService; |
|
|
|
import com.kms.yg.cz.service.AttStBaseService; |
|
|
|
import com.kms.yg.cz.service.AttStMpService; |
|
|
|
import com.kms.yg.df.service.BsSgcDfSafeJbxxService; |
|
|
|
import com.kms.yg.res.service.AttResBaseService; |
|
|
|
import com.kms.yg.sz.domain.BsSgcSzSzrw; |
|
|
|
import com.kms.yg.sz.service.BsSgcSzSafeJbxxService; |
|
|
|
import com.kms.yg.sz.service.BsSgcSzSzrwService; |
|
|
|
import com.kms.yxgh.common.dto.*; |
|
|
|
import com.kms.yxgh.common.service.Statistic; |
|
|
|
import com.kms.yxgh.df.domain.DfCheckingProblemV2; |
|
|
|
import com.kms.yxgh.df.mapper.DfCheckingProblemV2Mapper; |
|
|
|
import com.kms.yxgh.df.mapper.DfCheckingRecordV2Mapper; |
|
|
|
import com.kms.yxgh.df.mapper.DfCheckingV2Mapper; |
|
|
|
import com.kms.yxgh.df.mapper.DfYhV2Mapper; |
|
|
|
import com.kms.yxgh.df.service.DfCheckingProblemV2Service; |
|
|
|
import com.kms.yxgh.df.service.DfYhV2Service; |
|
|
|
import com.kms.yxgh.dw.mapper.DwCheckingProblemV2Mapper; |
|
|
|
import com.kms.yxgh.dw.mapper.DwCheckingRecordV2Mapper; |
|
|
|
import com.kms.yxgh.dw.mapper.DwCheckingV2Mapper; |
|
|
|
import com.kms.yxgh.dw.mapper.DwYhV2Mapper; |
|
|
|
import com.kms.yxgh.sz.domain.SzCheckingProblemV2; |
|
|
|
import com.kms.yxgh.sz.mapper.SzCheckingProblemV2Mapper; |
|
|
|
import com.kms.yxgh.sz.mapper.SzCheckingRecordV2Mapper; |
|
|
|
import com.kms.yxgh.sz.mapper.SzCheckingV2Mapper; |
|
|
|
import com.kms.yxgh.sz.mapper.SzYhV2Mapper; |
|
|
|
import com.kms.yxgh.sz.service.SzCheckingProblemV2Service; |
|
|
|
import com.kms.yxgh.sz.service.SzYhV2Service; |
|
|
|
import com.shuili.common.utils.SpringUtils; |
|
|
|
import lombok.Getter; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
@ -314,31 +324,30 @@ public enum StaticIndexEnum { |
|
|
|
|
|
|
|
YZT_SK_SUM("水库", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("sum","7596"); |
|
|
|
AttResBaseService service = SpringUtils.getBean(AttResBaseService.class); |
|
|
|
map.put("sum",String.valueOf(service)); |
|
|
|
return map; |
|
|
|
}, "座", "0"), |
|
|
|
YZT_SZ_SUM("水闸", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("sum","5456"); |
|
|
|
BsSgcSzSafeJbxxService service = SpringUtils.getBean(BsSgcSzSafeJbxxService.class); |
|
|
|
map.put("sum",String.valueOf(service.count())); |
|
|
|
return map; |
|
|
|
}, "座", "0"), |
|
|
|
YZT_DF_SUM("堤防", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
DfCheckingRecordV2Mapper mapper = SpringUtils.getBean(DfCheckingRecordV2Mapper.class); |
|
|
|
int count = mapper.paragraphCountNumber(sp); |
|
|
|
map.put("sum",String.valueOf(count)); |
|
|
|
BsSgcDfSafeJbxxService service = SpringUtils.getBean(BsSgcDfSafeJbxxService.class); |
|
|
|
map.put("sum",String.valueOf(service.count())); |
|
|
|
return map; |
|
|
|
}, "段", "0"), |
|
|
|
|
|
|
|
YZT_SSYX_SUM("水事影像监测监视点", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
// ATT_WMST_BASE
|
|
|
|
return map; |
|
|
|
}, "个", "0"), |
|
|
|
}, "个", "125"), |
|
|
|
YZT_SWGCJCCZ_SUM("水文工程检测测站数量", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
AttStBaseService service = SpringUtils.getBean(AttStBaseService.class); |
|
|
|
service.count(); |
|
|
|
map.put("sum",String.valueOf(service.count())); |
|
|
|
return map; |
|
|
|
}, "个", "0"), |
|
|
@ -350,7 +359,6 @@ public enum StaticIndexEnum { |
|
|
|
}, "个", "0"), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
YZT_SUPERVISE_JRGJ_YCL_SUM("已处理", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("sum","15"); |
|
|
@ -384,13 +392,18 @@ public enum StaticIndexEnum { |
|
|
|
|
|
|
|
YZT_TOUR_CHECK_DJD_SUM("待鉴定", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("sum","400"); |
|
|
|
BsSgcSzSzrwService service = SpringUtils.getBean(BsSgcSzSzrwService.class); |
|
|
|
int countDtb = service.count(new LambdaQueryWrapper<BsSgcSzSzrw>().eq(BsSgcSzSzrw::getStatus, 1)); |
|
|
|
int countDsh = service.count(new LambdaQueryWrapper<BsSgcSzSzrw>().eq(BsSgcSzSzrw::getStatus, 0)); |
|
|
|
map.put("sum",String.valueOf(countDtb+countDsh)); |
|
|
|
return map; |
|
|
|
}, "个", "0"), |
|
|
|
|
|
|
|
YZT_TOUR_CHECK_YJD_SUM("已鉴定", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("sum","56"); |
|
|
|
BsSgcSzSzrwService service = SpringUtils.getBean(BsSgcSzSzrwService.class); |
|
|
|
int count = service.count(new LambdaQueryWrapper<BsSgcSzSzrw>().eq(BsSgcSzSzrw::getStatus, 2)); |
|
|
|
map.put("sum",String.valueOf(count)); |
|
|
|
return map; |
|
|
|
}, "个", "0"), |
|
|
|
|
|
|
@ -422,31 +435,31 @@ public enum StaticIndexEnum { |
|
|
|
|
|
|
|
YZT_DAILY_YB_NUMBER_SUM("一般", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("sum","56"); |
|
|
|
map.put("sum",String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_YB.getValue()))); |
|
|
|
return map; |
|
|
|
}, "个", "0"), |
|
|
|
|
|
|
|
YZT_DAILY_JD_NUMBER_SUM("较大", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("sum","56"); |
|
|
|
map.put("sum",String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_JD.getValue()))); |
|
|
|
return map; |
|
|
|
}, "个", "0"), |
|
|
|
|
|
|
|
YZT_DAILY_ZD_NUMBER_SUM("重大", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("sum","56"); |
|
|
|
map.put("sum",String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_ZD.getValue()))); |
|
|
|
return map; |
|
|
|
}, "个", "0"), |
|
|
|
|
|
|
|
YZT_DAILY_JJ_NUMBER_SUM("紧急", sp -> { |
|
|
|
YZT_DAILY_JJ_NUMBER_SUM("零星", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("sum","56"); |
|
|
|
map.put("sum",String.valueOf(getProblemGrade(PatrolMaintenanceCategory.DJ_LX.getValue()))); |
|
|
|
return map; |
|
|
|
}, "个", "0"), |
|
|
|
|
|
|
|
YZT_DAILY_BL_NUMBER_SUM("比例", sp -> { |
|
|
|
Map<String,String> map =new HashMap<>(); |
|
|
|
map.put("bl","70"); |
|
|
|
map.put("bl",getYhSum()); |
|
|
|
return map; |
|
|
|
}, "个", "0"), |
|
|
|
|
|
|
@ -466,6 +479,35 @@ public enum StaticIndexEnum { |
|
|
|
this.defaultValue = defaultValue; |
|
|
|
} |
|
|
|
|
|
|
|
public static int getProblemGrade(String dj) { |
|
|
|
DfCheckingProblemV2Service dfQxService = SpringUtils.getBean(DfCheckingProblemV2Service.class); |
|
|
|
SzCheckingProblemV2Service szQxService = SpringUtils.getBean(SzCheckingProblemV2Service.class); |
|
|
|
int dfCount = dfQxService.count(new LambdaQueryWrapper<DfCheckingProblemV2>().eq(DfCheckingProblemV2::getProblemLevel, dj)); |
|
|
|
int szCount = szQxService.count(new LambdaQueryWrapper<SzCheckingProblemV2>().eq(SzCheckingProblemV2::getProblemLevel, dj)); |
|
|
|
return dfCount+szCount; |
|
|
|
} |
|
|
|
|
|
|
|
public static String getYhSum() { |
|
|
|
DfYhV2Service dfYhV2Service = SpringUtils.getBean(DfYhV2Service.class); |
|
|
|
SzYhV2Service szYhV2Service = SpringUtils.getBean(SzYhV2Service.class); |
|
|
|
int dfCount = dfYhV2Service.count(); |
|
|
|
int szCount = szYhV2Service.count(); |
|
|
|
|
|
|
|
int yb = getProblemGrade(PatrolMaintenanceCategory.DJ_YB.getValue()); |
|
|
|
int jd = getProblemGrade(PatrolMaintenanceCategory.DJ_JD.getValue()); |
|
|
|
int zd = getProblemGrade(PatrolMaintenanceCategory.DJ_ZD.getValue()); |
|
|
|
int lx = getProblemGrade(PatrolMaintenanceCategory.DJ_LX.getValue()); |
|
|
|
|
|
|
|
int qxCount = dfCount + szCount; |
|
|
|
int yhCount = yb+jd+zd+lx; |
|
|
|
|
|
|
|
int bl=0; |
|
|
|
if (qxCount!=0 && yhCount!=0) { |
|
|
|
bl=qxCount/yhCount; |
|
|
|
} |
|
|
|
return String.valueOf(bl); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static Map<String, String> dataGroup(List<CountDateDto> list) { |
|
|
|