Browse Source

王子文 专项培养 季度回顾
1) 计算导师评分时更新继任者评分表数据

wangggziwen 3 years ago
parent
commit
d3efaade87

+ 113 - 0
master/src/main/java/com/ruoyi/project/training/spec/controller/TStSuccessorScoreController.java

@@ -0,0 +1,113 @@
+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.TStSuccessorScore;
+import com.ruoyi.project.training.spec.service.ITStSuccessorScoreService;
+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-05-17
+ */
+@RestController
+@RequestMapping("/spec/score")
+public class TStSuccessorScoreController extends BaseController
+{
+    @Autowired
+    private ITStSuccessorScoreService tStSuccessorScoreService;
+
+    /**
+     * 查询继任者年度评分列表
+     */
+    @PreAuthorize("@ss.hasPermi('spec:score:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TStSuccessorScore tStSuccessorScore)
+    {
+        startPage();
+        List<TStSuccessorScore> list = tStSuccessorScoreService.selectTStSuccessorScoreList(tStSuccessorScore);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出继任者年度评分列表
+     */
+    @PreAuthorize("@ss.hasPermi('spec:score:export')")
+    @Log(title = "继任者年度评分", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TStSuccessorScore tStSuccessorScore)
+    {
+        List<TStSuccessorScore> list = tStSuccessorScoreService.selectTStSuccessorScoreList(tStSuccessorScore);
+        ExcelUtil<TStSuccessorScore> util = new ExcelUtil<TStSuccessorScore>(TStSuccessorScore.class);
+        return util.exportExcel(list, "score");
+    }
+
+    /**
+     * 获取继任者年度评分详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('spec:score:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tStSuccessorScoreService.selectTStSuccessorScoreById(id));
+    }
+
+    /**
+     * 获取继任者年度评分详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('spec:score:query')")
+    @GetMapping("/getTStSuccessorScore")
+    public AjaxResult getTStSuccessorScore(TStSuccessorScore tStSuccessorScore)
+    {
+        return AjaxResult.success(tStSuccessorScoreService.selectTStSuccessorScore(tStSuccessorScore));
+    }
+
+    /**
+     * 新增继任者年度评分
+     */
+    @PreAuthorize("@ss.hasPermi('spec:score:add')")
+    @Log(title = "继任者年度评分", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TStSuccessorScore tStSuccessorScore)
+    {
+        return toAjax(tStSuccessorScoreService.insertTStSuccessorScore(tStSuccessorScore));
+    }
+
+    /**
+     * 修改继任者年度评分
+     */
+    @PreAuthorize("@ss.hasPermi('spec:score:edit')")
+    @Log(title = "继任者年度评分", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TStSuccessorScore tStSuccessorScore)
+    {
+        return toAjax(tStSuccessorScoreService.updateTStSuccessorScore(tStSuccessorScore));
+    }
+
+    /**
+     * 删除继任者年度评分
+     */
+    @PreAuthorize("@ss.hasPermi('spec:score:remove')")
+    @Log(title = "继任者年度评分", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tStSuccessorScoreService.deleteTStSuccessorScoreByIds(ids));
+    }
+}

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

@@ -0,0 +1,194 @@
+package com.ruoyi.project.training.spec.domain;
+
+import java.util.Date;
+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;
+
+/**
+ * 继任者年度评分对象 t_st_successor_score
+ *
+ * @author ruoyi
+ * @date 2022-05-17
+ */
+public class TStSuccessorScore extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 唯一标识ID */
+    private Long id;
+
+    /** 培训员工编号 */
+    @Excel(name = "培训员工编号")
+    private String staffId;
+
+    /** 删除状态 */
+    private Long delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private String createrCode;
+
+    /** 创建时间 */
+    @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;
+
+    /** 一季度 */
+    @Excel(name = "一季度")
+    private String quarterOne;
+
+    /** 二季度 */
+    @Excel(name = "二季度")
+    private String quarterTwo;
+
+    /** 三季度 */
+    @Excel(name = "三季度")
+    private String quarterThree;
+
+    /** 四季度 */
+    @Excel(name = "四季度")
+    private String quarterFour;
+
+    /** 年度 */
+    @Excel(name = "年度")
+    private Long year;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setStaffId(String staffId)
+    {
+        this.staffId = staffId;
+    }
+
+    public String getStaffId()
+    {
+        return staffId;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(String createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public String getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate)
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate()
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(String updaterCode)
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public String getUpdaterCode()
+    {
+        return updaterCode;
+    }
+    public void setUpdatedate(Date updatedate)
+    {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate()
+    {
+        return updatedate;
+    }
+    public void setQuarterOne(String quarterOne)
+    {
+        this.quarterOne = quarterOne;
+    }
+
+    public String getQuarterOne()
+    {
+        return quarterOne;
+    }
+    public void setQuarterTwo(String quarterTwo)
+    {
+        this.quarterTwo = quarterTwo;
+    }
+
+    public String getQuarterTwo()
+    {
+        return quarterTwo;
+    }
+    public void setQuarterThree(String quarterThree)
+    {
+        this.quarterThree = quarterThree;
+    }
+
+    public String getQuarterThree()
+    {
+        return quarterThree;
+    }
+    public void setQuarterFour(String quarterFour)
+    {
+        this.quarterFour = quarterFour;
+    }
+
+    public String getQuarterFour()
+    {
+        return quarterFour;
+    }
+    public void setYear(Long year)
+    {
+        this.year = year;
+    }
+
+    public Long getYear()
+    {
+        return year;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("staffId", getStaffId())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("quarterOne", getQuarterOne())
+            .append("quarterTwo", getQuarterTwo())
+            .append("quarterThree", getQuarterThree())
+            .append("quarterFour", getQuarterFour())
+            .append("year", getYear())
+            .toString();
+    }
+}

+ 71 - 0
master/src/main/java/com/ruoyi/project/training/spec/mapper/TStSuccessorScoreMapper.java

@@ -0,0 +1,71 @@
+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.TStSuccessorScore;
+
+/**
+ * 继任者年度评分Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-05-17
+ */
+public interface TStSuccessorScoreMapper 
+{
+    /**
+     * 查询继任者年度评分
+     *
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 继任者年度评分
+     */
+    public TStSuccessorScore selectTStSuccessorScore(TStSuccessorScore tStSuccessorScore);
+
+    /**
+     * 查询继任者年度评分
+     * 
+     * @param id 继任者年度评分ID
+     * @return 继任者年度评分
+     */
+    public TStSuccessorScore selectTStSuccessorScoreById(Long id);
+
+    /**
+     * 查询继任者年度评分列表
+     * 
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 继任者年度评分集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TStSuccessorScore> selectTStSuccessorScoreList(TStSuccessorScore tStSuccessorScore);
+
+    /**
+     * 新增继任者年度评分
+     * 
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 结果
+     */
+    public int insertTStSuccessorScore(TStSuccessorScore tStSuccessorScore);
+
+    /**
+     * 修改继任者年度评分
+     * 
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 结果
+     */
+    public int updateTStSuccessorScore(TStSuccessorScore tStSuccessorScore);
+
+    /**
+     * 删除继任者年度评分
+     * 
+     * @param id 继任者年度评分ID
+     * @return 结果
+     */
+    public int deleteTStSuccessorScoreById(Long id);
+
+    /**
+     * 批量删除继任者年度评分
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTStSuccessorScoreByIds(Long[] ids);
+}

+ 69 - 0
master/src/main/java/com/ruoyi/project/training/spec/service/ITStSuccessorScoreService.java

@@ -0,0 +1,69 @@
+package com.ruoyi.project.training.spec.service;
+
+import java.util.List;
+import com.ruoyi.project.training.spec.domain.TStSuccessorScore;
+
+/**
+ * 继任者年度评分Service接口
+ * 
+ * @author ruoyi
+ * @date 2022-05-17
+ */
+public interface ITStSuccessorScoreService 
+{
+    /**
+     * 查询继任者年度评分
+     *
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 继任者年度评分
+     */
+    public TStSuccessorScore selectTStSuccessorScore(TStSuccessorScore tStSuccessorScore);
+
+    /**
+     * 查询继任者年度评分
+     * 
+     * @param id 继任者年度评分ID
+     * @return 继任者年度评分
+     */
+    public TStSuccessorScore selectTStSuccessorScoreById(Long id);
+
+    /**
+     * 查询继任者年度评分列表
+     * 
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 继任者年度评分集合
+     */
+    public List<TStSuccessorScore> selectTStSuccessorScoreList(TStSuccessorScore tStSuccessorScore);
+
+    /**
+     * 新增继任者年度评分
+     * 
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 结果
+     */
+    public int insertTStSuccessorScore(TStSuccessorScore tStSuccessorScore);
+
+    /**
+     * 修改继任者年度评分
+     * 
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 结果
+     */
+    public int updateTStSuccessorScore(TStSuccessorScore tStSuccessorScore);
+
+    /**
+     * 批量删除继任者年度评分
+     * 
+     * @param ids 需要删除的继任者年度评分ID
+     * @return 结果
+     */
+    public int deleteTStSuccessorScoreByIds(Long[] ids);
+
+    /**
+     * 删除继任者年度评分信息
+     * 
+     * @param id 继任者年度评分ID
+     * @return 结果
+     */
+    public int deleteTStSuccessorScoreById(Long id);
+}

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

@@ -0,0 +1,103 @@
+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.TStSuccessorScoreMapper;
+import com.ruoyi.project.training.spec.domain.TStSuccessorScore;
+import com.ruoyi.project.training.spec.service.ITStSuccessorScoreService;
+
+/**
+ * 继任者年度评分Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-05-17
+ */
+@Service
+public class TStSuccessorScoreServiceImpl implements ITStSuccessorScoreService
+{
+    @Autowired
+    private TStSuccessorScoreMapper tStSuccessorScoreMapper;
+
+    /**
+     * 查询继任者年度评分
+     *
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 继任者年度评分
+     */
+    public TStSuccessorScore selectTStSuccessorScore(TStSuccessorScore tStSuccessorScore) {
+        return tStSuccessorScoreMapper.selectTStSuccessorScore(tStSuccessorScore);
+    }
+
+    /**
+     * 查询继任者年度评分
+     *
+     * @param id 继任者年度评分ID
+     * @return 继任者年度评分
+     */
+    @Override
+    public TStSuccessorScore selectTStSuccessorScoreById(Long id)
+    {
+        return tStSuccessorScoreMapper.selectTStSuccessorScoreById(id);
+    }
+
+    /**
+     * 查询继任者年度评分列表
+     *
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 继任者年度评分
+     */
+    @Override
+    public List<TStSuccessorScore> selectTStSuccessorScoreList(TStSuccessorScore tStSuccessorScore)
+    {
+        return tStSuccessorScoreMapper.selectTStSuccessorScoreList(tStSuccessorScore);
+    }
+
+    /**
+     * 新增继任者年度评分
+     *
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 结果
+     */
+    @Override
+    public int insertTStSuccessorScore(TStSuccessorScore tStSuccessorScore)
+    {
+        return tStSuccessorScoreMapper.insertTStSuccessorScore(tStSuccessorScore);
+    }
+
+    /**
+     * 修改继任者年度评分
+     *
+     * @param tStSuccessorScore 继任者年度评分
+     * @return 结果
+     */
+    @Override
+    public int updateTStSuccessorScore(TStSuccessorScore tStSuccessorScore)
+    {
+        return tStSuccessorScoreMapper.updateTStSuccessorScore(tStSuccessorScore);
+    }
+
+    /**
+     * 批量删除继任者年度评分
+     *
+     * @param ids 需要删除的继任者年度评分ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTStSuccessorScoreByIds(Long[] ids)
+    {
+        return tStSuccessorScoreMapper.deleteTStSuccessorScoreByIds(ids);
+    }
+
+    /**
+     * 删除继任者年度评分信息
+     *
+     * @param id 继任者年度评分ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTStSuccessorScoreById(Long id)
+    {
+        return tStSuccessorScoreMapper.deleteTStSuccessorScoreById(id);
+    }
+}

+ 131 - 0
master/src/main/resources/mybatis/training/spec/TStSuccessorScoreMapper.xml

@@ -0,0 +1,131 @@
+<?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.TStSuccessorScoreMapper">
+    
+    <resultMap type="TStSuccessorScore" id="TStSuccessorScoreResult">
+        <result property="id"    column="id"    />
+        <result property="staffId"    column="staff_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updatedate"    column="updatedate"    />
+        <result property="quarterOne"    column="quarter_one"    />
+        <result property="quarterTwo"    column="quarter_two"    />
+        <result property="quarterThree"    column="quarter_three"    />
+        <result property="quarterFour"    column="quarter_four"    />
+        <result property="year"    column="year"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTStSuccessorScoreVo">
+        select d.id, d.staff_id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.quarter_one, d.quarter_two, d.quarter_three, d.quarter_four, d.year
+        from t_st_successor_score d
+    </sql>
+
+    <select id="selectTStSuccessorScore" parameterType="TStSuccessorScore" resultMap="TStSuccessorScoreResult">
+        <include refid="selectTStSuccessorScoreVo"/>
+        <where>
+            <if test="staffId != null  and staffId != ''"> and staff_id = #{staffId}</if>
+            <if test="quarterOne != null  and quarterOne != ''"> and quarter_one = #{quarterOne}</if>
+            <if test="quarterTwo != null  and quarterTwo != ''"> and quarter_two = #{quarterTwo}</if>
+            <if test="quarterThree != null  and quarterThree != ''"> and quarter_three = #{quarterThree}</if>
+            <if test="quarterFour != null  and quarterFour != ''"> and quarter_four = #{quarterFour}</if>
+            <if test="year != null "> and year = #{year}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
+    <select id="selectTStSuccessorScoreList" parameterType="TStSuccessorScore" resultMap="TStSuccessorScoreResult">
+        <include refid="selectTStSuccessorScoreVo"/>
+        <where>  
+            <if test="staffId != null  and staffId != ''"> and staff_id = #{staffId}</if>
+            <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</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>
+            <if test="quarterOne != null  and quarterOne != ''"> and quarter_one = #{quarterOne}</if>
+            <if test="quarterTwo != null  and quarterTwo != ''"> and quarter_two = #{quarterTwo}</if>
+            <if test="quarterThree != null  and quarterThree != ''"> and quarter_three = #{quarterThree}</if>
+            <if test="quarterFour != null  and quarterFour != ''"> and quarter_four = #{quarterFour}</if>
+            <if test="year != null "> and year = #{year}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTStSuccessorScoreById" parameterType="Long" resultMap="TStSuccessorScoreResult">
+        <include refid="selectTStSuccessorScoreVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTStSuccessorScore" parameterType="TStSuccessorScore">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_st_successor_score.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_st_successor_score
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="staffId != null">staff_id,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="quarterOne != null">quarter_one,</if>
+            <if test="quarterTwo != null">quarter_two,</if>
+            <if test="quarterThree != null">quarter_three,</if>
+            <if test="quarterFour != null">quarter_four,</if>
+            <if test="year != null">year,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="staffId != null">#{staffId},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="quarterOne != null">#{quarterOne},</if>
+            <if test="quarterTwo != null">#{quarterTwo},</if>
+            <if test="quarterThree != null">#{quarterThree},</if>
+            <if test="quarterFour != null">#{quarterFour},</if>
+            <if test="year != null">#{year},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTStSuccessorScore" parameterType="TStSuccessorScore">
+        update t_st_successor_score
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="staffId != null">staff_id = #{staffId},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="quarterOne != null">quarter_one = #{quarterOne},</if>
+            <if test="quarterTwo != null">quarter_two = #{quarterTwo},</if>
+            <if test="quarterThree != null">quarter_three = #{quarterThree},</if>
+            <if test="quarterFour != null">quarter_four = #{quarterFour},</if>
+            <if test="year != null">year = #{year},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTStSuccessorScoreById" parameterType="Long">
+        update t_st_successor_score set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTStSuccessorScoreByIds" parameterType="String">
+        update t_st_successor_score set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    
+</mapper>

+ 62 - 0
ui/src/api/training/spec/score.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询继任者年度评分列表
+export function listScore(query) {
+  return request({
+    url: '/spec/score/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询继任者年度评分详细
+export function getScoreById(id) {
+  return request({
+    url: '/spec/score/' + id,
+    method: 'get'
+  })
+}
+
+// 查询继任者年度评分详细
+export function getScore(query) {
+  return request({
+    url: '/spec/score/getTStSuccessorScore',
+    method: 'get',
+    params: query
+  })
+}
+
+// 新增继任者年度评分
+export function addScore(data) {
+  return request({
+    url: '/spec/score',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改继任者年度评分
+export function updateScore(data) {
+  return request({
+    url: '/spec/score',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除继任者年度评分
+export function delScore(id) {
+  return request({
+    url: '/spec/score/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出继任者年度评分
+export function exportScore(query) {
+  return request({
+    url: '/spec/score/export',
+    method: 'get',
+    params: query
+  })
+}

+ 31 - 0
ui/src/views/training/spec/seasonalfeedback/index.vue

@@ -416,6 +416,7 @@
 
 <script>
 import { getAnswer, addAnswer, updateAnswer, listAnswer } from "@/api/training/spec/answer";
+import { listScore, getScore, delScore, addScore, updateScore, exportScore, importTemplate} from "@/api/training/spec/score";
 import { allFileList, delCommonfile } from "@/api/common/commonfile";
 import { addFeedback, getFeedbackByParams, listInvitedSuccessor, updateFeedback, listFeedback, getFeedbackByPlanId } from "@/api/training/spec/feedback";
 import { listMentors } from "@/api/training/spec/successor";
@@ -945,6 +946,36 @@ export default {
         overallScore = mentorFeedbackScore * 0.6 + invitedMentorFeedbackScoreAvg * 0.4;
         // 更新季度平均分
         updateFeedback({ id: feedbackId, overallScore: overallScore });
+        // 更新继任者评分表数据
+        getScore({
+          successorId: this.queryParams.successorId,
+          feedbackYear: this.queryParams.feedbackYear,
+          feedbackSeason: this.queryParams.feedbackSeason
+        }).then(response => {
+          let data = response.data;
+          let score = {};
+          if (this.queryParams.feedbackSeason == 1) {
+            score.quaterOne = overallScore;
+          }
+          if (this.queryParams.feedbackSeason == 2) {
+            score.quaterTwo = overallScore;
+          }
+          if (this.queryParams.feedbackSeason == 3) {
+            score.quaterThree = overallScore;
+          }
+          if (this.queryParams.feedbackSeason == 4) {
+            score.quaterFour = overallScore;
+          }
+          if (data != null) {
+            score.id = data.id;
+            updateScore(score);
+          } else {
+            score.successorId = this.queryParams.successorId;
+            score.feedbackYear = this.queryParams.feedbackYear;
+            score.feedbackSeason = this.queryParams.feedbackSeason;
+            addScore(score);
+          }
+        });
       });
     },
     /** 保存反馈问题 */