From fa65a3c2f615d05ddca6822656ae1bcdd43d30f1 Mon Sep 17 00:00:00 2001 From: wanjia <553039491@qq.com> Date: Tue, 9 Aug 2022 15:05:55 +0800 Subject: [PATCH] API:tutor submit/update/list evaluation for medium term examination material Former-commit-id: 33adc7c18cf5b15f309257ac8ad40d76f6acf3e6 --- .../glcc/GlccTutorEvaluationController.java | 58 ++++++ .../dao/glcc/entity/GlccTutorEvaluation.java | 180 ++++++++++++++++++ .../mapper/GlccTutorEvaluationMapper.java | 16 ++ .../glcc/Impl/TutorEvaluationServiceImpl.java | 46 +++++ .../service/glcc/TutorEvaluationService.java | 23 +++ .../service/glcc/vo/TutorEvaluationVo.java | 125 ++++++++++++ .../glcc/vo/UpdateTutorEvaluationVo.java | 128 +++++++++++++ .../mapper/glcc/GlccTutorEvaluationMapper.xml | 25 +++ 8 files changed, 601 insertions(+) create mode 100644 share-api/src/main/java/com/xjy/ai/api/controller/glcc/GlccTutorEvaluationController.java create mode 100644 share-model/src/main/java/com/xjy/ai/model/dao/glcc/entity/GlccTutorEvaluation.java create mode 100644 share-model/src/main/java/com/xjy/ai/model/dao/glcc/mapper/GlccTutorEvaluationMapper.java create mode 100644 share-model/src/main/java/com/xjy/ai/model/service/glcc/Impl/TutorEvaluationServiceImpl.java create mode 100644 share-model/src/main/java/com/xjy/ai/model/service/glcc/TutorEvaluationService.java create mode 100644 share-model/src/main/java/com/xjy/ai/model/service/glcc/vo/TutorEvaluationVo.java create mode 100644 share-model/src/main/java/com/xjy/ai/model/service/glcc/vo/UpdateTutorEvaluationVo.java create mode 100644 share-model/src/main/resources/mapper/glcc/GlccTutorEvaluationMapper.xml diff --git a/share-api/src/main/java/com/xjy/ai/api/controller/glcc/GlccTutorEvaluationController.java b/share-api/src/main/java/com/xjy/ai/api/controller/glcc/GlccTutorEvaluationController.java new file mode 100644 index 0000000..8f3dd96 --- /dev/null +++ b/share-api/src/main/java/com/xjy/ai/api/controller/glcc/GlccTutorEvaluationController.java @@ -0,0 +1,58 @@ +package com.xjy.ai.api.controller.glcc; + + +import com.xjy.ai.common.response.DataPacketUtil; +import com.xjy.ai.common.response.ResponseData; +import com.xjy.ai.common.utils.ValidatorUtils; +import com.xjy.ai.model.service.glcc.TutorEvaluationService; +import com.xjy.ai.model.service.glcc.vo.TutorEvaluationVo; +import com.xjy.ai.model.service.glcc.vo.UpdateTutorEvaluationVo; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.BindingResult; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *
+ * 开源夏令营导师评分表 前端控制器 + *
+ * + * @author + * @since 2022-08-08 + */ +@RestController +@RequestMapping("/api/tutorEvaluation") +public class GlccTutorEvaluationController { + + @Autowired + private TutorEvaluationService tutorEvaluationService; + + @ApiOperation("导师提交中期考核评分") + @PostMapping("/create") + public ResponseEntity+ * 开源夏令营导师评分表 + *
+ * + * @author + * @since 2022-08-08 + */ +@TableName("glcc_tutor_evaluation") +public class GlccTutorEvaluation implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 导师用户id + */ + @TableField("tutor_user_id") + private Integer tutorUserId; + + /** + * 中期考核材料id + */ + @TableField("medium_term_examine_material_id") + private Integer mediumTermExamineMaterialId; + + /** + * 工作态度评价 + */ + @TableField("work_attitude_evaluation") + private String workAttitudeEvaluation; + + /** + * 开发进度评价 + */ + @TableField("develop_progress_evaluation") + private String developProgressEvaluation; + + /** + * 项目完成质量评价 + */ + @TableField("project_quality_evaluation") + private String projectQualityEvaluation; + + /** + * 总体评分评价 + */ + @TableField("totality_evaluation") + private String totalityEvaluation; + + /** + * 评语 + */ + @TableField("comment") + private String comment; + + /** + * 创建时间 + */ + @TableField("created_on") + private Date createdOn; + + /** + * 更新时间 + */ + @TableField("updated_on") + private Date updatedOn; + + /** + * 0未删除 1删除 + */ + @TableField("is_delete") + private Boolean isDelete; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + public Integer getTutorUserId() { + return tutorUserId; + } + + public void setTutorUserId(Integer tutorUserId) { + this.tutorUserId = tutorUserId; + } + public Integer getMediumTermExamineMaterialId() { + return mediumTermExamineMaterialId; + } + + public void setMediumTermExamineMaterialId(Integer mediumTermExamineMaterialId) { + this.mediumTermExamineMaterialId = mediumTermExamineMaterialId; + } + public String getWorkAttitudeEvaluation() { + return workAttitudeEvaluation; + } + + public void setWorkAttitudeEvaluation(String workAttitudeEvaluation) { + this.workAttitudeEvaluation = workAttitudeEvaluation; + } + public String getDevelopProgressEvaluation() { + return developProgressEvaluation; + } + + public void setDevelopProgressEvaluation(String developProgressEvaluation) { + this.developProgressEvaluation = developProgressEvaluation; + } + public String getProjectQualityEvaluation() { + return projectQualityEvaluation; + } + + public void setProjectQualityEvaluation(String projectQualityEvaluation) { + this.projectQualityEvaluation = projectQualityEvaluation; + } + public String getTotalityEvaluation() { + return totalityEvaluation; + } + + public void setTotalityEvaluation(String totalityEvaluation) { + this.totalityEvaluation = totalityEvaluation; + } + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + public Date getUpdatedOn() { + return updatedOn; + } + + public void setUpdatedOn(Date updatedOn) { + this.updatedOn = updatedOn; + } + public Boolean getIsDelete() { + return isDelete; + } + + public void setIsDelete(Boolean isDelete) { + this.isDelete = isDelete; + } + + @Override + public String toString() { + return "GlccTutorEvaluation{" + + "id=" + id + + ", tutorUserId=" + tutorUserId + + ", mediumTermExamineMaterialId=" + mediumTermExamineMaterialId + + ", workAttitudeEvaluation=" + workAttitudeEvaluation + + ", developProgressEvaluation=" + developProgressEvaluation + + ", projectQualityEvaluation=" + projectQualityEvaluation + + ", totalityEvaluation=" + totalityEvaluation + + ", comment=" + comment + + ", createdOn=" + createdOn + + ", updatedOn=" + updatedOn + + ", isDelete=" + isDelete + + "}"; + } +} diff --git a/share-model/src/main/java/com/xjy/ai/model/dao/glcc/mapper/GlccTutorEvaluationMapper.java b/share-model/src/main/java/com/xjy/ai/model/dao/glcc/mapper/GlccTutorEvaluationMapper.java new file mode 100644 index 0000000..f7b7793 --- /dev/null +++ b/share-model/src/main/java/com/xjy/ai/model/dao/glcc/mapper/GlccTutorEvaluationMapper.java @@ -0,0 +1,16 @@ +package com.xjy.ai.model.dao.glcc.mapper; + +import com.xjy.ai.model.dao.glcc.entity.GlccTutorEvaluation; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *+ * 开源夏令营导师评分表 Mapper 接口 + *
+ * + * @author + * @since 2022-08-08 + */ +public interface GlccTutorEvaluationMapper extends BaseMapper+ * 开源夏令营导师评分表 服务实现类 + *
+ * + * @author + * @since 2022-08-08 + */ +@Service +public class TutorEvaluationServiceImpl extends ServiceImpl+ * 开源夏令营导师评分表 服务类 + *
+ * + * @author + * @since 2022-08-08 + */ +public interface TutorEvaluationService extends IService+ * 开源夏令营导师评分表 + *
+ * + * @author + * @since 2022-08-08 + */ +public class TutorEvaluationVo { + + /** + * 导师用户id + */ + @NotNull(message = "导师用户id不能为空") + private Integer tutorUserId; + + /** + * 中期考核材料id + */ + @NotNull(message = "中期考核材料id不能为空") + private Integer mediumTermExamineMaterialId; + + /** + * 工作态度评价 eg:S,A,B,C,D + */ + @NotEmpty(message = "工作态度评价不能为空") + @Pattern(regexp = "(S|A|B|C|D)") + private String workAttitudeEvaluation; + + /** + * 开发进度评价 eg:S,A,B,C,D + */ + @NotEmpty(message = "开发进度评价不能为空") + @Pattern(regexp = "(S|A|B|C|D)") + private String developProgressEvaluation; + + /** + * 项目完成质量评价 eg:S,A,B,C,D + */ + @NotEmpty(message = "项目完成质量评价不能为空") + @Pattern(regexp = "(S|A|B|C|D)") + private String projectQualityEvaluation; + + /** + * 总体评分评价 eg:S,A,B,C,D + */ + @Pattern(regexp = "(S|A|B|C|D)") + @NotEmpty(message = "总体评分评价不能为空") + private String totalityEvaluation; + + /** + * 评语 + */ + @NotEmpty(message = "评语不能为空") + private String comment; + + public Integer getTutorUserId() { + return tutorUserId; + } + + public void setTutorUserId(Integer tutorUserId) { + this.tutorUserId = tutorUserId; + } + + public Integer getMediumTermExamineMaterialId() { + return mediumTermExamineMaterialId; + } + + public void setMediumTermExamineMaterialId(Integer mediumTermExamineMaterialId) { + this.mediumTermExamineMaterialId = mediumTermExamineMaterialId; + } + + public String getWorkAttitudeEvaluation() { + return workAttitudeEvaluation; + } + + public void setWorkAttitudeEvaluation(String workAttitudeEvaluation) { + this.workAttitudeEvaluation = workAttitudeEvaluation; + } + + public String getDevelopProgressEvaluation() { + return developProgressEvaluation; + } + + public void setDevelopProgressEvaluation(String developProgressEvaluation) { + this.developProgressEvaluation = developProgressEvaluation; + } + + public String getProjectQualityEvaluation() { + return projectQualityEvaluation; + } + + public void setProjectQualityEvaluation(String projectQualityEvaluation) { + this.projectQualityEvaluation = projectQualityEvaluation; + } + + public String getTotalityEvaluation() { + return totalityEvaluation; + } + + public void setTotalityEvaluation(String totalityEvaluation) { + this.totalityEvaluation = totalityEvaluation; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } +} diff --git a/share-model/src/main/java/com/xjy/ai/model/service/glcc/vo/UpdateTutorEvaluationVo.java b/share-model/src/main/java/com/xjy/ai/model/service/glcc/vo/UpdateTutorEvaluationVo.java new file mode 100644 index 0000000..1c45680 --- /dev/null +++ b/share-model/src/main/java/com/xjy/ai/model/service/glcc/vo/UpdateTutorEvaluationVo.java @@ -0,0 +1,128 @@ +package com.xjy.ai.model.service.glcc.vo; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; + +/** + *+ * 开源夏令营导师评分表 + *
+ * + * @author + * @since 2022-08-08 + */ +public class UpdateTutorEvaluationVo { + + @NotNull(message = "ID") + private Integer id; + /** + * 导师用户id + */ + @NotNull(message = "导师用户id不能为空") + private Integer tutorUserId; + + /** + * 中期考核材料id + */ + @NotNull(message = "中期考核材料id不能为空") + private Integer mediumTermExamineMaterialId; + + /** + * 工作态度评价 eg:S,A,B,C,D + */ + @NotEmpty(message = "工作态度评价不能为空") + @Pattern(regexp = "(S|A|B|C|D)") + private String workAttitudeEvaluation; + + /** + * 开发进度评价 eg:S,A,B,C,D + */ + @NotEmpty(message = "开发进度评价不能为空") + @Pattern(regexp = "(S|A|B|C|D)") + private String developProgressEvaluation; + + /** + * 项目完成质量评价 eg:S,A,B,C,D + */ + @NotEmpty(message = "项目完成质量评价不能为空") + @Pattern(regexp = "(S|A|B|C|D)") + private String projectQualityEvaluation; + + /** + * 总体评分评价 eg:S,A,B,C,D + */ + @Pattern(regexp = "(S|A|B|C|D)") + @NotEmpty(message = "总体评分评价不能为空") + private String totalityEvaluation; + + /** + * 评语 + */ + @NotEmpty(message = "评语不能为空") + private String comment; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getTutorUserId() { + return tutorUserId; + } + + public void setTutorUserId(Integer tutorUserId) { + this.tutorUserId = tutorUserId; + } + + public Integer getMediumTermExamineMaterialId() { + return mediumTermExamineMaterialId; + } + + public void setMediumTermExamineMaterialId(Integer mediumTermExamineMaterialId) { + this.mediumTermExamineMaterialId = mediumTermExamineMaterialId; + } + + public String getWorkAttitudeEvaluation() { + return workAttitudeEvaluation; + } + + public void setWorkAttitudeEvaluation(String workAttitudeEvaluation) { + this.workAttitudeEvaluation = workAttitudeEvaluation; + } + + public String getDevelopProgressEvaluation() { + return developProgressEvaluation; + } + + public void setDevelopProgressEvaluation(String developProgressEvaluation) { + this.developProgressEvaluation = developProgressEvaluation; + } + + public String getProjectQualityEvaluation() { + return projectQualityEvaluation; + } + + public void setProjectQualityEvaluation(String projectQualityEvaluation) { + this.projectQualityEvaluation = projectQualityEvaluation; + } + + public String getTotalityEvaluation() { + return totalityEvaluation; + } + + public void setTotalityEvaluation(String totalityEvaluation) { + this.totalityEvaluation = totalityEvaluation; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } +} diff --git a/share-model/src/main/resources/mapper/glcc/GlccTutorEvaluationMapper.xml b/share-model/src/main/resources/mapper/glcc/GlccTutorEvaluationMapper.xml new file mode 100644 index 0000000..608a1b5 --- /dev/null +++ b/share-model/src/main/resources/mapper/glcc/GlccTutorEvaluationMapper.xml @@ -0,0 +1,25 @@ + + +