fix: 教培
parent
b1c38109b1
commit
47a0514b07
|
|
@ -2,7 +2,6 @@ package org.qinan.cedu.model.dto;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.qinan.cedu.config.FlexibleLocalDateTimeDeserializer;
|
||||
|
|
@ -34,6 +33,8 @@ public class ClassManagementDTO {
|
|||
|
||||
@ApiModelProperty("参训单位名称")
|
||||
private String unitName;
|
||||
@ApiModelProperty("参训单位Id")
|
||||
private String unitId;
|
||||
|
||||
@ApiModelProperty("记录人员")
|
||||
private String recorder;
|
||||
|
|
|
|||
|
|
@ -95,4 +95,5 @@ public class ClassManagementDO extends BaseEntity {
|
|||
*/
|
||||
@TableField("paper_id")
|
||||
private Long paperId;
|
||||
private String unitId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ public class ClassManagementVO extends BaseVO {
|
|||
|
||||
@ApiModelProperty("参训单位名称")
|
||||
private String unitName;
|
||||
@ApiModelProperty("参训单位Id")
|
||||
private String unitId;
|
||||
|
||||
@ApiModelProperty("记录人员")
|
||||
private String recorder;
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ public class ClassManagementServiceImpl extends ServiceImpl<ClassManagementMappe
|
|||
if (entity.getShuffleQuestions() == null) {
|
||||
entity.setShuffleQuestions(0);
|
||||
}
|
||||
entity.setClassCode("C" + entity.getId());
|
||||
this.save(entity);
|
||||
return entity.getId();
|
||||
}
|
||||
|
|
@ -131,11 +132,12 @@ public class ClassManagementServiceImpl extends ServiceImpl<ClassManagementMappe
|
|||
|
||||
@Override
|
||||
public Boolean complete(ClassManagementDTO dto) {
|
||||
LocalDate start = dto.getStartDate().toLocalDate();
|
||||
LocalDate end = dto.getDelayTime().toLocalDate();
|
||||
ClassManagementDO classManagementDO = baseMapper.selectById(dto.getId());
|
||||
LocalDate start = classManagementDO.getStartDate().toLocalDate();
|
||||
LocalDate end = classManagementDO.getDelayTime().toLocalDate();
|
||||
;
|
||||
if (Objects.isNull(end)) {
|
||||
end = dto.getEndDate().toLocalDate();
|
||||
end = classManagementDO.getEndDate().toLocalDate();
|
||||
}
|
||||
LocalDate now = LocalDate.now();
|
||||
ClassStatusEnum pendingStart;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class CourseManagementServiceImpl extends ServiceImpl<CourseManagementMap
|
|||
.page(new Page<>(query.getCurrent(), query.getSize()));
|
||||
IPage<CourseManagementVO> convert = page.convert(courseManagementConvertor::convertEToVo);
|
||||
Map<Long, Integer> collectMap = classCourseMapper.selectList(new LambdaQueryWrapper<ClassCourseDO>()
|
||||
.in(ClassCourseDO::getCourseId, convert.getRecords().stream().map(CourseManagementVO::getId)))
|
||||
.in(ClassCourseDO::getCourseId, convert.getRecords().stream().map(CourseManagementVO::getId).collect(Collectors.toList())))
|
||||
.stream().map(ClassCourseDO::getCourseId).distinct().collect(Collectors.toMap(v -> v, v -> 1));
|
||||
convert.getRecords().forEach(vo -> {
|
||||
vo.setCourseRelCoursewareVOList(courseRelCoursewareConvertor.convertEListToVoList(
|
||||
|
|
|
|||
Loading…
Reference in New Issue