wangliang 3 سال پیش
والد
کامیت
650b86f7f9

+ 3 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -1384,14 +1384,10 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             map.put("dataCount", tcStatisticsList.size());
 
             List<TCStatistics> tcStatisticsTempList = tcStatisticsService.findByBatchNo(sysUser.getSchoolId(), batchNo);
-            for (TCStatistics tcStatistics : tcStatisticsTempList) {
-                for (TCStatistics t : tcStatisticsList) {
-                    if (t.getId().longValue() == tcStatistics.getId().longValue()) {
-                        t.updateInfo(sysUser.getId(), tcStatistics);
-                    }
-                }
+            if (Objects.nonNull(tcStatisticsTempList) && tcStatisticsTempList.size() > 0) {
+                tcStatisticsService.removeByIds(tcStatisticsList);
+                tcStatisticsService.saveBatch(tcStatisticsTempList);
             }
-            tcStatisticsService.saveOrUpdateBatch(tcStatisticsList);
             return finalExcelList;
         });
         return map;

+ 13 - 3
distributed-print-business/src/main/resources/mapper/TCStatisticsMapper.xml

@@ -4,11 +4,21 @@
 
     <select id="findByBatchNo" resultType="com.qmth.distributed.print.business.entity.TCStatistics">
         select
-        tcs.id,
+        distinct tcs.id,
+        tcs.college_id as collegeId,
+        tcs.college_name as collegeName,
+        tcs.course_name as courseName,
+        tcs.course_code as courseCode,
+        tcs.teaching_room_id as teachingRoomId,
+        tcs.teaching_room_name as teachingRoomName,
+        tcs.teacher_name as teacherName,
+        tcs.clazz_id as clazzId,
+        tcs.clazz_name as clazzName,
+        tcs.paper_number as paperNumber,
+        tcs.batch_no as batchNo,
         epp.id as printPlanId,
         edc.id as examDetailCourseId,
-        etd.id as examTaskDetailId,
-        et.paper_number as paperNumber
+        etd.id as examTaskDetailId
         from
         t_c_statistics tcs
         join exam_task et on