Browse Source

Merge remote-tracking branch 'origin/master'

GUXI 2 years ago
parent
commit
e3d3820f3b

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dlhh/app/TrainTaskUserInterfaceController.java

@@ -3,7 +3,6 @@ package com.ruoyi.web.controller.dlhh.app;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.dlhh.domain.TrainTaskUser;
-import com.ruoyi.dlhh.domain.vo.TrainTaskUserDto;
 import com.ruoyi.dlhh.service.ITrainTaskUserService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -67,7 +66,8 @@ public class TrainTaskUserInterfaceController extends BaseController {
         if (trainTaskUser.getTaskId() == null && trainTaskUser.getUserId() == null) {
             return success("添加失败");
         }
-        List<TrainTaskUserDto> trainTaskUserDtos = trainTaskUserService.selectTrainTaskUserInfoList(trainTaskUser);
+
+        List<TrainTaskUser> trainTaskUserDtos = trainTaskUserService.selectTrainTaskUserList(trainTaskUser);
         if (trainTaskUserDtos != null && !trainTaskUserDtos.isEmpty()) {
             return editSuccessTotal(trainTaskUserDtos.get(0).getId());
         }

+ 2 - 2
ruoyi-system/src/main/resources/mapper/dlhh/ExamMapper.xml

@@ -311,8 +311,8 @@
         LEFT JOIN exam_user eu ON e.id = eu.exam_id
         LEFT JOIN userinfo eu2 ON eu.ueser_id = eu2.id
         where e.id = #{examId}
-        <if test="trainPracticalResultId != null and trainPracticalResultId != 0">AND e.train_practical_result_id = #{trainPracticalResultId}</if>
-        <if test="trainPracticalStepResultId != null and trainPracticalStepResultId != 0">AND e.train_practical_step_result_id = #{trainPracticalStepResultId}</if>
+        <if test="trainPracticalResultId != null and trainPracticalResultId != 0">AND eu.train_practical_result_id = #{trainPracticalResultId}</if>
+        <if test="trainPracticalStepResultId != null and trainPracticalStepResultId != 0">AND eu.train_practical_step_result_id = #{trainPracticalStepResultId}</if>
     </select>
 
     <select id="examCountByName" resultType="Integer" parameterType="String">

+ 2 - 2
ruoyi-system/src/main/resources/mapper/dlhh/TrainPracticalResultMapper.xml

@@ -192,7 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE
             a.ueser_id = b.id
           AND a.exam_id = c.id
-          AND a.train_practical_result_id = #{id} and a.submit_time is null
+          AND a.train_practical_result_id = #{id} and a.submit_time is not null
     </select>
 
     <select id="selectTrainPracticalStepResultClassCount" parameterType="TrainPracticalResult" resultType="java.lang.Integer">
@@ -204,7 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 INNER JOIN   userinfo u on examuser.ueser_id=u.id
                 INNER JOIN   exam e on examuser.exam_id=e.id
         WHERE
-            result.id = #{id} and examuser.submit_time is null
+            result.id = #{id} and examuser.submit_time is not null
 
     </select>