提交 6c35c594 authored 作者: 朱运伟's avatar 朱运伟

修改bug

上级 fa632738
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.module.zhtj.entity.ZhtjGljsdjqk; import com.elephant.framework.galaxy.aroad.module.zhtj.entity.ZhtjGljsdjqk;
import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhZhzsKeyValue;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -16,5 +17,9 @@ import java.util.Map; ...@@ -16,5 +17,9 @@ import java.util.Map;
* @date 2019-03-11 17:24:55 * @date 2019-03-11 17:24:55
*/ */
public interface ZhtjGljsdjqkMapper extends BaseMapper<ZhtjGljsdjqk> { public interface ZhtjGljsdjqkMapper extends BaseMapper<ZhtjGljsdjqk> {
//查詢普通公路覆蓋情況
List<ZhtjGljsdjqk> selectZhtjGljsdjqk(String area,String type);
// 查询最新年份
String newYear(@Param("type")String type);
List<ZhyhZhzsKeyValue> getZhyhZhzsGlOne(@Param("year") String year);
} }
...@@ -146,6 +146,7 @@ public class ZhtjGljsdjqkServiceImpl extends ServiceImpl<ZhtjGljsdjqkMapper, Zht ...@@ -146,6 +146,7 @@ public class ZhtjGljsdjqkServiceImpl extends ServiceImpl<ZhtjGljsdjqkMapper, Zht
return resultMap; return resultMap;
} }
/** /**
* 根据年份查询智慧养护综合展示公路数据 * 根据年份查询智慧养护综合展示公路数据
* @param year 年份 * @param year 年份
......
...@@ -27,4 +27,26 @@ ...@@ -27,4 +27,26 @@
<result property="delFlag" column="del_flag"/> <result property="delFlag" column="del_flag"/>
<result property="remarks" column="remarks"/> <result property="remarks" column="remarks"/>
</resultMap> </resultMap>
<sql id="maxYear">
select max(year) maxyear from `t_zhtj_gljsdjqk`
</sql>
<select id="selectZhtjGljsdjqk" resultMap="zhtjGljsdjqkMap">
SELECT * FROM `t_zhtj_gljsdjqk` as tsd where area=#{area} and type in (${type}) and year = (
<include refid="maxYear"/>
)
</select>
<select id="newYear" resultType="string">
<include refid="maxYear"/>
<if test="type != null and type != ''">
where type in (${type})
</if>
</select>
<select id="getZhyhZhzsGlOne" resultType="com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhZhzsKeyValue">
select type as `key`,total as `value`
from t_zhtj_gllmqk
<where>
area='合计' and year=#{year} and (type="国道" or type="省道")
</where>
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论