Commit 253ad73e by 宋珺琪

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

parent dacc7947
......@@ -47,15 +47,14 @@ public class KshSlServiceController {
@OperLog(message = "人案关联",operation = OperationType.QUERY)
@PostMapping("/ragl")
@ApiOperation(value = "人案关联")
public MapRestResult ragl(@RequestParam String objectValue){
public MapRestResult ragl(String objectType,String objectValue){
// 人查案 sfz
Hnkshresult result = new Hnkshresult();
Hnkshresult result1 = new Hnkshresult();
if (objectType.equals("idcard")&& !StringUtil.isEmpty(objectValue)){
QueryWrapper<TbXwZbfzxyr> wrapper = new QueryWrapper<>();
wrapper.select("asjbh").eq("zhfzxyr_cyzj_zjhm",objectValue);
List<TbXwZbfzxyr> sfzfindasj = zbFzxyrDataMapper.selectList(wrapper);
if (ObjectUtil.isNotEmpty(sfzfindasj)){
kshdata kshdata = new kshdata();
dataSumup dataSumup = new dataSumup();
List<String> sumup = new ArrayList<>();
......@@ -108,12 +107,10 @@ public class KshSlServiceController {
result.setDataSumup(dataSumup);
return new MapRestResult(200,"ok",result);
}
else if (objectType.equals("aj")&& !StringUtil.isEmpty(objectValue)){
QueryWrapper<TbXwZbfzxyr> wrapper1 = new QueryWrapper<>();
wrapper1.select("zhfzxyr_cyzj_zjhm").eq("asjbh",objectValue);
List<TbXwZbfzxyr> AfindR = zbFzxyrDataMapper.selectList(wrapper1);
if (ObjectUtil.isNotEmpty(AfindR)){
kshdata kshdata = new kshdata();
dataSumup dataSumup = new dataSumup();
List<String> sumup = new ArrayList<>();
......@@ -167,17 +164,16 @@ public class KshSlServiceController {
result1.setKshData(kshdata);
result1.setDataSumup(dataSumup);
return new MapRestResult(200,"ok",result1);
}else {
}else
return new MapRestResult().error("无信息");
}
}
@OperLog(message = "同案关联",operation = OperationType.QUERY)
@PostMapping("/tagl")
@ApiOperation(value = "同案关联")
public MapRestResult tagl(String objectValue){
// sfz 人查询案下的其他人
public MapRestResult tagl(String objectType,String objectValue){
if (objectType.equals("aj")&& !StringUtil.isEmpty(objectValue)){
// sfz 人查询案下的其他人
QueryWrapper<TbXwZbfzxyr> wrapper = new QueryWrapper<>();
wrapper.select("asjbh").eq("zhfzxyr_cyzj_zjhm",objectValue);
List<TbXwZbfzxyr> sfzfindasj = zbFzxyrDataMapper.selectList(wrapper);
......@@ -243,18 +239,10 @@ public class KshSlServiceController {
result.setKshData(kshdata);
result.setDataSumup(dataSumup);
}
/* QueryWrapper<TbXwZbfzxyr> wrapper1 = new QueryWrapper<>();
wrapper1.and(wra -> {
for(TbXwZbfzxyr tbXwZbfzxyr : sfzfindasj){
wra.or()
.eq("asjbh",tbXwZbfzxyr.getAsjbh());
}
return wra;
});
List<TbXwZbfzxyr> RfindA = zbFzxyrDataMapper.selectList(wrapper1);*/
// return new MapRestResult(200,"ok",RfindA.size(),RfindA);
return new MapRestResult(200,"ok",result);
}else {
return new MapRestResult().error();
}
}
// 2.入参 证件号码 -->>返回IMSI国际移动用户识别码/IMEI国际移动设备身份码/手机号/MAC物理地址 四个信息(可视化连线上为 对应信息)
......@@ -262,8 +250,8 @@ public class KshSlServiceController {
@OperLog(message = "四码关联",operation = OperationType.QUERY)
@PostMapping("/smgl")
@ApiOperation(value = "四码关联")
public MapRestResult smgl( String objectValue){
if (objectValue.equals("430123196510265891")){
public MapRestResult smgl( String objectType,String objectValue){
if (objectType.equals("idcard") && objectValue.equals("430123196510265891")){
JSONObject jsonObject = null;
try {
jsonObject = JsonUtils.readJsonFromClassPath("data/getSmgl.json", JSONObject.class);
......@@ -272,7 +260,7 @@ public class KshSlServiceController {
System.out.print("json转换实体异常"+e);
}
return new MapRestResult(200,"ok",jsonObject);
}else if (objectValue.equals("18545251333")){
}else if (objectType.equals("sjh") && objectValue.equals("18545251333")){
JSONObject jsonObject = null;
try {
jsonObject = JsonUtils.readJsonFromClassPath("data/getSmgl2.json", JSONObject.class);
......@@ -290,8 +278,8 @@ public class KshSlServiceController {
@OperLog(message = "车主关联",operation = OperationType.QUERY)
@PostMapping("/czgl")
@ApiOperation(value = "车主关联")
public MapRestResult czgl( String objectValue){
if (objectValue.equals("430123196510265891") ){
public MapRestResult czgl(String objectType, String objectValue){
if (objectType.equals("idcard") && objectValue.equals("430123196510265891") ){
JSONObject jsonObject = null;
try {
jsonObject = JsonUtils.readJsonFromClassPath("data/getCzgl.json", JSONObject.class);
......@@ -300,7 +288,7 @@ public class KshSlServiceController {
System.out.print("json转换实体异常"+e);
}
return new MapRestResult(200,"ok",jsonObject);
}else if (objectValue.equals("蒙AKH824")){
}else if (objectType.equals("cph") && objectValue.equals("蒙AKH824")){
JSONObject jsonObject = null;
try {
jsonObject = JsonUtils.readJsonFromClassPath("data/getCzgl2.json", JSONObject.class);
......@@ -318,8 +306,8 @@ public class KshSlServiceController {
@OperLog(message = "同户关联",operation = OperationType.QUERY)
@PostMapping("/thgl")
@ApiOperation(value = "同户关联")
public MapRestResult thgl(String objectValue){
if (objectValue.equals("430123196510265891")){
public MapRestResult thgl(String objectType,String objectValue){
if (objectType.equals("idcard") && objectValue.equals("430123196510265891")){
// JSONObject jsonObject = null;
JSONObject jsonObject = new JSONObject(new LinkedHashMap());
try {
......@@ -338,8 +326,8 @@ public class KshSlServiceController {
@OperLog(message = "机主关联",operation = OperationType.QUERY)
@PostMapping("/jzgl")
@ApiOperation(value = "机主关联")
public MapRestResult jzgl(String objectValue){
if (objectValue.equals("430123196510265891") ){
public MapRestResult jzgl(String objectType,String objectValue){
if (objectType.equals("idcard") && objectValue.equals("430123196510265891") ){
JSONObject jsonObject = null;
try {
jsonObject = JsonUtils.readJsonFromClassPath("data/getJzgl2.json", JSONObject.class);
......@@ -348,7 +336,7 @@ public class KshSlServiceController {
System.out.print("json转换实体异常"+e);
}
return new MapRestResult(200,"ok",jsonObject);
}else if (objectValue.equals("18545251333")){
}else if (objectType.equals("sjh") && objectValue.equals("18545251333")){
JSONObject jsonObject = null;
try {
jsonObject = JsonUtils.readJsonFromClassPath("data/getJzgl.json", JSONObject.class);
......@@ -365,9 +353,9 @@ public class KshSlServiceController {
/*1.入参 如果为asjbh 则返回去重的wzxx ASJBH指向wzxx
2.入参 如果为身份证号码 则返回去重后的wzxx RYXX指向wzxx
2.入参 如果为wzxx 则返回去重的ryxx和ASJBH WZXX指向RYXX和ASJBH*/
@OperLog(message = "串并算例",operation = OperationType.QUERY)
@OperLog(message = "多维串并串并算例",operation = OperationType.QUERY)
@PostMapping("/cbsl")
@ApiOperation(value = "串并算例")
@ApiOperation(value = "多维串并串并算例")
public MapRestResult cbsl(String objectValue,String objectType){
Hnkshresult result = new Hnkshresult();
kshdata kshdata = new kshdata();
......
......@@ -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