Quellcode durchsuchen

LY 定期培训 超期和补赔

ly vor 1 Jahr
Ursprung
Commit
f4b5af5781

+ 4 - 1
master/src/main/java/com/ruoyi/project/training/controller/TTrainingbccDeviceController.java

@@ -77,7 +77,10 @@ public class TTrainingbccDeviceController extends BaseController
                     t.setIsLock(1);
                 }
             }
-
+            //判断是否5次不及格
+            if (t.getExamState() == -1) {
+                t.setIsLock(1);
+            }
             //如果补赔,可以
             if ("1".equals(t.getSupplementary())) {
                 t.setIsLock(0);

+ 3 - 0
master/src/main/java/com/ruoyi/project/training/elearn/service/impl/TElPaperServiceImpl.java

@@ -376,6 +376,9 @@ public class TElPaperServiceImpl implements ITElPaperService {
                                 long pass = objScore >= paper.getQualifyScore() ? 1 : 0;
                                 d.setExamState(pass);
                                 d.setExamNum(d.getExamNum()+ 1);
+                                if (d.getExamNum()+ 1 >= 5) {
+                                    d.setExamState(-1l);
+                                }
                                 d.setExamDate(new Date());
                                 tTrainingbccDeviceMapper.updateTTrainingbccDevice(d);
                             }

+ 3 - 3
ui/src/views/training/bccdevice/index.vue

@@ -49,19 +49,19 @@
       </el-table-column>
       <el-table-column label="培训课程" align="center" prop="trainingbcc.course" width="500">
       </el-table-column>
-      <el-table-column label="是否为补培人员" align="center" prop="supplementary" :show-overflow-tooltip="true">
+      <el-table-column label="是否为补培人员" align="center" prop="supplementary" width="120" :show-overflow-tooltip="true">
         <template v-slot="scope">
           <span v-if="scope.row.supplementary == 0" size="small" type="success">否</span>
           <span v-else-if="scope.row.supplementary == 1" size="small" type="info">是</span>
         </template>
       </el-table-column>
-      <el-table-column label="学习状态" align="center" prop="learnState" :show-overflow-tooltip="true">
+      <el-table-column label="学习状态" align="center" prop="learnState" width="120" :show-overflow-tooltip="true">
         <template v-slot="scope">
           <el-tag v-if="scope.row.learnState == 1" size="small" type="success">已完成</el-tag>
           <el-tag v-else-if="scope.row.learnState == 0"  size="small" type="info">未完成</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="考试状态" align="center" prop="examState" :show-overflow-tooltip="true">
+      <el-table-column label="考试状态" align="center" prop="examState" width="120" :show-overflow-tooltip="true">
         <template v-slot="scope">
           <el-tag v-if="scope.row.examState == 1" size="small" type="success">合格</el-tag>
           <el-tag v-else-if="scope.row.examState == 0" size="small" type="info">未完成</el-tag>

+ 5 - 5
ui/src/views/training/trainingbcc/deviceList.vue

@@ -51,27 +51,27 @@
       </el-table-column>
       <el-table-column label="参培人" align="center" prop="name" width="100">
       </el-table-column>
-      <el-table-column label="是否为补培人员" align="center" prop="supplementary" :show-overflow-tooltip="true">
+      <el-table-column label="是否为补培人员" align="center" width="120" prop="supplementary" :show-overflow-tooltip="true">
         <template v-slot="scope">
           <span v-if="scope.row.supplementary == 0" size="small" type="success">否</span>
           <span v-else-if="scope.row.supplementary == 1" size="small" type="info">是</span>
         </template>
       </el-table-column>
-      <el-table-column label="学习状态" align="center" prop="learnState" :show-overflow-tooltip="true">
+      <el-table-column label="学习状态" align="center" prop="learnState" width="120" :show-overflow-tooltip="true">
         <template v-slot="scope">
           <el-tag v-if="scope.row.learnState == 1" size="small" type="success">已完成</el-tag>
           <el-tag v-else-if="scope.row.learnState == 0"  size="small" type="info">未完成</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="学习时长min" align="center" prop="learnTime" :show-overflow-tooltip="true"/>
+      <el-table-column label="学习时长min" align="center" prop="learnTime" width="120" :show-overflow-tooltip="true"/>
 
-      <el-table-column label="考试状态" align="center" prop="examState" :show-overflow-tooltip="true">
+      <el-table-column label="考试状态" align="center" prop="examState" width="120" :show-overflow-tooltip="true">
         <template v-slot="scope">
           <el-tag v-if="scope.row.examState == 1" size="small" type="success">合格</el-tag>
           <el-tag v-else-if="scope.row.examState == 0" size="small" type="info">未完成</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="考试次数" align="center" prop="examNum" :show-overflow-tooltip="true"/>
+      <el-table-column label="考试次数" align="center"  prop="examNum" :show-overflow-tooltip="true"/>
 
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">