wangliang преди 3 години
родител
ревизия
e8cd9e2697

+ 6 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -691,7 +691,11 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
             examTask.setCardRuleId(task.getCardRuleId());
             examTask.setBatchNo(task.getBatchNo());
             examTask.insertInfo(sysUser.getId());
-            examTask.updateInfo(sysUser.getId());
+
+            // 取课程所在机构
+            Long teachingRoomId = basicCourseService.getOrgIdBySchoolIdAndCourseCode(schoolId, examTask.getCourseCode());
+            examTask.setOrgId(teachingRoomId);
+            examTask.setTeachingRoomId(teachingRoomId);
 
             String userId = userMap.get("userId");
             String specialty = userMap.get("specialty");
@@ -720,6 +724,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                 map2.computeIfAbsent(SystemConstant.EXAM_TASK_ID, v -> examTask.getId());
                 map2.computeIfAbsent(SystemConstant.FLOW_ID, v -> examTask.getFlowId());
                 tExamTaskFlowService.saveOrUpdate(map2);
+                examTask.updateInfo(sysUser.getId());
                 this.updateById(examTask);
             }
         }