|
@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.epmet.commons.mybatis.entity.DataScope; |
|
|
import com.epmet.commons.mybatis.entity.DataScope; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; |
|
|
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.ServiceConstant; |
|
|
import com.epmet.commons.tools.constant.ServiceConstant; |
|
@ -54,7 +53,6 @@ import com.epmet.feign.AuthFeignClient; |
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
import com.epmet.feign.OperCrmOpenFeignClient; |
|
|
import com.epmet.feign.OperCrmOpenFeignClient; |
|
|
import com.epmet.send.SendMqMsgUtil; |
|
|
|
|
|
import com.epmet.service.CustomerStaffService; |
|
|
import com.epmet.service.CustomerStaffService; |
|
|
import com.epmet.service.GovStaffRoleService; |
|
|
import com.epmet.service.GovStaffRoleService; |
|
|
import com.epmet.service.StaffRoleService; |
|
|
import com.epmet.service.StaffRoleService; |
|
@ -64,7 +62,6 @@ import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.logging.log4j.LogManager; |
|
|
import org.apache.logging.log4j.LogManager; |
|
|
import org.apache.logging.log4j.Logger; |
|
|
import org.apache.logging.log4j.Logger; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
@ -603,7 +600,31 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
public List<StaffSinGridResultDTO> getStaffInfoList(UserIdsFormDTO formDTO) { |
|
|
public List<StaffSinGridResultDTO> getStaffInfoList(UserIdsFormDTO formDTO) { |
|
|
List<String> userIds = formDTO.getUserIds(); |
|
|
List<String> userIds = formDTO.getUserIds(); |
|
|
// 1. 根据userId查询人员基本信息
|
|
|
// 1. 根据userId查询人员基本信息
|
|
|
List<StaffSinGridResultDTO> staffInfoList = customerStaffDao.getStaffInfoList(userIds); |
|
|
List<StaffSinGridResultDTO> staffInfoList = new ArrayList<>(); |
|
|
|
|
|
userIds.forEach(staffId->{ |
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), staffId); |
|
|
|
|
|
if (staffInfo ==null){ |
|
|
|
|
|
log.error("getStaffInfoList fail customerId:{}, staffId:{} not exist in db",formDTO.getCustomerId(), staffId); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
StaffSinGridResultDTO resultDTO = new StaffSinGridResultDTO(); |
|
|
|
|
|
resultDTO.setStaffId(staffId); |
|
|
|
|
|
resultDTO.setStaffName(staffInfo.getRealName()); |
|
|
|
|
|
resultDTO.setHeadPhoto(staffInfo.getHeadPhoto()); |
|
|
|
|
|
resultDTO.setGender(staffInfo.getGender()); |
|
|
|
|
|
|
|
|
|
|
|
List<RoleResultDTO> roleInfoList = new ArrayList<>(); |
|
|
|
|
|
staffInfo.getRoleMap().forEach((key,value) ->{ |
|
|
|
|
|
RoleResultDTO dto = new RoleResultDTO(); |
|
|
|
|
|
dto.setRoleKey(key); |
|
|
|
|
|
dto.setRoleName(value); |
|
|
|
|
|
roleInfoList.add(dto); |
|
|
|
|
|
}); |
|
|
|
|
|
resultDTO.setRoleList(roleInfoList); |
|
|
|
|
|
staffInfoList.add(resultDTO); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
/*List<StaffSinGridResultDTO> staffInfoList = customerStaffDao.getStaffInfoList(userIds); |
|
|
if (staffInfoList.size() == NumConstant.ZERO){ |
|
|
if (staffInfoList.size() == NumConstant.ZERO){ |
|
|
return staffInfoList; |
|
|
return staffInfoList; |
|
|
} |
|
|
} |
|
@ -619,7 +640,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
staffInfo.setRoleList(roleResult); |
|
|
staffInfo.setRoleList(roleResult); |
|
|
}); |
|
|
});*/ |
|
|
return staffInfoList; |
|
|
return staffInfoList; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|