Commit 45b890b8 by yangyang

轨迹统计计算、案件现勘警情经纬度判断使用(标准)

parent c552706b
...@@ -294,15 +294,29 @@ public class SkTrailController extends ApiController implements ExcelControllerI ...@@ -294,15 +294,29 @@ public class SkTrailController extends ApiController implements ExcelControllerI
listMapMd = (ArrayList<Map.Entry<String,Object>>)listMapMd.stream().parallel() listMapMd = (ArrayList<Map.Entry<String,Object>>)listMapMd.stream().parallel()
.limit(1).collect(Collectors.toList()); .limit(1).collect(Collectors.toList());
String lastGj = "";// 日期为空 展示暂无数据 String lastGj = "";// 日期为空 展示暂无数据
if(StringUtil.isEmpty(records.get(0).getDate())||"jdgj".equals(sktrailParam.getLikeField())||StringUtil.isEmpty(records.get(1).getAddress())){ String lastCfd = "";// 数据为空 展示暂无数据
String lastMdd = "";// 数据为空 展示暂无数据
if((StringUtil.isEmpty(records.get(0).getDate())||StringUtil.isEmpty(records.get(1).getAddress()))&&"jdgj".equals(sktrailParam.getLikeField())){
lastGj = "暂无数据"; lastGj = "暂无数据";
}else{ }else{
lastGj = records.get(0).getDate()+","+records.get(0).getAddress()+"—>"+records.get(1).getAddress(); lastGj = records.get(0).getDate()+","+records.get(0).getAddress()+"—>"+records.get(1).getAddress();
} }
if(listMapMd.size()==0&&"jdgj".equals(sktrailParam.getLikeField())){
lastMdd = "暂无数据";
}else{
lastMdd = listMapMd.get(0).getKey()+"("+listMapMd.get(0).getValue()+"次"+")";
}
if(listMapCf.size()==0&&"jdgj".equals(sktrailParam.getLikeField())){
lastCfd = "暂无数据";
}else{
lastCfd = listMapCf.get(0).getKey()+"("+listMapCf.get(0).getValue()+"次"+")";
}
mapResult.put("zxgj",lastGj);// 最后两条数据即为 最新轨迹 mapResult.put("zxgj",lastGj);// 最后两条数据即为 最新轨迹
mapResult.put("sfdd",listMapCf.get(0).getKey()+"("+listMapCf.get(0).getValue()+"次"+")"); mapResult.put("sfdd",lastCfd);
mapResult.put("mddd",listMapMd.get(0).getKey()+"("+listMapMd.get(0).getValue()+"次"+")"); mapResult.put("mddd",lastMdd);
}else if("wbgj".equals(sktrailParam.getLikeField())||"ldgj".equals(sktrailParam.getLikeField())){ }else if("wbgj".equals(sktrailParam.getLikeField())||"ldgj".equals(sktrailParam.getLikeField())){
records.stream().forEach(h->{ records.stream().forEach(h->{
if(StringUtils.isNotEmpty(h.getAddress())) { if(StringUtils.isNotEmpty(h.getAddress())) {
......
...@@ -22,8 +22,18 @@ ...@@ -22,8 +22,18 @@
,T.ASJFSDD_XZQHDM as asjfsddXzqhdm ,T.ASJFSDD_XZQHDM as asjfsddXzqhdm
,(select name from sys_dictitem where groupid='CODE_XZQH' and code=T.ASJFSDD_XZQHDM) as asjfsddXzqhdmMc ,(select name from sys_dictitem where groupid='CODE_XZQH' and code=T.ASJFSDD_XZQHDM) as asjfsddXzqhdmMc
,T.ASJFSDD_DZMC as asjfsddDzmc ,T.ASJFSDD_DZMC as asjfsddDzmc
,T.ASJFSDD_DQJD as x ,case when (T.ASJFSDD_DQJD is not null) then T.ASJFSDD_DQJD
,T.ASJFSDD_DQWD as y when (T.ASJFSDD_DQWD is null and (select xk_jd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)is not null)
then (select xk_jd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)
when((select xk_jd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)is null and (select jq_jd from
tb_asj_jwdinfo info where info.asjbh = T.asjbh) is not null)then (select jq_jd from tb_asj_jwdinfo info where
info.asjbh = T.asjbh) end as x
,case when (T.ASJFSDD_DQJD is not null) then T.ASJFSDD_DQWD
when (T.ASJFSDD_DQWD is null and (select xk_wd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)is not null)
then (select xk_wd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)
when((select xk_wd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)is null and (select jq_wd from
tb_asj_jwdinfo info where info.asjbh = T.asjbh) is not null)then (select jq_wd from tb_asj_jwdinfo info where
info.asjbh = T.asjbh) end as y
,T.JYAQ as jyaq ,T.JYAQ as jyaq
,T.zbr_xm as zbrXm ,T.zbr_xm as zbrXm
,T.xbr_xm as xbrXm ,T.xbr_xm as xbrXm
...@@ -186,8 +196,18 @@ ...@@ -186,8 +196,18 @@
DATE_FORMAT(T.asjfssj_Asjfskssj,'%Y-%m-%d %H:%i:%S') as asjfssjAsjfskssj, DATE_FORMAT(T.asjfssj_Asjfskssj,'%Y-%m-%d %H:%i:%S') as asjfssjAsjfskssj,
DATE_FORMAT(T.larq,'%Y-%m-%d %H:%i:%S') as larq, DATE_FORMAT(T.larq,'%Y-%m-%d %H:%i:%S') as larq,
T.ZUZDW_ZBR_XM AS zuzdwZbrXm, T.ZUZDW_ZBR_XM AS zuzdwZbrXm,
T.ASJFSDD_DQJD AS x, case when (T.ASJFSDD_DQJD is not null) then T.ASJFSDD_DQJD
T.ASJFSDD_DQWD AS y, when (T.ASJFSDD_DQWD is null and (select xk_jd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)is not null)
then (select xk_jd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)
when((select xk_jd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)is null and (select jq_jd from
tb_asj_jwdinfo info where info.asjbh = T.asjbh) is not null)then (select jq_jd from tb_asj_jwdinfo info where
info.asjbh = T.asjbh) end as x,
case when (T.ASJFSDD_DQJD is not null) then T.ASJFSDD_DQWD
when (T.ASJFSDD_DQWD is null and (select xk_wd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)is not null)
then (select xk_wd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)
when((select xk_wd from tb_asj_jwdinfo info where info.asjbh = T.asjbh)is null and (select jq_wd from
tb_asj_jwdinfo info where info.asjbh = T.asjbh) is not null)then (select jq_wd from tb_asj_jwdinfo info where
info.asjbh = T.asjbh) end as y,
(select name from sys_dictitem where groupid='CODE_UNIT' AND code = T.zuzdw_Gajgjgdm) AS zuzdwGajgjgdmMc, (select name from sys_dictitem where groupid='CODE_UNIT' AND code = T.zuzdw_Gajgjgdm) AS zuzdwGajgjgdmMc,
(select name from sys_dictitem where groupid='CODE_ZCJDDM' AND code = T.zcjddm) AS zcjddmMc, (select name from sys_dictitem where groupid='CODE_ZCJDDM' AND code = T.zcjddm) AS zcjddmMc,
(select name from sys_dictitem where groupid='CODE_UNIT' AND code = T.ladw_Gajgjgdm) AS ladwGajgjgdmMc, (select name from sys_dictitem where groupid='CODE_UNIT' AND code = T.ladw_Gajgjgdm) AS ladwGajgjgdmMc,
......
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