提交 90d69940 authored 作者: 朱运伟's avatar 朱运伟

数字公路

上级 ca5c6005
...@@ -8,6 +8,7 @@ import com.elephant.framework.galaxy.aroad.module.indexES.entity.Baseindexdata; ...@@ -8,6 +8,7 @@ import com.elephant.framework.galaxy.aroad.module.indexES.entity.Baseindexdata;
import com.elephant.framework.galaxy.aroad.module.indexES.service.BaseindexdataService; import com.elephant.framework.galaxy.aroad.module.indexES.service.BaseindexdataService;
import com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService; import com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.Line; import com.elephant.framework.galaxy.aroad.module.szgl.entity.Line;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SzglService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringEscapeUtils;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
...@@ -30,6 +31,7 @@ public class SzglController { ...@@ -30,6 +31,7 @@ public class SzglController {
private final BaseindexdataService baseindexdataService; private final BaseindexdataService baseindexdataService;
private final RoadConditionEventService eventService; private final RoadConditionEventService eventService;
private final SzglService szglService;
/** /**
* 全局搜索路段、收费站、桥梁、隧道 * 全局搜索路段、收费站、桥梁、隧道
...@@ -39,11 +41,7 @@ public class SzglController { ...@@ -39,11 +41,7 @@ public class SzglController {
@GetMapping("/bigdata") @GetMapping("/bigdata")
public R getBigData(String type,String keyword, Page page) throws Exception { public R getBigData(String type,String keyword, Page page) throws Exception {
List<Map<String, Object>> responseList = new ArrayList<>(); List<Map<String, Object>> responseList = new ArrayList<>();
long total = 0; long total = 0;
switch (type) { switch (type) {
case "路线": case "路线":
Baseindexdata lx = baseindexdataService.selectLatesByTableName("basehighwayalldata"); Baseindexdata lx = baseindexdataService.selectLatesByTableName("basehighwayalldata");
...@@ -245,8 +243,30 @@ public class SzglController { ...@@ -245,8 +243,30 @@ public class SzglController {
* @param zxzh * @param zxzh
* @return * @return
*/ */
@GetMapping("/getGczFroQS/{lxbh}/{zxzh}") @GetMapping("/getLksjForQS/{lxbh}/{zxzh}")
public R getLksjForQS(@PathVariable String lxbh, @PathVariable String zxzh){ public R getLksjForQS(@PathVariable String lxbh, @PathVariable String zxzh){
return new R(eventService.getLksjForQS(lxbh,Double.valueOf(zxzh))); return new R(eventService.getLksjForQS(lxbh,Double.valueOf(zxzh)));
} }
/**
* 根据路线编号、起点桩号、止点桩号查询建养历史
* @param lxbh
* @param qdzh
* @param zdzh
* @return
*/
@GetMapping("/getJYlsForRoad/{lxbh}/{qdzh}/{zdzh}")
public R getJYlsForRoad(@PathVariable String lxbh, @PathVariable String qdzh,@PathVariable String zdzh){
return new R(szglService.getJYlsForRoad(lxbh,Double.valueOf(qdzh),Double.valueOf(qdzh)));
}
/**
* 根据路线编号、中心桩号 查询路况事件
* @param lxbh
* @param zxzh
* @return
*/
@GetMapping("/getJYlsForQS/{lxbh}/{zxzh}")
public R getJYlsForQS(@PathVariable String lxbh, @PathVariable String zxzh){
return new R(szglService.getJYlsForQS(lxbh,Double.valueOf(zxzh)));
}
} }
\ No newline at end of file
package com.elephant.framework.galaxy.aroad.module.szgl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
import com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsGcxm;
import com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsGcxmShape;
import java.util.List;
/**
* 数字公路
*
* @author zyw
* @date 2019-05-13 11:08:50
*/
public interface SzglService extends IService<ZhjsGcxmShape> {
/***
* 根据路线与中心桩号查询建养历史
* @param lxbh
* @param zxzh
* @return
*/
List<Object> getJYlsForQS(String lxbh, double zxzh);
/**
* 查询路线建养历史
* @param lxbh
* @param qdzh
* @param zdzh
* @return
*/
List<Object> getJYlsForRoad(String lxbh, Double qdzh,Double zdzh);
}
package com.elephant.framework.galaxy.aroad.module.szgl.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SzglService;
import com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsGcxm;
import com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsGcxmShape;
import com.elephant.framework.galaxy.aroad.module.zhjs.mapper.ZhjsGcxmShapeMapper;
import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhDzxgcglGcxx;
import com.elephant.framework.galaxy.aroad.module.zhyh.mapper.ZhyhDzxgcglGcxxMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* 数字公路-观测站
*
* @author zyw
* @date 2019-05-13 11:08:50
*/
@Service
@AllArgsConstructor
public class SzglServiceImpl extends ServiceImpl<ZhjsGcxmShapeMapper, ZhjsGcxmShape> implements SzglService {
private final ZhjsGcxmShapeMapper zhjsGcxmShapeMapper;
private final ZhyhDzxgcglGcxxMapper zhyhDzxgcglGcxxMapper;
@Override
public List<Object> getJYlsForQS(String lxbh, double zxzh) {
List<ZhjsGcxmShape> jsxms = zhjsGcxmShapeMapper.getJYlsForQS(lxbh,zxzh);
List<ZhyhDzxgcglGcxx> dzxxms = zhyhDzxgcglGcxxMapper.getJYlsForQS(lxbh,zxzh);
List<Object> list = new ArrayList<>();
list.addAll(jsxms);
list.addAll(dzxxms);
return list;
}
@Override
public List<Object> getJYlsForRoad(String lxbh, Double qdzh,Double zdzh) {
List<ZhjsGcxmShape> jsxms = zhjsGcxmShapeMapper.getJYlsForRoad(lxbh,qdzh,zdzh);
List<ZhyhDzxgcglGcxx> dzxxms = zhyhDzxgcglGcxxMapper.getJYlsForRoad(lxbh,qdzh,zdzh);
List<Object> list = new ArrayList<>();
list.addAll(jsxms);
list.addAll(dzxxms);
return list;
}
}
...@@ -16,8 +16,10 @@ import java.math.BigDecimal; ...@@ -16,8 +16,10 @@ import java.math.BigDecimal;
* @date 2019-04-08 18:14:32 * @date 2019-04-08 18:14:32
*/ */
@Data @Data
@TableName("v_zhjs_gcxm_shape")
@EqualsAndHashCode(callSuper = true)
public class ZhjsGcxmShape extends Model<ZhjsGcxmShape> { public class ZhjsGcxmShape extends Model<ZhjsGcxmShape> {
private static final long serialVersionUID = 1L;
/** /**
* id * id
*/ */
......
package com.elephant.framework.galaxy.aroad.module.zhjs.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsGcxmShape;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 建设工程及坐标
*
* @author zyw
* @date 2019-05-26 10:43:22
*/
public interface ZhjsGcxmShapeMapper extends BaseMapper<ZhjsGcxmShape> {
List<ZhjsGcxmShape> getJYlsForQS(@Param("lxbh") String lxbh, @Param("zxzh") double zxzh);
List<ZhjsGcxmShape> getJYlsForRoad(@Param("lxbh") String lxbh, @Param("qdzh") Double qdzh, @Param("zdzh") Double zdzh);
}
package com.elephant.framework.galaxy.aroad.module.zhyh.mapper; package com.elephant.framework.galaxy.aroad.module.zhyh.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsGcxmShape;
import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhDzxgcglGcxx; import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhDzxgcglGcxx;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -13,4 +15,9 @@ import java.util.List; ...@@ -13,4 +15,9 @@ import java.util.List;
*/ */
public interface ZhyhDzxgcglGcxxMapper extends BaseMapper<ZhyhDzxgcglGcxx> { public interface ZhyhDzxgcglGcxxMapper extends BaseMapper<ZhyhDzxgcglGcxx> {
List<String> selectGcxxTreeGroupByGydw(); List<String> selectGcxxTreeGroupByGydw();
List<ZhyhDzxgcglGcxx> getJYlsForQS(String lxbh, double zxzh);
List<ZhyhDzxgcglGcxx> getJYlsForRoad(@Param("lxbh") String lxbh, @Param("qdzh") Double qdzh, @Param("zdzh") Double zdzh);
} }
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elephant.framework.galaxy.aroad.module.zhjs.mapper.ZhjsGcxmShapeMapper">
<resultMap id="zhjsGcxmShapeMap" type="com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsGcxmShape">
<id property="id" column="id"/>
<result property="code" column="code"/>
<result property="proname" column="proname"/>
<result property="reportitemname" column="reportItemName"/>
<result property="proabbreviation" column="proabbreviation"/>
<result property="attribute" column="attribute"/>
<result property="property" column="property"/>
<result property="level" column="level"/>
<result property="constructionunit" column="constructionunit"/>
<result property="designunit" column="designunit"/>
<result property="planstartdate" column="planstartdate"/>
<result property="planenddate" column="planenddate"/>
<result property="startdate" column="startdate"/>
<result property="enddate" column="enddate"/>
<result property="quantities" column="quantities"/>
<result property="bid" column="bid"/>
<result property="provinceinvest" column="provinceinvest"/>
<result property="centreinvest" column="centreinvest"/>
<result property="estimate" column="estimate"/>
<result property="planno" column="planno"/>
<result property="branched" column="branched"/>
<result property="address" column="address"/>
<result property="structure" column="structure"/>
<result property="proinfo" column="proinfo"/>
<result property="sort" column="sort"/>
<result property="managesorgid" column="managesOrgId"/>
<result property="managesorgname" column="managesOrgName"/>
<result property="city" column="city"/>
<result property="startstation" column="startStation"/>
<result property="endstation" column="endStation"/>
<result property="xy" column="xy"/>
<result property="invmodel" column="invmodel"/>
<result property="mileage" column="mileage"/>
<result property="remark" column="remark"/>
<result property="introduce" column="introduce"/>
<result property="type" column="type"/>
<result property="legalperson" column="legalperson"/>
<result property="spanlength" column="spanlength"/>
<result property="shape" column="shape"/>
</resultMap>
<select id="getJYlsForQS" resultMap="zhjsGcxmShapeMap">
select * from v_zhjs_gcxm_shape
<where>
<if test="lxbh !=null and lxbh !=''">
locate(#{lxbh},proname)
</if>
<if test="zxzh !=null">
and startStation <![CDATA[ <= ]]>#{zxzh} and endStation <![CDATA[ >= ]]>#{zxzh}
</if>
</where>
order by startdate
</select>
<select id="getJYlsForRoad" resultMap="zhjsGcxmShapeMap">
select * from v_zhjs_gcxm_shape
<where>
<if test="lxbh !=null and lxbh !=''">
locate(#{lxbh},proname)
</if>
<if test="qdzh !=null and zdzh != 0">
and(startStation <![CDATA[ <= ]]>#{qdzh} and endStation <![CDATA[ >= ]]>#{qdzh}) or (startStation <![CDATA[ <= ]]>#{zdzh} and endStation <![CDATA[ >= ]]>#{zdzh})
</if>
</where>
order by startdate
</select>
</mapper>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<mapper namespace="com.elephant.framework.galaxy.aroad.module.zhyh.mapper.ZhyhDzxgcglGcxxMapper"> <mapper namespace="com.elephant.framework.galaxy.aroad.module.zhyh.mapper.ZhyhDzxgcglGcxxMapper">
<resultMap id="zhyhDzxgcglGcxxMap" type="com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhDzxgcglGcxx"> <resultMap id="zhyhDzxgcglGcxxMap" type="com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhDzxgcglGcxx">
<id property="id" column="id"/> <id property="id" column="id"/>
<result property="gcmc" column="gcmc"/> <result property="gcmc" column="gcmc"/>
<result property="gclx" column="gclx"/> <result property="gclx" column="gclx"/>
...@@ -32,8 +32,33 @@ ...@@ -32,8 +32,33 @@
<result property="status" column="status"/> <result property="status" column="status"/>
<result property="delFlag" column="del_flag"/> <result property="delFlag" column="del_flag"/>
<result property="remarks" column="remarks"/> <result property="remarks" column="remarks"/>
</resultMap> </resultMap>
<select id="selectGcxxTreeGroupByGydw" resultType="String"> <select id="selectGcxxTreeGroupByGydw" resultType="String">
select gydw from t_zhyh_dzxgcgl_gcxx GROUP BY gydw select gydw from t_zhyh_dzxgcgl_gcxx GROUP BY gydw
</select> </select>
<select id="getJYlsForQS" resultMap="zhyhDzxgcglGcxxMap">
select * from t_zhyh_dzxgcgl_gcxx
<where>
<if test="lxbh !=null and lxbh !=''">
lxbh =#{lxbh}
</if>
<if test="zxzh !=null">
and gcqdzh <![CDATA[ <= ]]>#{zxzh} and gcjszh <![CDATA[ >= ]]>#{zxzh}
</if>
</where>
order by gcksrq
</select>
<select id="getJYlsForRoad" resultMap="zhyhDzxgcglGcxxMap">
select * from t_zhyh_dzxgcgl_gcxx
<where>
<if test="lxbh !=null and lxbh !=''">
lxbh =#{lxbh}
</if>
<if test="qdzh !=null">
and(gcqdzh <![CDATA[ <= ]]>#{qdzh} and gcjszh <![CDATA[ >= ]]>#{qdzh}) or (gcqdzh <![CDATA[ <= ]]>#{zdzh} and gcjszh <![CDATA[ >= ]]>#{zdzh})
</if>
</where>
order by gcksrq
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论