+ * 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 StaffOrgNameResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ //工作人员所属组织Id
+ private String agencyId = "";
+ //人员Id
+ private String staffId = "";
+ //人员注册时所属组织名【组织-组织,组织-部门,组织-网格】
+ private String orgName = "";
+ //工作人员添加入口Id(agencyId;deptId;gridId)
+ private String orgId = "";
+ //工作人员添加入口类型(组织:agency;部门:dept;网格:gridId)
+ private String orgType = "";
+
+}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffOrgRelationDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffOrgRelationDao.java
index a4d6610658..97c4e875b7 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffOrgRelationDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffOrgRelationDao.java
@@ -18,8 +18,12 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.result.StaffOrgNameResultDTO;
import com.epmet.entity.StaffOrgRelationEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
/**
* 工作人员注册组织关系表
@@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface StaffOrgRelationDao extends BaseDao {
-
+ /**
+ * @Description 批量查询工作人员注册组织信息
+ * @author sun
+ */
+ List selelctStaffOrg(@Param("staffIdList") List staffIdList);
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
index fd8be5cdbd..dae768cbf9 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
@@ -36,6 +36,7 @@ import com.epmet.dao.CustomerStaffGridDao;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
+import com.epmet.entity.CustomerAgencyEntity;
import com.epmet.entity.CustomerGridEntity;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.OperCrmOpenFeignClient;
@@ -712,7 +713,12 @@ public class CustomerGridServiceImpl extends BaseServiceImpl getBaseInfo(CustomerGridFormDTO customerGridFormDTO) {
- return new Result().ok(ConvertUtils.sourceToTarget(baseDao.selectById(customerGridFormDTO.getGridId()), CustomerGridDTO.class));
+ CustomerGridDTO restltDTO = ConvertUtils.sourceToTarget(baseDao.selectById(customerGridFormDTO.getGridId()), CustomerGridDTO.class);
+ if (null != restltDTO) {
+ CustomerAgencyEntity entity = customerAgencyService.selectById(restltDTO.getPid());
+ restltDTO.setAgencyName(null != entity ? entity.getOrganizationName() : "");
+ }
+ return new Result().ok(restltDTO);
}
/**
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
index 9d6504d673..06e41fbbc2 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
@@ -15,6 +15,7 @@ import com.epmet.constant.CustomerAgencyConstant;
import com.epmet.constant.OrgInfoConstant;
import com.epmet.dao.CustomerAgencyDao;
import com.epmet.dao.CustomerStaffAgencyDao;
+import com.epmet.dao.StaffOrgRelationDao;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
@@ -75,6 +76,8 @@ public class StaffServiceImpl implements StaffService {
private StaffOrgRelationService staffOrgRelationService;
@Resource
private CustomerStaffRedis customerStaffRedis;
+ @Resource
+ private StaffOrgRelationDao staffOrgRelationDao;
@Override
public Result getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) {
@@ -243,6 +246,18 @@ public class StaffServiceImpl implements StaffService {
result.setRootAgencyName(agency.getOrganizationName());
}
//2021.08.27 zhaoqf end
+ //2021.9.17 sun 添加工作人员注册组织、类型、id返参 start
+ List staffIdList = new ArrayList<>();
+ staffIdList.add(result.getStaffId());
+ List list = staffOrgRelationDao.selelctStaffOrg(staffIdList);
+ list.forEach(l->{
+ if(l.getStaffId().equals(result.getStaffId())){
+ result.setOrgId(l.getOrgId());
+ result.setOrgName(l.getOrgName());
+ result.setOrgType(l.getOrgType());
+ }
+ });
+ //2021.9.17 sun 添加工作人员注册组织、类型、id返参 end
return result;
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffOrgRelationDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffOrgRelationDao.xml
index 350dae73ac..76f749c00a 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffOrgRelationDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffOrgRelationDao.xml
@@ -3,6 +3,81 @@
-
+
\ No newline at end of file
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java
index 0bada1c5ee..64f790c115 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java
@@ -58,4 +58,11 @@ public class UserInfoOnEnterGridResultDTO implements Serializable{
* XX街道-YYY 如果是未认证居民,这一列为空
*/
private String userStreetTrueName;
+
+ //工作人员添加入口Id(agencyId;deptId;gridId)
+ private String orgId = "";
+ //人员注册时所属组织名【组织-组织,组织-部门,组织-网格】
+ private String orgName = "";
+ //工作人员添加入口类型(组织:agency;部门:dept;网格:gridId)
+ private String orgType = "";
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java
index e2aaae2963..efafe3a963 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java
@@ -301,6 +301,9 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl gridDTOResult = govOrgFeignClient.getGridBaseInfoByGridId(customerGridFormDTO);
if(gridDTOResult.success() && null != gridDTOResult.getData()){
resultObj.setCurrentGridName(gridDTOResult.getData().getGridName());
+ resultObj.setOrgId(resultObj.getCurrentGridId());
+ resultObj.setOrgName(gridDTOResult.getData().getAgencyName()+"-"+gridDTOResult.getData().getGridName());
+ resultObj.setOrgType("grid");
}else{
//查询网格名称失败
log.warn(String.format("查找网格信息失败,网格Id:【%s】",gridId));