Commit fdf551f8 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register_to_0715' of…

Merge branch 'develop_tzs_register_to_0715' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register_to_0715
parents d7045f76 b0c9cf42
...@@ -1293,7 +1293,8 @@ public class DPStatisticsServiceImpl { ...@@ -1293,7 +1293,8 @@ public class DPStatisticsServiceImpl {
} }
public List<Map<String, Object>> dataStatisticByReginCode(DPFilterParamDto dpFilterParamDto) { 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(); DPFilterParamDto filterParamDto = new DPFilterParamDto();
filterParamDto.setCityCode(r.getRegionCode().toString()); filterParamDto.setCityCode(r.getRegionCode().toString());
Map<String, Object> itemResult = staticsCenterMapCountDataForRegin(filterParamDto); Map<String, Object> itemResult = staticsCenterMapCountDataForRegin(filterParamDto);
...@@ -1304,34 +1305,6 @@ public class DPStatisticsServiceImpl { ...@@ -1304,34 +1305,6 @@ public class DPStatisticsServiceImpl {
itemResult.put(REGION_NAME, r.getRegionName()); itemResult.put(REGION_NAME, r.getRegionName());
return itemResult; return itemResult;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 杨陵区/韩城市 数据过滤添至返回结果
result = reginStepDataHandle(result);
return result;
}
private List<Map<String, Object>> reginStepDataHandle(List<Map<String, Object>> result) {
// 杨凌区数据统计
String ylOrgCode = commonMapper.getOrgCodeByCompanyCode(ReginStepEnum.YANGLING.getCode());
Map<String, Object> ylMap = new HashMap<>();
Long ylCertificateCount = jgUseRegistrationManageMapper.countCertificateByReginCode(ylOrgCode);
Long ylDeviceCount = equipmentCategoryMapper.countEquipByReginCode(ylOrgCode);
ylMap.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), ylCertificateCount);
ylMap.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), ylDeviceCount);
ylMap.put(REGION_CODE, ReginStepEnum.YANGLING.getCode());
ylMap.put(REGION_NAME, ReginStepEnum.YANGLING.getName());
result.add(ylMap);
// 韩城市数据统计
String hcOrgCode = commonMapper.getOrgCodeByCompanyCode(ReginStepEnum.HANCHENG.getCode());
Map<String, Object> hcMap = new HashMap<>();
Long hcCertificateCount = jgUseRegistrationManageMapper.countCertificateByReginCode(hcOrgCode);
Long hcDeviceCount = equipmentCategoryMapper.countEquipByReginCode(hcOrgCode);
hcMap.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), hcCertificateCount);
hcMap.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), hcDeviceCount);
hcMap.put(REGION_CODE, ReginStepEnum.HANCHENG.getCode());
hcMap.put(REGION_NAME, ReginStepEnum.HANCHENG.getName());
result.add(hcMap);
return result; return result;
} }
......
...@@ -62,7 +62,11 @@ public class DPSubServiceImpl { ...@@ -62,7 +62,11 @@ public class DPSubServiceImpl {
JSONArray tabs = result.getJSONArray("tabs"); JSONArray tabs = result.getJSONArray("tabs");
JSONObject content = result.getJSONObject("content"); JSONObject content = result.getJSONObject("content");
tabs.stream().forEach(x -> { tabs.stream().forEach(x -> {
this.buildContent(content, (JSONObject) x, param); 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; return result;
} }
...@@ -94,7 +98,10 @@ public class DPSubServiceImpl { ...@@ -94,7 +98,10 @@ public class DPSubServiceImpl {
Object showHideRules = JsonValueUtils.getValueByKey(JSONObject.parseObject(formPage.getContent()), "formConfig", "formConfig.showHideRules"); Object showHideRules = JsonValueUtils.getValueByKey(JSONObject.parseObject(formPage.getContent()), "formConfig", "formConfig.showHideRules");
// 处理显隐逻辑 // 处理显隐逻辑
long s = System.currentTimeMillis();
this.processShowHideRules(children, showHideRules, apiResult); 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()); List<Object> noHiddenChildren = children.stream().filter(x -> !"hidden".equals(JsonValueUtils.getValueByKey(x, "visualParams", "visualParams.behavior"))).collect(Collectors.toList());
// 设置一个图片附件分组 // 设置一个图片附件分组
...@@ -118,6 +125,8 @@ public class DPSubServiceImpl { ...@@ -118,6 +125,8 @@ public class DPSubServiceImpl {
this.buildSubFormData(map, i, yObj, apiResult); this.buildSubFormData(map, i, yObj, apiResult);
} }
} }
long fe = System.currentTimeMillis();
log.info("{}tab页处理分类逻辑,共耗时:{} 毫秒", tab.get("displayName"), (fe - e));
if (!ValidationUtil.isEmpty(matinfo.getJSONArray("datas"))) { if (!ValidationUtil.isEmpty(matinfo.getJSONArray("datas"))) {
matinfo.put("columns", map.get("columns")); matinfo.put("columns", map.get("columns"));
map.getJSONArray("subs").add(matinfo); map.getJSONArray("subs").add(matinfo);
......
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