Commit 2b46c876 authored by 韩桐桐's avatar 韩桐桐

ymt管辖所查询增加条件

parent dd05842b
...@@ -21,8 +21,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto; ...@@ -21,8 +21,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue; import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto; import com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto;
import com.yeejoin.amos.boot.module.common.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.common.api.enums.*; import com.yeejoin.amos.boot.module.common.api.enums.*;
import com.yeejoin.amos.boot.module.common.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto; 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.dto.FourColorCountDataDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto;
...@@ -3982,12 +3982,14 @@ public class JGDPStatisticsServiceImpl { ...@@ -3982,12 +3982,14 @@ public class JGDPStatisticsServiceImpl {
Map<String, Object> parentModel = getSuperviseTreeByLoginUnitCode(orgCodeP).get(0); Map<String, Object> parentModel = getSuperviseTreeByLoginUnitCode(orgCodeP).get(0);
List<Map<String, Object>> childrenRegionModelList = (List<Map<String, Object>>) parentModel.get("children"); List<Map<String, Object>> childrenRegionModelList = (List<Map<String, Object>>) parentModel.get("children");
List<RegionModel> regionModels = Lists.newArrayList(); List<RegionModel> regionModels = Lists.newArrayList();
childrenRegionModelList.forEach(r -> { if (childrenRegionModelList != null) {
RegionModel regionModel = new RegionModel(); childrenRegionModelList.forEach(r -> {
regionModel.setRegionCode(Integer.parseInt(r.get("companyCode").toString())); RegionModel regionModel = new RegionModel();
regionModel.setRegionName((String) r.get("companyName")); regionModel.setRegionCode(Integer.parseInt(r.get("companyCode").toString()));
regionModels.add(regionModel); regionModel.setRegionName((String) r.get("companyName"));
}); regionModels.add(regionModel);
});
}
// 如果是省局、地市局、区县局查看,则把各对应省局、地市局、区县局数据单独添加到列表中 // 如果是省局、地市局、区县局查看,则把各对应省局、地市局、区县局数据单独添加到列表中
if (!ValidationUtil.isEmpty(RegulatoryUnitLevelEnum.getEnumByCode((String) parentModel.get("level")))) { if (!ValidationUtil.isEmpty(RegulatoryUnitLevelEnum.getEnumByCode((String) parentModel.get("level")))) {
RegionModel regionModel = new RegionModel(); RegionModel regionModel = new RegionModel();
......
...@@ -43,7 +43,7 @@ public interface IRegUnitInfoService { ...@@ -43,7 +43,7 @@ public interface IRegUnitInfoService {
* 获取管辖机构树 * 获取管辖机构树
* @return 组织架构中单位级别为:省级、地市级、区县级的单位 * @return 组织架构中单位级别为:省级、地市级、区县级的单位
*/ */
Collection getManagementUnitTree(String orgCode); Collection getManagementUnitTree(String orgCode, String cityCode);
/** /**
* 单位注销 * 单位注销
......
package com.yeejoin.amos.boot.module.ymt.flc.biz.controller; package com.yeejoin.amos.boot.module.ymt.flc.biz.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
...@@ -148,8 +147,9 @@ public class RegUnitInfoController extends BaseController { ...@@ -148,8 +147,9 @@ public class RegUnitInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/management-unit/tree") @GetMapping(value = "/management-unit/tree")
@ApiOperation(httpMethod = "GET", value = "管辖机构树", notes = "管辖机构树") @ApiOperation(httpMethod = "GET", value = "管辖机构树", notes = "管辖机构树")
public ResponseModel<Collection> managementUnitTree(@RequestParam(required = false)String orgCode) { public ResponseModel<Collection> managementUnitTree(@RequestParam(required = false) String orgCode,
Collection result = iRegUnitInfoService.getManagementUnitTree(orgCode); @RequestParam(required = false) String cityCode) {
Collection result = iRegUnitInfoService.getManagementUnitTree(orgCode, cityCode);
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
} }
......
...@@ -14,17 +14,12 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService; ...@@ -14,17 +14,12 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.common.BizCommonConstant; import com.yeejoin.amos.boot.module.ymt.api.common.BizCommonConstant;
import com.yeejoin.amos.boot.module.ymt.api.common.CommonException;
import com.yeejoin.amos.boot.module.ymt.api.dto.BaseUnitLicenceDto; import com.yeejoin.amos.boot.module.ymt.api.dto.BaseUnitLicenceDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.BaseUnitLicence; import com.yeejoin.amos.boot.module.ymt.api.entity.BaseUnitLicence;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.CompanyLevelEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.CompanyLevelEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.ymt.biz.service.impl.BaseUnitLicenceServiceImpl; import com.yeejoin.amos.boot.module.ymt.biz.service.impl.*;
import com.yeejoin.amos.boot.module.ymt.biz.service.impl.EquipmentCategoryServiceImpl;
import com.yeejoin.amos.boot.module.ymt.biz.service.impl.StartPlatformTokenService;
import com.yeejoin.amos.boot.module.ymt.biz.service.impl.TzBaseEnterpriseInfoServiceImpl;
import com.yeejoin.amos.boot.module.ymt.biz.service.impl.TzsAuthServiceImpl;
import com.yeejoin.amos.boot.module.ymt.biz.utils.RedisUtil; import com.yeejoin.amos.boot.module.ymt.biz.utils.RedisUtil;
import com.yeejoin.amos.boot.module.ymt.flc.api.dto.RegUnitIcDto; import com.yeejoin.amos.boot.module.ymt.flc.api.dto.RegUnitIcDto;
import com.yeejoin.amos.boot.module.ymt.flc.api.dto.RegUnitInfoDto; import com.yeejoin.amos.boot.module.ymt.flc.api.dto.RegUnitInfoDto;
...@@ -439,7 +434,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -439,7 +434,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
} }
@Override @Override
public Collection getManagementUnitTree(String orgCode) { public Collection getManagementUnitTree(String orgCode, String cityCode) {
List<LinkedHashMap> companyModels = (List<LinkedHashMap>) redisUtil.get(BizCommonConstant.COMPANY_TREE_REDIS_KEY); List<LinkedHashMap> companyModels = (List<LinkedHashMap>) redisUtil.get(BizCommonConstant.COMPANY_TREE_REDIS_KEY);
if (ValidationUtil.isEmpty(companyModels)) { if (ValidationUtil.isEmpty(companyModels)) {
tzsAuthServiceImpl.setRequestContext(); tzsAuthServiceImpl.setRequestContext();
...@@ -449,6 +444,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -449,6 +444,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
companyModels = findNodesByCondition(companyModels, "orgCode", orgCode, "children"); companyModels = findNodesByCondition(companyModels, "orgCode", orgCode, "children");
companyModels = (List<LinkedHashMap>) companyModels.get(0).get("children"); companyModels = (List<LinkedHashMap>) companyModels.get(0).get("children");
} }
if (!ValidationUtil.isEmpty(cityCode)) {
companyModels = findNodesByCondition(companyModels, "companyCode", cityCode, "children");
}
return companyModels; return companyModels;
} }
......
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