Commit 80891bd9 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 f29b7e7e 5ce060da
...@@ -83,4 +83,9 @@ public class DPFilterParamForDetailDto { ...@@ -83,4 +83,9 @@ public class DPFilterParamForDetailDto {
*/ */
private String alertTypeCode; private String alertTypeCode;
/**
* 气瓶充装异常情况(0:正常,1:异常)
*/
private String anomalyType;
} }
...@@ -7,9 +7,9 @@ import lombok.Getter; ...@@ -7,9 +7,9 @@ import lombok.Getter;
@AllArgsConstructor @AllArgsConstructor
public enum CylinderTypeEnum { public enum CylinderTypeEnum {
CYLINDER("瓶", "2300"), CYLINDER("瓶", "2300"),
SEAMLESS_CYLINDER("无缝气瓶(车用)", "2310"), SEAMLESS_CYLINDER("无缝气瓶", "2310"),
WELDED_CYLINDER("焊接气瓶(车用)", "2320"), WELDED_CYLINDER("焊接气瓶", "2320"),
SPECIAL_CYLINDER("特种气瓶(车用)", "23T0"); SPECIAL_CYLINDER("特种气瓶", "23T0");
private final String name; private final String name;
private final String code; private final String code;
......
...@@ -2265,7 +2265,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2265,7 +2265,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
} }
} }
if("8300".equals(equCategory)) {
useInfo.setProjectContraption(((String) equipmentInfoForm.get("PROJECT_CONTRAPTION")).trim());
}
idxBizJgUseInfoService.saveOrUpdateData(useInfo); idxBizJgUseInfoService.saveOrUpdateData(useInfo);
// 设计信息 // 设计信息
......
...@@ -2592,6 +2592,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2592,6 +2592,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
buildTask(jgUseRegistration, workflowResultDto); buildTask(jgUseRegistration, workflowResultDto);
} }
} }
jgUseRegistration.setUseRegistrationCode("");
this.getBaseMapper().updateById(jgUseRegistration); this.getBaseMapper().updateById(jgUseRegistration);
commonServiceImpl.saveExecuteFlowData2Redis(jgUseRegistration.getInstanceId(), this.buildInstanceRuntimeData(jgUseRegistration)); commonServiceImpl.saveExecuteFlowData2Redis(jgUseRegistration.getInstanceId(), this.buildInstanceRuntimeData(jgUseRegistration));
} catch (InterruptedException e) { } catch (InterruptedException e) {
......
...@@ -1668,6 +1668,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -1668,6 +1668,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
buildTask(jgVehicleInformation, workflowResultDto); buildTask(jgVehicleInformation, workflowResultDto);
} }
} }
jgVehicleInformation.setUseRegistrationCode("");
this.getBaseMapper().updateById(jgVehicleInformation); this.getBaseMapper().updateById(jgVehicleInformation);
commonService.saveExecuteFlowData2Redis(jgVehicleInformation.getInstanceId(), this.buildInstanceRuntimeData(jgVehicleInformation)); commonService.saveExecuteFlowData2Redis(jgVehicleInformation.getInstanceId(), this.buildInstanceRuntimeData(jgVehicleInformation));
} catch (InterruptedException e) { } catch (InterruptedException e) {
......
package com.yeejoin.amos.boot.module.statistics.api.dto; package com.yeejoin.amos.boot.module.statistics.api.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDateDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -25,6 +22,21 @@ public class SafetyProblemTracingDto extends DPFilterParamForDetailDto { ...@@ -25,6 +22,21 @@ public class SafetyProblemTracingDto extends DPFilterParamForDetailDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键ID")
protected Long sequenceNbr;
@ApiModelProperty(value = "更新时间")
protected Date recDate;
@ApiModelProperty(value = "更新人id")
protected String recUserId;
@ApiModelProperty(value = "更新人")
protected String recUserName;
@ApiModelProperty(value = "问题编号") @ApiModelProperty(value = "问题编号")
private String problemNum; private String problemNum;
......
package com.yeejoin.amos.boot.module.statistics.api.dto;
import lombok.Data;
import java.util.List;
/**
* @author Administrator
*/
@Data
public class SubTreeDto {
private String value;
private String title;
private List<SubTreeDto> children;
}
package com.yeejoin.amos.boot.module.statistics.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.HashMap;
import java.util.Map;
@Getter
@AllArgsConstructor
public enum AnomalyTypeEnum {
NORMAL("正常", "0"),
ABNORMAL("异常", "1");
private String name;
private String code;
public static Map<String,String> getName=new HashMap<>();
public static Map<String,String> getCode=new HashMap<>();
static {
for (AnomalyTypeEnum e : AnomalyTypeEnum.values()) {
getCode.put(e.name, e.code);
getName.put(e.code, e.name);
}
}
public static AnomalyTypeEnum getEnumByStatus(String code) {
for (AnomalyTypeEnum c : AnomalyTypeEnum.values()) {
if (c.getCode().equals(code)){
return c;
}
}
return null;
}
}
package com.yeejoin.amos.boot.module.statistics.api.mapper; package com.yeejoin.amos.boot.module.statistics.api.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -33,4 +35,8 @@ public interface CylinderStatisticsMapper { ...@@ -33,4 +35,8 @@ public interface CylinderStatisticsMapper {
Long countDischargeVolumeCount(@Param("orgCode") String orgCode); Long countDischargeVolumeCount(@Param("orgCode") String orgCode);
Long countEnterpriseUsed(@Param("orgCode") String orgCode); Long countEnterpriseUsed(@Param("orgCode") String orgCode);
IPage<TzBaseEnterpriseInfoDto> getStationRateSubPage(IPage<TzBaseEnterpriseInfoDto> page,
@Param("companyName") String companyName,
@Param("orgCode") String orgCode);
} }
...@@ -73,6 +73,23 @@ ...@@ -73,6 +73,23 @@
WHERE WHERE
E.supervise_org_code LIKE concat ( #{orgCode}, '%' ) E.supervise_org_code LIKE concat ( #{orgCode}, '%' )
</select> </select>
<select id="getStationRateSubPage"
resultType="com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto">
SELECT
*,
CONCAT(province,'/',city,'/',district) AS region,
CONCAT(street,'/',address) AS full_address
FROM
tz_base_enterprise_info
where
is_delete = '0'
AND unit_type LIKE '%充装单位%'
AND supervise_org_code LIKE CONCAT(#{orgCode},'%')
<if test="companyName != null and companyName != '' ">
AND use_unit LIKE CONCAT('%',#{companyName},'%')
</if>
order by rec_date desc
</select>
</mapper> </mapper>
package com.yeejoin.amos.boot.module.statistcs.biz.controller; package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.CylinderFillingRecordStatisticsDto; import com.yeejoin.amos.boot.module.common.api.dto.CylinderFillingRecordStatisticsDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.CylinderDPStatisticsServiceImpl; import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.CylinderDPStatisticsServiceImpl;
import com.yeejoin.amos.boot.module.statistics.api.dto.SubTreeDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.ESCylinderFillingRecordDto;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -107,4 +113,73 @@ public class CylinderDPStatisticsController extends BaseController { ...@@ -107,4 +113,73 @@ public class CylinderDPStatisticsController extends BaseController {
return ResponseHelper.buildResponse(dpStatisticsService.stationRate(dpFilterParamDto)); return ResponseHelper.buildResponse(dpStatisticsService.stationRate(dpFilterParamDto));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "区域安全指数排名下钻树节点")
@GetMapping(value = "/securityIndexSubTree")
public ResponseModel<SubTreeDto> securityIndexSubTree() {
return ResponseHelper.buildResponse(dpStatisticsService.securityIndexSubTree());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "区域安全指数排名下钻柱状图")
@PostMapping(value = "/securityIndexSubChart")
public ResponseModel<Map<String, Object>> securityIndexSubChart(@RequestBody DPFilterParamDto dpFilterParamDto) {
return ResponseHelper.buildResponse(dpStatisticsService.securityIndexSubChart(dpFilterParamDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "充装量/卸液量下钻树节点")
@GetMapping(value = "/getFillingSubTree")
public ResponseModel<SubTreeDto> getFillingSubTree() {
return ResponseHelper.buildResponse(dpStatisticsService.getFillingSubTree());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "充装量/卸液量下钻柱状图")
@PostMapping(value = "/getFillingSubChart")
public ResponseModel<Map<String, Object>> getFillingSubChart(@RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto) {
return ResponseHelper.buildResponse(dpStatisticsService.getFillingSubChart(dpFilterParamForDetailDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "充装量/卸液量下钻列表")
@PostMapping(value = "/getFillingSubPage")
public ResponseModel<Page<ESCylinderFillingRecordDto>> getFillingSubPage(@RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto) {
return ResponseHelper.buildResponse(dpStatisticsService.getFillingSubPage(dpFilterParamForDetailDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "充装量/卸液量下钻气瓶充装异常情况下拉")
@GetMapping(value = "/getFillingSubAnomalyType")
public ResponseModel<Object> getFillingSubAnomalyType() {
return ResponseHelper.buildResponse(dpStatisticsService.getFillingSubAnomalyType());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "区域气站对接率下钻树节点")
@GetMapping(value = "/getStationRateSubTree")
public ResponseModel<SubTreeDto> getStationRateSubTree() {
return ResponseHelper.buildResponse(dpStatisticsService.getStationRateSubTree());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "区域气站对接率下钻图")
@PostMapping(value = "/getStationRateSubChart")
public ResponseModel<Map<String, Object>> getStationRateSubChart(@RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto) {
return ResponseHelper.buildResponse(dpStatisticsService.getStationRateSubChart(dpFilterParamForDetailDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "区域气站对接率下钻列表")
@PostMapping(value = "/getStationRateSubPage")
public ResponseModel<IPage<TzBaseEnterpriseInfoDto>> getStationRateSubPage(@RequestBody DPFilterParamForDetailDto dpFilterParamForDetailDto) {
return ResponseHelper.buildResponse(dpStatisticsService.getStationRateSubPage(dpFilterParamForDetailDto));
}
} }
...@@ -173,13 +173,13 @@ public class YJDPStatisticsController { ...@@ -173,13 +173,13 @@ public class YJDPStatisticsController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "应急大屏使用-警情类型", notes = "应急大屏使用-警情类型") @ApiOperation(value = "应急大屏使用-警情类型", notes = "应急大屏使用-警情类型")
@GetMapping("/alertOperations/dp") @PostMapping("/alertOperations/dp")
public ResponseModel<Object> alertOperations() { public ResponseModel<Object> alertOperations() {
return ResponseHelper.buildResponse(statisticsService.alertOperations()); return ResponseHelper.buildResponse(statisticsService.alertOperations());
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "应急大屏使用-报警类型", notes = "应急大屏使用-报警类型") @ApiOperation(value = "应急大屏使用-报警类型", notes = "应急大屏使用-报警类型")
@GetMapping("/alertTypeOperations/dp") @PostMapping("/alertTypeOperations/dp")
public ResponseModel<Object> alertTypeOperations() { public ResponseModel<Object> alertTypeOperations() {
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
map.put(AlertStageEnums.JQCB.getId(),AlertStageEnums.JQCB.getValue()); map.put(AlertStageEnums.JQCB.getId(),AlertStageEnums.JQCB.getValue());
......
...@@ -205,7 +205,7 @@ public class AQZSDPStatisticsServiceImpl { ...@@ -205,7 +205,7 @@ public class AQZSDPStatisticsServiceImpl {
return result; return result;
} }
private String castScore2Percent(String score) { public String castScore2Percent(String score) {
BigDecimal big = new BigDecimal(score); BigDecimal big = new BigDecimal(score);
BigDecimal percent = big.divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP); BigDecimal percent = big.divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP);
return percent.toPlainString(); return percent.toPlainString();
...@@ -251,6 +251,31 @@ public class AQZSDPStatisticsServiceImpl { ...@@ -251,6 +251,31 @@ public class AQZSDPStatisticsServiceImpl {
Map<String, SecurityIndexCountItemDto> regionCodeSecurityIndexMap = getSecurityIndexCountItemDtoMap(regionModels); Map<String, SecurityIndexCountItemDto> regionCodeSecurityIndexMap = getSecurityIndexCountItemDtoMap(regionModels);
List<Map<String, String>> data = new ArrayList<>(); List<Map<String, String>> data = new ArrayList<>();
List<Map<String, String>> finalData = data; List<Map<String, String>> finalData = data;
this.getCitySecurityIndex(finalData, regionCodeSecurityIndexMap);
data = finalData.stream()
.filter(map -> map.containsKey("value"))
.sorted(Comparator.comparingDouble(map -> {
// 检查并解析值,如果失败则返回Double.MIN_VALUE(或根据需要处理)
try {
return Double.parseDouble(map.get("value"));
} catch (NumberFormatException e) {
// 处理无法解析为double的情况,这里返回Double.MIN_VALUE表示最小
// 或者可以抛出自定义异常,记录日志等
return Double.MIN_VALUE;
}
}))
.collect(Collectors.toList());
Map<String, Object> result = new HashMap<>();
List<String> name = data.stream().map(map -> map.get("name")).collect(Collectors.toList());
Collections.reverse(name);
result.put("xdata", name);
List<String> value = data.stream().map(map -> map.get("value")).collect(Collectors.toList());
Collections.reverse(value);
result.put("ydata", value);
return result;
}
public void getCitySecurityIndex(List<Map<String, String>> finalData, Map<String, SecurityIndexCountItemDto> regionCodeSecurityIndexMap) {
/** /**
* 计算权重,总分100分: * 计算权重,总分100分:
* 检验超期率、检验合格率、充装检查率、充装检查合格率,占15% * 检验超期率、检验合格率、充装检查率、充装检查合格率,占15%
...@@ -261,6 +286,7 @@ public class AQZSDPStatisticsServiceImpl { ...@@ -261,6 +286,7 @@ public class AQZSDPStatisticsServiceImpl {
regionCodeSecurityIndexMap.forEach((k, v) -> { regionCodeSecurityIndexMap.forEach((k, v) -> {
Map<String, String> item = new HashMap<>(); Map<String, String> item = new HashMap<>();
item.put("name", v.getRegionName()); item.put("name", v.getRegionName());
item.put("regionCode", v.getRegionCode());
// 许可有效率的加权值 // 许可有效率的加权值
double xukeWeighted = Double.parseDouble(v.getXuke()) * weightTen; double xukeWeighted = Double.parseDouble(v.getXuke()) * weightTen;
// 使用登记办理率的加权值 // 使用登记办理率的加权值
...@@ -282,30 +308,10 @@ public class AQZSDPStatisticsServiceImpl { ...@@ -282,30 +308,10 @@ public class AQZSDPStatisticsServiceImpl {
item.put("value", String.format("%.2f", totalIndex)); item.put("value", String.format("%.2f", totalIndex));
finalData.add(item); finalData.add(item);
}); });
data = finalData.stream()
.filter(map -> map.containsKey("value"))
.sorted(Comparator.comparingDouble(map -> {
// 检查并解析值,如果失败则返回Double.MIN_VALUE(或根据需要处理)
try {
return Double.parseDouble(map.get("value"));
} catch (NumberFormatException e) {
// 处理无法解析为double的情况,这里返回Double.MIN_VALUE表示最小
// 或者可以抛出自定义异常,记录日志等
return Double.MIN_VALUE;
}
}))
.collect(Collectors.toList());
Map<String, Object> result = new HashMap<>();
List<String> name = data.stream().map(map -> map.get("name")).collect(Collectors.toList());
Collections.reverse(name);
result.put("xdata", name);
List<String> value = data.stream().map(map -> map.get("value")).collect(Collectors.toList());
Collections.reverse(value);
result.put("ydata", value);
return result;
} }
private Map<String, SecurityIndexCountItemDto> getSecurityIndexCountItemDtoMap(List<RegionModel> regionModels) {
public Map<String, SecurityIndexCountItemDto> getSecurityIndexCountItemDtoMap(List<RegionModel> regionModels) {
// 多线程处理后,顺序与regionModels的顺序不一致,故生成list // 多线程处理后,顺序与regionModels的顺序不一致,故生成list
List<SecurityIndexCountItemDto> countItemDtoList = getSecurityIndexCountDtoList(regionModels); List<SecurityIndexCountItemDto> countItemDtoList = getSecurityIndexCountDtoList(regionModels);
return countItemDtoList.stream().collect(Collectors.toMap(SecurityIndexCountItemDto::getRegionCode, Function.identity(), (k1, k2) -> k2)); return countItemDtoList.stream().collect(Collectors.toMap(SecurityIndexCountItemDto::getRegionCode, Function.identity(), (k1, k2) -> k2));
...@@ -1087,8 +1093,8 @@ public class AQZSDPStatisticsServiceImpl { ...@@ -1087,8 +1093,8 @@ public class AQZSDPStatisticsServiceImpl {
dto.setStrValue("0"); dto.setStrValue("0");
} else { } else {
List<CountDto> dtoList = statisticsMapper.selectByOrgAndMainBody(orgCode, null, sourceTypeCode); List<CountDto> dtoList = statisticsMapper.selectByOrgAndMainBody(orgCode, null, sourceTypeCode);
Long allProblemNum = dtoList.stream().filter(c -> c.getKeyStr().equals(sourceTypeCode)).mapToLong(CountDto::getLongValue).sum(); Long allProblemNum = dtoList.stream().mapToLong(CountDto::getLongValue).sum();
Long handledProblemNum = dtoList.stream().filter(c -> c.getKeyStr().equals(sourceTypeCode) && c.getLabel().equals(SafetyProblemStatusEnum.HANDLED.getCode())).mapToLong(CountDto::getLongValue).sum(); Long handledProblemNum = dtoList.stream().filter(c -> c.getLabel().equals(SafetyProblemStatusEnum.HANDLED.getCode())).mapToLong(CountDto::getLongValue).sum();
dto.setStrValue(calPercent(allProblemNum, handledProblemNum)); dto.setStrValue(calPercent(allProblemNum, handledProblemNum));
} }
return dto; return dto;
...@@ -1109,34 +1115,36 @@ public class AQZSDPStatisticsServiceImpl { ...@@ -1109,34 +1115,36 @@ public class AQZSDPStatisticsServiceImpl {
public Page<SafetyProblemTracingDto> getProblemRecords(Page<SafetyProblemTracingDto> page, SafetyProblemTracingDto problemModel) { public Page<SafetyProblemTracingDto> getProblemRecords(Page<SafetyProblemTracingDto> page, SafetyProblemTracingDto problemModel) {
String orgCode = stCommonService.getAndSetOrgCode(problemModel.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(problemModel.getCityCode());
if (orgCode == null){ if (orgCode == null) {
return new Page<>(); return new Page<>();
} }
problemModel.setGoverningBodyOrgCode(orgCode); problemModel.setGoverningBodyOrgCode(orgCode);
// 使用orgCode过滤 // 使用orgCode过滤
problemModel.setRegionCode(null); problemModel.setRegionCode(null);
// 将单位类型从code转化为value // 将单位类型从code转化为value
if (!ValidationUtil.isEmpty(problemModel.getPrincipalUnitType())){ if (!ValidationUtil.isEmpty(problemModel.getPrincipalUnitType())) {
Collection<DataDictionary> unitTypeList = dataDictionaryMapper.selectList(new QueryWrapper<DataDictionary>() Collection<DataDictionary> unitTypeList = dataDictionaryMapper.selectList(new QueryWrapper<DataDictionary>()
.eq("type", "UNIT_TYPE_NEW") .eq("type", "UNIT_TYPE_NEW")
.eq("is_delete", false) .eq("is_delete", false)
.orderByAsc("sort_num")); .orderByAsc("sort_num"));
Map<String, String> unitTypeMap = unitTypeList.stream().collect(Collectors.toMap(DataDictionary::getCode, DataDictionary::getName)); Map<String, String> unitTypeMap = unitTypeList.stream().collect(Collectors.toMap(DataDictionary::getCode, DataDictionary::getName));
problemModel.setPrincipalUnitType(unitTypeMap.getOrDefault(problemModel.getPrincipalUnitType(),null)); problemModel.setPrincipalUnitType(unitTypeMap.getOrDefault(problemModel.getPrincipalUnitType(), null));
} }
if(problemModel.getTimeSearchOne() != null){ if (problemModel.getTimeSearchOne() != null) {
problemModel.setProblemTimeStart(problemModel.getTimeSearchOne().getBeginDate()); problemModel.setProblemTimeStart(problemModel.getTimeSearchOne().getBeginDate());
problemModel.setProblemTimeEnd(problemModel.getTimeSearchOne().getEndDate()); problemModel.setProblemTimeEnd(problemModel.getTimeSearchOne().getEndDate());
} }
// 前端详情固定给的treeValue,后端进行进行字段转换
problemModel.setSourceTypeCode(problemModel.getTreeValue());
return statisticsMapper.queryForSafetyProblemTracingPage(page, problemModel); return statisticsMapper.queryForSafetyProblemTracingPage(page, problemModel);
} }
public List<Map<String,Object>> getYhType() { public List<Map<String, Object>> getYhType() {
List<DataDictionary> dictionaries = dataDictionaryMapper.selectList(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getType, "ISSUE_TYPE")); List<DataDictionary> dictionaries = dataDictionaryMapper.selectList(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getType, "ISSUE_TYPE"));
return dictionaries.stream().map(d->{ return dictionaries.stream().map(d -> {
Map<String,Object> item = new HashMap<>(); Map<String, Object> item = new HashMap<>();
item.put("value",d.getCode()); item.put("value", d.getCode());
item.put("label",d.getName()); item.put("label", d.getName());
return item; return item;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
......
package com.yeejoin.amos.boot.module.statistcs.biz.service.impl; package com.yeejoin.amos.boot.module.statistcs.biz.service.impl;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.dto.CountDto; import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.common.api.dto.CylinderFillingRecordStatisticsDto; import com.yeejoin.amos.boot.module.common.api.dto.CylinderFillingRecordStatisticsDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum;
import com.yeejoin.amos.boot.module.statistics.api.dto.SecurityIndexCountItemDto;
import com.yeejoin.amos.boot.module.statistics.api.dto.SubTreeDto;
import com.yeejoin.amos.boot.module.statistics.api.enums.AnomalyTypeEnum;
import com.yeejoin.amos.boot.module.statistics.api.mapper.AQZSDPStatisticsMapper; import com.yeejoin.amos.boot.module.statistics.api.mapper.AQZSDPStatisticsMapper;
import com.yeejoin.amos.boot.module.statistics.api.mapper.CylinderStatisticsMapper; import com.yeejoin.amos.boot.module.statistics.api.mapper.CylinderStatisticsMapper;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.ESCylinderFillingRecordDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.ymt.flc.api.mapper.CylinderAreaDataMapper; import com.yeejoin.amos.boot.module.ymt.flc.api.mapper.CylinderAreaDataMapper;
import com.yeejoin.amos.boot.module.ymt.flc.api.mapper.CylinderInfoMapper; import com.yeejoin.amos.boot.module.ymt.flc.api.mapper.CylinderInfoMapper;
import com.yeejoin.amos.feign.systemctl.model.RegionModel; import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.lucene.queryparser.classic.QueryParser; import org.apache.lucene.queryparser.classic.QueryParser;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;
...@@ -22,15 +34,21 @@ import org.elasticsearch.client.core.CountRequest; ...@@ -22,15 +34,21 @@ import org.elasticsearch.client.core.CountRequest;
import org.elasticsearch.client.core.CountResponse; import org.elasticsearch.client.core.CountResponse;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.sort.SortOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
...@@ -59,6 +77,9 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -59,6 +77,9 @@ public class CylinderDPStatisticsServiceImpl {
private AQZSDPStatisticsMapper statisticsMapper; private AQZSDPStatisticsMapper statisticsMapper;
@Autowired
private AQZSDPStatisticsServiceImpl statisticsService;
/** /**
* 气瓶图列换算单位上限 * 气瓶图列换算单位上限
*/ */
...@@ -387,8 +408,8 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -387,8 +408,8 @@ public class CylinderDPStatisticsServiceImpl {
List<CylinderFillingRecordStatisticsDto> fillingRecord = new ArrayList<>(0); List<CylinderFillingRecordStatisticsDto> fillingRecord = new ArrayList<>(0);
List<CylinderFillingRecordStatisticsDto> offloading = new ArrayList<>(0); List<CylinderFillingRecordStatisticsDto> offloading = new ArrayList<>(0);
if(orgCode != null){ if(orgCode != null){
fillingRecord = cylinderInfoMapper.queryFillingRecordByOrgCode(orgCode, LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); fillingRecord = cylinderInfoMapper.queryFillingRecordByOrgCode(orgCode, LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),null);
offloading = cylinderInfoMapper.queryoffloadingByOrgCode(orgCode, LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); offloading = cylinderInfoMapper.queryoffloadingByOrgCode(orgCode, LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),null);
} }
Map<String, String> fillingRecordMap = fillingRecord.stream().collect(Collectors.toMap(CylinderFillingRecordStatisticsDto::getTime, CylinderFillingRecordStatisticsDto::getFillingQuantity)); Map<String, String> fillingRecordMap = fillingRecord.stream().collect(Collectors.toMap(CylinderFillingRecordStatisticsDto::getTime, CylinderFillingRecordStatisticsDto::getFillingQuantity));
Map<String, String> offloadingMap = offloading.stream().collect(Collectors.toMap(CylinderFillingRecordStatisticsDto::getTime, CylinderFillingRecordStatisticsDto::getOffloadingVolume)); Map<String, String> offloadingMap = offloading.stream().collect(Collectors.toMap(CylinderFillingRecordStatisticsDto::getTime, CylinderFillingRecordStatisticsDto::getOffloadingVolume));
...@@ -436,13 +457,341 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -436,13 +457,341 @@ public class CylinderDPStatisticsServiceImpl {
// 已对接总数(存在充装业务数据的企业则认为已对接) // 已对接总数(存在充装业务数据的企业则认为已对接)
Long count = cylinderStatisticsMapper.countEnterpriseUsed(orgCode); Long count = cylinderStatisticsMapper.countEnterpriseUsed(orgCode);
if(totalNum != null && count != null){ if (totalNum != null && count != null) {
result.put("stationRate",count.doubleValue()/totalNum.doubleValue()); BigDecimal percent = (new BigDecimal(count.doubleValue() * 100).divide(new BigDecimal(totalNum.doubleValue()), 2, RoundingMode.HALF_UP));
}else{ result.put("stationRate", Double.valueOf(percent.toString()));
result.put("stationRate",0.0); } else {
result.put("stationRate", 0.0);
}
result.put("totalNum", totalNum);
result.put("count", count);
return result;
}
public SubTreeDto securityIndexSubTree() {
SubTreeDto subTreeDto = new SubTreeDto();
subTreeDto.setTitle(CylinderTypeEnum.CYLINDER.getCode());
subTreeDto.setValue("气" + CylinderTypeEnum.CYLINDER.getName());
return subTreeDto;
}
public Map<String, Object> securityIndexSubChart(DPFilterParamDto dpFilterParamDto) {
List<RegionModel> regionModels = stCommonService.setRegionIfRootParentAndNoAccessIf3Level(dpFilterParamDto.getCityCode());
Map<String, SecurityIndexCountItemDto> regionCodeSecurityIndexMap = statisticsService.getSecurityIndexCountItemDtoMap(regionModels);
List<Map<String, String>> finalData = new ArrayList<>();
statisticsService.getCitySecurityIndex(finalData, regionCodeSecurityIndexMap);
List<String> xdata = stCommonService.buildXData(regionModels);
List<String> yData = new ArrayList<>();
regionModels.forEach(r -> {
String s = finalData.stream().filter(e -> e.get("regionCode").equals(r.getRegionCode().toString())).collect(Collectors.toList()).get(0).get("value");
yData.add(s);
});
Map<String, Object> result = new HashMap<>();
result.put("xdata", xdata);
result.put("ydata", yData);
return result;
}
public SubTreeDto getFillingSubTree() {
SubTreeDto subTreeDto = new SubTreeDto();
subTreeDto.setTitle("气" + CylinderTypeEnum.CYLINDER.getName());
subTreeDto.setValue(CylinderTypeEnum.CYLINDER.getCode());
List<SubTreeDto> children = new ArrayList<>();
for (CylinderTypeEnum value : CylinderTypeEnum.values()) {
if (value.getCode() != CylinderTypeEnum.CYLINDER.getCode()) {
SubTreeDto subTree = new SubTreeDto();
subTree.setTitle(value.getName());
subTree.setValue(value.getCode());
children.add(subTree);
}
}
subTreeDto.setChildren(children);
return subTreeDto;
}
public Map<String, Object> getFillingSubChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<RegionModel> regionModels = stCommonService.setRegionIfRootParentAndNoAccessIf3Level(dpFilterParamForDetailDto.getCityCode());
List<String> xdata = stCommonService.buildXData(regionModels);
List<Double> fillingQuantitys = new ArrayList<>();
List<Double> offloadingVolumes = new ArrayList<>();
String fillingStartTime, fillingEndTime;
if (ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate())) {
fillingStartTime = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 00:00:00";
fillingEndTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 23:59:59";
} else {
fillingStartTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 00:00:00";
fillingEndTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 23:59:59";
}
List<Map<String,Object>> list = getFillingQuantity(dpFilterParamForDetailDto, fillingStartTime, fillingEndTime);
regionModels.forEach(r -> {
//充装量和
List<Map<String, Object>> regionCode = list.stream().filter(e -> e.get("regionCode").toString().contains(r.getRegionCode().toString())).collect(Collectors.toList());
Double fillingQuantity = 0.0d;
if (!CollectionUtils.isEmpty(regionCode)) {
fillingQuantity = regionCode.stream().mapToDouble(e -> Double.valueOf(e.get("fillingQuantity").toString())).sum();
}
//卸液量和
String orgCode = stCommonService.getAndSetOrgCode(r.getRegionCode().toString());
List<String> collect1 = cylinderInfoMapper.queryoffloadingByOrgCode(orgCode, fillingStartTime, fillingEndTime).stream().map(e -> e.getOffloadingVolume()).collect(Collectors.toList());
Double offloadingVolume = collect1.stream().mapToDouble(Double::valueOf).sum();
fillingQuantitys.add(fillingQuantity);
offloadingVolumes.add(offloadingVolume);
});
Set<Map<String,String>> legendData = new HashSet<>();
for (int i = 0; i < 2; i++) {
Map<String, String> map = new HashMap<>();
if (i == 0) {
map.put("dataKey", "fillingQuantity");
map.put("value", "充装量");
map.put("chartType", "bar");
} else {
map.put("dataKey", "offloadingVolume");
map.put("value", "卸液量");
map.put("chartType", "bar");
}
legendData.add(map);
}
Map<String, Object> result = new HashMap<>();
result.put("xdata", xdata);
result.put("fillingQuantity", fillingQuantitys);
result.put("offloadingVolume", offloadingVolumes);
result.put("legendData", legendData);
return result;
}
private List<Map<String, Object>> getFillingQuantity(DPFilterParamForDetailDto dpFilterParamForDetailDto, String fillingStartTime, String fillingEndTime) {
SearchRequest request = new SearchRequest();
request.indices("cylinder_filling");
SearchSourceBuilder builder = new SearchSourceBuilder();
BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
// 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("regionCode", "*" + dpFilterParamForDetailDto.getCityCode() + "*"));
//匹配气瓶类型
if (!ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTreeValue()) && !CylinderTypeEnum.CYLINDER.getCode().equals(dpFilterParamForDetailDto.getTreeValue())) {
BoolQueryBuilder query = QueryBuilders.boolQuery();
// 是车用气瓶,进行in查询(特种气瓶包含以下三个)
if (CylinderTypeEnum.SPECIAL_CYLINDER.getCode().equals(dpFilterParamForDetailDto.getTreeValue())) {
Collection<String> collections = new ArrayList<>();
collections.add("缠绕气瓶");
collections.add("绝热气瓶");
collections.add("内装填料气瓶");
query.must(QueryBuilders.termsQuery("cylinderVarietyName", collections.toArray()));
} else {
String cylinderVarietyName = CylinderTypeEnum.of(dpFilterParamForDetailDto.getTreeValue());
query.must(QueryBuilders.wildcardQuery("cylinderVarietyName", "*" + cylinderVarietyName + "*"));
}
boolMust.must(query);
}
SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN);
//充装时间
if (!ObjectUtils.isEmpty(fillingStartTime) && !ObjectUtils.isEmpty(fillingStartTime) ) {
BoolQueryBuilder query = QueryBuilders.boolQuery();
try {
query.must(QueryBuilders.rangeQuery("inspectionDateMs").gte(sdf.parse(fillingStartTime).getTime()));
query.must(QueryBuilders.rangeQuery("inspectionDateAfterMS").lte(sdf.parse(fillingEndTime).getTime()));
} catch (ParseException e) {
e.printStackTrace();
}
boolMust.must(query);
}
builder.query(boolMust);
builder.sort("inspectionDateMs",SortOrder.DESC);
builder.sort("sequenceNbr",SortOrder.DESC);
builder.trackTotalHits(true);
request.source(builder);
List<Map<String, Object>> list = new LinkedList<>();
try {
SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits()) {
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
Map<String,Object> map = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), Map.class);
list.add(map);
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return list;
}
public Page<ESCylinderFillingRecordDto> getFillingSubPage(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
int current = dpFilterParamForDetailDto.getCurrent();
int pageSize = dpFilterParamForDetailDto.getSize();
Page<ESCylinderFillingRecordDto> result = new Page<>(current, pageSize);
SearchRequest request = new SearchRequest();
request.indices("cylinder_filling");
//通用匹配规则,条件构建
boolean flag = true;
SearchSourceBuilder builder = new SearchSourceBuilder();
BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
//匹配行政区划
if (!org.springframework.util.ObjectUtils.isEmpty(dpFilterParamForDetailDto.getCityCode())) {
flag = false;
BoolQueryBuilder query = QueryBuilders.boolQuery();
query.must(QueryBuilders.wildcardQuery("regionCode", "*" + dpFilterParamForDetailDto.getCityCode() + "*"));
boolMust.must(query);
}
//匹配气瓶充装异常情况(0:正常,1:异常)
if (!org.springframework.util.ObjectUtils.isEmpty(dpFilterParamForDetailDto.getAnomalyType())) {
flag = false;
BoolQueryBuilder query = QueryBuilders.boolQuery();
String status = AnomalyTypeEnum.getEnumByStatus(dpFilterParamForDetailDto.getAnomalyType()).getName();
query.must(QueryBuilders.wildcardQuery("anomalyType", "*" + status + "*"));
boolMust.must(query);
}
//匹配气瓶类型
if (!ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTreeValue()) && !CylinderTypeEnum.CYLINDER.getCode().equals(dpFilterParamForDetailDto.getTreeValue())) {
flag = false;
BoolQueryBuilder query = QueryBuilders.boolQuery();
// 是车用气瓶,进行in查询(特种气瓶包含以下三个)
if (CylinderTypeEnum.SPECIAL_CYLINDER.getCode().equals(dpFilterParamForDetailDto.getTreeValue())) {
Collection<String> collections = new ArrayList<>();
collections.add("缠绕气瓶");
collections.add("绝热气瓶");
collections.add("内装填料气瓶");
query.must(QueryBuilders.termsQuery("cylinderVarietyName", collections.toArray()));
} else {
String cylinderVarietyName = CylinderTypeEnum.of(dpFilterParamForDetailDto.getTreeValue());
query.must(QueryBuilders.wildcardQuery("cylinderVarietyName", "*" + cylinderVarietyName + "*"));
}
boolMust.must(query);
}
String fillingStartTime, fillingEndTime;
if (ObjectUtils.isEmpty(dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate())) {
fillingStartTime = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 00:00:00";
fillingEndTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 23:59:59";
} else {
fillingStartTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 00:00:00";
fillingEndTime = dpFilterParamForDetailDto.getTimeSearchOne().getBeginDate() + " 23:59:59";
}
SimpleDateFormat sdf = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN);
//充装时间
if (!ObjectUtils.isEmpty(fillingStartTime) && !ObjectUtils.isEmpty(fillingEndTime) ) {
flag = false;
BoolQueryBuilder query = QueryBuilders.boolQuery();
try {
query.must(QueryBuilders.rangeQuery("inspectionDateMs").gte(sdf.parse(fillingStartTime).getTime()));
query.must(QueryBuilders.rangeQuery("inspectionDateAfterMS").lte(sdf.parse(fillingEndTime).getTime()));
} catch (ParseException e) {
e.printStackTrace();
}
boolMust.must(query);
}
if (flag) { // 搜索全部
boolMust.must(QueryBuilders.matchAllQuery());
}
builder.query(boolMust);
builder.sort("inspectionDateMs", SortOrder.DESC);
builder.sort("sequenceNbr",SortOrder.DESC);
builder.from((current - 1) * pageSize);
builder.size(pageSize);
builder.trackTotalHits(true);
request.source(builder);
List<ESCylinderFillingRecordDto> list = new LinkedList<>();
long totle = 0;
try {
SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (SearchHit hit : response.getHits()) {
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
ESCylinderFillingRecordDto esCylinderFillingRecordDto1 = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderFillingRecordDto.class);
list.add(esCylinderFillingRecordDto1);
}
totle = response.getInternalResponse().hits().getTotalHits().value;
result.setRecords(list);
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
}
return result;
}
public List<Map<String,Object>> getFillingSubAnomalyType() {
List<Map<String,Object>> result = new ArrayList<>();
for (AnomalyTypeEnum value : AnomalyTypeEnum.values()) {
Map<String,Object> map = new HashMap<>();
map.put("value",value.getCode());
map.put("label",value.getName());
result.add(map);
}
return result;
}
public SubTreeDto getStationRateSubTree() {
SubTreeDto subTreeDto = new SubTreeDto();
subTreeDto.setTitle("企业类型");
subTreeDto.setValue("");
List<SubTreeDto> children = new ArrayList<>();
SubTreeDto subTree = new SubTreeDto();
subTree.setTitle("充装企业");
subTree.setValue("1231");
children.add(subTree);
subTreeDto.setChildren(children);
return subTreeDto;
}
public Map<String, Object> getStationRateSubChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<RegionModel> regionModels = stCommonService.setRegionIfRootParentAndNoAccessIf3Level(dpFilterParamForDetailDto.getCityCode());
List<String> xdata = stCommonService.buildXData(regionModels);
List<String> counts = new ArrayList<>();
List<String> stationRates = new ArrayList<>();
List<RegionModel> regionList = stCommonService.setRegionIfRootParent(dpFilterParamForDetailDto.getCityCode());
List<Map<String,Object>> returnList = regionList.parallelStream().map(r -> {
String orgCode = stCommonService.getAndSetOrgCode(r.getRegionCode().toString());
Map<String, Object> item = new HashMap<>();
item.put("regionCode", r.getRegionCode());
getStationRate(orgCode, item);
return item;
}).collect(Collectors.toList());
regionModels.forEach(r -> {
String count = returnList.stream().filter(e -> e.get("regionCode").toString().equals(r.getRegionCode().toString())).collect(Collectors.toList()).get(0).get("totalNum").toString();
String stationRate = returnList.stream().filter(e -> e.get("regionCode").toString().equals(r.getRegionCode().toString())).collect(Collectors.toList()).get(0).get("stationRate").toString();
counts.add(count);
stationRates.add(stationRate);
});
Map<String, Object> result = new HashMap<>();
Set<Map<String,String>> legendData = new HashSet<>();
for (int i = 0; i < 2; i++) {
Map<String, String> map = new HashMap<>();
if (i == 0) {
map.put("dataKey", "count");
map.put("value", "对接企业数量");
map.put("chartType", "bar");
} else {
map.put("dataKey", "stationRate");
map.put("value", "对接率");
map.put("chartType", "line");
}
legendData.add(map);
}
result.put("legendData", legendData);
result.put("xdata", xdata);
result.put("count", counts);
result.put("stationRate", stationRates);
return result;
}
public IPage<TzBaseEnterpriseInfoDto> getStationRateSubPage(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
Page<TzBaseEnterpriseInfoDto> page = new Page<>(dpFilterParamForDetailDto.getCurrent(), dpFilterParamForDetailDto.getSize());
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamForDetailDto.getCityCode());
if(ObjectUtils.isEmpty(orgCode)){
return null;
} }
result.put("totalNum",totalNum); IPage<TzBaseEnterpriseInfoDto> result = cylinderStatisticsMapper.getStationRateSubPage(page, dpFilterParamForDetailDto.getCompanyName(), orgCode);
result.put("count",count);
return result; return result;
} }
} }
\ No newline at end of file
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{useUnit}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "监管码",
......
...@@ -134,23 +134,25 @@ ...@@ -134,23 +134,25 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{PRODUCT_NAME}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "监管码",
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }
], ],
"infoRecords": { "infoRecords": {
"title": "监管记录", "title": "监管记录",
......
...@@ -138,46 +138,49 @@ ...@@ -138,46 +138,49 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{PRODUCT_NAME}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "监管码",
"problem": [] "problem": []
}, },
"keyParams_default": [ "keyParams_default": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
], { "key": "ADDRESS", "label": "设备使用地点" },
"keyParams_2300_true": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" }, { "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" }, { "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }
],
"keyParams_2300_true": [
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
], ],
"keyParams_2300_false": [ "keyParams_2300_false": [
{ "key": "EQU_TYPE", "label": "气瓶品种" },
{ "key": "PRODUCT_NAME", "label": "产品名称" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" }, { "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" }, { "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "NEXT_INSPECTION_DATE", "label": "下次检验日期" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "CAR_NUMBER", "label": "车牌号" }, { "key": "CAR_NUMBER", "label": "车牌号" },
{ "key": "IDENTIFICATION_CODE", "label": "车辆VIN码" }, { "key": "IDENTIFICATION_CODE", "label": "车辆VIN码" },
{ "key": "EQU_TYPE", "label": "气瓶品种" },
{ "key": "PRODUCT_NAME", "label": "产品名称" },
{ "key": "GAS_NUM", "label": "气瓶数量" }, { "key": "GAS_NUM", "label": "气瓶数量" },
{ "key": "FILLING_MEDIUM", "label": "充装介质" }, { "key": "FILLING_MEDIUM", "label": "充装介质" }
{ "key": "NEXT_INSPECTION_DATE", "label": "下次检验日期" }
], ],
"infoRecords": { "infoRecords": {
"title": "监管记录", "title": "监管记录",
......
...@@ -134,25 +134,27 @@ ...@@ -134,25 +134,27 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{PRODUCT_NAME}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "监管码",
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" },
{ "key": "ME_UNIT_NAME", "label": "维保单位名称" }, { "key": "ME_UNIT_NAME", "label": "维保单位名称" },
{ "key": "INFORM_END", "label": "维保备案有效期" }, { "key": "INFORM_END", "label": "维保备案有效期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "USE_INNER_CODE", "label": "单位内编号" }
], ],
"infoRecords": { "infoRecords": {
"title": "监管记录", "title": "监管记录",
......
...@@ -130,23 +130,25 @@ ...@@ -130,23 +130,25 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{PRODUCT_NAME}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "监管码",
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }
], ],
"infoRecords": { "infoRecords": {
"title": "监管记录", "title": "监管记录",
......
...@@ -126,23 +126,25 @@ ...@@ -126,23 +126,25 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{PRODUCT_NAME}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "监管码",
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }
], ],
"infoRecords": { "infoRecords": {
"title": "监管记录", "title": "监管记录",
......
...@@ -120,23 +120,25 @@ ...@@ -120,23 +120,25 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{PRODUCT_NAME}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "监管码",
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }
], ],
"infoRecords": { "infoRecords": {
"title": "监管记录", "title": "监管记录",
......
...@@ -126,31 +126,34 @@ ...@@ -126,31 +126,34 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{PRODUCT_NAME}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "监管码",
"problem": [] "problem": []
}, },
"keyParams_default": [ "keyParams_default": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
], { "key": "ADDRESS", "label": "设备使用地点" },
"keyParams_8300": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" }, { "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" }, { "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }
],
"keyParams_8300": [
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" }, { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" }, { "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
], ],
"infoRecords": { "infoRecords": {
......
...@@ -126,23 +126,25 @@ ...@@ -126,23 +126,25 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{PRODUCT_NAME}",
"status": [], "status": [],
"qrcode": { "qrcode": {
"title": "监管码", "title": "监管码",
"problem": [] "problem": []
}, },
"keyParams": [ "keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" }, { "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" }, { "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" }, { "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }, { "key": "PRODUCT_NAME", "label": "设备名称", "source": "param" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" }, { "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" } { "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" }
], ],
"infoRecords": { "infoRecords": {
"title": "监管记录", "title": "监管记录",
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
], ],
"content": { "content": {
"keyinfo": { "keyinfo": {
"title": "{principalUnit}",
"keyParams": [ "keyParams": [
{ "key": "sourceType", "label": "隐患主体类型" }, { "key": "sourceType", "label": "隐患主体类型" },
{ "key": "problemType", "label": "隐患类型" }, { "key": "problemType", "label": "隐患类型" },
......
...@@ -89,7 +89,11 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> { ...@@ -89,7 +89,11 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
Integer getInfoTotal(); Integer getInfoTotal();
List<CylinderFillingRecordStatisticsDto> queryFillingRecordByOrgCode(@Param("orgCode") String orgCode, @Param("startTime") String startTime); List<CylinderFillingRecordStatisticsDto> queryFillingRecordByOrgCode(@Param("orgCode") String orgCode,
@Param("startTime") String startTime,
@Param("endTime") String endTime);
List<CylinderFillingRecordStatisticsDto> queryoffloadingByOrgCode(@Param("orgCode") String orgCode, @Param("startTime") String startTime); List<CylinderFillingRecordStatisticsDto> queryoffloadingByOrgCode(@Param("orgCode") String orgCode,
@Param("startTime") String startTime,
@Param("endTime") String endTime);
} }
...@@ -347,7 +347,10 @@ ...@@ -347,7 +347,10 @@
tz_base_enterprise_info i tz_base_enterprise_info i
WHERE WHERE
i.app_id = f.app_id i.app_id = f.app_id
AND f.filling_endtime >= concat(#{startTime}, ' 00:00:00') AND f.filling_endtime <![CDATA[>=]]> concat(#{startTime}, ' 00:00:00')
<if test="endTime != null and endTime != '' ">
AND f.filling_endtime <![CDATA[<=]]> concat(#{endTime}, ' 00:00:00')
</if>
AND i.org_code like concat(#{orgCode}, '%') AND i.org_code like concat(#{orgCode}, '%')
GROUP BY GROUP BY
filling_time filling_time
...@@ -358,13 +361,16 @@ ...@@ -358,13 +361,16 @@
<select id="queryoffloadingByOrgCode" resultType="com.yeejoin.amos.boot.module.common.api.dto.CylinderFillingRecordStatisticsDto"> <select id="queryoffloadingByOrgCode" resultType="com.yeejoin.amos.boot.module.common.api.dto.CylinderFillingRecordStatisticsDto">
SELECT SELECT
f.statistics_sync_date filling_time, f.statistics_sync_date filling_time,
SUM ( f.offloading_volume ) filling_quantity SUM ( f.offloading_volume ) offloading_volume
FROM FROM
tz_cylinder_offloading f, tz_cylinder_offloading f,
tz_base_enterprise_info i tz_base_enterprise_info i
WHERE WHERE
i.app_id = f.app_id i.app_id = f.app_id
AND f.statistics_sync_date >= #{startTime} AND f.statistics_sync_date <![CDATA[>=]]> #{startTime}
<if test="endTime != null and endTime != '' ">
AND f.statistics_sync_date <![CDATA[<=]]> #{endTime}
</if>
AND i.org_code like concat(#{orgCode}, '%') AND i.org_code like concat(#{orgCode}, '%')
GROUP BY GROUP BY
filling_time filling_time
......
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