|
@@ -19,8 +19,10 @@ import com.diagbot.vo.UserRoleInfoVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @author wangfeng
|
|
@@ -36,6 +38,8 @@ public class UserRoleFacade extends UserRoleServiceImpl {
|
|
|
UserHospitalFacade userHospitalFacade;
|
|
|
@Autowired
|
|
|
UserRoleService userRoleService;
|
|
|
+ @Autowired
|
|
|
+ HospitalInfoFacade hospitalInfoFacade;
|
|
|
|
|
|
public boolean addUserRoles(UserRoleInfoVO userRoleInfoVO) {
|
|
|
boolean res = false;
|
|
@@ -64,8 +68,16 @@ public class UserRoleFacade extends UserRoleServiceImpl {
|
|
|
}
|
|
|
|
|
|
public List<UserRoleInfoFindDTO> getUserRoles(UserRoleInfoFindVO userRoleInfoFindVO) {
|
|
|
- List<UserRoleInfoFindDTO> data = userRoleService.getUserRoleAlls(userRoleInfoFindVO);
|
|
|
- return data;
|
|
|
+ List<UserRoleInfoFindDTO> dataAll = userRoleService.getUserRoleAlls(userRoleInfoFindVO);
|
|
|
+ List<Long> hospitalId = new ArrayList<>();
|
|
|
+ for (UserRoleInfoFindDTO data : dataAll) {
|
|
|
+ hospitalId.add(data.getHospitalId());
|
|
|
+ }
|
|
|
+ Map<Long, String> hospitalInfoData = hospitalInfoFacade.getHospitalInfoData(hospitalId);
|
|
|
+ for (UserRoleInfoFindDTO userData : dataAll) {
|
|
|
+ userData.setHospitalName(hospitalInfoData.get(userData.getHospitalId()));
|
|
|
+ }
|
|
|
+ return dataAll;
|
|
|
}
|
|
|
|
|
|
/**
|