Browse Source

工作端:我的信息返回myagencyName,agencyId,修改接口getLatestCustomer返回agencyName

master
yinzuomei 5 years ago
parent
commit
084379b8a4
  1. 8
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/LatestCustomerResultDTO.java
  2. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/MineResultDTO.java
  3. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java
  4. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java

8
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/LatestCustomerResultDTO.java

@ -21,9 +21,15 @@ public class LatestCustomerResultDTO implements Serializable {
*/ */
private String customerName; private String customerName;
/** /**
* 用户所属组织id任意一条 * 用户所属组织id
*/ */
private String agencyId; private String agencyId;
/**
* 用户所属组织名称
*/
private String agencyName;
/** /**
* 工作人员头像 * 工作人员头像
*/ */

10
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/MineResultDTO.java

@ -40,4 +40,14 @@ public class MineResultDTO implements Serializable {
* 角色 * 角色
*/ */
private List<String> roleList; private List<String> roleList;
/**
* 我所属的机关id
*/
private String agencyId;
/**
* 我所属的机关名称
*/
private String myAgencyName;
} }

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java

@ -131,6 +131,11 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl<CustomerStaf
CustomerStaffAgencyDTO customerStaffAgencyDTO = baseDao.selectLatestCustomerByStaff(userId); CustomerStaffAgencyDTO customerStaffAgencyDTO = baseDao.selectLatestCustomerByStaff(userId);
resultDTO.setAgencyId(customerStaffAgencyDTO.getAgencyId()); resultDTO.setAgencyId(customerStaffAgencyDTO.getAgencyId());
CustomerAgencyDTO customerAgencyDTO=customerAgencyService.get(customerStaffAgencyDTO.getAgencyId());
if(null!=customerAgencyDTO){
//用户所属机关名称
resultDTO.setAgencyName(customerAgencyDTO.getOrganizationName());
}
resultDTO.setCustomerId(customerStaffAgencyDTO.getCustomerId()); resultDTO.setCustomerId(customerStaffAgencyDTO.getCustomerId());
//获取工作人员头像 //获取工作人员头像
CustomerStaffDTO customerStaffParam = new CustomerStaffDTO(); CustomerStaffDTO customerStaffParam = new CustomerStaffDTO();

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java

@ -3,6 +3,7 @@ package com.epmet.service.impl;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerStaffAgencyDTO; import com.epmet.dto.CustomerStaffAgencyDTO;
import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.form.StaffInfoFromDTO; import com.epmet.dto.form.StaffInfoFromDTO;
@ -171,7 +172,15 @@ public class StaffServiceImpl implements StaffService {
result.setStaffHeadPhoto(staffDetail.getHeadPhoto()); result.setStaffHeadPhoto(staffDetail.getHeadPhoto());
result.setGender(staffDetail.getGender()); result.setGender(staffDetail.getGender());
result.setRoleList(staffDetail.getRoles()); result.setRoleList(staffDetail.getRoles());
//用户所属机关名称(上级-本级)
result.setAgencyName(agencyName); result.setAgencyName(agencyName);
//新增返参: 用户所属机关id
result.setAgencyId(customerStaffAgency.getAgencyId());
CustomerAgencyDTO customerAgencyDTO=customerAgencyService.get(customerStaffAgency.getAgencyId());
if(null!=customerAgencyDTO){
//用户所属机关名称
result.setAgencyName(customerAgencyDTO.getOrganizationName());
}
return result; return result;
} }
} }

Loading…
Cancel
Save