暂未提交
This commit is contained in:
+1
@@ -55,6 +55,7 @@ public class XjAed implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String orgName;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
private String createBy;
|
||||
|
||||
+5
@@ -8,4 +8,9 @@ public interface IXjAedService extends IService<XjAed> {
|
||||
void aedDataInit();
|
||||
|
||||
void aedDataUtil();
|
||||
|
||||
/**
|
||||
* 定时任务更新aed数据 , 数据通过安眼平台接口获取
|
||||
*/
|
||||
void aedDataRefreshTask();
|
||||
}
|
||||
|
||||
+17
-1
@@ -1,6 +1,10 @@
|
||||
package com.renkang.emergency.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.renkang.anyan.client.AnYanClient;
|
||||
import com.renkang.anyan.model.vo.AnYanAedInfo;
|
||||
import com.renkang.emergency.entity.XjAed;
|
||||
import com.renkang.emergency.mapper.XjAedMapper;
|
||||
import com.renkang.emergency.service.IXjAedService;
|
||||
@@ -13,6 +17,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.jeecg.untils.CoordinateConverter;
|
||||
import org.jeecg.util.TypeConversionUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
@@ -24,8 +29,8 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class XjAedServiceImpl extends ServiceImpl<XjAedMapper, XjAed> implements IXjAedService {
|
||||
|
||||
private final CoordinateConverter converter;
|
||||
private final AnYanClient anYanClient;
|
||||
|
||||
@Override
|
||||
public void aedDataInit() {
|
||||
@@ -145,4 +150,15 @@ public class XjAedServiceImpl extends ServiceImpl<XjAedMapper, XjAed> implements
|
||||
System.out.println(gps.getLatitude());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void aedDataRefreshTask() {
|
||||
//安眼接口查询AED数据 , 主要更新位置信息 ,目前安眼平台没有设备编码来确定AED的唯一性,安放位置使用二级单位+三级单位+具体位置标注
|
||||
List<AnYanAedInfo> anYanAedInfos = anYanClient.queryAnYanAedInfo();
|
||||
if(ObjectUtil.isNotEmpty(anYanAedInfos)){
|
||||
//todo , 本系统做了对应功能后此处的同步方法暂不使用
|
||||
List<XjAed> xjAedList = baseMapper.selectList(new QueryWrapper<>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user