123456789101112131415161718192021222324252627282930 |
- <?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.zhili.dashboard.mapper.DistributionMapMapper">
- <update id="updateDistributionMap">
- -- 更新大屏数据库
- UPDATE tb_distribution_map t
- SET t.statis_date = REPLACE(DATE_ADD(t.statis_date,INTERVAL 1 DAY),'-','')
- </update>
- <select id="getDeviceStatusList" resultType="Map">
- select sum(car_num) * 20000 as quantity, statis_hours as num, stat_flg as item,statis_date
- from tb_distribution_map
- where is_delete = 0
- and ((statis_date = #{dateStr} and statis_hours <= #{hourStr}) or (statis_date = #{yesStr} and statis_hours >= #{yesHourStr}))
- group by item,num,statis_date,statis_hours
- order by statis_date ,statis_hours
- </select>
- <select id="getOnLine" resultType="Map">
- select sum(car_num) * 20000 as total
- from tb_distribution_map
- where is_delete = 0
- and statis_date = #{dateStr}
- and statis_hours = #{hourStr}
- </select>
- </mapper>
|