Commit 4b46bb57 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 8245468d e3a3f46c
package com.yeejoin.amos.boot.module.common.api.constant;
/**
* @author Administrator
*/
public class TZSCommonConstant {
/**
* 陕西省行政区划编码
*/
public final static String SHAN_XI_REGION_CODE = "610000";
}
package com.yeejoin.amos.boot.module.common.api.enums;
import lombok.Getter;
/**
* 提级后需要处理数据的行政区划
*/
@Getter
public enum ReginExcludeStepEnum {
/**
* 渭南市
*/
WEINAN("610500", "渭南市"),
/**
* 咸阳市
*/
XIANYANG("610400", "咸阳市");
private final String code;
private final String name;
ReginExcludeStepEnum(String code, String name) {
this.code = code;
this.name = name;
}
}
package com.yeejoin.amos.boot.module.common.api.enums;
import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import lombok.Getter;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* 需要提级的行政区划
*/
......@@ -11,16 +16,15 @@ public enum ReginStepEnum {
/**
* 杨凌区
*/
YANGLING("610403", "杨陵区","map"),
YANGLING("610403", "杨陵区", "map"),
/**
* 西咸新区
*/
XIXIAN("617000", "西咸新区","other"),
XIXIAN("617000", "西咸新区", "map"),
/**
* 韩城市
*/
HANCHENG("610581", "韩城市","map");
HANCHENG("610581", "韩城市", "map");
private final String code;
......@@ -29,9 +33,18 @@ public enum ReginStepEnum {
private final String type;
ReginStepEnum(String code, String name,String type) {
ReginStepEnum(String code, String name, String type) {
this.code = code;
this.name = name;
this.type = type;
}
public static List<RegionModel> enum2RegionList(String type) {
return Arrays.stream(ReginStepEnum.values()).filter(e -> e.getType().equals(type)).map(e -> {
RegionModel regionModel = new RegionModel();
regionModel.setRegionCode(Integer.parseInt(e.getCode()));
regionModel.setRegionName(e.getName());
return regionModel;
}).collect(Collectors.toList());
}
}
......@@ -955,11 +955,31 @@
<select id="countBizFinishedNumForDP" resultType="java.lang.Long">
SELECT count(1) FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616' and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_le(CAST(handle_date as date),#{dto.endDate})
union all
SELECT count(1) FROM "tz_jyjc_inspection_application" a, tz_base_enterprise_info b where a.inspection_unit_code= b.use_unit_code and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status = '6616' and a.biz_type = 'supervise' and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_le(CAST(a.accept_date as date),#{dto.endDate})
SELECT
count(1)
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.biz_type = 'supervise'
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
union all
SELECT count(1) FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
union all
SELECT count(1) FROM "tz_jyjc_inspection_application" a, tz_base_enterprise_info b where a.inspection_unit_code= b.use_unit_code and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status = '6616' and a.inspection_type = 'DQJY' and date_ge(CAST(a.accept_date as date),#{dto.beginDate}) and date_le(CAST(a.accept_date as date),#{dto.endDate})
SELECT
count(1)
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.inspection_type = 'DQJY'
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
union all
select sum(num) from (
select count(1) as num from tzs_jg_change_registration_name a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%') and a.audit_status = '已完成' and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
......@@ -976,11 +996,33 @@
<select id="countAllInFlowingForDPNoFinishedBizData" resultType="java.lang.Long">
SELECT count(1) FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status != '6610' and notice_status != '6615' and notice_status != '6617' and notice_status != '6616' and date_ge(CAST(notice_date as date),#{dto.beginDate}) and date_le(CAST(notice_date as date),#{dto.endDate})
union all
SELECT count(1) FROM "tz_jyjc_inspection_application" a, tz_base_enterprise_info b where a.inspection_unit_code= b.use_unit_code and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.status != '6616' and a.biz_type = 'supervise' and date_ge(CAST(a.application_date as date),#{dto.beginDate}) and date_le(CAST(a.application_date as date),#{dto.endDate})
SELECT
count(1)
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.status != '6616'
and a.biz_type = 'supervise'
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
and date_le(CAST(a.application_date as date),#{dto.endDate})
union all
SELECT count(1) FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status = '已完成' and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_le(CAST(reg_date as date),#{dto.endDate})
union all
SELECT count(1) FROM "tz_jyjc_inspection_application" a, tz_base_enterprise_info b where a.inspection_unit_code= b.use_unit_code and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.status != '6616' and a.inspection_type = 'DQJY' and date_ge(CAST(a.application_date as date),#{dto.beginDate}) and date_le(CAST(a.application_date as date),#{dto.endDate})
SELECT
count(1)
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
where
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.status != '6616'
and a.inspection_type = 'DQJY'
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
and date_le(CAST(a.application_date as date),#{dto.endDate})
union all
select sum(num) from (
select count(1) as num from tzs_jg_change_registration_name a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%') and a.audit_status != '使用单位已撤回' and a.audit_status != '使用单位待提交' and a.audit_status !='已作废' and a.audit_status !='已完成' and date_ge(CAST(a.apply_date as date),#{dto.beginDate}) and date_le(CAST(a.apply_date as date),#{dto.endDate})
......
......@@ -2,8 +2,10 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.date.DateUtil;
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.dto.LegendDataDto;
import com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.FourColorCountDataDto;
import com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum;
......@@ -87,6 +89,18 @@ public class DPStatisticsServiceImpl {
*/
private final static String COMPANY_TYPE_FILLING = "充装单位";
/**
* 监管-中屏-地图行政区划code
*/
private final static String REGION_CODE = "regionCode";
/**
* 监管-中屏-地图行政区划code
*/
private final static String REGION_NAME = "regionName";
@Autowired
private EquipmentCategoryMapper equipmentCategoryMapper;
......@@ -393,7 +407,8 @@ public class DPStatisticsServiceImpl {
}
public List<Map<String, Object>> getCenterMapCountDataForOverview(DPFilterParamDto dpFilterParamDto) {
List<Map<String, Object>> result = regionModels.parallelStream().filter(e -> e.getParentRegionCode() != null && (e.getParentRegionCode().toString()).equals(dpFilterParamDto.getCityCode())).map(r -> {
List<RegionModel> regionModels = this.setRegionIfRootParent(dpFilterParamDto);
List<Map<String, Object>> result = regionModels.parallelStream().map(r -> {
DPFilterParamDto filterParamDto = new DPFilterParamDto();
filterParamDto.setCityCode(r.getRegionCode().toString());
Map<String, Object> itemResult = getCenterMapOverviewData(filterParamDto);
......@@ -407,6 +422,16 @@ public class DPStatisticsServiceImpl {
return result;
}
private List<RegionModel> setRegionIfRootParent(DPFilterParamDto dpFilterParamDto) {
List<RegionModel> regions = regionModels.parallelStream().filter(e -> e.getParentRegionCode() != null && (e.getParentRegionCode().toString()).equals(dpFilterParamDto.getCityCode())).collect(Collectors.toList());
// 陕西省时需要在地图返回独立的地级市:韩城、杨凌、西咸
if (dpFilterParamDto.getCityCode().equals(TZSCommonConstant.SHAN_XI_REGION_CODE)) {
List<RegionModel> independentRegions = ReginStepEnum.enum2RegionList("map");
regions.addAll(independentRegions);
}
return regions;
}
private void setCompanyDataBatch(List<Map<String, Object>> result) {
List<CountDto> countDtos = enterpriseInfoMapper.countByUnitTypeAndOrgCodeNoParam();
......@@ -636,11 +661,11 @@ public class DPStatisticsServiceImpl {
BigDecimal finish = new BigDecimal(String.valueOf(allFinishedCount));
BigDecimal flowing = new BigDecimal(String.valueOf(allBizDataInFlowingCount));
BigDecimal total = finish.add(flowing);
if(total.compareTo(BigDecimal.ZERO) > 0){
if (total.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal result = finish.divide(total, 2, RoundingMode.HALF_UP);
BigDecimal percentage = result.multiply(new BigDecimal("100")).setScale(0, RoundingMode.HALF_UP);
return percentage.toPlainString();
} else {
} else {
return "0";
}
}
......@@ -672,8 +697,8 @@ public class DPStatisticsServiceImpl {
return orgCode;
}
public List<Map<String,Object>> equStateCount(DPFilterParamDto dpFilterParamDto) {
List<Map<String,Object>> resultList = new ArrayList<>();
public List<Map<String, Object>> equStateCount(DPFilterParamDto dpFilterParamDto) {
List<Map<String, Object>> resultList = new ArrayList<>();
SearchRequest request = new SearchRequest();
request.indices("idx_biz_view_jg_all");
BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
......@@ -703,17 +728,17 @@ public class DPStatisticsServiceImpl {
* 4 注销
* 0 未登记
*/
for(int i = 0; i < 5; i++){
Map<String,Object> map = new HashMap();
if(i == 0){
for (int i = 0; i < 5; i++) {
Map<String, Object> map = new HashMap();
if (i == 0) {
map.put("name", "未登记");
}else if(i == 1){
} else if (i == 1) {
map.put("name", "在用");
}else if(i == 2){
} else if (i == 2) {
map.put("name", "停用");
}else if(i == 3){
} else if (i == 3) {
map.put("name", "报废");
}else if(i == 4){
} else if (i == 4) {
map.put("name", "注销");
}
map.put("value", dataMap.getOrDefault(String.valueOf(i), 0L));
......@@ -726,7 +751,7 @@ public class DPStatisticsServiceImpl {
return resultList;
}
public Map<String,Object> equStopStateCount(DPFilterParamDto dpFilterParamDto) {
public Map<String, Object> equStopStateCount(DPFilterParamDto dpFilterParamDto) {
SearchRequest request = new SearchRequest();
request.indices("idx_biz_view_jg_all");
BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
......@@ -742,17 +767,17 @@ public class DPStatisticsServiceImpl {
.subAggregation(AggregationBuilders.terms("EQU_LIST_CODE_COUNT").field("EQU_LIST_CODE"));
builder.aggregation(aggregationBuilder);
request.source(builder);
try{
try {
SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
Terms terms = response.getAggregations().get("EQU_STATE_COUNT");
Map<String, Long> dataMap = new HashMap<>();
for (Terms.Bucket bucket : terms.getBuckets()) {
String category = bucket.getKeyAsString(); // 或者使用 bucket.getKey() 对于非字符串类型
Terms subTerms = bucket.getAggregations().get("EQU_LIST_CODE_COUNT");
for(Terms.Bucket subBucket :subTerms.getBuckets()){
for (Terms.Bucket subBucket : subTerms.getBuckets()) {
String subCategory = subBucket.getKeyAsString();
long docCount = subBucket.getDocCount();
dataMap.put(category+"#"+subCategory, docCount);
dataMap.put(category + "#" + subCategory, docCount);
}
}
/**
......@@ -773,18 +798,18 @@ public class DPStatisticsServiceImpl {
* 4 注销
* 3 报废
*/
List<Map<String,Object>> legendDataList = new ArrayList<>();
for(int i = 0; i < 3; i++){
Map<String,Object> map = new HashMap();
if(i == 0){
map.put("dataKey","stop");
map.put("name","停用");
}else if(i == 1){
map.put("dataKey","logout");
map.put("name","注销");
}else if(i == 2){
map.put("dataKey","scrap");
map.put("name","报废");
List<Map<String, Object>> legendDataList = new ArrayList<>();
for (int i = 0; i < 3; i++) {
Map<String, Object> map = new HashMap();
if (i == 0) {
map.put("dataKey", "stop");
map.put("name", "停用");
} else if (i == 1) {
map.put("dataKey", "logout");
map.put("name", "注销");
} else if (i == 2) {
map.put("dataKey", "scrap");
map.put("name", "报废");
}
legendDataList.add(map);
}
......@@ -792,247 +817,247 @@ public class DPStatisticsServiceImpl {
List<Object> stop = new ArrayList<>();
List<Object> logout = new ArrayList<>();
List<Object> scrap = new ArrayList<>();
for(int i = 0; i < 9; i++){
if(i == 0){
for (int i = 0; i < 9; i++) {
if (i == 0) {
stop.add(dataMap.getOrDefault("2#2300", 0L));
logout.add(dataMap.getOrDefault("4#2300", 0L));
scrap.add(dataMap.getOrDefault("3#2300", 0L));
}else if(i == 1){
} else if (i == 1) {
stop.add(dataMap.getOrDefault("2#3000", 0L));
logout.add(dataMap.getOrDefault("4#3000", 0L));
scrap.add(dataMap.getOrDefault("3#3000", 0L));
}else if(i == 2){
stop.add(dataMap.getOrDefault("2#2000", 0L)-dataMap.getOrDefault("2#2300", 0L));
logout.add(dataMap.getOrDefault("4#2000", 0L)-dataMap.getOrDefault("4#2300", 0L));
scrap.add(dataMap.getOrDefault("3#2000", 0L)-dataMap.getOrDefault("3#2300", 0L));
}else if(i == 3){
} else if (i == 2) {
stop.add(dataMap.getOrDefault("2#2000", 0L) - dataMap.getOrDefault("2#2300", 0L));
logout.add(dataMap.getOrDefault("4#2000", 0L) - dataMap.getOrDefault("4#2300", 0L));
scrap.add(dataMap.getOrDefault("3#2000", 0L) - dataMap.getOrDefault("3#2300", 0L));
} else if (i == 3) {
stop.add(dataMap.getOrDefault("2#1000", 0L));
logout.add(dataMap.getOrDefault("4#1000", 0L));
scrap.add(dataMap.getOrDefault("3#1000", 0L));
}else if(i == 4){
} else if (i == 4) {
stop.add(dataMap.getOrDefault("2#4000", 0L));
logout.add(dataMap.getOrDefault("4#4000", 0L));
scrap.add(dataMap.getOrDefault("3#4000", 0L));
}else if(i == 5){
} else if (i == 5) {
stop.add(dataMap.getOrDefault("2#5000", 0L));
logout.add(dataMap.getOrDefault("4#5000", 0L));
scrap.add(dataMap.getOrDefault("3#5000", 0L));
}else if(i == 6){
} else if (i == 6) {
stop.add(dataMap.getOrDefault("2#6000", 0L));
logout.add(dataMap.getOrDefault("4#6000", 0L));
scrap.add(dataMap.getOrDefault("3#6000", 0L));
}else if(i == 7){
} else if (i == 7) {
stop.add(dataMap.getOrDefault("2#8000", 0L));
logout.add(dataMap.getOrDefault("4#8000", 0L));
scrap.add(dataMap.getOrDefault("3#8000", 0L));
}else if(i == 8){
} else if (i == 8) {
stop.add(dataMap.getOrDefault("2#9000", 0L));
logout.add(dataMap.getOrDefault("4#9000", 0L));
scrap.add(dataMap.getOrDefault("3#9000", 0L));
}
}
Map<String,Object> returnMap = new HashMap<>();
Map<String, Object> returnMap = new HashMap<>();
returnMap.put("legendData", legendDataList);
returnMap.put("xdata", xDataList);
returnMap.put("stop",stop);
returnMap.put("logout",logout);
returnMap.put("scrap",scrap);
returnMap.put("stop", stop);
returnMap.put("logout", logout);
returnMap.put("scrap", scrap);
return returnMap;
}catch (Exception e){
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public List<Map<String,Object>> maintenanceCountTopTen(DPFilterParamDto dpFilterParamDto) {
List<Map<String,Object>> list = dpStatisticsMapper.maintenanceCountTopTen(dpFilterParamDto);
List<Map<String,Object>> resultList = new ArrayList<>();
for(int i = 0; i < list.size(); i++){
Map<String,Object> result = new HashMap<>();
result.put("key",i);
result.put("city",list.get(i).get("regionName"));
result.put("count",list.get(i).get("count"));
result.put("name",list.get(i).get("companyName"));
public List<Map<String, Object>> maintenanceCountTopTen(DPFilterParamDto dpFilterParamDto) {
List<Map<String, Object>> list = dpStatisticsMapper.maintenanceCountTopTen(dpFilterParamDto);
List<Map<String, Object>> resultList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
Map<String, Object> result = new HashMap<>();
result.put("key", i);
result.put("city", list.get(i).get("regionName"));
result.put("count", list.get(i).get("count"));
result.put("name", list.get(i).get("companyName"));
resultList.add(result);
}
return resultList;
}
public Map<String,Object> maintenanceCount(DPFilterParamDto dpFilterParamDto) {
List<Map<String,Object>> list = dpStatisticsMapper.maintenanceCount(dpFilterParamDto);
Map<String,Object> resultMap = new HashMap<>();
public Map<String, Object> maintenanceCount(DPFilterParamDto dpFilterParamDto) {
List<Map<String, Object>> list = dpStatisticsMapper.maintenanceCount(dpFilterParamDto);
Map<String, Object> resultMap = new HashMap<>();
List xList = new ArrayList();
List yList = new ArrayList();
for(int i = 0; i < list.size(); i++){
for (int i = 0; i < list.size(); i++) {
xList.add(list.get(i).get("regionName"));
yList.add(list.get(i).get("count"));
}
resultMap.put("xdata",xList);
resultMap.put("ydata",yList);
resultMap.put("xdata", xList);
resultMap.put("ydata", yList);
return resultMap;
}
public Map<String,Object> cityBusinessCount(DPFilterParamDto dpFilterParamDto) {
Map<String,Object> resultMap = new HashMap<>();
public Map<String, Object> cityBusinessCount(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> resultMap = new HashMap<>();
/**
* 业务类型0告知管理,1使用登记,2变更登记,3停用启用,4注销报废
*/
if("0".equals(dpFilterParamDto.getBusinessKey())){
resultMap = noticeCount(resultMap,dpFilterParamDto.getCityCode());
}else if("1".equals(dpFilterParamDto.getBusinessKey())){
resultMap = useCount(resultMap,dpFilterParamDto.getCityCode());
}else if("2".equals(dpFilterParamDto.getBusinessKey())){
resultMap = changeCount(resultMap,dpFilterParamDto.getCityCode());
}else if("3".equals(dpFilterParamDto.getBusinessKey())){
resultMap = disableCount(resultMap,dpFilterParamDto.getCityCode());
}else if("4".equals(dpFilterParamDto.getBusinessKey())){
resultMap = cancelCount(resultMap,dpFilterParamDto.getCityCode());
if ("0".equals(dpFilterParamDto.getBusinessKey())) {
resultMap = noticeCount(resultMap, dpFilterParamDto.getCityCode());
} else if ("1".equals(dpFilterParamDto.getBusinessKey())) {
resultMap = useCount(resultMap, dpFilterParamDto.getCityCode());
} else if ("2".equals(dpFilterParamDto.getBusinessKey())) {
resultMap = changeCount(resultMap, dpFilterParamDto.getCityCode());
} else if ("3".equals(dpFilterParamDto.getBusinessKey())) {
resultMap = disableCount(resultMap, dpFilterParamDto.getCityCode());
} else if ("4".equals(dpFilterParamDto.getBusinessKey())) {
resultMap = cancelCount(resultMap, dpFilterParamDto.getCityCode());
}
return resultMap;
}
private Map<String, Object> cancelCount(Map<String, Object> resultMap, String cityCode) {
Map<String,Integer> countMap = new HashMap<>();
Map<String, Integer> countMap = new HashMap<>();
//注销报废
List<Map<String,Object>> cancelList = dpStatisticsMapper.cancelCount(cityCode);
countByMap(countMap,cancelList);
List<Map<String, Object>> cancelList = dpStatisticsMapper.cancelCount(cityCode);
countByMap(countMap, cancelList);
List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>();
countMap.forEach((k,v)->{
countMap.forEach((k, v) -> {
xDataList.add(k);
yDataList.add(v);
});
resultMap.put("xdata",xDataList);
resultMap.put("ydata",yDataList);
resultMap.put("xdata", xDataList);
resultMap.put("ydata", yDataList);
return resultMap;
}
private Map<String, Object> disableCount(Map<String, Object> resultMap, String cityCode) {
Map<String,Integer> countMap = new HashMap<>();
Map<String, Integer> countMap = new HashMap<>();
//启用停用
List<Map<String,Object>> disableList = dpStatisticsMapper.disableCount(cityCode);
countByMap(countMap,disableList);
List<Map<String, Object>> disableList = dpStatisticsMapper.disableCount(cityCode);
countByMap(countMap, disableList);
List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>();
countMap.forEach((k,v)->{
countMap.forEach((k, v) -> {
xDataList.add(k);
yDataList.add(v);
});
resultMap.put("xdata",xDataList);
resultMap.put("ydata",yDataList);
resultMap.put("xdata", xDataList);
resultMap.put("ydata", yDataList);
return resultMap;
}
private Map<String, Object> changeCount(Map<String, Object> resultMap, String cityCode) {
Map<String,Integer> countMap = new HashMap<>();
Map<String, Integer> countMap = new HashMap<>();
//更名变更登记
List<Map<String,Object>>changeNameList = dpStatisticsMapper.changeNameCount(cityCode);
countByMap(countMap,changeNameList);
List<Map<String, Object>> changeNameList = dpStatisticsMapper.changeNameCount(cityCode);
countByMap(countMap, changeNameList);
//改造变更登记
List<Map<String,Object>> reformList = dpStatisticsMapper.changeReformCount(cityCode);
countByMap(countMap,reformList);
List<Map<String, Object>> reformList = dpStatisticsMapper.changeReformCount(cityCode);
countByMap(countMap, reformList);
//移装变更登记
List<Map<String,Object>> transferList = dpStatisticsMapper.changeTransferCount(cityCode);
countByMap(countMap,transferList);
List<Map<String, Object>> transferList = dpStatisticsMapper.changeTransferCount(cityCode);
countByMap(countMap, transferList);
//单位变更登记
List<Map<String,Object>> unitList = dpStatisticsMapper.changeUnitCount(cityCode);
countByMap(countMap,unitList);
List<Map<String, Object>> unitList = dpStatisticsMapper.changeUnitCount(cityCode);
countByMap(countMap, unitList);
//单位变更登记
List<Map<String,Object>> vehicleList = dpStatisticsMapper.changeVehicleCount(cityCode);
countByMap(countMap,vehicleList);
List<Map<String, Object>> vehicleList = dpStatisticsMapper.changeVehicleCount(cityCode);
countByMap(countMap, vehicleList);
List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>();
countMap.forEach((k,v)->{
countMap.forEach((k, v) -> {
xDataList.add(k);
yDataList.add(v);
});
resultMap.put("xdata",xDataList);
resultMap.put("ydata",yDataList);
resultMap.put("xdata", xDataList);
resultMap.put("ydata", yDataList);
return resultMap;
}
private Map<String, Object> useCount(Map<String, Object> resultMap, String cityCode) {
Map<String,Integer> countMap = new HashMap<>();
Map<String, Integer> countMap = new HashMap<>();
//使用登记
List<Map<String,Object>> useList = dpStatisticsMapper.useCount(cityCode);
countByMap(countMap,useList);
List<Map<String, Object>> useList = dpStatisticsMapper.useCount(cityCode);
countByMap(countMap, useList);
//气瓶登记
List<Map<String,Object>> vehicleList = dpStatisticsMapper.vehicleCount(cityCode);
countByMap(countMap,vehicleList);
List<Map<String, Object>> vehicleList = dpStatisticsMapper.vehicleCount(cityCode);
countByMap(countMap, vehicleList);
List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>();
countMap.forEach((k,v)->{
countMap.forEach((k, v) -> {
xDataList.add(k);
yDataList.add(v);
});
resultMap.put("xdata",xDataList);
resultMap.put("ydata",yDataList);
resultMap.put("xdata", xDataList);
resultMap.put("ydata", yDataList);
return resultMap;
}
private Map<String, Object> noticeCount(Map<String, Object> resultMap, String cityCode) {
Map<String,Integer> countMap = new HashMap<>();
Map<String, Integer> countMap = new HashMap<>();
//安装告知
List<Map<String,Object>> installlist = dpStatisticsMapper.installCount(cityCode);
countByMap(countMap,installlist);
List<Map<String, Object>> installlist = dpStatisticsMapper.installCount(cityCode);
countByMap(countMap, installlist);
//维修告知
List<Map<String,Object>> maintenancelist = dpStatisticsMapper.maintenanceNoticeCount(cityCode);
countByMap(countMap,maintenancelist);
List<Map<String, Object>> maintenancelist = dpStatisticsMapper.maintenanceNoticeCount(cityCode);
countByMap(countMap, maintenancelist);
//改造告知
List<Map<String,Object>> reformlist = dpStatisticsMapper.reformCount(cityCode);
countByMap(countMap,reformlist);
List<Map<String, Object>> reformlist = dpStatisticsMapper.reformCount(cityCode);
countByMap(countMap, reformlist);
//移装告知
List<Map<String,Object>> transferlist = dpStatisticsMapper.transferCount(cityCode);
countByMap(countMap,transferlist);
List<Map<String, Object>> transferlist = dpStatisticsMapper.transferCount(cityCode);
countByMap(countMap, transferlist);
List<Object> xDataList = new ArrayList<>();
List<Object> yDataList = new ArrayList<>();
countMap.forEach((k,v)->{
countMap.forEach((k, v) -> {
xDataList.add(k);
yDataList.add(v);
});
resultMap.put("xdata",xDataList);
resultMap.put("ydata",yDataList);
resultMap.put("xdata", xDataList);
resultMap.put("ydata", yDataList);
return resultMap;
}
private void countByMap(Map<String,Integer> countMap, List<Map<String,Object>> list){
for(int i = 0; i < list.size(); i++){
if(null == countMap.get(list.get(i).get("regionName"))){
countMap.put(list.get(i).get("regionName").toString(),Integer.valueOf(list.get(i).get("count")+""));
}else{
countMap.put(list.get(i).get("regionName").toString(),countMap.get(list.get(i).get("regionName").toString())+Integer.valueOf(list.get(i).get("count")+""));
private void countByMap(Map<String, Integer> countMap, List<Map<String, Object>> list) {
for (int i = 0; i < list.size(); i++) {
if (null == countMap.get(list.get(i).get("regionName"))) {
countMap.put(list.get(i).get("regionName").toString(), Integer.valueOf(list.get(i).get("count") + ""));
} else {
countMap.put(list.get(i).get("regionName").toString(), countMap.get(list.get(i).get("regionName").toString()) + Integer.valueOf(list.get(i).get("count") + ""));
}
}
}
public List<Map<String,Object>> getBusinessKey(DPFilterParamDto dpFilterParamDto) {
List<Map<String,Object>> resultList = new ArrayList<>();
public List<Map<String, Object>> getBusinessKey(DPFilterParamDto dpFilterParamDto) {
List<Map<String, Object>> resultList = new ArrayList<>();
/**
* 告知管理、使用登记、变更登记、停用启用、注销报废
*/
for(int i = 0; i < 5; i++){
Map<String,Object> result = new HashMap<>();
if(i == 0){
result.put("key",i+"");
result.put("name","告知管理");
}else if(i == 1){
result.put("key",i+"");
result.put("name","使用登记");
}else if(i == 2){
result.put("key",i+"");
result.put("name","变更登记");
}else if(i == 3){
result.put("key",i+"");
result.put("name","停用启用");
}else if(i == 4){
result.put("key",i+"");
result.put("name","注销报废");
for (int i = 0; i < 5; i++) {
Map<String, Object> result = new HashMap<>();
if (i == 0) {
result.put("key", i + "");
result.put("name", "告知管理");
} else if (i == 1) {
result.put("key", i + "");
result.put("name", "使用登记");
} else if (i == 2) {
result.put("key", i + "");
result.put("name", "变更登记");
} else if (i == 3) {
result.put("key", i + "");
result.put("name", "停用启用");
} else if (i == 4) {
result.put("key", i + "");
result.put("name", "注销报废");
}
resultList.add(result);
......@@ -1041,47 +1066,47 @@ public class DPStatisticsServiceImpl {
return resultList;
}
public Map<String,Object> getNoticeEquCount(DPFilterParamDto dpFilterParamDto) {
public Map<String, Object> getNoticeEquCount(DPFilterParamDto dpFilterParamDto) {
String startTime = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
//安装告知
List<Map<String,Object>> installlist = dpStatisticsMapper.installEquCount(dpFilterParamDto.getCityCode(),startTime);
Map<String,Integer> installCountMap = new HashMap<>();
countNoticEquList(installCountMap,installlist);
List<Map<String, Object>> installlist = dpStatisticsMapper.installEquCount(dpFilterParamDto.getCityCode(), startTime);
Map<String, Integer> installCountMap = new HashMap<>();
countNoticEquList(installCountMap, installlist);
//维修告知
List<Map<String,Object>> maintenancelist = dpStatisticsMapper.maintenanceEquCount(dpFilterParamDto.getCityCode(),startTime);
Map<String,Integer> maintenanceCountMap = new HashMap<>();
countNoticEquList(maintenanceCountMap,maintenancelist);
List<Map<String, Object>> maintenancelist = dpStatisticsMapper.maintenanceEquCount(dpFilterParamDto.getCityCode(), startTime);
Map<String, Integer> maintenanceCountMap = new HashMap<>();
countNoticEquList(maintenanceCountMap, maintenancelist);
//改造告知
List<Map<String,Object>> reformlist = dpStatisticsMapper.reformEquCount(dpFilterParamDto.getCityCode(),startTime);
Map<String,Integer> reformCountMap = new HashMap<>();
countNoticEquList(reformCountMap,reformlist);
List<Map<String, Object>> reformlist = dpStatisticsMapper.reformEquCount(dpFilterParamDto.getCityCode(), startTime);
Map<String, Integer> reformCountMap = new HashMap<>();
countNoticEquList(reformCountMap, reformlist);
//移装告知
List<Map<String,Object>> transferlist = dpStatisticsMapper.transferEquCount(dpFilterParamDto.getCityCode(),startTime);
Map<String,Integer> transferCountMap = new HashMap<>();
countNoticEquList(transferCountMap,transferlist);
List<Map<String, Object>> transferlist = dpStatisticsMapper.transferEquCount(dpFilterParamDto.getCityCode(), startTime);
Map<String, Integer> transferCountMap = new HashMap<>();
countNoticEquList(transferCountMap, transferlist);
Map<String,Object> resultMap = new HashMap<>();
Map<String, Object> resultMap = new HashMap<>();
List legendData = new ArrayList<>();
for(int i = 0; i < 4; i++){
Map<String,String> map = new HashMap<>();
if(i == 0){
map.put("dataKey","installNotify");
map.put("value","安装告知");
}else if(i == 1){
map.put("dataKey","transformNotify");
map.put("value","改造告知");
}else if(i == 2){
map.put("dataKey","maintainNotify");
map.put("value","维修告知");
}else if(i == 3){
map.put("dataKey","transloadingNotify");
map.put("value","移装告知");
for (int i = 0; i < 4; i++) {
Map<String, String> map = new HashMap<>();
if (i == 0) {
map.put("dataKey", "installNotify");
map.put("value", "安装告知");
} else if (i == 1) {
map.put("dataKey", "transformNotify");
map.put("value", "改造告知");
} else if (i == 2) {
map.put("dataKey", "maintainNotify");
map.put("value", "维修告知");
} else if (i == 3) {
map.put("dataKey", "transloadingNotify");
map.put("value", "移装告知");
}
legendData.add(map);
}
resultMap.put("legendData",legendData);
resultMap.put("legendData", legendData);
List<String> xDataList = Arrays.asList("气瓶", "电梯", "压力容器", "锅炉", "起重机械", "场(厂)内专用", "大型游乐设施", "压力管道", "客运索道");
resultMap.put("xdata",xDataList);
resultMap.put("xdata", xDataList);
List installNotify = new ArrayList<>();
List transformNotify = new ArrayList<>();
List maintainNotify = new ArrayList<>();
......@@ -1097,200 +1122,202 @@ public class DPStatisticsServiceImpl {
* 8000 压力管道
* 9000 客运索道
*/
for(int i = 0; i < xDataList.size(); i++){
if(i == 0){
installNotify.add(installCountMap.getOrDefault("2300",0));
transformNotify.add(reformCountMap.getOrDefault("2300",0));
maintainNotify.add(maintenanceCountMap.getOrDefault("2300",0));
transloadingNotify.add(transferCountMap.getOrDefault("2300",0));
}else if(i == 1){
installNotify.add(installCountMap.getOrDefault("3000",0));
transformNotify.add(reformCountMap.getOrDefault("3000",0));
maintainNotify.add(maintenanceCountMap.getOrDefault("3000",0));
transloadingNotify.add(transferCountMap.getOrDefault("3000",0));
}else if(i == 2){
installNotify.add(installCountMap.getOrDefault("2000",0));
transformNotify.add(reformCountMap.getOrDefault("2000",0));
maintainNotify.add(maintenanceCountMap.getOrDefault("2000",0));
transloadingNotify.add(transferCountMap.getOrDefault("2000",0));
}else if(i == 3){
installNotify.add(installCountMap.getOrDefault("1000",0));
transformNotify.add(reformCountMap.getOrDefault("1000",0));
maintainNotify.add(maintenanceCountMap.getOrDefault("1000",0));
transloadingNotify.add(transferCountMap.getOrDefault("1000",0));
}else if(i == 4){
installNotify.add(installCountMap.getOrDefault("4000",0));
transformNotify.add(reformCountMap.getOrDefault("4000",0));
maintainNotify.add(maintenanceCountMap.getOrDefault("4000",0));
transloadingNotify.add(transferCountMap.getOrDefault("4000",0));
}else if(i == 5){
installNotify.add(installCountMap.getOrDefault("5000",0));
transformNotify.add(reformCountMap.getOrDefault("5000",0));
maintainNotify.add(maintenanceCountMap.getOrDefault("5000",0));
transloadingNotify.add(transferCountMap.getOrDefault("5000",0));
}else if(i == 6){
installNotify.add(installCountMap.getOrDefault("6000",0));
transformNotify.add(reformCountMap.getOrDefault("6000",0));
maintainNotify.add(maintenanceCountMap.getOrDefault("6000",0));
transloadingNotify.add(transferCountMap.getOrDefault("6000",0));
}else if(i == 7){
installNotify.add(installCountMap.getOrDefault("8000",0));
transformNotify.add(reformCountMap.getOrDefault("8000",0));
maintainNotify.add(maintenanceCountMap.getOrDefault("8000",0));
transloadingNotify.add(transferCountMap.getOrDefault("8000",0));
}else if(i == 8){
installNotify.add(installCountMap.getOrDefault("9000",0));
transformNotify.add(reformCountMap.getOrDefault("9000",0));
maintainNotify.add(maintenanceCountMap.getOrDefault("9000",0));
transloadingNotify.add(transferCountMap.getOrDefault("9000",0));
for (int i = 0; i < xDataList.size(); i++) {
if (i == 0) {
installNotify.add(installCountMap.getOrDefault("2300", 0));
transformNotify.add(reformCountMap.getOrDefault("2300", 0));
maintainNotify.add(maintenanceCountMap.getOrDefault("2300", 0));
transloadingNotify.add(transferCountMap.getOrDefault("2300", 0));
} else if (i == 1) {
installNotify.add(installCountMap.getOrDefault("3000", 0));
transformNotify.add(reformCountMap.getOrDefault("3000", 0));
maintainNotify.add(maintenanceCountMap.getOrDefault("3000", 0));
transloadingNotify.add(transferCountMap.getOrDefault("3000", 0));
} else if (i == 2) {
installNotify.add(installCountMap.getOrDefault("2000", 0));
transformNotify.add(reformCountMap.getOrDefault("2000", 0));
maintainNotify.add(maintenanceCountMap.getOrDefault("2000", 0));
transloadingNotify.add(transferCountMap.getOrDefault("2000", 0));
} else if (i == 3) {
installNotify.add(installCountMap.getOrDefault("1000", 0));
transformNotify.add(reformCountMap.getOrDefault("1000", 0));
maintainNotify.add(maintenanceCountMap.getOrDefault("1000", 0));
transloadingNotify.add(transferCountMap.getOrDefault("1000", 0));
} else if (i == 4) {
installNotify.add(installCountMap.getOrDefault("4000", 0));
transformNotify.add(reformCountMap.getOrDefault("4000", 0));
maintainNotify.add(maintenanceCountMap.getOrDefault("4000", 0));
transloadingNotify.add(transferCountMap.getOrDefault("4000", 0));
} else if (i == 5) {
installNotify.add(installCountMap.getOrDefault("5000", 0));
transformNotify.add(reformCountMap.getOrDefault("5000", 0));
maintainNotify.add(maintenanceCountMap.getOrDefault("5000", 0));
transloadingNotify.add(transferCountMap.getOrDefault("5000", 0));
} else if (i == 6) {
installNotify.add(installCountMap.getOrDefault("6000", 0));
transformNotify.add(reformCountMap.getOrDefault("6000", 0));
maintainNotify.add(maintenanceCountMap.getOrDefault("6000", 0));
transloadingNotify.add(transferCountMap.getOrDefault("6000", 0));
} else if (i == 7) {
installNotify.add(installCountMap.getOrDefault("8000", 0));
transformNotify.add(reformCountMap.getOrDefault("8000", 0));
maintainNotify.add(maintenanceCountMap.getOrDefault("8000", 0));
transloadingNotify.add(transferCountMap.getOrDefault("8000", 0));
} else if (i == 8) {
installNotify.add(installCountMap.getOrDefault("9000", 0));
transformNotify.add(reformCountMap.getOrDefault("9000", 0));
maintainNotify.add(maintenanceCountMap.getOrDefault("9000", 0));
transloadingNotify.add(transferCountMap.getOrDefault("9000", 0));
}
}
resultMap.put("installNotify",installNotify);
resultMap.put("transformNotify",transformNotify);
resultMap.put("maintainNotify",maintainNotify);
resultMap.put("transloadingNotify",transloadingNotify);
resultMap.put("installNotify", installNotify);
resultMap.put("transformNotify", transformNotify);
resultMap.put("maintainNotify", maintainNotify);
resultMap.put("transloadingNotify", transloadingNotify);
return resultMap;
}
private void countNoticEquList(Map<String, Integer> countMap, List<Map<String, Object>> list) {
for(int i = 0; i < list.size(); i++){
if("2300".equals(list.get(i).get("equCategory"))){
if(null == countMap.get("2300")){
countMap.put("2300",Integer.valueOf(list.get(i).get("count")+""));
}else{
countMap.put("2300",countMap.get("2300")+Integer.valueOf(list.get(i).get("count")+""));
for (int i = 0; i < list.size(); i++) {
if ("2300".equals(list.get(i).get("equCategory"))) {
if (null == countMap.get("2300")) {
countMap.put("2300", Integer.valueOf(list.get(i).get("count") + ""));
} else {
countMap.put("2300", countMap.get("2300") + Integer.valueOf(list.get(i).get("count") + ""));
}
}else {
if(null == countMap.get(list.get(i).get("equList").toString())){
countMap.put(list.get(i).get("equList").toString(),Integer.valueOf(list.get(i).get("count")+""));
}else{
countMap.put(list.get(i).get("equList").toString(),countMap.get(list.get(i).get("equList").toString())+Integer.valueOf(list.get(i).get("count")+""));
} else {
if (null == countMap.get(list.get(i).get("equList").toString())) {
countMap.put(list.get(i).get("equList").toString(), Integer.valueOf(list.get(i).get("count") + ""));
} else {
countMap.put(list.get(i).get("equList").toString(), countMap.get(list.get(i).get("equList").toString()) + Integer.valueOf(list.get(i).get("count") + ""));
}
}
}
}
public Map<String,Object> getRegEquCount(DPFilterParamDto dpFilterParamDto) {
Map<String,Object> resultMap = new HashMap<>();
public Map<String, Object> getRegEquCount(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> resultMap = new HashMap<>();
String startTime = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
//使用登记
List<Map<String,Object>> uselist = dpStatisticsMapper.useEquCount(dpFilterParamDto.getCityCode(),startTime);
Map<String,Integer> useCountMap = new HashMap<>();
countNoticEquList(useCountMap,uselist);
List<Map<String, Object>> uselist = dpStatisticsMapper.useEquCount(dpFilterParamDto.getCityCode(), startTime);
Map<String, Integer> useCountMap = new HashMap<>();
countNoticEquList(useCountMap, uselist);
//气瓶使用登记
List<Map<String,Object>> vehicleList = dpStatisticsMapper.vehicleEquCount(dpFilterParamDto.getCityCode(),startTime);
Map<String,Integer> vehicleCountMap = new HashMap<>();
countNoticEquList(vehicleCountMap,vehicleList);
List<Map<String, Object>> vehicleList = dpStatisticsMapper.vehicleEquCount(dpFilterParamDto.getCityCode(), startTime);
Map<String, Integer> vehicleCountMap = new HashMap<>();
countNoticEquList(vehicleCountMap, vehicleList);
//改造变更登记
List<Map<String,Object>> changeReformList = dpStatisticsMapper.changeReformEquCount(dpFilterParamDto.getCityCode(),startTime);
Map<String,Integer> changeReformCountMap = new HashMap<>();
countNoticEquList(changeReformCountMap,changeReformList);
List<Map<String, Object>> changeReformList = dpStatisticsMapper.changeReformEquCount(dpFilterParamDto.getCityCode(), startTime);
Map<String, Integer> changeReformCountMap = new HashMap<>();
countNoticEquList(changeReformCountMap, changeReformList);
//移装变更登记
List<Map<String,Object>> changeTransferList = dpStatisticsMapper.changeTransferEquCount(dpFilterParamDto.getCityCode(),startTime);
Map<String,Integer> changeTransferCountMap = new HashMap<>();
countNoticEquList(changeTransferCountMap,changeTransferList);
List<Map<String, Object>> changeTransferList = dpStatisticsMapper.changeTransferEquCount(dpFilterParamDto.getCityCode(), startTime);
Map<String, Integer> changeTransferCountMap = new HashMap<>();
countNoticEquList(changeTransferCountMap, changeTransferList);
//单位变更登记
List<Map<String,Object>> changeUnitList = dpStatisticsMapper.changeUnitEquCount(dpFilterParamDto.getCityCode(),startTime);
Map<String,Integer> changeUnitCountMap = new HashMap<>();
countNoticEquList(changeUnitCountMap,changeUnitList);
List<Map<String, Object>> changeUnitList = dpStatisticsMapper.changeUnitEquCount(dpFilterParamDto.getCityCode(), startTime);
Map<String, Integer> changeUnitCountMap = new HashMap<>();
countNoticEquList(changeUnitCountMap, changeUnitList);
List legendData = new ArrayList<>();
for(int i = 0; i < 4; i++){
Map<String,String> map = new HashMap<>();
if(i == 0){
map.put("dataKey","useRegistration");
map.put("value","使用登记");
}else if(i == 1){
map.put("dataKey","modificateModifyRegistration");
map.put("value","改造变更登记");
}else if(i == 2){
map.put("dataKey","transloadingModifyRegistration");
map.put("value","移装变更登记");
}else if(i == 3){
map.put("dataKey","unitModifyRegistration");
map.put("value","单位变更登记");
for (int i = 0; i < 4; i++) {
Map<String, String> map = new HashMap<>();
if (i == 0) {
map.put("dataKey", "useRegistration");
map.put("value", "使用登记");
} else if (i == 1) {
map.put("dataKey", "modificateModifyRegistration");
map.put("value", "改造变更登记");
} else if (i == 2) {
map.put("dataKey", "transloadingModifyRegistration");
map.put("value", "移装变更登记");
} else if (i == 3) {
map.put("dataKey", "unitModifyRegistration");
map.put("value", "单位变更登记");
}
legendData.add(map);
}
resultMap.put("legendData",legendData);
resultMap.put("legendData", legendData);
List<String> xDataList = Arrays.asList("气瓶", "电梯", "压力容器", "锅炉", "起重机械", "场(厂)内专用", "大型游乐设施", "压力管道", "客运索道");
resultMap.put("xdata",xDataList);
resultMap.put("xdata", xDataList);
List useRegistration = new ArrayList<>();
List modificateModifyRegistration = new ArrayList<>();
List transloadingModifyRegistration = new ArrayList<>();
List unitModifyRegistration = new ArrayList<>();
for(int i = 0; i < xDataList.size(); i++){
if(i == 0){
useRegistration.add(vehicleCountMap.getOrDefault("2300",0));
modificateModifyRegistration.add(changeReformCountMap.getOrDefault("2300",0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("2300",0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("2300",0));
}else if(i == 1){
useRegistration.add(useCountMap.getOrDefault("3000",0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("3000",0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("3000",0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("3000",0));
}else if(i == 2){
useRegistration.add(useCountMap.getOrDefault("2000",0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("2000",0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("2000",0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("2000",0));
}else if(i == 3){
useRegistration.add(useCountMap.getOrDefault("1000",0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("1000",0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("1000",0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("1000",0));
}else if(i == 4){
useRegistration.add(useCountMap.getOrDefault("4000",0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("4000",0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("4000",0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("4000",0));
}else if(i == 5){
useRegistration.add(useCountMap.getOrDefault("5000",0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("5000",0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("5000",0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("5000",0));
}else if(i == 6){
useRegistration.add(useCountMap.getOrDefault("6000",0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("6000",0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("6000",0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("6000",0));
}else if(i == 7){
useRegistration.add(useCountMap.getOrDefault("8000",0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("8000",0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("8000",0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("8000",0));
}else if(i == 8){
useRegistration.add(useCountMap.getOrDefault("9000",0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("9000",0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("9000",0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("9000",0));
for (int i = 0; i < xDataList.size(); i++) {
if (i == 0) {
useRegistration.add(vehicleCountMap.getOrDefault("2300", 0));
modificateModifyRegistration.add(changeReformCountMap.getOrDefault("2300", 0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("2300", 0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("2300", 0));
} else if (i == 1) {
useRegistration.add(useCountMap.getOrDefault("3000", 0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("3000", 0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("3000", 0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("3000", 0));
} else if (i == 2) {
useRegistration.add(useCountMap.getOrDefault("2000", 0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("2000", 0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("2000", 0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("2000", 0));
} else if (i == 3) {
useRegistration.add(useCountMap.getOrDefault("1000", 0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("1000", 0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("1000", 0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("1000", 0));
} else if (i == 4) {
useRegistration.add(useCountMap.getOrDefault("4000", 0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("4000", 0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("4000", 0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("4000", 0));
} else if (i == 5) {
useRegistration.add(useCountMap.getOrDefault("5000", 0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("5000", 0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("5000", 0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("5000", 0));
} else if (i == 6) {
useRegistration.add(useCountMap.getOrDefault("6000", 0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("6000", 0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("6000", 0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("6000", 0));
} else if (i == 7) {
useRegistration.add(useCountMap.getOrDefault("8000", 0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("8000", 0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("8000", 0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("8000", 0));
} else if (i == 8) {
useRegistration.add(useCountMap.getOrDefault("9000", 0));
modificateModifyRegistration.add(changeTransferCountMap.getOrDefault("9000", 0));
transloadingModifyRegistration.add(changeTransferCountMap.getOrDefault("9000", 0));
unitModifyRegistration.add(changeUnitCountMap.getOrDefault("9000", 0));
}
}
resultMap.put("useRegistration",useRegistration);
resultMap.put("modificateModifyRegistration",modificateModifyRegistration);
resultMap.put("transloadingModifyRegistration",transloadingModifyRegistration);
resultMap.put("unitModifyRegistration",unitModifyRegistration);
resultMap.put("useRegistration", useRegistration);
resultMap.put("modificateModifyRegistration", modificateModifyRegistration);
resultMap.put("transloadingModifyRegistration", transloadingModifyRegistration);
resultMap.put("unitModifyRegistration", unitModifyRegistration);
return resultMap;
}
public List<Map<String, Object>> dataStatisticByReginCode(DPFilterParamDto dpFilterParamDto) {
List<Map<String, Object>> result = regionModels.parallelStream().filter(e -> e.getParentRegionCode() != null && (e.getParentRegionCode().toString()).equals(dpFilterParamDto.getCityCode())).map(r -> {
List<RegionModel> regionModels = setRegionIfRootParent(dpFilterParamDto);
List<Map<String, Object>> result = regionModels.parallelStream().map(r -> {
DPFilterParamDto filterParamDto = new DPFilterParamDto();
filterParamDto.setCityCode(r.getRegionCode().toString());
Map<String, Object> itemResult = staticsCenterMapCountDataForRegin(filterParamDto);
if (itemResult == null) {
itemResult = new HashMap<>();
}
itemResult.put("regionCode", r.getRegionCode());
itemResult.put("regionName", r.getRegionName());
itemResult.put(REGION_CODE, r.getRegionCode());
itemResult.put(REGION_NAME, r.getRegionName());
return itemResult;
}).collect(Collectors.toList());
return result;
}
private Map<String, Object> staticsCenterMapCountDataForRegin(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> result = new HashMap<>();
String orgCode = regionCodeOrgCodeMap.get(dpFilterParamDto.getCityCode());
......@@ -1311,9 +1338,9 @@ public class DPStatisticsServiceImpl {
}
public Map<String, Object> dataStatisticCountByReginCode(DPFilterParamDto dpFilterParamDto) {
Map<String,Object> resultMap = new HashMap<>();
Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> mapList = this.dataStatisticByReginCode(dpFilterParamDto);
if(ObjectUtils.isEmpty(mapList)){
if (ObjectUtils.isEmpty(mapList)) {
resultMap.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), 0);
resultMap.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), 0);
return resultMap;
......@@ -1325,66 +1352,66 @@ public class DPStatisticsServiceImpl {
return resultMap;
}
public Map<String,Object> newRegEquCount(DPFilterParamDto dpFilterParamDto) {
Map<String,Object> resultMap = new HashMap<>();
Map<String,Object> map = new HashMap<>();
map.put("dataKey","newRegisterEq");
map.put("value","新增登记设备");
List<Map<String,Object>> legendData = new ArrayList<>();
public Map<String, Object> newRegEquCount(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> resultMap = new HashMap<>();
Map<String, Object> map = new HashMap<>();
map.put("dataKey", "newRegisterEq");
map.put("value", "新增登记设备");
List<Map<String, Object>> legendData = new ArrayList<>();
legendData.add(map);
resultMap.put("legendData",legendData);
resultMap.put("legendData", legendData);
List xDataList = new ArrayList<>();
List newRegisterEq = new ArrayList<>();
Map<String,Object> useCountMap = new HashMap<>();
Map<String,Object> vehicleCountMap = new HashMap<>();
if("month".equals(dpFilterParamDto.getSearchType())){
List<Map<String,Object>> useCountList = dpStatisticsMapper.newRegEquCountByMonth(dpFilterParamDto.getCityCode());
List<Map<String,Object>> vehicleCountList = dpStatisticsMapper.newVehicleEquCountByMonth(dpFilterParamDto.getCityCode());
for(int i = 0; i < useCountList.size(); i++){
useCountMap.put(useCountList.get(i).getOrDefault("date_format","")+"",Integer.valueOf(useCountList.get(i).getOrDefault("count",0)+""));
Map<String, Object> useCountMap = new HashMap<>();
Map<String, Object> vehicleCountMap = new HashMap<>();
if ("month".equals(dpFilterParamDto.getSearchType())) {
List<Map<String, Object>> useCountList = dpStatisticsMapper.newRegEquCountByMonth(dpFilterParamDto.getCityCode());
List<Map<String, Object>> vehicleCountList = dpStatisticsMapper.newVehicleEquCountByMonth(dpFilterParamDto.getCityCode());
for (int i = 0; i < useCountList.size(); i++) {
useCountMap.put(useCountList.get(i).getOrDefault("date_format", "") + "", Integer.valueOf(useCountList.get(i).getOrDefault("count", 0) + ""));
}
for(int i = 0; i < vehicleCountList.size(); i++){
vehicleCountMap.put(vehicleCountList.get(i).getOrDefault("date_format","")+"",Integer.valueOf(vehicleCountList.get(i).getOrDefault("count",0)+""));
for (int i = 0; i < vehicleCountList.size(); i++) {
vehicleCountMap.put(vehicleCountList.get(i).getOrDefault("date_format", "") + "", Integer.valueOf(vehicleCountList.get(i).getOrDefault("count", 0) + ""));
}
for(int i = 0; i < LocalDate.now().getDayOfMonth(); i++){
for (int i = 0; i < LocalDate.now().getDayOfMonth(); i++) {
xDataList.add(LocalDate.now().minusDays(i).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
newRegisterEq.add(Integer.valueOf(useCountMap.getOrDefault(LocalDate.now().minusDays(i).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),0)+"")
+Integer.valueOf(vehicleCountMap.getOrDefault(LocalDate.now().minusDays(i).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),0)+""));
newRegisterEq.add(Integer.valueOf(useCountMap.getOrDefault(LocalDate.now().minusDays(i).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), 0) + "")
+ Integer.valueOf(vehicleCountMap.getOrDefault(LocalDate.now().minusDays(i).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), 0) + ""));
}
}else if("year".equals(dpFilterParamDto.getSearchType())){
List<Map<String,Object>> useCountList = dpStatisticsMapper.newRegEquCountByYear(dpFilterParamDto.getCityCode());
List<Map<String,Object>> vehicleCountList = dpStatisticsMapper.newVehicleEquCountByYear(dpFilterParamDto.getCityCode());
for(int i = 0; i < useCountList.size(); i++){
useCountMap.put(useCountList.get(i).getOrDefault("date_format","")+"",Integer.valueOf(useCountList.get(i).getOrDefault("count",0)+""));
} else if ("year".equals(dpFilterParamDto.getSearchType())) {
List<Map<String, Object>> useCountList = dpStatisticsMapper.newRegEquCountByYear(dpFilterParamDto.getCityCode());
List<Map<String, Object>> vehicleCountList = dpStatisticsMapper.newVehicleEquCountByYear(dpFilterParamDto.getCityCode());
for (int i = 0; i < useCountList.size(); i++) {
useCountMap.put(useCountList.get(i).getOrDefault("date_format", "") + "", Integer.valueOf(useCountList.get(i).getOrDefault("count", 0) + ""));
}
for(int i = 0; i < vehicleCountList.size(); i++){
vehicleCountMap.put(vehicleCountList.get(i).getOrDefault("date_format","")+"",Integer.valueOf(vehicleCountList.get(i).getOrDefault("count",0)+""));
for (int i = 0; i < vehicleCountList.size(); i++) {
vehicleCountMap.put(vehicleCountList.get(i).getOrDefault("date_format", "") + "", Integer.valueOf(vehicleCountList.get(i).getOrDefault("count", 0) + ""));
}
for (int i = 0; i < LocalDate.now().getMonth().getValue(); i++){
for (int i = 0; i < LocalDate.now().getMonth().getValue(); i++) {
xDataList.add(LocalDate.now().minusMonths(i).format(DateTimeFormatter.ofPattern("yyyy-MM")));
newRegisterEq.add(Integer.valueOf(useCountMap.getOrDefault(LocalDate.now().minusMonths(i).format(DateTimeFormatter.ofPattern("yyyy-MM")),0)+"")
+Integer.valueOf(vehicleCountMap.getOrDefault(LocalDate.now().minusMonths(i).format(DateTimeFormatter.ofPattern("yyyy-MM")),0)+""));
newRegisterEq.add(Integer.valueOf(useCountMap.getOrDefault(LocalDate.now().minusMonths(i).format(DateTimeFormatter.ofPattern("yyyy-MM")), 0) + "")
+ Integer.valueOf(vehicleCountMap.getOrDefault(LocalDate.now().minusMonths(i).format(DateTimeFormatter.ofPattern("yyyy-MM")), 0) + ""));
}
}
Collections.reverse(xDataList);
Collections.reverse(newRegisterEq);
resultMap.put("xdata",xDataList);
resultMap.put("newRegisterEq",newRegisterEq);
resultMap.put("xdata", xDataList);
resultMap.put("newRegisterEq", newRegisterEq);
return resultMap;
}
public List<Map<String,Object>> newRegCount(DPFilterParamDto dpFilterParamDto) {
List<Map<String,Object>> resultList = new ArrayList<>();
public List<Map<String, Object>> newRegCount(DPFilterParamDto dpFilterParamDto) {
List<Map<String, Object>> resultList = new ArrayList<>();
//年使用登记设备
List<Map<String,Object>> useEquCountListYear = dpStatisticsMapper.newRegEquCountByYear(dpFilterParamDto.getCityCode());
List<Map<String, Object>> useEquCountListYear = dpStatisticsMapper.newRegEquCountByYear(dpFilterParamDto.getCityCode());
//年气瓶使用登记设备
List<Map<String,Object>> vehicleEquCountListYear = dpStatisticsMapper.newVehicleEquCountByYear(dpFilterParamDto.getCityCode());
List<Map<String, Object>> vehicleEquCountListYear = dpStatisticsMapper.newVehicleEquCountByYear(dpFilterParamDto.getCityCode());
//月使用登记设备
List<Map<String,Object>> useEquCountListMonth = dpStatisticsMapper.newRegEquCountByMonth(dpFilterParamDto.getCityCode());
List<Map<String, Object>> useEquCountListMonth = dpStatisticsMapper.newRegEquCountByMonth(dpFilterParamDto.getCityCode());
//月气瓶使用登记设备
List<Map<String,Object>> vehicleEquCountListMonth = dpStatisticsMapper.newVehicleEquCountByMonth(dpFilterParamDto.getCityCode());
List<Map<String, Object>> vehicleEquCountListMonth = dpStatisticsMapper.newVehicleEquCountByMonth(dpFilterParamDto.getCityCode());
//年气瓶使用登记
String vehicleCountYear = dpStatisticsMapper.newVehicleCountByYear(dpFilterParamDto.getCityCode());
//月气瓶使用登记
......@@ -1398,43 +1425,43 @@ public class DPStatisticsServiceImpl {
int usrEqYear = 0;
int usrEqMonth = 0;
//本年新增登记
for(int i = 0 ; i < useEquCountListYear.size() ; i++){
useYear += Integer.valueOf(useEquCountListYear.get(i).getOrDefault("count",0)+"");
usrEqYear += Integer.valueOf(useEquCountListYear.get(i).getOrDefault("count",0)+"");
for (int i = 0; i < useEquCountListYear.size(); i++) {
useYear += Integer.valueOf(useEquCountListYear.get(i).getOrDefault("count", 0) + "");
usrEqYear += Integer.valueOf(useEquCountListYear.get(i).getOrDefault("count", 0) + "");
}
useYear += StringUtils.isBlank(vehicleCountYear)?0:Integer.valueOf(vehicleCountYear);
useYear += StringUtils.isBlank(vehicleCountYear) ? 0 : Integer.valueOf(vehicleCountYear);
//本年新增设备
for(int i = 0 ; i < vehicleEquCountListYear.size() ; i++){
usrEqYear += Integer.valueOf(vehicleEquCountListYear.get(i).getOrDefault("count",0)+"");
for (int i = 0; i < vehicleEquCountListYear.size(); i++) {
usrEqYear += Integer.valueOf(vehicleEquCountListYear.get(i).getOrDefault("count", 0) + "");
}
//本月新增登记
for(int i = 0 ; i < useEquCountListMonth.size() ; i++){
useMonth += Integer.valueOf(useEquCountListMonth.get(i).getOrDefault("count",0)+"");
usrEqMonth += Integer.valueOf(useEquCountListMonth.get(i).getOrDefault("count",0)+"");
for (int i = 0; i < useEquCountListMonth.size(); i++) {
useMonth += Integer.valueOf(useEquCountListMonth.get(i).getOrDefault("count", 0) + "");
usrEqMonth += Integer.valueOf(useEquCountListMonth.get(i).getOrDefault("count", 0) + "");
}
useMonth += StringUtils.isBlank(vehicleCountListMonth)?0:Integer.valueOf(vehicleCountListMonth);
useMonth += StringUtils.isBlank(vehicleCountListMonth) ? 0 : Integer.valueOf(vehicleCountListMonth);
//本月新增设备
for(int i = 0 ; i < vehicleEquCountListMonth.size() ; i++){
usrEqMonth += Integer.valueOf(vehicleEquCountListMonth.get(i).getOrDefault("count",0)+"");
for (int i = 0; i < vehicleEquCountListMonth.size(); i++) {
usrEqMonth += Integer.valueOf(vehicleEquCountListMonth.get(i).getOrDefault("count", 0) + "");
}
for(int i=0 ; i < 4 ; i++){
Map<String,Object> map = new HashMap<>();
if(i == 0){
map.put("name","本年新增登记");
map.put("value",useYear);
}else if(i == 1){
map.put("name","本年新增设备");
map.put("value",usrEqYear);
}else if(i == 2){
map.put("name","本月新增登记");
map.put("value",useMonth);
}else if(i == 3){
map.put("name","本月新增设备");
map.put("value",usrEqMonth);
for (int i = 0; i < 4; i++) {
Map<String, Object> map = new HashMap<>();
if (i == 0) {
map.put("name", "本年新增登记");
map.put("value", useYear);
} else if (i == 1) {
map.put("name", "本年新增设备");
map.put("value", usrEqYear);
} else if (i == 2) {
map.put("name", "本月新增登记");
map.put("value", useMonth);
} else if (i == 3) {
map.put("name", "本月新增设备");
map.put("value", usrEqMonth);
}
resultList.add(map);
}
......
......@@ -48,25 +48,31 @@
c.equ_define
</select>
<select id="inspectTimeCount" resultType="java.lang.Integer">
SELECT COUNT(1) AS num
SELECT COUNT
( 1 ) AS num
FROM
(
SELECT
ae.sequence_nbr,
ae.equ_category,
concat ( u.PROVINCE, '#', u.CITY, '#', u.COUNTY ) AS areaCode
pc.company_code,
pc.org_code
FROM
"tz_jyjc_inspection_application_equip" ae,
tz_jyjc_inspection_application A,
"idx_biz_jg_use_info" u
privilege_company pc
INNER JOIN tz_base_enterprise_info bi ON (
( bi.supervise_org_code != '50' AND bi.supervise_org_code LIKE CONCAT ( pc.org_code, '%' ) )
OR ( bi.supervise_org_code = '50' AND bi.office_region LIKE CONCAT ( '%', pc.company_code, '%' ) )
)
INNER JOIN tz_jyjc_inspection_application A ON A.inspection_unit_code = bi.use_unit_code
INNER JOIN tz_jyjc_inspection_application_equip ae ON A.sequence_nbr = ae.application_seq
WHERE
ae.equip_unicode = u."RECORD"
AND A.sequence_nbr = ae.application_seq
AND ( A.application_date BETWEEN #{ dpFilterParamDto.beginDate } AND #{ dpFilterParamDto.endDate } )
AND A.status = '6616'
A.status = '6616'
AND ae.equ_category = '2300'
AND pc.company_code = #{dpFilterParamDto.cityCode}
AND ( A.application_date BETWEEN #{ dpFilterParamDto.beginDate } AND #{ dpFilterParamDto.endDate } )
GROUP BY
ae.sequence_nbr
) C
WHERE
C.areaCode LIKE concat ( '%', #{dpFilterParamDto.cityCode}, '%' )
GROUP BY
C.equ_category
</select>
......
......@@ -62,29 +62,33 @@ public class DPSubServiceImpl {
JSONArray tabs = result.getJSONArray("tabs");
JSONObject content = result.getJSONObject("content");
tabs.stream().forEach(x -> {
this.buildContent(content, (JSONObject) x);
JSONObject tab = (JSONObject) x;
long s = System.currentTimeMillis();
this.buildContent(content, tab, param);
long e = System.currentTimeMillis();
log.info("{}tab页处理结束,共耗时:{} 毫秒", tab.get("displayName"), (e - s));
});
return result;
}
public void buildContent(JSONObject content, JSONObject tab) {
public void buildContent(JSONObject content, JSONObject tab, Map<String, Object> param) {
Long formSeq = tab.getLong("formSeq");
String renderType = tab.getString("renderType");
Object resultConvert = JsonValueUtils.getValueByKey(tab, "dataConfig", "dataConfig.resultConvert");
Object api = JsonValueUtils.getValueByKey(tab, "dataConfig", "dataConfig.api");
Object columnWidth = JsonValueUtils.getValueByKey(tab, "dataConfig", "dataConfig.columnWidth");
tab.put("param", param);
JSONObject map = content.getJSONObject(tab.getString("key"));
JSONObject apiResult = new JSONObject();
JSONArray apiArrayResult = new JSONArray();
if (ValidationUtil.isEmpty(map)){
map = new JSONObject();
}
Object apiResult = null;
long s = System.currentTimeMillis();
if (!ValidationUtil.isEmpty(api)) {
ResponseModel responseModel = this.getApiResult((JSONObject) api, !ValidationUtil.isEmpty(resultConvert) ? resultConvert.toString() : null);
if (!ValidationUtil.isEmpty(responseModel.getResult())) {
if (responseModel.getResult() instanceof JSONObject){
apiResult = JSONObject.parseObject(responseModel.getResult().toString());
} else {
apiArrayResult = JSONArray.parseArray(responseModel.getResult().toString());
}
apiResult = responseModel.getResult();
}
}
......@@ -96,6 +100,8 @@ public class DPSubServiceImpl {
// 处理显隐逻辑
this.processShowHideRules(children, showHideRules, apiResult);
long e = System.currentTimeMillis();
log.info("{}tab页处理显隐逻辑,共耗时:{} 毫秒", tab.get("displayName"), (e - s));
List<Object> noHiddenChildren = children.stream().filter(x -> !"hidden".equals(JsonValueUtils.getValueByKey(x, "visualParams", "visualParams.behavior"))).collect(Collectors.toList());
// 设置一个图片附件分组
......@@ -111,43 +117,37 @@ public class DPSubServiceImpl {
List<Object> mergedArray = mergedList(yObj.getJSONArray("children"));
// 第一组去除标题
if (i == 0 || ValidationUtil.isEmpty(map.get("datas"))) {
this.buildContentData(map, mergedArray, apiResult, matinfo);
this.buildContentData(tab, map, mergedArray, apiResult, matinfo);
} else {
this.buildSubContentData(map, i, yObj, mergedArray, apiResult, matinfo);
this.buildSubContentData(tab, map, i, yObj, mergedArray, apiResult, matinfo);
}
} else if ("subForm".equals(yObj.get("componentKey"))) { // 子表单
this.buildSubFormData(map, i, yObj, apiResult);
} else if ("formTable".equals(yObj.get("componentKey"))) {
map = new JSONObject();
JSONArray columns = (JSONArray) JsonValueUtils.getValueByKey(yObj, "visualParams", "visualParams.modelTableColumns");
JSONObject columnWidthMap = (JSONObject) columnWidth;
columns.stream().forEach(x -> {
JSONObject xObj = (JSONObject) x;
if (!ValidationUtil.isEmpty(columnWidthMap.get(xObj.get("dataIndex")))) {
xObj.put("width", columnWidthMap.get(xObj.get("dataIndex")));
}
});
map.put("columns", columns);
map.put("dataList", apiResult);
map.put("showPage", true);
map.put("api", api);
map.put("rowKey", "record");
content.put(tab.getString("key"), map);
}
}
if (!ValidationUtil.isEmpty(matinfo.getJSONArray("datas"))){
long fe = System.currentTimeMillis();
log.info("{}tab页处理分类逻辑,共耗时:{} 毫秒", tab.get("displayName"), (fe - e));
if (!ValidationUtil.isEmpty(matinfo.getJSONArray("datas"))) {
matinfo.put("columns", map.get("columns"));
map.getJSONArray("subs").add(matinfo);
}
} else {
if (ValidationUtil.isEmpty(map)) {
content.put(tab.getString("key"), apiArrayResult);
if ("timeline".equals(renderType)){
content.put(tab.getString("key"), apiResult);
} else if("table".equals(renderType)){
Object columns = JsonValueUtils.getValueByKey(tab, "visualParams", "visualParams.columns");
map.put("columns", columns);
map.put("dataList", apiResult);
map.put("showPage", true);
map.put("api", api);
map.put("rowKey", JsonValueUtils.getValueByKey(tab, "visualParams", "visualParams.rowKey"));
content.put(tab.getString("key"), map);
}
}
}
private JSONArray processShowHideRules(JSONArray children, Object showHideRules, JSONObject apiResult) {
private JSONArray processShowHideRules(JSONArray children, Object showHideRules, Object apiResult) {
JSONObject result = JSONObject.parseObject(apiResult.toString());
if (!ValidationUtil.isEmpty(showHideRules)) {
((JSONArray) showHideRules).stream().forEach(x -> {
JSONObject xObj = (JSONObject) x;
......@@ -161,7 +161,7 @@ public class DPSubServiceImpl {
String condition = conditionObj.getString("condition");
JSONObject item = this.findByEid(children, JsonValueUtils.getValueByKey(conditionObj, "name", "name.key").toString());
Object fieldvalue = apiResult.get(JsonValueUtils.getValueByKey(item, "visualParams", "visualParams.fieldKey"));
Object fieldvalue = result.get(JsonValueUtils.getValueByKey(item, "visualParams", "visualParams.fieldKey"));
if (ValidationUtil.isEmpty(relation)) {
if (condition.equals("notUndefined") && !ValidationUtil.isEmpty(fieldvalue)) {
lastConditionResult = !ValidationUtil.isEmpty(fieldvalue);
......@@ -291,13 +291,14 @@ public class DPSubServiceImpl {
return mergedArray;
}
public JSONObject buildContentData(JSONObject map, List<Object> mergedArray, JSONObject apiResult, JSONObject matinfo) {
public JSONObject buildContentData(JSONObject tab, JSONObject map, List<Object> mergedArray, Object apiResult, JSONObject matinfo) {
JSONObject result = JSONObject.parseObject(apiResult.toString());
JSONArray datas = new JSONArray();
// 处理二维码
mergedArray.stream().filter(x -> "QRCode".equals(JsonValueUtils.getValueByKey(x, "componentKey", null))).findFirst().ifPresent(x -> {
JSONObject qrcode = map.getJSONObject("qrcode");
String problemTime = apiResult.getString("problemTime");
String problemStatus = apiResult.getString("problemStatus");
String problemTime = result.getString("problemTime");
String problemStatus = result.getString("problemStatus");
String color = null;
if (!ValidationUtil.isEmpty(problemTime)) {
try {
......@@ -312,7 +313,7 @@ public class DPSubServiceImpl {
} else if ("异常".equals(problemStatus)) {
color = "red";
}
qrcode.put("value", !ValidationUtil.isEmpty(apiResult.get("useCode")) ? apiResult.get("useCode") : apiResult.get("USE_ORG_CODE"));
qrcode.put("value", !ValidationUtil.isEmpty(result.get("useCode")) ? result.get("useCode") : result.get("USE_ORG_CODE"));
qrcode.put("status", problemStatus);
qrcode.put("color", color);
});
......@@ -322,14 +323,14 @@ public class DPSubServiceImpl {
mergedArray.stream().forEach(x -> {
Object fieldKey = JsonValueUtils.getValueByKey(x, "visualParams", "visualParams.fieldKey");
if (!ValidationUtil.isEmpty(fieldKey)) {
this.processWidgets(datas, x, fieldKey.toString(), apiResult, matinfo);
this.processWidgets(tab, datas, x, fieldKey.toString(), result, matinfo);
}
});
map.put("datas", datas);
return map;
}
public JSONObject buildSubContentData(JSONObject map, int i, JSONObject yObj, List<Object> mergedArray, JSONObject apiResult, JSONObject matinfo) {
public JSONObject buildSubContentData(JSONObject tab, JSONObject map, int i, JSONObject yObj, List<Object> mergedArray, Object apiResult, JSONObject matinfo) {
JSONArray subs = map.getJSONArray("subs");
JSONArray children = yObj.getJSONArray("children");
List<Object> columnsArray = children.stream().filter(x -> {
......@@ -347,7 +348,7 @@ public class DPSubServiceImpl {
mergedArray.stream().forEach(x -> {
Object fieldKey = JsonValueUtils.getValueByKey(x, "visualParams", "visualParams.fieldKey");
if (!ValidationUtil.isEmpty(fieldKey)) {
this.processWidgets(datas, x, fieldKey.toString(), apiResult, matinfo);
this.processWidgets(tab, datas, x, fieldKey.toString(), JSONObject.parseObject(apiResult.toString()), matinfo);
subObj.put("datas", datas);
}
});
......@@ -364,7 +365,7 @@ public class DPSubServiceImpl {
* @param apiResult
* @return
*/
public JSONArray processWidgets(JSONArray datas, Object x, String fieldKey, JSONObject apiResult, JSONObject matinfo) {
public JSONArray processWidgets(JSONObject tab, JSONArray datas, Object x, String fieldKey, JSONObject apiResult, JSONObject matinfo) {
JSONObject jsonObject = new JSONObject();
JSONObject xObj = (JSONObject) x;
......@@ -372,66 +373,65 @@ public class DPSubServiceImpl {
jsonObject.put("label", visualParams.getString("label"));
Object value = apiResult.get(fieldKey);
if ("upload".equals(xObj.getString("componentKey"))) {
jsonObject.put("type", "img");
if (!ValidationUtil.isEmpty(value)) {
jsonObject.put("value", ((JSONArray) value).getJSONObject(0).getString("url"));
Object paramFieldKeys = JsonValueUtils.getValueByKey(tab, "dataConfig", "dataConfig.paramFieldKeys");
JSONObject param = tab.getJSONObject("param");
jsonObject.put("type", "text");
jsonObject.put("value", value);
if (!ValidationUtil.isEmpty(paramFieldKeys)){
if (((JSONArray) paramFieldKeys).contains(fieldKey)){
jsonObject.put("value", param.getString(fieldKey));
}
} else if ("attachmentUpload".equals(xObj.getString("componentKey"))) {
JSONArray attachmentUploadDatas = matinfo.getJSONArray("datas");
if (!ValidationUtil.isEmpty(value)) {
JSONObject attachmentUploadDatasObj = new JSONObject();
attachmentUploadDatasObj.put("value", value);
String accept = JsonValueUtils.getValueByKey(xObj, "visualParams", "visualParams.accept").toString();
if (accept.contains("doc") || accept.contains("docx") || accept.contains("pdf") || accept.contains("xls") || accept.contains("xlsx")){
attachmentUploadDatasObj.put("label", "附件");
attachmentUploadDatasObj.put("type", "file");
} else if(accept.contains("png") || accept.contains("img")){
attachmentUploadDatasObj.put("label", "证照");
attachmentUploadDatasObj.put("type", "img");
} else if(accept.contains("mp4") || accept.contains("flv")){
attachmentUploadDatasObj.put("label", "视频");
attachmentUploadDatasObj.put("type", "video");
} else {
if ("upload".equals(xObj.getString("componentKey"))) {
jsonObject.put("type", "img");
if (!ValidationUtil.isEmpty(value)) {
jsonObject.put("value", ((JSONArray) value).getJSONObject(0).getString("url"));
}
} else if ("attachmentUpload".equals(xObj.getString("componentKey"))) {
JSONArray attachmentUploadDatas = matinfo.getJSONArray("datas");
if (!ValidationUtil.isEmpty(value)) {
JSONObject attachmentUploadDatasObj = new JSONObject();
attachmentUploadDatasObj.put("value", value);
String accept = JsonValueUtils.getValueByKey(xObj, "visualParams", "visualParams.accept").toString();
if (accept.contains("doc") || accept.contains("docx") || accept.contains("pdf") || accept.contains("xls") || accept.contains("xlsx")) {
attachmentUploadDatasObj.put("label", "附件");
attachmentUploadDatasObj.put("type", "file");
} else if (accept.contains("png") || accept.contains("img")) {
attachmentUploadDatasObj.put("label", "证照");
attachmentUploadDatasObj.put("type", "img");
} else if (accept.contains("mp4") || accept.contains("flv")) {
attachmentUploadDatasObj.put("label", "视频");
attachmentUploadDatasObj.put("type", "video");
}
attachmentUploadDatas.add(attachmentUploadDatasObj);
}
} else if ("lnglatSelect".equals(xObj.getString("componentKey"))) {
if (!ValidationUtil.isEmpty(value) && value instanceof JSONObject) {
JSONObject lnglatSelect = (JSONObject) value;
jsonObject.put("value", (!ValidationUtil.isEmpty(lnglatSelect.getString("latitude")) && !ValidationUtil.isEmpty(lnglatSelect.getString("longitude")))
? String.format("[%s,%s]", lnglatSelect.getString("latitude"), lnglatSelect.getString("longitude")) : lnglatSelect.getString("address"));
}
} else if ("checkbox".equals(xObj.getString("componentKey"))) {
ResponseModel checkboxResult = this.getApiResult(visualParams.getJSONObject("api"), null);
if (!ValidationUtil.isEmpty(checkboxResult) && checkboxResult.getStatus() == 200 && !ValidationUtil.isEmpty(value)) {
List<Object> collect = ((JSONArray) checkboxResult.getResult()).stream().filter(y -> ((JSONArray) value).contains(JsonValueUtils.getValueByKey(y, "valueKey", "valueKey"))).collect(Collectors.toList());
String nameKey = collect.stream().map(item -> ((JSONObject) item).getString("nameKey")).collect(Collectors.joining("、"));
jsonObject.put("value", nameKey);
}
} else if ("select".equals(xObj.getString("componentKey"))) {
ResponseModel selectResult = this.getApiResult(visualParams.getJSONObject("api"), null);
if (!ValidationUtil.isEmpty(selectResult) && selectResult.getStatus() == 200 && !ValidationUtil.isEmpty(value)) {
((JSONArray) selectResult.getResult()).stream().filter(y -> value.equals(JsonValueUtils.getValueByKey(y, "valueKey", "valueKey"))).findFirst().ifPresent(z -> {
jsonObject.put("value", ((JSONObject) z).getString("nameKey"));
});
}
attachmentUploadDatas.add(attachmentUploadDatasObj);
}
} else if ("lnglatSelect".equals(xObj.getString("componentKey"))) {
jsonObject.put("type", "text");
if (!ValidationUtil.isEmpty(value) && value instanceof JSONObject) {
JSONObject lnglatSelect = (JSONObject) value;
jsonObject.put("value", String.format("[%s,%s]", lnglatSelect.getString("latitude"), lnglatSelect.getString("longitude")));
} else {
jsonObject.put("value", value);
}
} else if ("checkbox".equals(xObj.getString("componentKey"))) {
jsonObject.put("type", "text");
ResponseModel checkboxResult = this.getApiResult(visualParams.getJSONObject("api"), null);
if (!ValidationUtil.isEmpty(checkboxResult) && checkboxResult.getStatus() == 200 && !ValidationUtil.isEmpty(value)) {
List<Object> collect = ((JSONArray) checkboxResult.getResult()).stream().filter(y -> ((JSONArray) value).contains(JsonValueUtils.getValueByKey(y, "valueKey", "valueKey"))).collect(Collectors.toList());
String nameKey = collect.stream().map(item -> ((JSONObject) item).getString("nameKey")).collect(Collectors.joining("、"));
jsonObject.put("value", nameKey);
} else {
jsonObject.put("value", value);
}
} else if ("select".equals(xObj.getString("componentKey"))) {
jsonObject.put("type", "text");
ResponseModel selectResult = this.getApiResult(visualParams.getJSONObject("api"), null);
if (!ValidationUtil.isEmpty(selectResult) && selectResult.getStatus() == 200 && !ValidationUtil.isEmpty(value)) {
((JSONArray) selectResult.getResult()).stream().filter(y -> value.equals(JsonValueUtils.getValueByKey(y, "valueKey", "valueKey"))).findFirst().ifPresent(z -> {
jsonObject.put("value", ((JSONObject) z).getString("nameKey"));
});
} else {
jsonObject.put("value", value);
}
} else {
jsonObject.put("type", "text");
jsonObject.put("value", value);
}
datas.add(jsonObject);
return datas;
}
public JSONObject buildSubFormData(JSONObject map, int i, JSONObject yObj, JSONObject apiResult) {
public JSONObject buildSubFormData(JSONObject map, int i, JSONObject yObj, Object apiResult) {
JSONArray subs = map.getJSONArray("subs");
JSONArray children = yObj.getJSONArray("children");
......@@ -458,7 +458,8 @@ public class DPSubServiceImpl {
subObj.put("rowKey", "key");
subObj.put("showPage", false);
subObj.put("columns", columns);
subObj.put("dataList", apiResult.get(JsonValueUtils.getValueByKey(yObj, "visualParams", "visualParams.fieldKey")));
JSONObject result = JSONObject.parseObject(apiResult.toString());
subObj.put("dataList", result.get(JsonValueUtils.getValueByKey(yObj, "visualParams", "visualParams.fieldKey")));
subs.add(subObj);
return map;
......
......@@ -21,7 +21,7 @@
"key": "devtable",
"displayName": "设备列表",
"renderType": "table",
"formSeq": "1792821076963651585",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -31,17 +31,20 @@
"size": 14,
"USE_UNIT_CREDIT_CODE": "{useUnitCode}"
}
},
"columnWidth": {
"EQU_LIST": 150,
"EQU_CATEGORY": 160,
"EQU_DEFINE": 150,
"PRODUCT_NAME": 180,
"EQU_CODE": 180,
"FACTORY_NUM": 180,
"PRODUCE_UNIT_NAME": 180,
"USE_UNIT_NAME": 180
}
},
"visualParams": {
"rowKey": "record",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "EQU_LIST","width": 150,"align": "left","title": "设备种类","key": "AA6DE857-C788-494F-8F16-2ECFC7E34528"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CATEGORY","width": 160,"align": "left","title": "设备类别","key": "611DAF3D-5B79-466C-BEF2-CC91580091FA"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_DEFINE","width": 150,"align": "left","title": "设备品种","key": "D1CB84A4-E037-446A-9469-65B76E381585"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCT_NAME","width": 180,"align": "left","title": "设备名称","key": "0BB7318F-5134-42B6-A835-FC86D68066C2"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CODE","width": 180,"align": "left","title": "设备代码","key": "6EB924FB-EFEA-4779-ADF8-78F310818D2D"},
{"dataRenderingMode": "defaultText","dataIndex": "FACTORY_NUM","width": 180,"align": "left","title": "出厂编号/产品编码","key": "87C53BEA-829C-4539-9FCA-E2AF6A53DA15"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCE_UNIT_NAME","width": 180,"align": "left","title": "制造单位","key": "EADCED1C-C761-4209-B6C6-16298B53DD2E"},
{"dataRenderingMode": "defaultText","dataIndex": "USE_UNIT_NAME","width": 180,"align": "left","title": "使用单位","key": "BA4FB9F0-7F44-473F-A977-5C36A69CD541"}
]
}
}
],
......
......@@ -16,7 +16,8 @@
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
},
"paramFieldKeys": ["EQU_LIST","EQU_CATEGORY","EQU_DEFINE"]
}
},
{
......@@ -60,7 +61,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -70,10 +71,21 @@
"size": 14,
"record": "{record}"
}
},
"columnWidth": {
}
},
"visualParams": {
"rowKey": "key",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "sourceType","width": 150,"align": "left","title": "问题主体类型","key": "58E0E2F7-4F34-4C01-9AD6-777CABC1672F"},
{"dataRenderingMode": "imageText","dataIndex": "problemType","width": 150,"align": "left","title": "问题类型","key": "8ACDE41E-CAE3-4A27-82EF-8F7452164A66","imageAttributeName": "problemTypePic"},
{"dataRenderingMode": "defaultText","dataIndex": "problemDesc","width": 150,"align": "left","title": "问题描述","key": "9FAE9BDE-D285-4F5C-9EFB-F1560A78CBA4"},
{"dataRenderingMode": "defaultText","dataIndex": "problemTime","width": 180,"align": "left","title": "问题时间","key": "F00231C2-6AB5-470E-8F50-9FDD242DA75A"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnit","width": 200,"align": "left","title": "主体单位","key": "8934A41D-EC48-4E67-9F3C-EC87A4742499"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnitType","width": 150,"align": "left","title": "单位类型","key": "5A81B891-D5D4-4765-A610-BF9FA7D55FAB"},
{"dataRenderingMode": "defaultText","dataIndex": "governingBody","width": 150,"align": "left","title": "管辖机构","key": "B8D224B4-3843-4270-B508-0D6D8147D3D2"},
{"dataRenderingMode": "defaultText","dataIndex": "regionName","width": 180,"align": "left","title": "所属区域","key": "BAC9DA62-A6D7-4A75-BF9E-DB7AD0B1D4A6"},
{"dataRenderingMode": "defaultText","dataIndex": "problemStatus","width": 100,"align": "left","title": "问题状态","key": "C79630FE-7C73-4AA9-A68A-F1846204582B"}
]
}
}
],
......
......@@ -16,7 +16,8 @@
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
},
"paramFieldKeys": ["EQU_LIST","EQU_CATEGORY","EQU_DEFINE"]
}
},
{
......@@ -60,7 +61,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -70,10 +71,21 @@
"size": 14,
"record": "{record}"
}
},
"columnWidth": {
}
},
"visualParams": {
"rowKey": "key",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "sourceType","width": 150,"align": "left","title": "问题主体类型","key": "58E0E2F7-4F34-4C01-9AD6-777CABC1672F"},
{"dataRenderingMode": "imageText","dataIndex": "problemType","width": 150,"align": "left","title": "问题类型","key": "8ACDE41E-CAE3-4A27-82EF-8F7452164A66","imageAttributeName": "problemTypePic"},
{"dataRenderingMode": "defaultText","dataIndex": "problemDesc","width": 150,"align": "left","title": "问题描述","key": "9FAE9BDE-D285-4F5C-9EFB-F1560A78CBA4"},
{"dataRenderingMode": "defaultText","dataIndex": "problemTime","width": 180,"align": "left","title": "问题时间","key": "F00231C2-6AB5-470E-8F50-9FDD242DA75A"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnit","width": 200,"align": "left","title": "主体单位","key": "8934A41D-EC48-4E67-9F3C-EC87A4742499"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnitType","width": 150,"align": "left","title": "单位类型","key": "5A81B891-D5D4-4765-A610-BF9FA7D55FAB"},
{"dataRenderingMode": "defaultText","dataIndex": "governingBody","width": 150,"align": "left","title": "管辖机构","key": "B8D224B4-3843-4270-B508-0D6D8147D3D2"},
{"dataRenderingMode": "defaultText","dataIndex": "regionName","width": 180,"align": "left","title": "所属区域","key": "BAC9DA62-A6D7-4A75-BF9E-DB7AD0B1D4A6"},
{"dataRenderingMode": "defaultText","dataIndex": "problemStatus","width": 100,"align": "left","title": "问题状态","key": "C79630FE-7C73-4AA9-A68A-F1846204582B"}
]
}
}
],
......
......@@ -16,7 +16,8 @@
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
},
"paramFieldKeys": ["EQU_LIST","EQU_CATEGORY","EQU_DEFINE"]
}
},
{
......@@ -60,7 +61,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -70,10 +71,21 @@
"size": 14,
"record": "{record}"
}
},
"columnWidth": {
}
},
"visualParams": {
"rowKey": "key",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "sourceType","width": 150,"align": "left","title": "问题主体类型","key": "58E0E2F7-4F34-4C01-9AD6-777CABC1672F"},
{"dataRenderingMode": "imageText","dataIndex": "problemType","width": 150,"align": "left","title": "问题类型","key": "8ACDE41E-CAE3-4A27-82EF-8F7452164A66","imageAttributeName": "problemTypePic"},
{"dataRenderingMode": "defaultText","dataIndex": "problemDesc","width": 150,"align": "left","title": "问题描述","key": "9FAE9BDE-D285-4F5C-9EFB-F1560A78CBA4"},
{"dataRenderingMode": "defaultText","dataIndex": "problemTime","width": 180,"align": "left","title": "问题时间","key": "F00231C2-6AB5-470E-8F50-9FDD242DA75A"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnit","width": 200,"align": "left","title": "主体单位","key": "8934A41D-EC48-4E67-9F3C-EC87A4742499"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnitType","width": 150,"align": "left","title": "单位类型","key": "5A81B891-D5D4-4765-A610-BF9FA7D55FAB"},
{"dataRenderingMode": "defaultText","dataIndex": "governingBody","width": 150,"align": "left","title": "管辖机构","key": "B8D224B4-3843-4270-B508-0D6D8147D3D2"},
{"dataRenderingMode": "defaultText","dataIndex": "regionName","width": 180,"align": "left","title": "所属区域","key": "BAC9DA62-A6D7-4A75-BF9E-DB7AD0B1D4A6"},
{"dataRenderingMode": "defaultText","dataIndex": "problemStatus","width": 100,"align": "left","title": "问题状态","key": "C79630FE-7C73-4AA9-A68A-F1846204582B"}
]
}
}
],
......
......@@ -16,7 +16,8 @@
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
},
"paramFieldKeys": ["EQU_LIST","EQU_CATEGORY","EQU_DEFINE"]
}
},
{
......@@ -60,7 +61,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -70,10 +71,21 @@
"size": 14,
"record": "{record}"
}
},
"columnWidth": {
}
},
"visualParams": {
"rowKey": "key",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "sourceType","width": 150,"align": "left","title": "问题主体类型","key": "58E0E2F7-4F34-4C01-9AD6-777CABC1672F"},
{"dataRenderingMode": "imageText","dataIndex": "problemType","width": 150,"align": "left","title": "问题类型","key": "8ACDE41E-CAE3-4A27-82EF-8F7452164A66","imageAttributeName": "problemTypePic"},
{"dataRenderingMode": "defaultText","dataIndex": "problemDesc","width": 150,"align": "left","title": "问题描述","key": "9FAE9BDE-D285-4F5C-9EFB-F1560A78CBA4"},
{"dataRenderingMode": "defaultText","dataIndex": "problemTime","width": 180,"align": "left","title": "问题时间","key": "F00231C2-6AB5-470E-8F50-9FDD242DA75A"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnit","width": 200,"align": "left","title": "主体单位","key": "8934A41D-EC48-4E67-9F3C-EC87A4742499"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnitType","width": 150,"align": "left","title": "单位类型","key": "5A81B891-D5D4-4765-A610-BF9FA7D55FAB"},
{"dataRenderingMode": "defaultText","dataIndex": "governingBody","width": 150,"align": "left","title": "管辖机构","key": "B8D224B4-3843-4270-B508-0D6D8147D3D2"},
{"dataRenderingMode": "defaultText","dataIndex": "regionName","width": 180,"align": "left","title": "所属区域","key": "BAC9DA62-A6D7-4A75-BF9E-DB7AD0B1D4A6"},
{"dataRenderingMode": "defaultText","dataIndex": "problemStatus","width": 100,"align": "left","title": "问题状态","key": "C79630FE-7C73-4AA9-A68A-F1846204582B"}
]
}
}
],
......
......@@ -16,7 +16,8 @@
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
},
"paramFieldKeys": ["EQU_LIST","EQU_CATEGORY","EQU_DEFINE"]
}
},
{
......@@ -60,7 +61,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -70,10 +71,21 @@
"size": 14,
"record": "{record}"
}
},
"columnWidth": {
}
},
"visualParams": {
"rowKey": "key",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "sourceType","width": 150,"align": "left","title": "问题主体类型","key": "58E0E2F7-4F34-4C01-9AD6-777CABC1672F"},
{"dataRenderingMode": "imageText","dataIndex": "problemType","width": 150,"align": "left","title": "问题类型","key": "8ACDE41E-CAE3-4A27-82EF-8F7452164A66","imageAttributeName": "problemTypePic"},
{"dataRenderingMode": "defaultText","dataIndex": "problemDesc","width": 150,"align": "left","title": "问题描述","key": "9FAE9BDE-D285-4F5C-9EFB-F1560A78CBA4"},
{"dataRenderingMode": "defaultText","dataIndex": "problemTime","width": 180,"align": "left","title": "问题时间","key": "F00231C2-6AB5-470E-8F50-9FDD242DA75A"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnit","width": 200,"align": "left","title": "主体单位","key": "8934A41D-EC48-4E67-9F3C-EC87A4742499"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnitType","width": 150,"align": "left","title": "单位类型","key": "5A81B891-D5D4-4765-A610-BF9FA7D55FAB"},
{"dataRenderingMode": "defaultText","dataIndex": "governingBody","width": 150,"align": "left","title": "管辖机构","key": "B8D224B4-3843-4270-B508-0D6D8147D3D2"},
{"dataRenderingMode": "defaultText","dataIndex": "regionName","width": 180,"align": "left","title": "所属区域","key": "BAC9DA62-A6D7-4A75-BF9E-DB7AD0B1D4A6"},
{"dataRenderingMode": "defaultText","dataIndex": "problemStatus","width": 100,"align": "left","title": "问题状态","key": "C79630FE-7C73-4AA9-A68A-F1846204582B"}
]
}
}
],
......
......@@ -16,7 +16,8 @@
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
},
"paramFieldKeys": ["EQU_LIST","EQU_CATEGORY","EQU_DEFINE"]
}
},
{
......@@ -60,7 +61,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -70,10 +71,21 @@
"size": 14,
"record": "{record}"
}
},
"columnWidth": {
}
},
"visualParams": {
"rowKey": "key",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "sourceType","width": 150,"align": "left","title": "问题主体类型","key": "58E0E2F7-4F34-4C01-9AD6-777CABC1672F"},
{"dataRenderingMode": "imageText","dataIndex": "problemType","width": 150,"align": "left","title": "问题类型","key": "8ACDE41E-CAE3-4A27-82EF-8F7452164A66","imageAttributeName": "problemTypePic"},
{"dataRenderingMode": "defaultText","dataIndex": "problemDesc","width": 150,"align": "left","title": "问题描述","key": "9FAE9BDE-D285-4F5C-9EFB-F1560A78CBA4"},
{"dataRenderingMode": "defaultText","dataIndex": "problemTime","width": 180,"align": "left","title": "问题时间","key": "F00231C2-6AB5-470E-8F50-9FDD242DA75A"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnit","width": 200,"align": "left","title": "主体单位","key": "8934A41D-EC48-4E67-9F3C-EC87A4742499"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnitType","width": 150,"align": "left","title": "单位类型","key": "5A81B891-D5D4-4765-A610-BF9FA7D55FAB"},
{"dataRenderingMode": "defaultText","dataIndex": "governingBody","width": 150,"align": "left","title": "管辖机构","key": "B8D224B4-3843-4270-B508-0D6D8147D3D2"},
{"dataRenderingMode": "defaultText","dataIndex": "regionName","width": 180,"align": "left","title": "所属区域","key": "BAC9DA62-A6D7-4A75-BF9E-DB7AD0B1D4A6"},
{"dataRenderingMode": "defaultText","dataIndex": "problemStatus","width": 100,"align": "left","title": "问题状态","key": "C79630FE-7C73-4AA9-A68A-F1846204582B"}
]
}
}
],
......
......@@ -16,7 +16,8 @@
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
},
"paramFieldKeys": ["EQU_LIST","EQU_CATEGORY","EQU_DEFINE"]
}
},
{
......@@ -60,7 +61,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -70,10 +71,21 @@
"size": 14,
"record": "{record}"
}
},
"columnWidth": {
}
},
"visualParams": {
"rowKey": "key",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "sourceType","width": 150,"align": "left","title": "问题主体类型","key": "58E0E2F7-4F34-4C01-9AD6-777CABC1672F"},
{"dataRenderingMode": "imageText","dataIndex": "problemType","width": 150,"align": "left","title": "问题类型","key": "8ACDE41E-CAE3-4A27-82EF-8F7452164A66","imageAttributeName": "problemTypePic"},
{"dataRenderingMode": "defaultText","dataIndex": "problemDesc","width": 150,"align": "left","title": "问题描述","key": "9FAE9BDE-D285-4F5C-9EFB-F1560A78CBA4"},
{"dataRenderingMode": "defaultText","dataIndex": "problemTime","width": 180,"align": "left","title": "问题时间","key": "F00231C2-6AB5-470E-8F50-9FDD242DA75A"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnit","width": 200,"align": "left","title": "主体单位","key": "8934A41D-EC48-4E67-9F3C-EC87A4742499"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnitType","width": 150,"align": "left","title": "单位类型","key": "5A81B891-D5D4-4765-A610-BF9FA7D55FAB"},
{"dataRenderingMode": "defaultText","dataIndex": "governingBody","width": 150,"align": "left","title": "管辖机构","key": "B8D224B4-3843-4270-B508-0D6D8147D3D2"},
{"dataRenderingMode": "defaultText","dataIndex": "regionName","width": 180,"align": "left","title": "所属区域","key": "BAC9DA62-A6D7-4A75-BF9E-DB7AD0B1D4A6"},
{"dataRenderingMode": "defaultText","dataIndex": "problemStatus","width": 100,"align": "left","title": "问题状态","key": "C79630FE-7C73-4AA9-A68A-F1846204582B"}
]
}
}
],
......
......@@ -16,7 +16,8 @@
"ruleData": {
"responseSuccess": "data.result.equipInfo"
}
}
},
"paramFieldKeys": ["EQU_LIST","EQU_CATEGORY","EQU_DEFINE"]
}
},
{
......@@ -60,7 +61,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "1793458819301404673",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -70,10 +71,21 @@
"size": 14,
"record": "{record}"
}
},
"columnWidth": {
}
},
"visualParams": {
"rowKey": "key",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "sourceType","width": 150,"align": "left","title": "问题主体类型","key": "58E0E2F7-4F34-4C01-9AD6-777CABC1672F"},
{"dataRenderingMode": "imageText","dataIndex": "problemType","width": 150,"align": "left","title": "问题类型","key": "8ACDE41E-CAE3-4A27-82EF-8F7452164A66","imageAttributeName": "problemTypePic"},
{"dataRenderingMode": "defaultText","dataIndex": "problemDesc","width": 150,"align": "left","title": "问题描述","key": "9FAE9BDE-D285-4F5C-9EFB-F1560A78CBA4"},
{"dataRenderingMode": "defaultText","dataIndex": "problemTime","width": 180,"align": "left","title": "问题时间","key": "F00231C2-6AB5-470E-8F50-9FDD242DA75A"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnit","width": 200,"align": "left","title": "主体单位","key": "8934A41D-EC48-4E67-9F3C-EC87A4742499"},
{"dataRenderingMode": "defaultText","dataIndex": "principalUnitType","width": 150,"align": "left","title": "单位类型","key": "5A81B891-D5D4-4765-A610-BF9FA7D55FAB"},
{"dataRenderingMode": "defaultText","dataIndex": "governingBody","width": 150,"align": "left","title": "管辖机构","key": "B8D224B4-3843-4270-B508-0D6D8147D3D2"},
{"dataRenderingMode": "defaultText","dataIndex": "regionName","width": 180,"align": "left","title": "所属区域","key": "BAC9DA62-A6D7-4A75-BF9E-DB7AD0B1D4A6"},
{"dataRenderingMode": "defaultText","dataIndex": "problemStatus","width": 100,"align": "left","title": "问题状态","key": "C79630FE-7C73-4AA9-A68A-F1846204582B"}
]
}
}
],
......
{
"name": "非检验检测机构模板",
"tabs": [
{
"key": "basic",
"displayName": "基本信息",
"renderType": "basic",
"formSeq": "1793454184889085953",
"dataConfig": {
"api": {
"reqType":"GET",
"url":"/tcm/baseEnterprise/getInfoByUseCode",
"params": {
"useCode": "{useUnitCode}"
}
}
}
},
{
"key": "devtable",
"displayName": "设备列表",
"renderType": "table",
"formSeq": "1792821076963651585",
"dataConfig": {
"api": {
"reqType":"GET",
"url":"/jg/equipment-register/page",
"params": {
"number": 1,
"size": 10,
"USE_UNIT_CREDIT_CODE": "{useUnitCode}"
}
}
}
}
],
"content": {
"basic": {
"columns": 2,
"datas": [],
"qrcode": {
"src": "/public/ag/zongshu.png",
"text": "2023/12/26",
"subtext": "23:10:16"
},
"subs": []
}
}
}
\ No newline at end of file
......@@ -239,4 +239,10 @@ public class IdxBizJgUseInfo extends TzsBaseEntity {
private Boolean isIntoManagement;
/**
* 工程装置名称(工业管道使用)
*/
@TableField("\"PROJECT_CONTRAPTION\"")
private String projectContraption;
}
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