mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-24 18:23:05 +08:00
1155增加审批人审批时间
This commit is contained in:
@@ -138,6 +138,10 @@ public class CourseManageApi extends ApiBaseController{
|
||||
dto.setOrgIds(ids);
|
||||
dto.setReadIds(userOrgIds.getReadIds());
|
||||
PageList<Course> coursePageList = courseService.findPage(pager.getPageIndex(), pager.getPageSize(),dto);
|
||||
//补充审核人,审核时间字段
|
||||
if(CollectionUtils.isEmpty(coursePageList.getList())){
|
||||
fullAuditInfo(coursePageList.getList());
|
||||
}
|
||||
return success(coursePageList);
|
||||
}catch(Exception e) {
|
||||
log.error("管理课程列表查询错误",e);
|
||||
@@ -145,6 +149,21 @@ public class CourseManageApi extends ApiBaseController{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void fullAuditInfo(List<Course> list){
|
||||
List<String> courseIdList = list.stream().map(Course::getId).collect(Collectors.toList());
|
||||
List<CourseHRBPAudit> auditList = hrbpAuditService.listByCourseIds(courseIdList);
|
||||
Map<String,CourseHRBPAudit> map = auditList.stream().collect(Collectors.toMap(CourseHRBPAudit::getCourseId, i->i));
|
||||
list.forEach(item ->{
|
||||
CourseHRBPAudit audit = map.get(item.getId());
|
||||
if(audit != null){
|
||||
//暂时获取这两个字段,之后看是否需要调整
|
||||
item.setAuditUser(audit.getAuditUser());
|
||||
item.setAuditTime(audit.getAuditTime());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
public JsonResponse<Map<String,Object>> detail(String id){
|
||||
|
||||
@@ -406,6 +406,12 @@ public class Course extends BaseEntity {
|
||||
@Transient
|
||||
private Boolean isTip;
|
||||
|
||||
@Transient
|
||||
private String auditUser;
|
||||
|
||||
@Transient
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
public Course(String id,String name,String summary,String coverImg,String sysCreateAid,String sysCreateBy,Integer type,LocalDateTime publishTime){
|
||||
super.setId(id);
|
||||
this.name=name;
|
||||
|
||||
@@ -55,6 +55,8 @@ public interface ICourseHRBPAuditService {
|
||||
* @return
|
||||
*/
|
||||
PageList<CourseHRBPAudit> pageList(Integer pageIndex, Integer pageSize,int userType, CourseHRBPAudit info);
|
||||
|
||||
|
||||
|
||||
List<CourseHRBPAudit> listByCourseIds(List<String> courseIdList);
|
||||
|
||||
}
|
||||
|
||||
@@ -263,4 +263,7 @@ public class CourseHRBPAuditServiceImpl implements ICourseHRBPAuditService {
|
||||
return courseHRBPAuditDao.get(id);
|
||||
}
|
||||
|
||||
public List<CourseHRBPAudit> listByCourseIds(List<String> courseIdList){
|
||||
return courseHRBPAuditDao.findList(FieldFilters.in("courseId",courseIdList));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user