فهرست منبع

王子文 专项培养

wangggziwen 3 سال پیش
والد
کامیت
4c07cebaeb

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/spec/controller/TStFeedbackController.java

@@ -271,7 +271,6 @@ public class TStFeedbackController extends BaseController
     @GetMapping(value = "/getInfoByPlanId/{planId}")
     public AjaxResult getInfoByPlanId(@PathVariable("planId") Long planId)
     {
-        System.out.println(planId);
         return AjaxResult.success(tStFeedbackService.selectTStFeedbackByPlanId(planId));
     }
 

+ 0 - 104
master/src/main/java/com/ruoyi/project/training/spec/controller/TStPlanFeedbackController.java

@@ -1,104 +0,0 @@
-package com.ruoyi.project.training.spec.controller;
-
-import java.util.List;
-
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.framework.aspectj.lang.annotation.Log;
-import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.training.spec.domain.TStPlanFeedback;
-import com.ruoyi.project.training.spec.service.ITStPlanFeedbackService;
-import com.ruoyi.framework.web.controller.BaseController;
-import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.framework.web.page.TableDataInfo;
-
-/**
- * 专项培训反馈Controller
- *
- * @author ruoyi
- * @date 2022-04-20
- */
-@RestController
-@RequestMapping("/spec/planfeedback")
-public class TStPlanFeedbackController extends BaseController
-{
-    @Autowired
-    private ITStPlanFeedbackService tStPlanFeedbackService;
-
-    /**
-     * 查询专项培训反馈列表
-     */
-    @PreAuthorize("@ss.hasPermi('spec:feedback:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(TStPlanFeedback tStPlanFeedback)
-    {
-        startPage();
-        List<TStPlanFeedback> list = tStPlanFeedbackService.selectTStPlanFeedbackList(tStPlanFeedback);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出专项培训反馈列表
-     */
-    @PreAuthorize("@ss.hasPermi('spec:feedback:export')")
-    @Log(title = "专项培训反馈", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult export(TStPlanFeedback tStPlanFeedback)
-    {
-        List<TStPlanFeedback> list = tStPlanFeedbackService.selectTStPlanFeedbackList(tStPlanFeedback);
-        ExcelUtil<TStPlanFeedback> util = new ExcelUtil<TStPlanFeedback>(TStPlanFeedback.class);
-        return util.exportExcel(list, "feedback");
-    }
-
-    /**
-     * 获取专项培训反馈详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('spec:feedback:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return AjaxResult.success(tStPlanFeedbackService.selectTStPlanFeedbackById(id));
-    }
-
-    /**
-     * 新增专项培训反馈
-     */
-    @PreAuthorize("@ss.hasPermi('spec:feedback:add')")
-    @Log(title = "专项培训反馈", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody TStPlanFeedback tStPlanFeedback)
-    {
-        return toAjax(tStPlanFeedbackService.insertTStPlanFeedback(tStPlanFeedback));
-    }
-
-    /**
-     * 修改专项培训反馈
-     */
-    @PreAuthorize("@ss.hasPermi('spec:feedback:edit')")
-    @Log(title = "专项培训反馈", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody TStPlanFeedback tStPlanFeedback)
-    {
-        return toAjax(tStPlanFeedbackService.updateTStPlanFeedback(tStPlanFeedback));
-    }
-
-    /**
-     * 删除专项培训反馈
-     */
-    @PreAuthorize("@ss.hasPermi('spec:feedback:remove')")
-    @Log(title = "专项培训反馈", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(tStPlanFeedbackService.deleteTStPlanFeedbackByIds(ids));
-    }
-}

+ 0 - 194
master/src/main/java/com/ruoyi/project/training/spec/domain/TStPlanFeedback.java

@@ -1,194 +0,0 @@
-package com.ruoyi.project.training.spec.domain;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.framework.aspectj.lang.annotation.Excel;
-import com.ruoyi.framework.web.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import java.util.Date;
-
-/**
- * 专项培训反馈对象 t_st_plan_feedback
- *
- * @author ruoyi
- * @date 2022-04-20
- */
-public class TStPlanFeedback extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** $column.columnComment */
-    private Long id;
-
-    /** 专项培训计划编号 */
-    @Excel(name = "专项培训计划编号")
-    private Long planId;
-
-    /** 问题1 */
-    @Excel(name = "问题1")
-    private String question1;
-
-    /** 问题2 */
-    @Excel(name = "问题2")
-    private String question2;
-
-    /** 问题3 */
-    @Excel(name = "问题3")
-    private String question3;
-
-    /** 答案1 */
-    @Excel(name = "答案1")
-    private String answer1;
-
-    /** 答案2 */
-    @Excel(name = "答案2")
-    private String answer2;
-
-    /** 答案3 */
-    @Excel(name = "答案3")
-    private String answer3;
-
-    /** 删除状态 */
-    private Long delFlag;
-
-    /** 创建人 */
-    @Excel(name = "创建人")
-    private String createerCode;
-
-    /** 创建时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date createdate;
-
-    /** 修改人 */
-    @Excel(name = "修改人")
-    private String updaterCode;
-
-    /** 修改时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date updatedate;
-
-    public Long getDelFlag() {
-        return delFlag;
-    }
-
-    public void setDelFlag(Long delFlag) {
-        this.delFlag = delFlag;
-    }
-
-    public String getCreateerCode() {
-        return createerCode;
-    }
-
-    public void setCreateerCode(String createerCode) {
-        this.createerCode = createerCode;
-    }
-
-    public Date getCreatedate() {
-        return createdate;
-    }
-
-    public void setCreatedate(Date createdate) {
-        this.createdate = createdate;
-    }
-
-    public String getUpdaterCode() {
-        return updaterCode;
-    }
-
-    public void setUpdaterCode(String updaterCode) {
-        this.updaterCode = updaterCode;
-    }
-
-    public Date getUpdatedate() {
-        return updatedate;
-    }
-
-    public void setUpdatedate(Date updatedate) {
-        this.updatedate = updatedate;
-    }
-
-    public static long getSerialVersionUID() {
-        return serialVersionUID;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getPlanId() {
-        return planId;
-    }
-
-    public void setPlanId(Long planId) {
-        this.planId = planId;
-    }
-
-    public String getQuestion1() {
-        return question1;
-    }
-
-    public void setQuestion1(String question1) {
-        this.question1 = question1;
-    }
-
-    public String getQuestion2() {
-        return question2;
-    }
-
-    public void setQuestion2(String question2) {
-        this.question2 = question2;
-    }
-
-    public String getQuestion3() {
-        return question3;
-    }
-
-    public void setQuestion3(String question3) {
-        this.question3 = question3;
-    }
-
-    public String getAnswer1() {
-        return answer1;
-    }
-
-    public void setAnswer1(String answer1) {
-        this.answer1 = answer1;
-    }
-
-    public String getAnswer2() {
-        return answer2;
-    }
-
-    public void setAnswer2(String answer2) {
-        this.answer2 = answer2;
-    }
-
-    public String getAnswer3() {
-        return answer3;
-    }
-
-    public void setAnswer3(String answer3) {
-        this.answer3 = answer3;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("planId", getPlanId())
-                .append("question1", getQuestion1())
-                .append("question2", getQuestion2())
-                .append("question3", getQuestion3())
-                .append("answer1", getAnswer1())
-                .append("answer2", getAnswer2())
-                .append("answer3", getAnswer3())
-            .toString();
-    }
-}

+ 0 - 63
master/src/main/java/com/ruoyi/project/training/spec/mapper/TStPlanFeedbackMapper.java

@@ -1,63 +0,0 @@
-package com.ruoyi.project.training.spec.mapper;
-
-import java.util.List;
-import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
-import com.ruoyi.project.training.spec.domain.TStPlanFeedback;
-
-/**
- * 专项培训反馈Mapper接口
- * 
- * @author ruoyi
- * @date 2022-04-20
- */
-public interface TStPlanFeedbackMapper 
-{
-    /**
-     * 查询专项培训反馈
-     * 
-     * @param id 专项培训反馈ID
-     * @return 专项培训反馈
-     */
-    public TStPlanFeedback selectTStPlanFeedbackById(Long id);
-
-    /**
-     * 查询专项培训反馈列表
-     * 
-     * @param tStPlanFeedback 专项培训反馈
-     * @return 专项培训反馈集合
-     */
-    @DataScope(deptAlias = "d")
-    public List<TStPlanFeedback> selectTStPlanFeedbackList(TStPlanFeedback tStPlanFeedback);
-
-    /**
-     * 新增专项培训反馈
-     * 
-     * @param tStPlanFeedback 专项培训反馈
-     * @return 结果
-     */
-    public int insertTStPlanFeedback(TStPlanFeedback tStPlanFeedback);
-
-    /**
-     * 修改专项培训反馈
-     * 
-     * @param tStPlanFeedback 专项培训反馈
-     * @return 结果
-     */
-    public int updateTStPlanFeedback(TStPlanFeedback tStPlanFeedback);
-
-    /**
-     * 删除专项培训反馈
-     * 
-     * @param id 专项培训反馈ID
-     * @return 结果
-     */
-    public int deleteTStPlanFeedbackById(Long id);
-
-    /**
-     * 批量删除专项培训反馈
-     * 
-     * @param ids 需要删除的数据ID
-     * @return 结果
-     */
-    public int deleteTStPlanFeedbackByIds(Long[] ids);
-}

+ 0 - 61
master/src/main/java/com/ruoyi/project/training/spec/service/ITStPlanFeedbackService.java

@@ -1,61 +0,0 @@
-package com.ruoyi.project.training.spec.service;
-
-import java.util.List;
-import com.ruoyi.project.training.spec.domain.TStPlanFeedback;
-
-/**
- * 专项培训反馈Service接口
- * 
- * @author ruoyi
- * @date 2022-04-20
- */
-public interface ITStPlanFeedbackService 
-{
-    /**
-     * 查询专项培训反馈
-     * 
-     * @param id 专项培训反馈ID
-     * @return 专项培训反馈
-     */
-    public TStPlanFeedback selectTStPlanFeedbackById(Long id);
-
-    /**
-     * 查询专项培训反馈列表
-     * 
-     * @param tStPlanFeedback 专项培训反馈
-     * @return 专项培训反馈集合
-     */
-    public List<TStPlanFeedback> selectTStPlanFeedbackList(TStPlanFeedback tStPlanFeedback);
-
-    /**
-     * 新增专项培训反馈
-     * 
-     * @param tStPlanFeedback 专项培训反馈
-     * @return 结果
-     */
-    public int insertTStPlanFeedback(TStPlanFeedback tStPlanFeedback);
-
-    /**
-     * 修改专项培训反馈
-     * 
-     * @param tStPlanFeedback 专项培训反馈
-     * @return 结果
-     */
-    public int updateTStPlanFeedback(TStPlanFeedback tStPlanFeedback);
-
-    /**
-     * 批量删除专项培训反馈
-     * 
-     * @param ids 需要删除的专项培训反馈ID
-     * @return 结果
-     */
-    public int deleteTStPlanFeedbackByIds(Long[] ids);
-
-    /**
-     * 删除专项培训反馈信息
-     * 
-     * @param id 专项培训反馈ID
-     * @return 结果
-     */
-    public int deleteTStPlanFeedbackById(Long id);
-}

+ 0 - 93
master/src/main/java/com/ruoyi/project/training/spec/service/impl/TStPlanFeedbackServiceImpl.java

@@ -1,93 +0,0 @@
-package com.ruoyi.project.training.spec.service.impl;
-
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.project.training.spec.mapper.TStPlanFeedbackMapper;
-import com.ruoyi.project.training.spec.domain.TStPlanFeedback;
-import com.ruoyi.project.training.spec.service.ITStPlanFeedbackService;
-
-/**
- * 专项培训反馈Service业务层处理
- *
- * @author ruoyi
- * @date 2022-04-20
- */
-@Service
-public class TStPlanFeedbackServiceImpl implements ITStPlanFeedbackService
-{
-    @Autowired
-    private TStPlanFeedbackMapper tStPlanFeedbackMapper;
-
-    /**
-     * 查询专项培训反馈
-     *
-     * @param id 专项培训反馈ID
-     * @return 专项培训反馈
-     */
-    @Override
-    public TStPlanFeedback selectTStPlanFeedbackById(Long id)
-    {
-        return tStPlanFeedbackMapper.selectTStPlanFeedbackById(id);
-    }
-
-    /**
-     * 查询专项培训反馈列表
-     *
-     * @param tStPlanFeedback 专项培训反馈
-     * @return 专项培训反馈
-     */
-    @Override
-    public List<TStPlanFeedback> selectTStPlanFeedbackList(TStPlanFeedback tStPlanFeedback)
-    {
-        return tStPlanFeedbackMapper.selectTStPlanFeedbackList(tStPlanFeedback);
-    }
-
-    /**
-     * 新增专项培训反馈
-     *
-     * @param tStPlanFeedback 专项培训反馈
-     * @return 结果
-     */
-    @Override
-    public int insertTStPlanFeedback(TStPlanFeedback tStPlanFeedback)
-    {
-        return tStPlanFeedbackMapper.insertTStPlanFeedback(tStPlanFeedback);
-    }
-
-    /**
-     * 修改专项培训反馈
-     *
-     * @param tStPlanFeedback 专项培训反馈
-     * @return 结果
-     */
-    @Override
-    public int updateTStPlanFeedback(TStPlanFeedback tStPlanFeedback)
-    {
-        return tStPlanFeedbackMapper.updateTStPlanFeedback(tStPlanFeedback);
-    }
-
-    /**
-     * 批量删除专项培训反馈
-     *
-     * @param ids 需要删除的专项培训反馈ID
-     * @return 结果
-     */
-    @Override
-    public int deleteTStPlanFeedbackByIds(Long[] ids)
-    {
-        return tStPlanFeedbackMapper.deleteTStPlanFeedbackByIds(ids);
-    }
-
-    /**
-     * 删除专项培训反馈信息
-     *
-     * @param id 专项培训反馈ID
-     * @return 结果
-     */
-    @Override
-    public int deleteTStPlanFeedbackById(Long id)
-    {
-        return tStPlanFeedbackMapper.deleteTStPlanFeedbackById(id);
-    }
-}

+ 2 - 24
master/src/main/resources/mybatis/training/spec/TStFeedbackMapper.xml

@@ -64,30 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectTStFeedbackByPlanId" parameterType="Long" resultMap="TStFeedbackResult">
-        select
-            id,
-            feedback_type,
-            mentor_id,
-            successor_id,
-            parent_id,
-            plan_id,
-            feedback_year,
-            feedback_season,
-            feedback_month,
-            successor_feedback,
-            mentor_feedback,
-            feedback_score,
-            feedback_status,
-            meeting_date
-        from
-        (
-            select rownum,t.* from
-            (
-                select * from t_st_feedback order by id desc
-            ) t
-            where t.plan_id = #{planId}
-        )
-        where rownum=1;
+        <include refid="selectTStFeedbackVo"/>
+        where plan_id = #{planId}
     </select>
 
     <select id="selectTStFeedbackById" parameterType="Long" resultMap="TStFeedbackResult">

+ 0 - 121
master/src/main/resources/mybatis/training/spec/TStPlanFeedbackMapper.xml

@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.project.training.spec.mapper.TStPlanFeedbackMapper">
-    
-    <resultMap type="TStPlanFeedback" id="TStPlanFeedbackResult">
-        <result property="id"    column="id"    />
-        <result property="planId"    column="plan_id"    />
-        <result property="question1"    column="question1"    />
-        <result property="question2"    column="question2"    />
-        <result property="question3"    column="question3"    />
-        <result property="answer1"    column="answer1"    />
-        <result property="answer2"    column="answer2"    />
-        <result property="answer3"    column="answer3"    />
-        <result property="delFlag"    column="del_flag"    />
-        <result property="createerCode"    column="createer_code"    />
-        <result property="createdate"    column="createdate"    />
-        <result property="updaterCode"    column="updater_code"    />
-        <result property="updatedate"    column="updatedate"    />
-        <result property="deptName" column="dept_name" />
-    </resultMap>
-
-    <sql id="selectTStPlanFeedbackVo">
-        select d.id, d.plan_id, d.question1, d.question2, d.question3, d.answer1, d.answer2, d.answer3, d.del_flag, d.createer_code, d.createdate, d.updater_code, d.updatedate from t_st_plan_feedback d
-
-    </sql>
-
-    <select id="selectTStPlanFeedbackList" parameterType="TStPlanFeedback" resultMap="TStPlanFeedbackResult">
-        <include refid="selectTStPlanFeedbackVo"/>
-        <where>  
-            <if test="planId != null "> and plan_id = #{planId}</if>
-            <if test="question1 != null  and question1 != ''"> and question1 = #{question1}</if>
-            <if test="question2 != null  and question2 != ''"> and question2 = #{question2}</if>
-            <if test="question3 != null  and question3 != ''"> and question3 = #{question3}</if>
-            <if test="answer1 != null  and answer1 != ''"> and answer1 = #{answer1}</if>
-            <if test="answer2 != null  and answer2 != ''"> and answer2 = #{answer2}</if>
-            <if test="answer3 != null  and answer3 != ''"> and answer3 = #{answer3}</if>
-            <if test="createerCode != null  and createerCode != ''"> and createer_code = #{createerCode}</if>
-            <if test="createdate != null "> and createdate = #{createdate}</if>
-            <if test="updaterCode != null  and updaterCode != ''"> and updater_code = #{updaterCode}</if>
-            <if test="updatedate != null "> and updatedate = #{updatedate}</if>
-            and d.del_flag = 0
-        </where>
-        <!-- 数据范围过滤 -->
-        ${params.dataScope}
-    </select>
-    
-    <select id="selectTStPlanFeedbackById" parameterType="Long" resultMap="TStPlanFeedbackResult">
-        <include refid="selectTStPlanFeedbackVo"/>
-        where plan_id = #{id}
-    </select>
-        
-    <insert id="insertTStPlanFeedback" parameterType="TStPlanFeedback">
-        <selectKey keyProperty="id" resultType="long" order="BEFORE">
-            SELECT seq_t_st_plan_feedback.NEXTVAL as id FROM DUAL
-        </selectKey>
-        insert into t_st_plan_feedback
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="planId != null">plan_id,</if>
-            <if test="question1 != null">question1,</if>
-            <if test="question2 != null">question2,</if>
-            <if test="question3 != null">question3,</if>
-            <if test="answer1 != null">answer1,</if>
-            <if test="answer2 != null">answer2,</if>
-            <if test="answer3 != null">answer3,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="createerCode != null">createer_code,</if>
-            <if test="createdate != null">createdate,</if>
-            <if test="updaterCode != null">updater_code,</if>
-            <if test="updatedate != null">updatedate,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="planId != null">#{planId},</if>
-            <if test="question1 != null">#{question1},</if>
-            <if test="question2 != null">#{question2},</if>
-            <if test="question3 != null">#{question3},</if>
-            <if test="answer1 != null">#{answer1},</if>
-            <if test="answer2 != null">#{answer2},</if>
-            <if test="answer3 != null">#{answer3},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="createerCode != null">#{createerCode},</if>
-            <if test="createdate != null">#{createdate},</if>
-            <if test="updaterCode != null">#{updaterCode},</if>
-            <if test="updatedate != null">#{updatedate},</if>
-         </trim>
-    </insert>
-
-    <update id="updateTStPlanFeedback" parameterType="TStPlanFeedback">
-        update t_st_plan_feedback
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="planId != null">plan_id = #{planId},</if>
-            <if test="question1 != null">question1 = #{question1},</if>
-            <if test="question2 != null">question2 = #{question2},</if>
-            <if test="question3 != null">question3 = #{question3},</if>
-            <if test="answer1 != null">answer1 = #{answer1},</if>
-            <if test="answer2 != null">answer2 = #{answer2},</if>
-            <if test="answer3 != null">answer3 = #{answer3},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="createerCode != null">createer_code = #{createerCode},</if>
-            <if test="createdate != null">createdate = #{createdate},</if>
-            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
-            <if test="updatedate != null">updatedate = #{updatedate},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <update id="deleteTStPlanFeedbackById" parameterType="Long">
-        update t_st_plan_feedback set del_flag = 2 where id = #{id}
-    </update>
-
-    <update id="deleteTStPlanFeedbackByIds" parameterType="String">
-        update t_st_plan_feedback set del_flag = 2 where id in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </update>
-    
-</mapper>

+ 0 - 53
ui/src/api/training/spec/planfeedback.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询 专项培养反馈列表
-export function listFeedback(query) {
-  return request({
-    url: '/spec/planfeedback/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询 专项培养反馈详细
-export function getFeedback(id) {
-  return request({
-    url: '/spec/planfeedback/' + id,
-    method: 'get'
-  })
-}
-
-// 新增 专项培养反馈
-export function addFeedback(data) {
-  return request({
-    url: '/spec/planfeedback',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改 专项培养反馈
-export function updateFeedback(data) {
-  return request({
-    url: '/spec/planfeedback',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除 专项培养反馈
-export function delFeedback(id) {
-  return request({
-    url: '/spec/planfeedback/' + id,
-    method: 'delete'
-  })
-}
-
-// 导出 专项培养反馈
-export function exportFeedback(query) {
-  return request({
-    url: '/spec/planfeedback/export',
-    method: 'get',
-    params: query
-  })
-}

+ 45 - 25
ui/src/views/training/spec/myplan/index.vue

@@ -29,7 +29,6 @@
             icon="el-icon-chat-dot-round"
             v-hasPermi="['spec:plan:edit']"
             @click="handleFeedback(scope.row)"
-            v-if="scope.row.studyState == 0"
           >反馈</el-button>
           <el-button
             size="mini"
@@ -122,13 +121,13 @@
     </el-dialog>
     <!-- 反馈对话框 -->
     <el-dialog v-dialogDrag :title="feedbackDialog.title" :visible.sync="feedbackDialog.open" width="700px" append-to-body>
-      <h3 style="margin-bottom:20px;">导师反馈</h3>
-      <el-form>
+      <el-form v-if="mentorFeedback != null">
+        <h3 style="margin-bottom:20px;">导师反馈</h3>
         <el-form-item>
-          <p v-html="mentorFeedback" style="border:1px solid #DFE6EC; height:150px;" />
+          <p v-html="mentorFeedback" style="border:1px solid #DFE6EC;" />
         </el-form-item>
       </el-form>
-      <h3 style="margin-bottom:20px;">我的心得</h3>
+      <h3>我的心得</h3>
       <el-upload
         ref="doc"
         :headers="doc.headers"
@@ -138,14 +137,16 @@
         :on-progress="handleFileDocProgress"
         :on-success="handleFileDocSuccess"
         :auto-upload="true"
-        :on-preview="handlePreview"
-        :on-remove="handleRemove"
-        :before-remove="beforeRemove"
         multiple
-        :limit="3"
-        :on-exceed="handleExceed"
-        :file-list="fileList">
-        <el-button size="small" type="primary" style="margin-bottom:10px;">点击上传附件</el-button>
+        :limit="3">
+        <el-button 
+          size="small" 
+          type="primary" 
+          style="margin-bottom:10px;margin-top:10px;"
+          v-if="feedbackDialog.studyState == 0 || feedbackDialog.studyState == 3"
+        >
+          点击上传附件
+        </el-button>
       </el-upload>
       <el-table :data="doc.commonfileList" border>
         <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
@@ -192,8 +193,8 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="handleSubmitFeedback()">{{ $t('保 存') }}</el-button>
-        <el-button>{{ $t('提 交') }}</el-button>
+        <el-button @click="handleSaveFeedback()" v-if="feedbackDialog.studyState == 0 || feedbackDialog.studyState == 3">{{ $t('保 存') }}</el-button>
+        <el-button @click="handleSubmitFeedback()" v-if="feedbackDialog.studyState == 0 || feedbackDialog.studyState == 3">{{ $t('提 交') }}</el-button>
         <el-button @click="feedbackDialog.open = false">{{ $t('返 回') }}</el-button>
       </div>
       
@@ -213,6 +214,7 @@ import {
   delPlan,
   addPlan,
   updatePlan,
+  updatePlan2,
   exportPlan,
   importTemplate,
   listPlanByStaffId
@@ -287,7 +289,11 @@ export default {
         // 是否显示弹出层(报告附件)
         open: false,
         // 弹出层标题(报告附件)
-        title: ""
+        title: "",
+        // 学习状态
+        studyState: null,
+        // 计划id
+        planId: null,
       },
       // 反馈参数
       feedbackParams: {
@@ -295,8 +301,6 @@ export default {
         answer2: null,
         answer3: null
       },
-      // 计划id
-      planId: null,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -352,7 +356,7 @@ export default {
         return "background: #FFEEEE"
       }
     },
-    /** 反馈按钮处理 */
+    /** 反馈处理 */
     handleFeedback(row) {
       this.feedbackParams = {};
       this.mentorFeedback = null;
@@ -386,24 +390,27 @@ export default {
         // 查询导师反馈
         return getFeedbackByPlanId(row.id);
       }).then(response => {
-        this.mentorFeedback = response.data.mentorFeedback;
-        this.planId = row.id;
+        if (response.data != null) {
+          this.mentorFeedback = response.data.mentorFeedback;
+        }
         this.feedbackDialog.title = row.plantName + "学习情况反馈";
+        this.feedbackDialog.planId = row.id;
+        this.feedbackDialog.studyState = row.studyState;
         this.feedbackDialog.open = true;
       });
     },
-    /** 提交反馈处理 */
-    handleSubmitFeedback() {
+    /** 反馈对话框保存处理 */
+    handleSaveFeedback() {
       let feedback1 = {};
-      feedback1.planId = this.planId;
+      feedback1.planId = this.feedbackDialog.planId;
       feedback1.questionId = 1;
       feedback1.answer = this.feedbackParams.answer1;
       let feedback2 = {};
-      feedback2.planId = this.planId;
+      feedback2.planId = this.feedbackDialog.planId;
       feedback2.questionId = 2;
       feedback2.answer = this.feedbackParams.answer2;
       let feedback3 = {};
-      feedback3.planId = this.planId;
+      feedback3.planId = this.feedbackDialog.planId;
       feedback3.questionId = 3;
       feedback3.answer = this.feedbackParams.answer3;
       getAnswerByPlanIdAndQuestionId(feedback1).then(response => {
@@ -435,6 +442,19 @@ export default {
       });
       this.feedbackDialog.open = false;
       this.msgSuccess("保存成功");
+      this.getList();
+    },
+    /** 反馈对话框提交处理 */
+    handleSubmitFeedback() {
+      let plan = {};
+      plan.id = this.feedbackDialog.planId;
+      plan.studyState = 2;
+      // 修改学习状态为2学员已提交
+      updatePlan2(plan).then(response => {
+        this.feedbackDialog.open = false;
+        this.msgSuccess("提交成功");
+        this.getList();
+      });
     },
     /** 文件下载处理 */
     handleDownload(row) {

+ 59 - 13
ui/src/views/training/spec/plan/index.vue

@@ -375,7 +375,7 @@
     <!-- 反馈对话框 -->
     <el-dialog v-dialogDrag :title="feedbackDialog.title" :visible.sync="feedbackDialog.open" width="800px" append-to-body>
       <div style="width:700px; margin:0px auto;">
-        <h3 style="margin-bottom:20px;text-align:center;">学员心得</h3>
+        <h3 style="margin-bottom:20px;">学员心得</h3>
         <el-table :data="tableData" border style="width: 100%">
           <el-table-column prop="id" label="编号" width="50"></el-table-column>
           <el-table-column prop="question" label="问题" width="250"></el-table-column>
@@ -415,15 +415,30 @@
             </template>
           </el-table-column>
         </el-table>
-        <h3 style="margin-top:30px;margin-bottom:20px;text-align:center;">导师反馈</h3>
-        <el-form>
+        <h3 style="margin-top:30px;margin-bottom:20px;">导师反馈</h3>
+        <el-form v-if="feedbackDialog.studyState == 2">
           <el-form-item>
             <editor v-model="feedbackParams.mentorFeedback" :min-height="192"/>
           </el-form-item>
         </el-form>
         <div style="text-align:center;">
-          <el-button @click="handleApprove()" type="success" size="medium" style="margin-right:25px;">{{ $t('通 过') }}</el-button>
-          <el-button @click="handleReject()" type="danger" size="medium">{{ $t('驳 回') }}</el-button>
+          <el-button 
+            @click="handleApprove()" 
+            type="success" 
+            size="medium" 
+            style="margin-right:25px;"
+            v-if="feedbackDialog.studyState == 2"
+          >
+            {{ $t('通 过') }}
+          </el-button>
+          <el-button 
+            @click="handleReject()" 
+            type="danger" 
+            size="medium"
+            v-if="feedbackDialog.studyState == 2"
+          >
+          {{ $t('驳 回') }}
+          </el-button>
         </div>
       </div>
     </el-dialog>
@@ -499,7 +514,11 @@ export default {
         // 是否显示弹出层(报告附件)
         open: false,
         // 弹出层标题(报告附件)
-        title: ""
+        title: "",
+        // 学习状态
+        studyState: null,
+        // 计划id
+        planId: null,
       },
       // 遮罩层
       loading: true,
@@ -707,6 +726,16 @@ export default {
       addFeedback(this.feedbackParams).then(response => {
         // 后期需要发邮件通知学员
         this.feedbackDialog.open = false;
+        // 修改学习状态为1已完成
+        let plan = {};
+        plan.id = this.feedbackDialog.planId;
+        plan.studyState = 1;
+        plan.dateOfCompletion = new Date();
+        updatePlan2(plan).then(response => {
+          this.feedbackDialog.open = false;
+          this.msgSuccess("已通过");
+          this.getList();
+        });
       });
     },
     /** 驳回处理 */
@@ -715,6 +744,15 @@ export default {
       addFeedback(this.feedbackParams).then(response => {
         // 后期需要发邮件通知学员
         this.feedbackDialog.open = false;
+        // 修改学习状态为3导师已反馈
+        let plan = {};
+        plan.id = this.feedbackDialog.planId;
+        plan.studyState = 3;
+        updatePlan2(plan).then(response => {
+          this.feedbackDialog.open = false;
+          this.msgSuccess("已驳回");
+          this.getList();
+        });
       });
     },
     /** 反馈处理 */
@@ -734,20 +772,28 @@ export default {
       let answerObj3 = {};
       getAnswerByPlanIdAndQuestionId(feedback1).then(response => {
         let data = response.data;
-        answerObj1 = { id: feedback1.questionId, question: data.question, answer: data.answer};
+        if (data != null) {
+          answerObj1 = { id: 1, question: data.question, answer: data.answer};
+        }
         return getAnswerByPlanIdAndQuestionId(feedback2);
       }).then(response => {
         let data = response.data;
-        answerObj2 = { id: feedback2.questionId, question: data.question, answer: data.answer};
+        if (data != null) {
+          answerObj2 = { id: 2, question: data.question, answer: data.answer};
+        }
         return getAnswerByPlanIdAndQuestionId(feedback3);
       }).then(response => {
         let data = response.data;
-        answerObj3 = { id: feedback3.questionId, question: data.question, answer: data.answer};
-        this.tableData.push(answerObj1);
-        this.tableData.push(answerObj2);
-        this.tableData.push(answerObj3);
-        this.feedbackDialog.id = row.id;
+        if (data != null) {
+          answerObj3 = { id: 3, question: data.question, answer: data.answer};
+          this.tableData.push(answerObj1);
+          this.tableData.push(answerObj2);
+          this.tableData.push(answerObj3);
+        }
         this.feedbackDialog.title = row.staffName + row.plantName + "学习情况反馈";
+        this.feedbackDialog.id = row.id;
+        this.feedbackDialog.planId = row.id;
+        this.feedbackDialog.studyState = row.studyState;
         this.feedbackDialog.open = true;
       });
     },