+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+
+/**
+ * 获取组织列表-接口入参
+ *
+ * @author sun
+ */
+@Data
+public class AgencyListFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 机关组织Id
+ */
+ @NotBlank(message = "组织机构ID不能为空")
+ private String agencyId;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyListResultDTO.java
new file mode 100644
index 0000000000..9673700fcc
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyListResultDTO.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 获取组织列表-接口返参
+ *
+ * @author sun
+ */
+@Data
+public class AgencyListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 机关组织Id
+ */
+ private String agencyId;
+
+ /**
+ * 机关组织名称
+ */
+ private String agencyName;
+
+ /**
+ * 总人数
+ */
+ private Integer totalUser;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
index 501e6c05bd..82cd76e7c3 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
@@ -20,6 +20,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.*;
import com.epmet.dto.result.AddAgencyResultDTO;
+import com.epmet.dto.result.AgencyListResultDTO;
import com.epmet.dto.result.AgencydetailResultDTO;
import com.epmet.dto.result.SubAgencyResultDTO;
import com.epmet.service.AgencyService;
@@ -29,6 +30,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import java.util.List;
+
/**
* 组织机构
@@ -97,4 +100,14 @@ public class AgencyController {
return agencyService.subAgencyList(formDTO);
}
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 获取组织列表
+ */
+ @PostMapping("agencylist")
+ public Result> agencyList(@RequestBody AgencyListFormDTO formDTO) {
+ return agencyService.agencyList(formDTO);
+ }
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
index 0dc66e7bdd..8a4c14548b 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
@@ -18,6 +18,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.result.AgencyListResultDTO;
import com.epmet.dto.result.ParentListResultDTO;
import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.dto.result.SubListResultDTO;
@@ -59,4 +60,12 @@ public interface CustomerAgencyDao extends BaseDao {
* @Description 组织首页-下级机关列表
**/
List selectSubAgencyById(@Param("pId") String pId);
+
+ /**
+ * @param pId
+ * @return
+ * @Author sun
+ * @Description 获取组织列表
+ **/
+ List selectAgencyList(@Param("pId") String pId);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java
index 3df8e719d4..f811f71f80 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java
@@ -22,10 +22,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.*;
-import com.epmet.dto.result.AddAgencyResultDTO;
-import com.epmet.dto.result.AgencydetailResultDTO;
-import com.epmet.dto.result.StaffOrgsResultDTO;
-import com.epmet.dto.result.SubAgencyResultDTO;
+import com.epmet.dto.result.*;
import com.epmet.entity.CustomerAgencyEntity;
import java.util.List;
@@ -77,4 +74,12 @@ public interface AgencyService {
* @Description 组织首页-下级机关列表
*/
Result subAgencyList(SubAgencyFormDTO formDTO);
+
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 获取组织列表
+ */
+ Result> agencyList(AgencyListFormDTO formDTO);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
index c03526f6cd..ae13436d6a 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
@@ -182,4 +182,16 @@ public class AgencyServiceImpl implements AgencyService {
subAgencyResultDTO.setSubAgencyCount(agencyList.size());
return new Result().ok(subAgencyResultDTO);
}
+
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 获取组织列表
+ */
+ @Override
+ public Result> agencyList(AgencyListFormDTO formDTO) {
+ List agencyList = customerAgencyDao.selectAgencyList(formDTO.getAgencyId());
+ return new Result>().ok(agencyList);
+ }
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
index a80b7334c4..1740a0c0ea 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
@@ -59,4 +59,15 @@
AND pid = #{pId}
ORDER BY CREATED_TIME DESC
+
+
\ No newline at end of file