Browse Source

refactor(national-motion-system-biz): 暂停同步门开闭记录任务并优化设备序列号处理

- 暂停了定时同步门开闭记录的任务(注释掉了 @Scheduled 注解)- 优化了设备序列号的处理,使用 split 方法获取第一个部分作为设备序列号
SheepHy 3 weeks ago
parent
commit
ef7f10826a

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

@@ -235,7 +235,7 @@ public class OrTeachingJobService {
      * @Param
      * @return
      **/
-    @Scheduled(fixedDelay = 300000)
+//    @Scheduled(fixedDelay = 300000)
     public void synchronousDoorOpeningAndClosingRecords(){
         try {
             List<DoorRecordDTO> allRecords = fetchAllDoorRecords();
@@ -244,7 +244,7 @@ public class OrTeachingJobService {
                 appGmtInfoMapper.insert(new AppGmtInfo()
                         .setFamilyId(data.getEmployeeNo())
                         .setSiteId(appDeviceMapper.selectOne(Wrappers.<AppDevice>lambdaQuery()
-                                .eq(AppDevice::getDeviceSerial, data.getDeviceSerial())).getSiteId())
+                                .eq(AppDevice::getDeviceSerial, data.getDeviceSerial().split("-")[0])).getSiteId())
                         .setAuthResultMsg(data.getAuthResultMsg())
                         .setGmtCreate(DateUtils.str2Date(data.getGmtCreate(), new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")))
                         .setPicUrl(data.getPicUrl())