|
@@ -238,15 +238,19 @@ public class OrTeachingJobService {
|
|
|
* @Param
|
|
|
* @return
|
|
|
**/
|
|
|
- @Scheduled(fixedDelay = 600000)
|
|
|
+ @Scheduled(fixedDelay = 1200000)
|
|
|
// @Scheduled(cron = "0 0 23 * * ?")
|
|
|
public void synchronousDoorOpeningAndClosingRecords(){
|
|
|
try {
|
|
|
List<DoorRecordDTO> allRecords = fetchAllDoorRecords();
|
|
|
for (DoorRecordDTO data : allRecords) {
|
|
|
if(null == appGmtInfoMapper.selectOne(Wrappers.<AppGmtInfo>lambdaQuery().eq(AppGmtInfo::getOriginId, data.getOriginId()).last("LIMIT 1"))){
|
|
|
- String siteId = appDeviceMapper.selectOne(Wrappers.<AppDevice>lambdaQuery()
|
|
|
- .eq(AppDevice::getDeviceSerial, data.getDeviceSerial().split("-")[0])).getSiteId();
|
|
|
+ AppDevice appDevice = appDeviceMapper.selectOne(Wrappers.<AppDevice>lambdaQuery().eq(AppDevice::getDeviceSerial, data.getDeviceSerial().split("-")[0]));
|
|
|
+ if(null == appDevice){
|
|
|
+ log.error("未找到设备:{}", data.getDeviceSerial());
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String siteId = appDevice.getSiteId();
|
|
|
appGmtInfoMapper.insert(new AppGmtInfo()
|
|
|
.setFamilyId(data.getEmployeeNo())
|
|
|
.setSiteId(siteId)
|