<?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.iailab.module.mcs.dao.StModelRunlogDao">
|
<insert id="migrationModelRunlog"
|
parameterType="java.util.List">
|
INSERT INTO `t_st_model_runlog` (id, `modelid`, `run_time`, `run_type`, `run_result`)
|
VALUES
|
<foreach item="item" collection="list" separator=",">
|
(#{item.id},#{item.modelid},#{item.runTime},#{item.runType},#{item.runCommonResult})
|
</foreach>
|
</insert>
|
|
<select id="getLastFxLog" resultType="com.iailab.module.mcs.dto.StModelRunlogDTO">
|
select *
|
from t_st_model_runlog
|
where run_type in ('separation_control','DensityPredict')
|
order by run_time desc
|
limit 10
|
</select>
|
<select id="getLastJyLog" resultType="com.iailab.module.mcs.dto.StModelRunlogDTO">
|
select *
|
from t_st_model_runlog
|
where run_type in ('dosing_control','Dosingsystempre')
|
order by run_time desc
|
limit 10
|
</select>
|
<select id="getLastLog" parameterType="map" resultType="com.iailab.module.mcs.dto.StModelRunlogDTO">
|
select *
|
from t_st_model_runlog
|
where run_type = #{runType}
|
order by run_time desc
|
limit #{limit}
|
</select>
|
<delete id="cleanRunlogTask" parameterType="map">
|
delete
|
from t_st_model_runlog
|
where run_time between #{startdate} and #{enddate}
|
</delete>
|
<select id="queryList" resultType="com.iailab.module.mcs.dto.StModelRunlogDTO" parameterType="map">
|
SELECT a.model_code,a.model_name,b.* FROM t_st_model a,t_st_model_runlog b
|
where a.id = b.modelid
|
<if test="params.modelCode != null and params.modelCode != ''">
|
and a.model_code LIKE concat(concat("%",#{params.modelCode}),"%")
|
</if>
|
<if test="params.modelName != null and params.modelName != ''">
|
and a.model_name LIKE concat(concat("%",#{params.modelName}),"%")
|
</if>
|
<if test="params.startTime != null and params.startTime != ''">
|
and b.run_time >= #{params.startTime}
|
</if>
|
<if test="params.endTime != null and params.endTime != ''">
|
and b.run_time <= #{params.endTime}
|
</if>
|
order by b.run_time desc
|
</select>
|
<select id="listAll" resultType="com.iailab.module.mcs.dto.StModelRunlogDTO" parameterType="map">
|
SELECT a.model_code,a.model_name,b.* FROM t_st_model a,t_st_model_runlog b
|
where a.id = b.modelid
|
<if test="modelCode != null and modelCode != ''">
|
and a.model_code LIKE concat(concat("%",#{modelCode}),"%")
|
</if>
|
<if test="modelName != null and modelName != ''">
|
and a.model_name LIKE concat(concat("%",#{modelName}),"%")
|
</if>
|
order by b.run_time desc
|
</select>
|
|
|
</mapper>
|