20200622-zlp-1
首页-一日流程学习
This commit is contained in:
@ -4,6 +4,8 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.project.benyi.domain.ByTrainVideoScore;
|
||||
import com.ruoyi.project.benyi.service.IByTrainVideoScoreService;
|
||||
import com.ruoyi.project.common.CommonController;
|
||||
import com.ruoyi.project.common.SchoolCommon;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -40,6 +42,8 @@ public class ByTrainVideoController extends BaseController {
|
||||
private CommonController commonController;
|
||||
@Autowired
|
||||
private SchoolCommon schoolCommon;
|
||||
@Autowired
|
||||
private IByTrainVideoScoreService byTrainVideoScoreService;
|
||||
|
||||
|
||||
/**
|
||||
@ -64,6 +68,19 @@ public class ByTrainVideoController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询培训评分和评价列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:video:list')")
|
||||
@GetMapping("/listscoreandfree/{id}")
|
||||
public TableDataInfo listscoreandfree(@PathVariable("id") Long id) {
|
||||
startPage();
|
||||
ByTrainVideoScore byTrainVideoScore=new ByTrainVideoScore();
|
||||
byTrainVideoScore.setVideoid(id);
|
||||
List<ByTrainVideoScore> list = byTrainVideoScoreService.selectByTrainVideoScoreList(byTrainVideoScore);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出培训列表
|
||||
*/
|
||||
|
@ -82,6 +82,12 @@ public class ByTrainVideo extends BaseEntity {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createtime;
|
||||
|
||||
/**
|
||||
* 培训视频平均分
|
||||
*/
|
||||
@Excel(name = "培训视频平均分")
|
||||
private Float avgscore;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
@ -170,6 +176,14 @@ public class ByTrainVideo extends BaseEntity {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setAvgscore(Float avgscore) {
|
||||
this.avgscore = avgscore;
|
||||
}
|
||||
|
||||
public Float getAvgscore() {
|
||||
return avgscore;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -184,6 +198,7 @@ public class ByTrainVideo extends BaseEntity {
|
||||
.append("classtype", getClasstype())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createtime", getCreatetime())
|
||||
.append("avgscore",getAvgscore())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -10,30 +10,45 @@ import java.util.Date;
|
||||
|
||||
/**
|
||||
* 培训视频评分对象 by_train_video_score
|
||||
*
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-06-01
|
||||
*/
|
||||
public class ByTrainVideoScore extends BaseEntity
|
||||
{
|
||||
public class ByTrainVideoScore extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 视频编号 */
|
||||
/**
|
||||
* 视频编号
|
||||
*/
|
||||
@Excel(name = "视频编号")
|
||||
private Long videoid;
|
||||
|
||||
/** 讲师id */
|
||||
/**
|
||||
* 讲师id
|
||||
*/
|
||||
@Excel(name = "讲师id")
|
||||
private Long lecturerid;
|
||||
|
||||
/** 评分 */
|
||||
/**
|
||||
* 评分
|
||||
*/
|
||||
@Excel(name = "评分")
|
||||
private Long score;
|
||||
|
||||
/** 创建人 */
|
||||
/**
|
||||
* 反馈意见建议
|
||||
*/
|
||||
@Excel(name = "反馈意见建议")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人")
|
||||
private Long createuserid;
|
||||
|
||||
@ -43,51 +58,54 @@ public class ByTrainVideoScore extends BaseEntity
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createtime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setVideoid(Long videoid)
|
||||
{
|
||||
|
||||
public void setVideoid(Long videoid) {
|
||||
this.videoid = videoid;
|
||||
}
|
||||
|
||||
public Long getVideoid()
|
||||
{
|
||||
public Long getVideoid() {
|
||||
return videoid;
|
||||
}
|
||||
public void setLecturerid(Long lecturerid)
|
||||
{
|
||||
|
||||
public void setLecturerid(Long lecturerid) {
|
||||
this.lecturerid = lecturerid;
|
||||
}
|
||||
|
||||
public Long getLecturerid()
|
||||
{
|
||||
public Long getLecturerid() {
|
||||
return lecturerid;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
|
||||
public void setScore(Long score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
public Long getScore() {
|
||||
return score;
|
||||
}
|
||||
public void setCreateuserid(Long createuserid)
|
||||
{
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setCreateuserid(Long createuserid) {
|
||||
this.createuserid = createuserid;
|
||||
}
|
||||
|
||||
public Long getCreateuserid()
|
||||
{
|
||||
public Long getCreateuserid() {
|
||||
return createuserid;
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
@ -98,13 +116,14 @@ public class ByTrainVideoScore extends BaseEntity
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("videoid", getVideoid())
|
||||
.append("lecturerid", getLecturerid())
|
||||
.append("score", getScore())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createtime", getCreatetime())
|
||||
.toString();
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("videoid", getVideoid())
|
||||
.append("lecturerid", getLecturerid())
|
||||
.append("score", getScore())
|
||||
.append("content", getContent())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createtime", getCreatetime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -16,10 +16,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="classtype" column="classtype" />
|
||||
<result property="createuserid" column="createuserid" />
|
||||
<result property="createtime" column="createtime" />
|
||||
<result property="avgscore" column="avgscore" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByTrainVideoVo">
|
||||
select id, title, information, lecturer,(select name from by_lecturer where lecturer=by_lecturer.id) as lecturername, videourl,filetype, type, classtype, createuserid, createtime from by_train_video
|
||||
select id, title, information, lecturer,(select name from by_lecturer where lecturer=by_lecturer.id) as lecturername, videourl,filetype, type, classtype, createuserid, createtime,
|
||||
(select avg(score) from by_train_video_score where by_train_video_score.videoid=by_train_video.id) avgscore
|
||||
from by_train_video
|
||||
</sql>
|
||||
|
||||
<select id="selectByTrainVideoList" parameterType="ByTrainVideo" resultMap="ByTrainVideoResult">
|
||||
|
@ -9,12 +9,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="videoid" column="videoid" />
|
||||
<result property="lecturerid" column="lecturerid" />
|
||||
<result property="score" column="score" />
|
||||
<result property="content" column="content" />
|
||||
<result property="createuserid" column="createuserid" />
|
||||
<result property="createtime" column="createtime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByTrainVideoScoreVo">
|
||||
select id, videoid, lecturerid, score, createuserid, createtime from by_train_video_score
|
||||
select id, videoid, lecturerid, score,(select content from by_train_video_feedback where by_train_video_feedback.id=by_train_video_score.id) content, createuserid, createtime from by_train_video_score
|
||||
</sql>
|
||||
|
||||
<select id="selectByTrainVideoScoreList" parameterType="ByTrainVideoScore" resultMap="ByTrainVideoScoreResult">
|
||||
|
Reference in New Issue
Block a user