Procházet zdrojové kódy

ly 培训详情修改

ly před 2 týdny
rodič
revize
79b1f17f83

+ 14 - 0
master/src/main/java/com/ruoyi/project/training/domain/TTrainingbccDevice.java

@@ -85,6 +85,11 @@ public class TTrainingbccDevice extends BaseEntity
     @Excel(name = "学习时长min")
     private Long learnTime;
 
+    /** 完成时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date finishDate;
+
     /** 班组 */
     private String team;
 
@@ -309,6 +314,14 @@ public class TTrainingbccDevice extends BaseEntity
         this.isLock = isLock;
     }
 
+    public Date getFinishDate() {
+        return finishDate;
+    }
+
+    public void setFinishDate(Date finishDate) {
+        this.finishDate = finishDate;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -328,6 +341,7 @@ public class TTrainingbccDevice extends BaseEntity
             .append("examId", getExamId())
             .append("learnTime", getLearnTime())
             .append("team", getTeam())
+            .append("finishDate", getFinishDate())
             .toString();
     }
 }

+ 7 - 3
master/src/main/resources/mybatis/training/TTrainingbccDeviceMapper.xml

@@ -21,12 +21,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="examId"    column="exam_id"    />
         <result property="examNum"    column="exam_num"    />
         <result property="learnTime"    column="learn_time"    />
+        <result property="finishDate"    column="finish_date"    />
         <result property="deptName" column="dept_name" />
         <result property="team" column="team" />
     </resultMap>
 
     <sql id="selectTTrainingbccDeviceVo">
-        select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id,d.exam_num, d.learn_time from t_trainingbcc_device d
+        select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id,d.exam_num, d.learn_time, d.finish_date from t_trainingbcc_device d
        left join t_staffmgr s on s.staffid = d.staff_id
 
 </sql>
@@ -58,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <select id="selectTTrainingbccDeviceByReguar" parameterType="TTrainingbccDevice" resultMap="TTrainingbccDeviceResult">
-        select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id,d.exam_num, d.learn_time, s.team from t_trainingbcc_device d
+        select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id,d.exam_num, d.learn_time, d.finish_date, s.team from t_trainingbcc_device d
         left join t_staffmgr s on s.staffid = d.staff_id
         left join t_trainingbcc t on t.id = d.regular_id and t.DEL_FLAG = 0
         <where>
@@ -83,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="sortSelectTTrainingbccDeviceList" parameterType="TTrainingbccDevice" resultMap="TTrainingbccDeviceResult">
-        select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id,d.exam_num, d.learn_time from t_trainingbcc_device d
+        select d.id,s.name , d.staff_id, d.regular_id, d.start_date, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.supplementary, d.learn_state, d.exam_state, d.exam_id,d.exam_num, d.learn_time, d.finish_date from t_trainingbcc_device d
         left join t_staffmgr s on s.staffid = d.staff_id
         left join t_trainingbcc t on t.id = d.regular_id and t.DEL_FLAG = 0
         Left join SYS_DICT_DATA s0 on s.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
@@ -135,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examState != null">exam_state,</if>
             <if test="examId != null">exam_id,</if>
             <if test="learnTime != null">learn_time,</if>
+            <if test="finishDate != null">finish_date,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -152,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examState != null">#{examState},</if>
             <if test="examId != null">#{examId},</if>
             <if test="learnTime != null">#{learnTime},</if>
+            <if test="finishDate != null">#{finishDate},</if>
          </trim>
     </insert>
 
@@ -173,6 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examId != null">exam_id = #{examId},</if>
             <if test="examNum != null">exam_num = #{examNum},</if>
             <if test="learnTime != null">learn_time = #{learnTime},</if>
+            <if test="finishDate != null">finish_date = #{finishDate},</if>
         </trim>
         where id = #{id}
     </update>

+ 2 - 1
master/src/main/resources/mybatis/training/TTrainingbccMapper.xml

@@ -56,7 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="duration != null  and duration != ''"> and duration = #{duration}</if>
             <if test="trainer != null  and trainer != ''"> and trainer = #{trainer}</if>
             <if test="position != null  and position != ''"> and position = #{position}</if>
-            <if test="trainingType != null and trainingType != ''">and training_type = #{trainingType}</if>
+            <if test="trainingType != null and trainingType != '' and trainingType != -1">and training_type = #{trainingType}</if>
+            <if test="trainingType != null and trainingType == -1">and training_type not in ('10','12','14','16','20')</if>
             <if test="examId != null and examId != ''">and exam_id = #{examId}</if>
             <if test="isfinish != null and isfinish != ''">and isfinish = #{isfinish}</if>
             <if test="regularId != null and regularId != ''">and regular_id = #{regularId}</if>

+ 1 - 0
ui/package.json

@@ -74,6 +74,7 @@
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",
+    "qrcode": "^1.5.4",
     "quill": "1.3.7",
     "screenfull": "4.2.0",
     "sortablejs": "1.8.4",

+ 26 - 2
ui/src/views/training/trainingbcc/deviceList.vue

@@ -30,6 +30,14 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="完成时间" prop="finishDate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.finishDate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择完成时间">
+        </el-date-picker>
+      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -58,6 +66,11 @@
           <span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="完成时间" align="center" prop="finishDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.finishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="培训课程" align="center" prop="trainingbcc.course" width="300">
       </el-table-column>
       <el-table-column label="参培人" align="center" prop="name" width="100">
@@ -83,6 +96,8 @@
 
       <el-table-column label="已学习时长min" align="center" prop="learnTime" width="120" :show-overflow-tooltip="true"/>
 
+
+
       <el-table-column label="考试状态" align="center" prop="examState" width="100" :show-overflow-tooltip="true">
         <template v-slot="scope">
           <el-tag v-if="scope.row.examState == 1" size="small" type="success">合格</el-tag>
@@ -127,6 +142,14 @@
             placeholder="选择开始日期">
           </el-date-picker>
         </el-form-item>
+        <el-form-item label="完成时间" prop="finishDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.finishDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择完成时间">
+          </el-date-picker>
+        </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注" />
         </el-form-item>
@@ -251,7 +274,8 @@ export default {
         learnState: null,
         examState: null,
         examId: null,
-        learnTime: null
+        learnTime: null,
+        finishDate: null
       },
       // 表单参数
       form: {},
@@ -313,7 +337,7 @@ export default {
         staffId: null,
         regularId: null,
         startDate: null,
-        team: null,
+        finishDate: null,
         remarks: null,
         delFlag: null,
         createrCode: null,