Commit 253ad73e by 宋珺琪

修改json文件和轨迹导出接口

parent dacc7947
......@@ -12,6 +12,7 @@ import com.founder.commonutils.model.vo.response.SkTrailVO;
import com.founder.commonutils.util.*;
import com.founder.commonutils.model.newPublicEntity.SkTrail;
import com.founder.publicapi.controller.SkDataUpload.FtpUtil;
import com.founder.publicapi.mapper.mysqlMapper.SkTrailMapper;
import com.founder.servicebase.controller.ExcelControllerInterface;
import com.founder.servicebase.logs.OperLog;
import com.founder.servicebase.logs.OperationType;
......@@ -46,6 +47,8 @@ public class SkTrailController extends ApiController implements ExcelControllerI
private SkTrailService skTrailService;
@Autowired
private SkDictionaryService skDictionaryService;
@Autowired
SkTrailMapper skTrailMapper;
/**
* 新增轨迹
......@@ -398,7 +401,7 @@ public class SkTrailController extends ApiController implements ExcelControllerI
@OperLog(message = "Excel接口(轨迹导出)", operation = OperationType.QUERY)
public void export(HttpServletResponse response,@RequestBody SkTrailParam sktrailParam)throws Exception{
//分页
Page page = new Page(sktrailParam.getPage(), sktrailParam.getPageSize());
// Page page = new Page(sktrailParam.getPage(), sktrailParam.getPageSize());
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("isDeleted", "0");
......@@ -416,12 +419,13 @@ public class SkTrailController extends ApiController implements ExcelControllerI
queryWrapper.le("str_to_date(date,'%Y-%m-%d %H:%i:%s')", sktrailParam.getJssj());
}
IPage page1 = skTrailService.page(page, queryWrapper);
List<SkTrail> records = page1.getRecords();
List list = skTrailMapper.selectList(queryWrapper);
// IPage page1 = skTrailService.page(page, queryWrapper);
// List<SkTrail> records = page1.getRecords();
ExportExcelUtil<SkTrail> exportExcelUtil = new ExportExcelUtil<>();
String[] headersName = {"号码","经度","纬度","时间","地址"};
String[] headersField = {"objectvalue","x","y","date","address"};
exportExcelUtil.exportExcel("DataStatistics", headersName, headersField, records, response,"轨迹信息");
exportExcelUtil.exportExcel("DataStatistics", headersName, headersField, list, response,"轨迹信息");
}
/**
* 根据编号查找相关轨迹
......
......@@ -32,35 +32,35 @@
"links": [
{
"source": "430123196510265891",
"target": "证件号码:430123196510265892",
"target": "430123196510265892",
"label": "配偶关系",
"properties": {
"time": "2022-09-16 09:59:11",
"label": "配偶关系",
"source": "430123196510265891",
"target": "证件号码:430123196510265892"
"target": "430123196510265892"
}
},
{
"source": "430123196510265891",
"target": "证件号码:430123196510265893",
"target": "430123196510265893",
"label": "子女关系",
"properties": {
"time": "2022-09-16 09:59:11",
"label": "子女关系",
"source": "430123196510265891",
"target": "证件号码:430123196510265893"
"target": "430123196510265893"
}
},
{
"source": "430123196510265891",
"target": "证件号码:430123196510265894",
"target": "430123196510265894",
"label": "父母关系",
"properties": {
"time": "2022-09-16 09:59:11",
"label": "父母关系",
"source": "430123196510265891",
"target": "证件号码:430123196510265894"
"target": "430123196510265894"
}
}
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment