Browse Source

Merge remote-tracking branch 'origin/master'

GUXI 2 years ago
parent
commit
a123169a0e

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

@@ -472,8 +472,9 @@ public class ExamInterfaceController extends BaseController {
                 }
             }
         }
-
-        return AjaxResult.success(list);
+        HashMap<String, Object> result = new HashMap<>();
+        result.put("records",list);
+        return AjaxResult.success(result);
     }
 
     /**

+ 13 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dlhh/app/TrainTaskQueryInterfaceController.java

@@ -89,6 +89,9 @@ public class TrainTaskQueryInterfaceController extends BaseController
     @Autowired
     private ISystemLabelService labelService;
 
+    @Autowired
+    private ITrainAppraiseService appraiseService;
+
     @ApiOperation("获取系统时间")
     @PostMapping("/getTime")
     @ResponseBody
@@ -146,7 +149,16 @@ public class TrainTaskQueryInterfaceController extends BaseController
             TrainTaskUser tUser = new TrainTaskUser();
             tUser.setTaskId(practicalResult.getTaskId());
             tUser.setUserId(Long.valueOf(map.get("userId").toString()));
-            trainUser.setTrainPeoples(trainTaskUserService.selectTrainTaskUserLists(tUser));
+            List<TrainPeoplesVo> trainPeoples = trainTaskUserService.selectTrainTaskUserLists(tUser);
+            for (TrainPeoplesVo trainPeople : trainPeoples) {
+                TrainAppraise trainAppraise = new TrainAppraise();
+                trainAppraise.setTrainId(practicalResult.getId());
+                trainAppraise.setPublishUserId(Long.valueOf(map.get("userId").toString()));
+                trainAppraise.setUserId(trainPeople.getId());
+                List<TrainAppraise> trainAppraises = appraiseService.selectTrainAppraiseList(trainAppraise);
+                trainPeople.setStatus(trainAppraises == null || trainAppraises.isEmpty() ? 0 : 1);
+            }
+            trainUser.setTrainPeoples(trainPeoples);
 
             TrainPracticalStepDocVo trainPracticalStepDoc = new TrainPracticalStepDocVo();
             trainPracticalStepDoc.setId(practicalResult.getId());

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/dlhh/vo/TrainPeoplesVo.java

@@ -9,6 +9,8 @@ public class TrainPeoplesVo
 
     private String name;//学员姓名
 
+    private Integer status;//互评状态
+
     public Long getId() {
         return id;
     }
@@ -24,4 +26,12 @@ public class TrainPeoplesVo
     public void setName(String name) {
         this.name = name;
     }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
 }