diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java index 33416972ae..f0766f2b0b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java @@ -96,4 +96,9 @@ public class StaffBasicInfoResultDTO implements Serializable { * 地区编码全路径:例如:37,3702,370203,370203005,370203005015 */ private List areaCodePath; + + /** + * 工作人员所属组织的行政地区编码 + */ + private String areaCode; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 72b43b0506..01283f45c4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.ExceptionUtils; @@ -731,20 +732,21 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl>().ok(listResultDTO); } - @Override - public Result selectStaffBasicInfo(String userId,String customerId) { + @Override + public Result selectStaffBasicInfo(String userId, String customerId) { StaffBasicInfoResultDTO resultDTO = baseDao.selectStaffBasicInfo(userId); - if(null!=resultDTO){ - resultDTO.setRoleList(baseDao.selectStaffRoles(userId,resultDTO.getCustomerId())); + if (null != resultDTO) { + resultDTO.setRoleList(baseDao.selectStaffRoles(userId, resultDTO.getCustomerId())); CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); - if (null != staffInfo){ + if (null != staffInfo) { resultDTO.setAgencyId(staffInfo.getAgencyId()); resultDTO.setAgencyName(staffInfo.getAgencyName()); resultDTO.setLevel(staffInfo.getLevel()); resultDTO.setLongitude(staffInfo.getLongitude()); resultDTO.setLatitude(staffInfo.getLatitude()); - AgencyInfoCache agency= CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); + AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); resultDTO.setAreaCodePath(null != agency && !CollectionUtils.isEmpty(agency.getAreaCodePath()) ? agency.getAreaCodePath() : new ArrayList<>()); + resultDTO.setAreaCode(null != agency && StringUtils.isNotBlank(agency.getAreaCode()) ? agency.getAreaCode() : StrConstant.EPMETY_STR); } //获取工作人员所属客户名 CustomerDTO dto = new CustomerDTO(); @@ -757,8 +759,8 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl().ok(resultDTO); - } + return new Result().ok(resultDTO); + } /** * @param formDTO