Commit f1aa4a06 authored by 王淑君's avatar 王淑君

Merge remote-tracking branch 'origin/meiteng' into meiteng

parents 0bacddfc 2230072a
...@@ -377,7 +377,7 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -377,7 +377,7 @@ public class BLessonController extends PaginationController<BLesson> {
* @param * @param
* @return * @return
*/ */
@ApiOperation(value="620 线上课程学员跟踪", notes="线上课程学员跟踪") @ApiOperation(value="620 线上课程学员跟踪", notes="线上课程学员跟踪" ,response = StudentTrackingRspDTO.class)
@GetMapping(value = "/studentTrackingByPagination") @GetMapping(value = "/studentTrackingByPagination")
public Result studentTrackingByPagination(CurUser curUser, @Valid StudentTrackingDTO studentTrackingDTO, BindingResult bindingResult) { public Result studentTrackingByPagination(CurUser curUser, @Valid StudentTrackingDTO studentTrackingDTO, BindingResult bindingResult) {
bLessonPersonService.studentTrackingByPagination(getPaginationUtility(), studentTrackingDTO); bLessonPersonService.studentTrackingByPagination(getPaginationUtility(), studentTrackingDTO);
...@@ -424,7 +424,7 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -424,7 +424,7 @@ public class BLessonController extends PaginationController<BLesson> {
* @param * @param
* @return * @return
*/ */
@ApiOperation(value="623 根据课程Id 查询该课程推荐范围", notes="根据课程id 查询课程推荐范围(人和部门)", response = BLesson.class) @ApiOperation(value="623 根据课程Id 查询该课程推荐范围", notes="根据课程id 查询课程推荐范围(人和部门)", response = FindLessonRecommendRspDTO.class)
@GetMapping(value = "/queryRecommendByLessonId") @GetMapping(value = "/queryRecommendByLessonId")
public Result queryRecommendByLessonId(CurUser curUser, @Valid FindLessonRecommendDTO param, BindingResult bindingResult) { public Result queryRecommendByLessonId(CurUser curUser, @Valid FindLessonRecommendDTO param, BindingResult bindingResult) {
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
...@@ -453,4 +453,20 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -453,4 +453,20 @@ public class BLessonController extends PaginationController<BLesson> {
addMyLearnLessonDTO); addMyLearnLessonDTO);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="626 删除推荐", notes="删除推荐")
@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")
@PostMapping(value = "/deleteRecommend")
public Result deleteRecommend(CurUser curUser, @Valid String lessonId, BindingResult bindingResult) {
PersistModel data = bLessonService.deleteRecommend(lessonId);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
lessonId);
}
} }
...@@ -39,7 +39,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -39,7 +39,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
// 退出课程 // 退出课程
@Update("update b_lesson_person set flag = 0 where business_id = #{id}") @Update("update b_lesson_person set del_flag = 1 where business_id = #{id}")
int quit(String id); int quit(String id);
//查询线上课程学员追踪图表 //查询线上课程学员追踪图表
...@@ -232,4 +232,9 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -232,4 +232,9 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" #{param.isAppoint}) " + " #{param.isAppoint}) " +
"</script>") "</script>")
int insertBLessonPerson(@Param("param") BLessonPerson param); int insertBLessonPerson(@Param("param") BLessonPerson param);
@Select("<script>select * from b_lesson_person where 1=1 " +
"and business_id = #{businessId}</script>")
@ResultMap(value = "BaseResultMap")
BLessonPerson selectById(String businessId);
} }
...@@ -61,7 +61,7 @@ public interface BRecommendRepository extends BaseMapper<BRecommend> { ...@@ -61,7 +61,7 @@ public interface BRecommendRepository extends BaseMapper<BRecommend> {
int insertBRecommendSons(List<BRecommendSon> bRecommendSons); int insertBRecommendSons(List<BRecommendSon> bRecommendSons);
@Select("<script>select brs.business_id businessId, brs.type type, brs.target_id targetId, su.name targetName " + @Select("<script>select brs.business_id businessId, brs.type type, brs.target_id targetId, su.name targetName,su.account_id accountId " +
" from b_recommend_son brs left join b_recommend br on brs.recommend_id = br.business_id " + " from b_recommend_son brs left join b_recommend br on brs.recommend_id = br.business_id " +
" left join b_lesson bl on br.lesson_id = bl.business_id " + " left join b_lesson bl on br.lesson_id = bl.business_id " +
" left join s_user su on brs.target_id = su.business_id " + " left join s_user su on brs.target_id = su.business_id " +
......
...@@ -2,6 +2,7 @@ package org.rcisoft.business.blesson.dto; ...@@ -2,6 +2,7 @@ package org.rcisoft.business.blesson.dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.rcisoft.common.util.feignDto.DeptGetRspDTO;
import java.util.List; import java.util.List;
...@@ -14,7 +15,7 @@ public class FindLessonRecommendDTO { ...@@ -14,7 +15,7 @@ public class FindLessonRecommendDTO {
@ApiModelProperty(value = "课程Id",required = true) @ApiModelProperty(value = "课程Id",required = true)
private String lessonId; private String lessonId;
private List<LessonRecommendDepartDTO> departs; private List<DeptGetRspDTO> departs;
private String userId; private String userId;
......
...@@ -19,4 +19,7 @@ public class FindLessonRecommendRspDTO { ...@@ -19,4 +19,7 @@ public class FindLessonRecommendRspDTO {
@ApiModelProperty(value = "被推荐 人/部门名") @ApiModelProperty(value = "被推荐 人/部门名")
private String targetName; private String targetName;
@ApiModelProperty(value = "被推荐 人/部门accountId")
private String accountId;
} }
...@@ -181,4 +181,12 @@ public interface BLessonService{ ...@@ -181,4 +181,12 @@ public interface BLessonService{
*/ */
List<BLesson> theLessonMangageByPagination(PageUtil pageUtil,CurUser curUser,BLesson bLesson); List<BLesson> theLessonMangageByPagination(PageUtil pageUtil,CurUser curUser,BLesson bLesson);
/**
* 分页查询列表页全部
* @author: zhangqingle
* @param lessonId
* @return
*/
PersistModel deleteRecommend(String lessonId);
} }
...@@ -45,7 +45,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService { ...@@ -45,7 +45,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
@Transactional(propagation = Propagation.REQUIRED, readOnly = false) @Transactional(propagation = Propagation.REQUIRED, readOnly = false)
@Override @Override
public PersistModel quit(QuitLessonDTO quitLessonDTO) { public PersistModel quit(QuitLessonDTO quitLessonDTO) {
BLessonPerson bLessonPerson = bLessonPersonRepository.selectByPrimaryKey(quitLessonDTO.getBusinessId()); BLessonPerson bLessonPerson = bLessonPersonRepository.selectById(quitLessonDTO.getBusinessId());
if ("1".equals(bLessonPerson.getIsAppoint())){ if ("1".equals(bLessonPerson.getIsAppoint())){
throw new ServiceException(ResultExceptionEnum.APPOINT_NOT_CLOSE); throw new ServiceException(ResultExceptionEnum.APPOINT_NOT_CLOSE);
} }
......
...@@ -10,6 +10,7 @@ import org.rcisoft.business.blesson.entity.*; ...@@ -10,6 +10,7 @@ import org.rcisoft.business.blesson.entity.*;
import org.rcisoft.business.blesson.service.BLessonService; import org.rcisoft.business.blesson.service.BLessonService;
import org.rcisoft.business.blesson.util.recursion; import org.rcisoft.business.blesson.util.recursion;
import org.rcisoft.business.blesson.dao.BViewrangeRepository; import org.rcisoft.business.blesson.dao.BViewrangeRepository;
import org.rcisoft.common.util.feignDto.DeptGetRspDTO;
import org.rcisoft.common.util.feignDto.MTUserGetsReqDTO; import org.rcisoft.common.util.feignDto.MTUserGetsReqDTO;
import org.rcisoft.common.util.feignDto.MTUserInfoRspDTO; import org.rcisoft.common.util.feignDto.MTUserInfoRspDTO;
import org.rcisoft.common.util.outClient.MTCotactApiRequestClient; import org.rcisoft.common.util.outClient.MTCotactApiRequestClient;
...@@ -357,28 +358,27 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -357,28 +358,27 @@ public class BLessonServiceImpl implements BLessonService {
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<FindLessonRecommendRspDTO> queryRecommendByLessonId(FindLessonRecommendDTO param) { public List<FindLessonRecommendRspDTO> queryRecommendByLessonId(FindLessonRecommendDTO param) {
//按部门名模糊查询部门id(list)------ //按部门名模糊查询部门id(list)------
// if (StringUtils.isEmpty(param.getViewParam())){
List<LessonRecommendDepartDTO> departs = new ArrayList<>(); // param.setViewParam("");
departs.add(new LessonRecommendDepartDTO("1","111")); // }
departs.add(new LessonRecommendDepartDTO("2","222")); List<DeptGetRspDTO> departs = cotactApiRequestClient.deptListDeptInfoByName(param.getCorpId(),param.getViewParam());
departs.add(new LessonRecommendDepartDTO("3","333"));
//-------------------------------
//查询结果放入DTO中 //查询结果放入DTO中
param.setDeparts(departs); param.setDeparts(departs);
//查询该课程推荐的所有人 //查询该课程推荐的所有人
List<FindLessonRecommendRspDTO> findLessonPersonRecommend = bRecommendRepository.queryRecommendPersonByLessonId(param); List<FindLessonRecommendRspDTO> findLessonPersonRecommend = bRecommendRepository.queryRecommendPersonByLessonId(param);
//查询该课程推荐的所有部门
List<FindLessonRecommendRspDTO> findLessonDepartRecommend = bRecommendRepository.queryRecommendDepartByLessonId(param); List<FindLessonRecommendRspDTO> findLessonDepartRecommend = bRecommendRepository.queryRecommendDepartByLessonId(param);
for (LessonRecommendDepartDTO depart : departs) { if (departs != null && departs.size() > 0 && findLessonDepartRecommend != null && findLessonDepartRecommend.size() > 0){
for (FindLessonRecommendRspDTO findLessonRecommendRspDTO : findLessonDepartRecommend) { for (DeptGetRspDTO depart : departs) {
if ( depart.equals(findLessonRecommendRspDTO.getTargetId())){ for (FindLessonRecommendRspDTO findLessonRecommendRspDTO : findLessonDepartRecommend) {
findLessonRecommendRspDTO.setTargetName(depart.getDepartName()); if ( depart.getId().equals(findLessonRecommendRspDTO.getTargetId())){
findLessonRecommendRspDTO.setTargetName(depart.getName());
}
} }
} }
findLessonPersonRecommend.addAll(findLessonDepartRecommend);
} }
findLessonPersonRecommend.addAll(findLessonDepartRecommend);
return findLessonPersonRecommend; return findLessonPersonRecommend;
} }
...@@ -535,6 +535,24 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -535,6 +535,24 @@ public class BLessonServiceImpl implements BLessonService {
return bLessons; return bLessons;
} }
@Override
public PersistModel deleteRecommend(String lessonId) {
List<String> recommendIds = bRecommendRepository.selectIdByLessonId(lessonId);
if (recommendIds == null || recommendIds.size()<1){
throw new ServiceException(ResultExceptionEnum.NOT_RECOMMEND);
}
//修改推荐表
BRecommend bRecommend = new BRecommend();
bRecommend.setLessonId(lessonId);
UserUtil.setCurrentMergeOperation(bRecommend);
bRecommend.setBusinessId(recommendIds.get(0));
bRecommend.setDelFlag("1");
int line = bRecommendRepository.updateByPrimaryKeySelective(bRecommend);
//删除推荐子表内容
return new PersistModel(line);
}
//遍历标签放入List中 //遍历标签放入List中
List<BLessonLabel> addLabel(BLesson model){ List<BLessonLabel> addLabel(BLesson model){
//标签集合 //标签集合
......
...@@ -194,4 +194,13 @@ public interface ContactFeignClient { ...@@ -194,4 +194,13 @@ public interface ContactFeignClient {
@RequestParam("zxClientType") String zxClientType, @RequestParam("zxClientType") String zxClientType,
@RequestParam("zxAccountId") Long zxAccountId); @RequestParam("zxAccountId") Long zxAccountId);
/**
* 通过名称模糊搜索部门列表
*/
@RequestMapping(value = "/dept/list_dept_info_by_name",method = RequestMethod.GET)
Ret<List<DeptGetRspDTO>> deptListDeptInfoByName(@RequestParam("corpId") String corpId,
@RequestParam("name") String name,
@RequestParam("zxClientType") String zxClientType,
@RequestParam("zxAccountId") Long zxAccountId);
} }
...@@ -476,6 +476,11 @@ public class MTCotactApiRequestClient { ...@@ -476,6 +476,11 @@ public class MTCotactApiRequestClient {
return contactFeignClient.getUserByDeptIds(getUserByDeptIdReqDTO,zxClientType,zxAccountId).getData(); return contactFeignClient.getUserByDeptIds(getUserByDeptIdReqDTO,zxClientType,zxAccountId).getData();
} }
public List<DeptGetRspDTO> deptListDeptInfoByName(String corpId,String name){
return contactFeignClient.deptListDeptInfoByName(corpId,name,zxClientType,zxAccountId).getData();
}
/** /**
* 刷新token * 刷新token
* @param refreshToken * @param refreshToken
......
...@@ -30,7 +30,8 @@ public enum ResultExceptionEnum { ...@@ -30,7 +30,8 @@ public enum ResultExceptionEnum {
APPOINT_NOT_CLOSE(4014,"必修不能退出"), APPOINT_NOT_CLOSE(4014,"必修不能退出"),
STATE_NOT_RELEASE(4015,"该课程状态不能发布"), STATE_NOT_RELEASE(4015,"该课程状态不能发布"),
APPOINT_NOT_CANCEL(4016,"该课程不能取消指派"), APPOINT_NOT_CANCEL(4016,"该课程不能取消指派"),
INVALID_PARAMETER_VALUE(4017,"参数值无效") INVALID_PARAMETER_VALUE(4017,"参数值无效"),
NOT_RECOMMEND(4018,"该课程未推荐")
; ;
private Integer code; private Integer code;
......
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