Commit 896d99e8 authored by 韩桐桐's avatar 韩桐桐

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents 67cd3a2e 122956f2
......@@ -84,7 +84,7 @@ public class ZLDPStatisticsController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping (value = "/region/info")
@ApiOperation(httpMethod = "POST", value = "查询区域统计信息", notes = "查询区域统计信息")
@ApiOperation(httpMethod = "POST", value = "大屏-总览-安全监管 (近7天)", notes = "安全监管 (近7天)")
public ResponseModel<JSONArray> statisticsRegionInfo(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
......
package com.yeejoin.amos.boot.module.statistcs.biz.service.impl;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.module.common.api.constant.TZSCommonConstant;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum;
import com.yeejoin.amos.boot.module.statistics.api.mapper.CommonBaseMapper;
import com.yeejoin.amos.boot.module.statistics.api.mapper.ZLStatisticsMapper;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamPipelineMapper;
......@@ -58,17 +62,20 @@ public class StCommonServiceImpl {
private EquipmentCategoryMapper equipmentCategoryMapper;
private ZLStatisticsMapper zlStatisticsMapper;
private static Map<String, String> regionCodeOrgCodeMap = new ConcurrentHashMap<>();
private static List<RegionModel> regionModels = new ArrayList<>();
private static List<EquipmentCategoryDto> equipmentCategoryDtos;
public StCommonServiceImpl(CommonBaseMapper commonMapper, RestHighLevelClient restHighLevelClient, EquipTechParamPipelineMapper techParamsPipelineMapper, EquipmentCategoryMapper equipmentCategoryMapper) {
public StCommonServiceImpl(CommonBaseMapper commonMapper, RestHighLevelClient restHighLevelClient, EquipTechParamPipelineMapper techParamsPipelineMapper, EquipmentCategoryMapper equipmentCategoryMapper, ZLStatisticsMapper zlStatisticsMapper) {
this.commonMapper = commonMapper;
this.restHighLevelClient = restHighLevelClient;
this.techParamsPipelineMapper = techParamsPipelineMapper;
this.equipmentCategoryMapper = equipmentCategoryMapper;
this.zlStatisticsMapper = zlStatisticsMapper;
}
public static Map<String, String> getRegionCodeOrgCodeMap() {
......@@ -233,4 +240,32 @@ public class StCommonServiceImpl {
result.put(DPMapStatisticsItemEnum.PRESSURE_PIPELINES.getCode(), length);
}
public CountDto getYellowStatusCompany(DPFilterParamDto dpFilterParamDto) {
CountDto countDto = new CountDto();
countDto.setLongValue(this.countCompanyForCertDateTimeOut(dpFilterParamDto));
countDto.setLabel("资质临期");
return countDto;
}
public CountDto getRedStatusCompany(DPFilterParamDto dpFilterParamDto) {
CountDto countDto = new CountDto();
countDto.setLongValue(this.countCompanyForCertDateTemporary(dpFilterParamDto));
countDto.setLabel("资质超期");
return countDto;
}
private long countCompanyForCertDateTemporary(DPFilterParamDto dpFilterParamDto) {
String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode());
// 临期6个月
String limitDate = DateUtil.offset(DateUtil.date(), DateField.DAY_OF_MONTH, 6).toDateStr();
return zlStatisticsMapper.countCompanyForCertDateTemporary(dpFilterParamDto, orgCode, limitDate);
}
private long countCompanyForCertDateTimeOut(DPFilterParamDto dpFilterParamDto) {
String orgCode = this.getAndSetOrgCode(dpFilterParamDto.getCityCode());
String limitDate = DateUtil.today();
return zlStatisticsMapper.countCompanyForCertDateTimeOut(dpFilterParamDto, orgCode, limitDate);
}
}
package com.yeejoin.amos.boot.module.statistcs.biz.service.impl;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
......@@ -590,6 +593,17 @@ public class ZLDPStatisticsServiceImpl {
jsonObject9.put("key", "csjsynx");
jsonObject9.put("value", this.getQuestionNumber("超设计使用年限",params, orgCode));
jsonObject9.put("name", "超设计使用年限");
JSONObject jsonObject10 = new JSONObject();
jsonObject10.put("key", "csjsynx");
jsonObject10.put("value", stCommonService.getYellowStatusCompany(params));
jsonObject10.put("name", "许可超期");
JSONObject jsonObject11 = new JSONObject();
jsonObject11.put("key", "csjsynx");
jsonObject11.put("value", stCommonService.getRedStatusCompany(params));
jsonObject11.put("name", "资质超期");
jsonArray.add(jsonObject0);
jsonArray.add(jsonObject1);
jsonArray.add(jsonObject2);
......@@ -600,6 +614,9 @@ public class ZLDPStatisticsServiceImpl {
jsonArray.add(jsonObject7);
jsonArray.add(jsonObject8);
jsonArray.add(jsonObject9);
jsonArray.add(jsonObject10);
jsonArray.add(jsonObject11);
}
return jsonArray;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment