Commit 5f1d5250 authored by zhangqingle's avatar zhangqingle

修改接口

parent 15e5f7ff
...@@ -85,26 +85,29 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -85,26 +85,29 @@ public class BLessonServiceImpl implements BLessonService {
} }
List<FindDepartByNameDTO> departs = cotactApiRequestClient.deptListDeptInfoByName(curUser.getCorpId(),""); List<FindDepartByNameDTO> departs = cotactApiRequestClient.deptListDeptInfoByName(curUser.getCorpId(),"");
log.debug("-----MT---departs----"+departs);
//查询该课程推荐的所有人 //查询该课程推荐的所有人
List<BViewRangeSonDTO> selectPersonByLessonIds = bViewrangeRepository.selectPersonByLessonId(curUser.getCorpId(),lessonId); List<BViewRangeSonDTO> selectPersonByLessonIds = bViewrangeRepository.selectPersonByLessonId(curUser.getCorpId(),lessonId);
bLesson.setViewRangePersonList(selectPersonByLessonIds); bLesson.setViewRangePersonList(selectPersonByLessonIds);
//查询该课程推荐的所有部门 //查询该课程推荐的所有部门
List<BViewRangeSonDTO> selectDepartByLessonIds = bViewrangeRepository.selectDepartByLessonId(curUser.getCorpId(),lessonId); List<BViewRangeSonDTO> selectDepartByLessonIds = bViewrangeRepository.selectDepartByLessonId(curUser.getCorpId(),lessonId);
log.debug("--------departs----"+selectDepartByLessonIds);
if ( selectDepartByLessonIds != null && selectDepartByLessonIds.size() > 0){ if ( selectDepartByLessonIds != null && selectDepartByLessonIds.size() > 0){
for (FindDepartByNameDTO depart : departs) { for (FindDepartByNameDTO depart : departs) {
for (BViewRangeSonDTO selectDepartByLessonId : selectDepartByLessonIds) { for (BViewRangeSonDTO selectDepartByLessonId : selectDepartByLessonIds) {
log.error("------1-------"+selectDepartByLessonId);
if ( depart.getId().equals(selectDepartByLessonId.getTargetId())){ if ( depart.getId().equals(selectDepartByLessonId.getTargetId())){
log.error("------2-------"+depart.getName());
selectDepartByLessonId.setTargetName(depart.getName()); selectDepartByLessonId.setTargetName(depart.getName());
} }
} }
} }
bLesson.setViewRangeDepartList(selectDepartByLessonIds); bLesson.setViewRangeDepartList(selectDepartByLessonIds);
} }
log.error("------3-------"+bLesson);
return bLesson; return bLesson;
} }
...@@ -475,20 +478,28 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -475,20 +478,28 @@ public class BLessonServiceImpl implements BLessonService {
//查询结果放入DTO中 //查询结果放入DTO中
param.setDeparts(departs); param.setDeparts(departs);
//查询该课程推荐的所有人 //查询该课程推荐的所有人
List<FindLessonRecommendRspDTO> findLessonPersonRecommend = bRecommendRepository.queryRecommendPersonByLessonId(param); List<FindLessonRecommendRspDTO> findLessonPersonRecommend = new ArrayList<>();
findLessonPersonRecommend = bRecommendRepository.queryRecommendPersonByLessonId(param);
//查询该课程推荐的所有部门 //查询该课程推荐的所有部门
List<FindLessonRecommendRspDTO> findLessonDepartRecommend = bRecommendRepository.queryRecommendDepartByLessonId(param); List<FindLessonRecommendRspDTO> findLessonDepartRecommend = new ArrayList<>();
findLessonDepartRecommend = bRecommendRepository.queryRecommendDepartByLessonId(param);
log.error("---------------"+departs);
if (departs != null && departs.size() > 0 && findLessonDepartRecommend != null && findLessonDepartRecommend.size() > 0) { if (departs != null && departs.size() > 0 && findLessonDepartRecommend != null && findLessonDepartRecommend.size() > 0) {
for (FindDepartByNameDTO depart : departs) { for (FindDepartByNameDTO depart : departs) {
for (FindLessonRecommendRspDTO findLessonRecommendRspDTO : findLessonDepartRecommend) { for (FindLessonRecommendRspDTO findLessonRecommendRspDTO : findLessonDepartRecommend) {
log.error("------------1-------------"+findLessonPersonRecommend);
if (depart.getId().equals(findLessonRecommendRspDTO.getTargetId())) { if (depart.getId().equals(findLessonRecommendRspDTO.getTargetId())) {
log.error("------------2-------------"+findLessonPersonRecommend);
findLessonRecommendRspDTO.setTargetName(depart.getName()); findLessonRecommendRspDTO.setTargetName(depart.getName());
} }
} }
} }
findLessonPersonRecommend.addAll(findLessonDepartRecommend); findLessonPersonRecommend.addAll(findLessonDepartRecommend);
} }
log.error("推荐范围-------------"+findLessonPersonRecommend);
return findLessonPersonRecommend; return findLessonPersonRecommend;
} }
......
...@@ -14,6 +14,7 @@ import org.rcisoft.common.util.feignDto.*; ...@@ -14,6 +14,7 @@ import org.rcisoft.common.util.feignDto.*;
import org.rcisoft.core.exception.ServiceException; import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.result.ResultServiceEnums; import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.result.Ret; import org.rcisoft.core.result.Ret;
import org.rcisoft.core.util.UserUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -576,6 +577,9 @@ public class MTCotactApiRequestClient { ...@@ -576,6 +577,9 @@ public class MTCotactApiRequestClient {
} }
public List<FindDepartByNameDTO> deptListDeptInfoByName(String corpId,String name){ public List<FindDepartByNameDTO> deptListDeptInfoByName(String corpId,String name){
if (StringUtils.isEmpty(name)){
name = "";
}
return contactFeignClient.deptListDeptInfoByName(corpId,name,zxClientType,zxAccountId).getData(); return contactFeignClient.deptListDeptInfoByName(corpId,name,zxClientType,zxAccountId).getData();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment