Browse Source

王子文

专项培训
1) 培训计划页面 点击年度计划详情 根据YEAR_PLAN_ID查询培训计划列表

数据库
1) 专项培训计划(T_ST_PLAN)表 添加列 年度计划编号(YEAR_PLAN_ID)
wangggziwen 3 years ago
parent
commit
ff3fb8cc48

+ 2 - 0
master/src/main/java/com/ruoyi/project/training/spec/controller/TStPlanController.java

@@ -154,6 +154,8 @@ public class TStPlanController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody TStPlan tStPlan)
     {
+//        tStPlan.setStartYear((tStPlan.getStartDate().getYear() + 1900) + "");
+//        tStPlan.setStartMonth((tStPlan.getStartDate().getMonth() + 1) + "");
         return toAjax(tStPlanService.insertTStPlan(tStPlan));
     }
 

+ 10 - 0
master/src/main/java/com/ruoyi/project/training/spec/domain/TStPlan.java

@@ -97,6 +97,16 @@ public class TStPlan extends BaseEntity
     /** 综合评价 */
     private String overallComment;
 
+    private Long yearPlanId;
+
+    public Long getYearPlanId() {
+        return yearPlanId;
+    }
+
+    public void setYearPlanId(Long yearPlanId) {
+        this.yearPlanId = yearPlanId;
+    }
+
     public Date getDateOfCompletion() {
         return dateOfCompletion;
     }

+ 1 - 1
master/src/main/resources/mybatis/training/spec/TStFeedbackMMapper.xml

@@ -12,7 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTStFeedbackMVo">
-        select d.id, d.monthly_feedback_id, d.overall_comment ,s.dept_name from t_st_feedback_m d
+        select d.id, d.MENTOR_ID, d.overall_comment ,s.dept_name from t_st_feedback_m d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 

+ 1 - 1
master/src/main/resources/mybatis/training/spec/TStFeedbackMRMapper.xml

@@ -12,7 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTStFeedbackMRVo">
-        select d.id, d.monthly_feedback_id, d.monthly_feedback_m_id ,s.dept_name from t_st_feedback_m_r d
+        select d.id, d.FEEDBACK_ID, d.FEEDBACK_M_ID ,s.dept_name from t_st_feedback_m_r d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 

+ 1 - 1
master/src/main/resources/mybatis/training/spec/TStFeedbackPRMapper.xml

@@ -12,7 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTStFeedbackPRVo">
-        select d.id, d.monthly_feedback_id, d.plan_id ,s.dept_name from t_st_feedback_p_r d
+        select d.id, d.FEEDBACK_ID, d.plan_id ,s.dept_name from t_st_feedback_p_r d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 

+ 3 - 1
master/src/main/resources/mybatis/training/spec/TStPlanMapper.xml

@@ -24,10 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="overallComment" column="overall_comment" />
         <result property="approveStatus" column="APPROVE_STATUS" />
         <result property="dateOfCompletion" column="date_of_completion" />
+        <result property="yearPlanId" column="year_plan_id" />
     </resultMap>
 
     <sql id="selectTStPlanVo">
-        select d.date_of_completion, suc.MENTOR_STAFF_ID, d.overall_comment, d.score, d.id, d.staff_id,d.APPROVE_STATUS, u.nick_name, d.plant_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.start_date, d.end_date, d.class_hour, d.class_content, d.study_state ,s.dept_name from t_st_plan d
+        select d.year_plan_id, d.date_of_completion, suc.MENTOR_STAFF_ID, d.overall_comment, d.score, d.id, d.staff_id,d.APPROVE_STATUS, u.nick_name, d.plant_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.start_date, d.end_date, d.class_hour, d.class_content, d.study_state ,s.dept_name from t_st_plan d
         left join sys_dept s on s.dept_id = d.dept_id
         left join sys_user u on d.staff_id = u.staffid
         left join T_ST_SUCCESSOR suc on d.STAFF_ID = suc.STAFF_ID
@@ -36,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTStPlanList" parameterType="TStPlan" resultMap="TStPlanResult">
         <include refid="selectTStPlanVo"/>
         <where>
+            <if test="yearPlanId != null  and yearPlanId != ''"> and d.year_plan_id = #{yearPlanId}</if>
             <if test="staffId != null  and staffId != ''"> and d.staff_id = #{staffId}</if>
             <if test="plantName != null  and plantName != ''"> and plant_name like concat(concat('%', #{plantName}), '%')</if>
             <if test="startDate != null "> and start_date = #{startDate}</if>

+ 2 - 15
ui/src/views/training/spec/myplan/index.vue

@@ -543,7 +543,6 @@ export default {
     this.getDicts("st_study_state").then(response => {
       this.studyStateOptions = response.data;
     });
-    this.getSuccessorOptions();
   },
   methods: {
     /** 表格行样式 */
@@ -570,10 +569,10 @@ export default {
     /** 新增反馈处理 */
     handleAddFeedback() {
       this.feedbackParams.planId = this.endParams.id;
-      // 新增feedback
+      // 新增培训计划反馈
       addFeedback(this.feedbackParams).then(response => {
         this.feedback.open = false;
-        // 修改plan学习状态
+        // 修改培训计划学习状态
         updatePlan(this.endParams).then(response => {
           this.msgSuccess("已结束学习");
           this.getList();
@@ -665,18 +664,6 @@ export default {
         this.msgSuccess(this.$t('删除成功'));
       })
     },
-    /** 查询学员下拉列表 */
-    getSuccessorOptions() {
-      getSuccessorListByMentorId(this.queryObject).then(response => {
-        let successorList = response.data;
-        for (let i = 0; i < successorList.length; i++) {
-          let successor = {};
-          successor.key = successorList[i].staffId;
-          successor.value = successorList[i].staffName;
-          this.successorOptions.push(successor);
-        }
-      });
-    },
     /** 查询培训计划列表 */
     getList() {
       this.loading = true;

+ 9 - 1
ui/src/views/training/spec/plan/index.vue

@@ -201,6 +201,9 @@
     />
     <!-- 添加或修改培训计划对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form-item prop="yearPlanId" v-if="this.operation=='add'">
+          <el-input v-model="form.yearPlanId" type="hidden"/>
+        </el-form-item>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="培训员工" prop="staffId" v-if="this.operation=='add'">
           <el-select v-model="form.staffId" placeholder="请选择学员">
@@ -522,7 +525,8 @@ export default {
         startDate: null,
         endDate: null,
         classHour: null,
-        studyState: null
+        studyState: null,
+        yearPlanId: null
       },
       // 表单参数
       form: {},
@@ -555,6 +559,10 @@ export default {
         this.clientHeight = document.body.clientHeight -250
     })
     const yearId = this.$route.params && this.$route.params.yearId;
+    // 设置查询参数年度计划编号
+    this.queryParams.yearPlanId = yearId;
+    // 设置表单参数年度计划编号
+    this.form.yearPlanId = yearId;
     this.getList();
     this.getTreeselect();
     this.getDicts("st_study_state").then(response => {