Эх сурвалжийг харах

fix(national-motion-system): 修复同步记录时原图 ID 错误的问题

- 将 AppIsin 对象的 originId 字段正确设置为 data 的 originId属性
- 在 ExtractedData 类中添加 secMsgCode 字段,用于保存门禁信息
-优化 synchronousDoorOpeningAndClosingRecords 方法,提高数据同步准确性
SheepHy 1 сар өмнө
parent
commit
558592ad00

+ 5 - 5
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/quartz/job/OrTeachingJobService.java

@@ -243,7 +243,6 @@ public class OrTeachingJobService {
      * @return
      **/
 //    @Scheduled(fixedDelay = 30000)
-    @Scheduled(fixedDelay = 30000)
     public void synchronousDoorOpeningAndClosingRecords(){
         try {
             List<DoorRecordDTO> allRecords = fetchAllDoorRecords();
@@ -257,7 +256,7 @@ public class OrTeachingJobService {
                     appIsin.setUpdateTime(DateUtils.str2Date(data.getGmtCreate(), new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")));
                     appIsin.setIsinStatus(1);
                     appIsin.setUseImage(data.getPortraitUrl());
-                    appIsin.setOriginId(data.getPortraitUrl());
+                    appIsin.setOriginId(data.getOriginId());
                     appIsinMapper.updateById(appIsin);
                     AppOrderProInfo orderProInfo = appOrderProInfoMapper.selectById(appIsin.getOrderProInfoId());
                     orderProInfo.setOrderStatus(2);
@@ -343,7 +342,6 @@ public class OrTeachingJobService {
      */
     private List<ExtractedData> extractRequiredData(List<DoorRecordDTO> records) {
         List<ExtractedData> result = new ArrayList<>();
-
         if (records != null && !records.isEmpty()) {
             result = records.stream()
                     .filter(record -> "ACE-5-75".equals(record.getSecMsgCode()))
@@ -351,8 +349,9 @@ public class OrTeachingJobService {
                             record.getEmployeeNo(),
                             record.getAuthResultMsg(),
                             record.getGmtCreate(),
-                            record.getOriginId(),
-                            record.getPortraitUrl()  // 可能为null,不影响
+                            record.getPortraitUrl(),
+                            record.getSecMsgCode(),
+                            record.getOriginId()
                     ))
                     .filter(data -> data.getEmployeeNo() != null)  // 可选:排除无效数据
                     .collect(Collectors.toList());
@@ -393,6 +392,7 @@ public class OrTeachingJobService {
         private String authResultMsg;
         private String gmtCreate;
         private String portraitUrl;
+        private String secMsgCode;
         private String originId;
     }
 }