fix: bug
parent
7534893261
commit
9f94dc6042
|
|
@ -5,7 +5,6 @@ create table class_course
|
||||||
class_id bigint not null comment '所属班级ID(关联training_class.id)',
|
class_id bigint not null comment '所属班级ID(关联training_class.id)',
|
||||||
course_name varchar(200) not null comment '课程名称',
|
course_name varchar(200) not null comment '课程名称',
|
||||||
course_id bigint not null comment '课程id',
|
course_id bigint not null comment '课程id',
|
||||||
courseware_id text not null comment '课件id集合',
|
|
||||||
required_total_hours decimal(10, 2) null comment '要求完成总学时(小时)',
|
required_total_hours decimal(10, 2) null comment '要求完成总学时(小时)',
|
||||||
video_duration decimal(10, 2) null comment '视频累计时长(小时)',
|
video_duration decimal(10, 2) null comment '视频累计时长(小时)',
|
||||||
delete_enum varchar(32) null comment '删除标识true false',
|
delete_enum varchar(32) null comment '删除标识true false',
|
||||||
|
|
@ -18,7 +17,8 @@ create table class_course
|
||||||
update_time datetime null comment '修改时间',
|
update_time datetime null comment '修改时间',
|
||||||
create_id bigint null comment '创建人id',
|
create_id bigint null comment '创建人id',
|
||||||
update_id bigint null comment '修改人id',
|
update_id bigint null comment '修改人id',
|
||||||
env varchar(50) null comment '环境'
|
env varchar(50) null comment '环境',
|
||||||
|
courseware_id text null comment '课件id集合'
|
||||||
)
|
)
|
||||||
comment '课程管理表' charset = utf8mb4;
|
comment '课程管理表' charset = utf8mb4;
|
||||||
|
|
||||||
|
|
@ -166,3 +166,74 @@ create index idx_student_id
|
||||||
create index idx_study_status
|
create index idx_study_status
|
||||||
on class_student_learning_record (study_status);
|
on class_student_learning_record (study_status);
|
||||||
|
|
||||||
|
create table course_management
|
||||||
|
(
|
||||||
|
delete_enum varchar(32) charset utf8mb4 null comment '删除标识true false',
|
||||||
|
remarks varchar(255) charset utf8mb4 null comment '备注',
|
||||||
|
create_name varchar(50) charset utf8mb4 null comment '创建人姓名',
|
||||||
|
update_name varchar(50) charset utf8mb4 null comment '更新人姓名',
|
||||||
|
tenant_id bigint null comment '租户id',
|
||||||
|
version int null comment '版本',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_time datetime null comment '修改时间',
|
||||||
|
create_id bigint null comment '创建人id',
|
||||||
|
update_id bigint null comment '修改人id',
|
||||||
|
env varchar(50) charset utf8mb4 null comment '环境',
|
||||||
|
id bigint not null comment '主键'
|
||||||
|
primary key,
|
||||||
|
course_name varchar(200) null comment '课程名称',
|
||||||
|
training_type varchar(100) null comment '培训类型',
|
||||||
|
course_description varchar(512) null comment '课称描述',
|
||||||
|
course_cover varchar(255) null comment '课程封面',
|
||||||
|
class_hour_duration decimal(5, 1) unsigned default 0.0 null comment '课时时长(小时)',
|
||||||
|
upload_unit varchar(200) null comment '上传单位',
|
||||||
|
status int default 0 null comment '状态(1启用/0禁用)',
|
||||||
|
used int default 0 null comment '是否已被使用(0-未使用,1-已使用)',
|
||||||
|
exam_type int null comment '试卷类型(如:1自动生成试卷、2平台组卷等)',
|
||||||
|
exam_minutes int null comment '考试时长(分钟)',
|
||||||
|
exam_id bigint not null comment '试卷id'
|
||||||
|
)
|
||||||
|
comment '课程管理';
|
||||||
|
|
||||||
|
create table course_rel_courseware
|
||||||
|
(
|
||||||
|
id bigint not null comment '主键'
|
||||||
|
primary key,
|
||||||
|
courseware_name varchar(200) null comment '课件名称',
|
||||||
|
courseware_document varchar(512) null comment '课件文档(文件名或路径)',
|
||||||
|
courseware_id bigint null comment '课件id',
|
||||||
|
course_id bigint null comment '课程id',
|
||||||
|
sort int null comment '排序',
|
||||||
|
class_hour_duration_unit varchar(10) default '小时' null comment '课时时长单位',
|
||||||
|
credit_hours decimal(5, 1) unsigned default 0.0 null comment '学时'
|
||||||
|
)
|
||||||
|
comment '课程关联课件表';
|
||||||
|
|
||||||
|
create table courseware_management
|
||||||
|
(
|
||||||
|
delete_enum varchar(32) charset utf8mb4 null comment '删除标识true false',
|
||||||
|
remarks varchar(255) charset utf8mb4 null comment '备注',
|
||||||
|
create_name varchar(50) charset utf8mb4 null comment '创建人姓名',
|
||||||
|
update_name varchar(50) charset utf8mb4 null comment '更新人姓名',
|
||||||
|
tenant_id bigint null comment '租户id',
|
||||||
|
version int null comment '版本',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_time datetime null comment '修改时间',
|
||||||
|
create_id bigint null comment '创建人id',
|
||||||
|
update_id bigint null comment '修改人id',
|
||||||
|
env varchar(50) charset utf8mb4 null comment '环境',
|
||||||
|
id bigint not null comment '主键'
|
||||||
|
primary key,
|
||||||
|
courseware_name varchar(200) null comment '课件名称',
|
||||||
|
training_type varchar(100) null comment '培训类型',
|
||||||
|
lecturer_name varchar(100) null comment '讲师名称',
|
||||||
|
credit_hours decimal(5, 1) unsigned default 0.0 null comment '学时',
|
||||||
|
class_hour_duration decimal(5, 1) unsigned default 0.0 null comment '课时时长(小时)',
|
||||||
|
upload_unit varchar(200) null comment '上传单位',
|
||||||
|
status int default 0 null comment '状态(1启用/0禁用)',
|
||||||
|
courseware_type int null comment '课件类型(1视频课件/2文档课件)',
|
||||||
|
courseware_document varchar(512) null comment '课件文档(文件名或路径)',
|
||||||
|
courseware_description varchar(512) null comment '课件描述'
|
||||||
|
)
|
||||||
|
comment '课件表';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,12 @@ public class EvalProjectController {
|
||||||
return evalProjectApi.save(cmd);
|
return evalProjectApi.save(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("编辑项目")
|
||||||
|
@PostMapping("/update")
|
||||||
|
public SingleResponse<EvalProjectCO> update(@Validated @RequestBody EvalProjectAddCmd cmd) {
|
||||||
|
return evalProjectApi.update(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("查询项目详情")
|
@ApiOperation("查询项目详情")
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
public SingleResponse<EvalProjectCO> get(@ApiParam("主键ID") @RequestParam String id) {
|
public SingleResponse<EvalProjectCO> get(@ApiParam("主键ID") @RequestParam String id) {
|
||||||
|
|
|
||||||
|
|
@ -546,7 +546,7 @@ public class EvalProcessControlExecutor implements EvalProcessControlApi {
|
||||||
String fName = StringUtils.hasText(name) ? CommonUtil.EMPTY : name;
|
String fName = StringUtils.hasText(name) ? CommonUtil.EMPTY : name;
|
||||||
item.setMaterialName(itemName + fName);
|
item.setMaterialName(itemName + fName);
|
||||||
item.setProjectDocUrl(obj.getStr("url"));
|
item.setProjectDocUrl(obj.getStr("url"));
|
||||||
item.setMaterialType(MaterialCategory.ARCHIVED.getVal());
|
item.setMaterialType(MaterialCategory.ARCHIVED.getMsg());
|
||||||
archivedItems.add(item);
|
archivedItems.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -567,6 +567,7 @@ public class EvalProcessControlExecutor implements EvalProcessControlApi {
|
||||||
docDO.setProjectName(project.getProjectName());
|
docDO.setProjectName(project.getProjectName());
|
||||||
docDO.setEvalTypeCode(project.getEvalTypeCode());
|
docDO.setEvalTypeCode(project.getEvalTypeCode());
|
||||||
docDO.setProjectDocUrl(JSON.toJSONString(archivedItems));
|
docDO.setProjectDocUrl(JSON.toJSONString(archivedItems));
|
||||||
|
docDO.setRemarks(MaterialCategory.ARCHIVED.getMsg());
|
||||||
InsertFieldDefaults.apply(docDO);
|
InsertFieldDefaults.apply(docDO);
|
||||||
evalProjectDocMapper.insert(docDO);
|
evalProjectDocMapper.insert(docDO);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package org.qinan.safetyeval.app.executor.institution;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.qinan.safetyeval.app.convertor.EvalProjectCmdConvertor;
|
import org.qinan.safetyeval.app.convertor.EvalProjectCmdConvertor;
|
||||||
|
|
@ -281,7 +282,7 @@ public class EvalProjectExecutor implements EvalProjectApi {
|
||||||
.map(EvalProjectCO::getCustomerId).collect(Collectors.toList()))
|
.map(EvalProjectCO::getCustomerId).collect(Collectors.toList()))
|
||||||
.stream().collect(Collectors.toMap(EvalCustomerDO::getId, EvalCustomerDO::getCustomerName));
|
.stream().collect(Collectors.toMap(EvalCustomerDO::getId, EvalCustomerDO::getCustomerName));
|
||||||
Map<Long, String> projectRole = getProjectRole(co.stream().map(EvalProjectCO::getId).map(Long::new).collect(Collectors.toList()));
|
Map<Long, String> projectRole = getProjectRole(co.stream().map(EvalProjectCO::getId).map(Long::new).collect(Collectors.toList()));
|
||||||
co.forEach(item -> {
|
co.stream().sorted((o1, o2) -> o2.getSurveyType() - o1.getSurveyType()).forEach(item -> {
|
||||||
item.setCustomerName(customerNameMap.get(Long.valueOf(item.getCustomerId())));
|
item.setCustomerName(customerNameMap.get(Long.valueOf(item.getCustomerId())));
|
||||||
item.setRole(projectRole.get(Long.valueOf(item.getId())));
|
item.setRole(projectRole.get(Long.valueOf(item.getId())));
|
||||||
});
|
});
|
||||||
|
|
@ -343,6 +344,14 @@ public class EvalProjectExecutor implements EvalProjectApi {
|
||||||
return SingleResponse.success(co);
|
return SingleResponse.success(co);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SingleResponse<EvalProjectCO> update(EvalProjectAddCmd cmd) {
|
||||||
|
evalProjectMapper.update(new LambdaUpdateWrapper<EvalProjectDO>()
|
||||||
|
.eq(EvalProjectDO::getId, cmd.getId())
|
||||||
|
.set(EvalProjectDO::getParticipantsJson, JSON.toJSONString(cmd.getParticipants())));
|
||||||
|
return SingleResponse.success(null);
|
||||||
|
}
|
||||||
|
|
||||||
private CustomerEvalProjectCO convertToCustomerCO(EvalProjectEntity entity) {
|
private CustomerEvalProjectCO convertToCustomerCO(EvalProjectEntity entity) {
|
||||||
CustomerEvalProjectCO co = new CustomerEvalProjectCO();
|
CustomerEvalProjectCO co = new CustomerEvalProjectCO();
|
||||||
co.setId(entity.getId() == null ? null : String.valueOf(entity.getId()));
|
co.setId(entity.getId() == null ? null : String.valueOf(entity.getId()));
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import org.qinan.safetyeval.client.dto.PageResponse;
|
||||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||||
import org.qinan.safetyeval.client.dto.institution.EvalProjectMemberAddCmd;
|
import org.qinan.safetyeval.client.dto.institution.EvalProjectMemberAddCmd;
|
||||||
import org.qinan.safetyeval.client.dto.institution.EvalProjectMemberPageQuery;
|
import org.qinan.safetyeval.client.dto.institution.EvalProjectMemberPageQuery;
|
||||||
import org.qinan.safetyeval.domain.constant.ProjectRoleEnum;
|
|
||||||
import org.qinan.safetyeval.domain.constant.ProjectStageEnum;
|
import org.qinan.safetyeval.domain.constant.ProjectStageEnum;
|
||||||
import org.qinan.safetyeval.domain.entity.EvalProjectMemberEntity;
|
import org.qinan.safetyeval.domain.entity.EvalProjectMemberEntity;
|
||||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
||||||
|
|
@ -71,9 +70,6 @@ public class EvalProjectMemberExecutor implements EvalProjectMemberApi {
|
||||||
domainQuery.setOrgId(institutionOrgSupport.resolveCurrentOrgId());
|
domainQuery.setOrgId(institutionOrgSupport.resolveCurrentOrgId());
|
||||||
PageResult<EvalProjectMemberEntity> pageResult = evalProjectMemberDomainService.page(domainQuery);
|
PageResult<EvalProjectMemberEntity> pageResult = evalProjectMemberDomainService.page(domainQuery);
|
||||||
List<EvalProjectMemberCO> evalProjectMemberCOS = evalProjectMemberCmdConvertor.convertEListToCOList(pageResult.getRecords());
|
List<EvalProjectMemberCO> evalProjectMemberCOS = evalProjectMemberCmdConvertor.convertEListToCOList(pageResult.getRecords());
|
||||||
for (EvalProjectMemberCO evalProjectMemberCO : evalProjectMemberCOS) {
|
|
||||||
evalProjectMemberCO.setRole(ProjectRoleEnum.froms(evalProjectMemberCO.getRole()));
|
|
||||||
}
|
|
||||||
return PageResponse.of(evalProjectMemberCOS
|
return PageResponse.of(evalProjectMemberCOS
|
||||||
,
|
,
|
||||||
pageResult.getTotal());
|
pageResult.getTotal());
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import org.qinan.safetyeval.client.dto.PageResponse;
|
||||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||||
import org.qinan.safetyeval.client.dto.institution.EvalSurveyPageQuery;
|
import org.qinan.safetyeval.client.dto.institution.EvalSurveyPageQuery;
|
||||||
import org.qinan.safetyeval.client.dto.institution.EvalSurveySaveCmd;
|
import org.qinan.safetyeval.client.dto.institution.EvalSurveySaveCmd;
|
||||||
import org.qinan.safetyeval.domain.constant.ProjectRoleEnum;
|
|
||||||
import org.qinan.safetyeval.domain.entity.EvalProjectMemberEntity;
|
import org.qinan.safetyeval.domain.entity.EvalProjectMemberEntity;
|
||||||
import org.qinan.safetyeval.domain.entity.EvalSurveyEntity;
|
import org.qinan.safetyeval.domain.entity.EvalSurveyEntity;
|
||||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
||||||
|
|
@ -108,7 +107,7 @@ public class EvalSurveyExecutor implements EvalSurveyApi {
|
||||||
}
|
}
|
||||||
List<EvalProjectMemberEntity> dbList = evalProjectMemberDOS.stream().map(evalProjectMemberDoConvertor::convertDoToE).collect(Collectors.toList());
|
List<EvalProjectMemberEntity> dbList = evalProjectMemberDOS.stream().map(evalProjectMemberDoConvertor::convertDoToE).collect(Collectors.toList());
|
||||||
EvalProjectMemberCO evalProjectMemberCO = evalProjectMemberCmdConvertor.convertEListToCOList(dbList).get(0);
|
EvalProjectMemberCO evalProjectMemberCO = evalProjectMemberCmdConvertor.convertEListToCOList(dbList).get(0);
|
||||||
evalProjectMemberCO.setRole(ProjectRoleEnum.froms(evalProjectMemberCO.getRole()));
|
// evalProjectMemberCO.setRole(ProjectRoleEnum.froms(evalProjectMemberCO.getRole()));
|
||||||
return SingleResponse.success(evalProjectMemberCO);
|
return SingleResponse.success(evalProjectMemberCO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,4 +46,6 @@ public interface EvalProjectApi {
|
||||||
PageResponse<EvalProjectCO> myPage(EvalProjectPageQuery query);
|
PageResponse<EvalProjectCO> myPage(EvalProjectPageQuery query);
|
||||||
|
|
||||||
SingleResponse<EvalProjectStatisticsCO> appProjectStatistics();
|
SingleResponse<EvalProjectStatisticsCO> appProjectStatistics();
|
||||||
|
|
||||||
|
SingleResponse<EvalProjectCO> update(EvalProjectAddCmd cmd);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,4 +65,9 @@ public class EvalSurveyCO {
|
||||||
|
|
||||||
@ApiModelProperty("内容")
|
@ApiModelProperty("内容")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty("人脸识别照片")
|
||||||
|
private String faceUrl;
|
||||||
|
@ApiModelProperty("地址")
|
||||||
|
private String address;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@ import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
public class EvalProjectAddCmd {
|
public class EvalProjectAddCmd {
|
||||||
|
|
||||||
|
@ApiModelProperty("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
@NotBlank(message = "项目名称不能为空")
|
@NotBlank(message = "项目名称不能为空")
|
||||||
@ApiModelProperty(value = "项目名称", required = true)
|
@ApiModelProperty(value = "项目名称", required = true)
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
|
||||||
|
|
@ -65,4 +65,9 @@ public class EvalSurveySaveCmd {
|
||||||
|
|
||||||
@ApiModelProperty("内容")
|
@ApiModelProperty("内容")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty("人脸识别照片")
|
||||||
|
private String faceUrl;
|
||||||
|
@ApiModelProperty("地址")
|
||||||
|
private String address;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package org.qinan.safetyeval.domain.entity;
|
package org.qinan.safetyeval.domain.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
@ -27,4 +28,6 @@ public class EvalSurveyEntity {
|
||||||
private String latitude;
|
private String latitude;
|
||||||
private String content;
|
private String content;
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
private String faceUrl;
|
||||||
|
private String address;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package org.qinan.safetyeval.infrastructure.dataobject;
|
package org.qinan.safetyeval.infrastructure.dataobject;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
@ -41,4 +42,6 @@ public class EvalSurveyDO {
|
||||||
private Long createId;
|
private Long createId;
|
||||||
private Long updateId;
|
private Long updateId;
|
||||||
private String env;
|
private String env;
|
||||||
|
private String faceUrl;
|
||||||
|
private String address;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue