diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 3d26395c0e..edf95f1a78 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -362,7 +362,7 @@ public class CustomerAgencyController { @PostMapping("agencylist") public Result getAgencyList(@LoginUser TokenDto tokenDTO,@RequestBody GetAgencyListFormDTO formDTO) { if(AppClientConstant.APP_OPER.equals(tokenDTO.getApp())){ - ValidatorUtils.validateEntity(formDTO.getCustomerId(),GetAgencyListFormDTO.OperAddUserShowGroup.class); + ValidatorUtils.validateEntity(formDTO,GetAgencyListFormDTO.OperAddUserShowGroup.class); }else{ if (StringUtils.isBlank(formDTO.getCustomerId())){ formDTO.setCustomerId(tokenDTO.getCustomerId()); @@ -416,6 +416,17 @@ public class CustomerAgencyController { return new Result().ok(customerAgencyService.getOrgTreeData(tokenDTO.getUserId(),tokenDTO.getCustomerId())); } + /** + * 根组织开始,含网格 + * @param formDTO + * @return + */ + @PostMapping("agencygridtreeV2") + public Result getOrgList(@RequestBody GetAgencyListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO,GetAgencyListFormDTO.OperAddUserShowGroup.class); + return new Result().ok(customerAgencyService.getOrgTreeData(formDTO.getUserId(),formDTO.getCustomerId())); + } + /** * @Description 【事件】社区服务热线 * @author sun diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcDangerousChemicalsExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcDangerousChemicalsExcel.java index ee012d722e..4f1dd34ad2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcDangerousChemicalsExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcDangerousChemicalsExcel.java @@ -49,7 +49,7 @@ public class IcDangerousChemicalsExcel { @ColumnWidth(25) private String securityPrincipalName; - @ExcelProperty(value = "安全负责电话") + @ExcelProperty(value = "安全负责人电话") @ColumnWidth(25) private String securityPrincipalMobile; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsModel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsModel.java index 07b3813ed4..d18dd7566a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsModel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsModel.java @@ -28,8 +28,8 @@ public class DangerousChemicalsModel { @ExcelProperty(value = "企业名称") private String name; - @NotBlank(message = "企业类型不能为空") - @ExcelProperty(value = "企业类型") + @NotBlank(message = "企业类别不能为空") + @ExcelProperty(value = "企业类别") private String categoryName; /** @@ -168,7 +168,7 @@ public class DangerousChemicalsModel { /** * 灵山:企业介绍 */ - @ColumnWidth(5) + @ColumnWidth(50) @ExcelProperty(value = "企业介绍") private String companyProfile; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index ab291ac021..a5887e6c21 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -270,7 +270,7 @@ public interface CustomerAgencyService extends BaseService /** * desc:获取用户所属组织的组织及网格树 - * @param staffId + * @param staffId 为空时,从根组织返回 * @return */ AgencyTreeResultDTO getOrgTreeData(String staffId,String customerId); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index dbb0bd544e..e04699567f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -1211,14 +1211,35 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl%s", staffId)); - throw new RenException(CustomerAgencyConstant.SELECT_STAFF_AGENCY_EXCEPTION); + AgencyResultDTO rootAgency=new AgencyResultDTO(); + if(StringUtils.isNotBlank(staffId)){ + //1.查询工作人员所属组织信息 + rootAgency = baseDao.selectAgencyByStaffId(staffId); + if (null == rootAgency) { + logger.error(String.format("查询工作人员所属组织信息失败,staffId->%s", staffId)); + throw new RenException(CustomerAgencyConstant.SELECT_STAFF_AGENCY_EXCEPTION); + } + }else{ + LambdaQueryWrapper rootQuery=new LambdaQueryWrapper<>(); + rootQuery.eq(CustomerAgencyEntity::getCustomerId,customerId) + .eq(CustomerAgencyEntity::getPid,NumConstant.ZERO_STR); + CustomerAgencyEntity rootEntity=baseDao.selectOne(rootQuery); + rootAgency.setAgencyId(rootEntity.getId()); + rootAgency.setAgencyName(rootEntity.getOrganizationName()); + rootAgency.setPids(rootEntity.getPids()); + rootAgency.setPid(rootEntity.getPid()); + rootAgency.setLevel(rootEntity.getLevel()); + rootAgency.setLongitude(rootEntity.getLongitude()); + rootAgency.setLatitude(rootEntity.getLatitude()); } result.setPid(rootAgency.getPid()); result.setAgencyName(rootAgency.getAgencyName()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcDangerousChemicalsServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcDangerousChemicalsServiceImpl.java index 42e644d84d..4bb95cf9a0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcDangerousChemicalsServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcDangerousChemicalsServiceImpl.java @@ -258,7 +258,7 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_DANGER_TYPE.getCode()); - if (!statusRes.success() || MapUtils.isNotEmpty(statusRes.getData())) { + if (!statusRes.success() || MapUtils.isEmpty(statusRes.getData())) { throw new EpmetException("获取IC_DANGER_TYPE字典表失败"); } Map dangerTypeMap = statusRes.getData(); @@ -326,7 +326,7 @@ public class IcDangerousChemicalsServiceImpl extends BaseServiceImpl - AND dc.org_id_path like concat(#{orgIdPath},'%') + AND dc.AGENCY_ID_PATH like concat(#{orgIdPath},'%')