燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-06-18 07fe1bb1ef9bf716567c3287ecd7c4859b6ccb1d
src/main/resources/mapping/WarningDetailMapper.xml
@@ -85,6 +85,15 @@
         and value >= (select jcbj from rs)
      order by value;
   </select>
   <select id="getLastYearVal" resultType="java.lang.Double">
      with rs as (
         select su_yuan_id "id", date_sub(create_time, interval 1 year) "time"
         from warning_detail where id = ${id})
      select format(value, 2) "val"
      from warning_detail
      where su_yuan_id = (select id from rs) and create_time = (select time from rs);
   </select>
    
    <insert id="batchInsert">
       INSERT INTO warning_detail (table_name, su_yuan_id, location_name, type, create_time, value)VALUES