I2新增查询功能和代码优化

master
liuguijing 1 year ago
parent 4804848466
commit 284f2e45ee

@ -13,20 +13,8 @@ public interface Data_Byq_JbfdDao {
List<Data_Byq_Jbfd> selectUploadById(@Param("maxid") BigInteger maxid);
List<Data_Byq_Jbfd> selectUpload(@Param("isupload") Integer isupload);
Data_Byq_Jbfd selectMaxId();
Data_Byq_Jbfd selectNowId(@Param("date") Date date);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateDataList(@Param("isupload") Integer isupload, @Param("idlist") ArrayList<SendDataBean> id, @Param("updateTime") Date updateTime);
int updateDataList2(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") ArrayList<Integer> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -16,12 +16,5 @@ public interface Data_CnjDao {
Data_Cnj selectNowId(@Param("date") Date date);
List<Data_Cnj> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -16,12 +16,5 @@ public interface Data_DcywDao {
Data_Dcyw selectNowId(@Param("date") Date date);
List<Data_Dcyw> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -12,7 +12,6 @@ import java.util.List;
public interface Data_Dlq_JbfdDao {
List<Data_Dlq_Jbfd> selectUpload(@Param("isupload") Integer isupload);
Data_Dlq_Jbfd selectMaxId();
@ -20,13 +19,4 @@ public interface Data_Dlq_JbfdDao {
List<Data_Dlq_Jbfd> selectUploadById(@Param("maxid") BigInteger maxid);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateDataList(@Param("isupload") Integer isupload, @Param("idlist") ArrayList<SendDataBean> id, @Param("updateTime") Date updateTime);
int updateDataList2(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") ArrayList<Integer> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -16,11 +16,4 @@ public interface Data_Dr_JyjcDao {
Data_Dr_Jyjc selectNowId(@Param("date") Date date);
List<Data_Dr_Jyjc> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -17,11 +17,4 @@ public interface Data_FhdlbxDao {
Data_Fhdlbx selectNowId(@Param("date") Date date);
List<Data_Fhdlbx> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -16,11 +16,4 @@ public interface Data_FhzxqDao {
Data_Fhzxq selectNowId(@Param("date") Date date);
List<Data_Fhzxq> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -16,11 +16,4 @@ public interface Data_Jsyhw_JyjcDao {
Data_Jsyhw_Jyjc selectNowId(@Param("date") Date date);
List<Data_Jsyhw_Jyjc> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -16,11 +16,5 @@ public interface Data_MicroclimateDao {
Data_Microclimate selectNowId(@Param("date") Date date);
List<Data_Microclimate> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -16,11 +16,4 @@ public interface Data_SF6_QtsfDao {
Data_SF6_Qtsf selectNowId(@Param("date") Date date);
List<Data_SF6_Qtsf> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -17,11 +17,4 @@ public interface Data_SF6_QtylDao {
Data_SF6_Qtyl selectNowId(@Param("date") Date date);
List<Data_SF6_Qtyl> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -17,12 +17,5 @@ public interface Data_TxDao {
Data_Tx selectNowId(@Param("date") Date date);
List<Data_Tx> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -16,11 +16,4 @@ public interface Data_WsDao {
Data_Ws selectNowId(@Param("date") Date date);
List<Data_Ws> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -15,18 +15,6 @@ public interface Data_YspDao {
List<Data_Ysp> selectUploadById(@Param("maxid") BigInteger maxid);
List<Data_Ysp> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateDataList(@Param("isupload") Integer isupload, @Param("idlist") ArrayList<SendDataBean> id, @Param("updateTime") Date updateTime);
int updateDataList2(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") ArrayList<Integer> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
Data_Ysp selectMaxId();
Data_Ysp selectNowId(@Param("date") Date time);

@ -36,118 +36,4 @@
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_byq_jbfd where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
SELECT
t1.id, t1.eqmid, t1.acquisitionTime, t1.dischargeCapacity, t1.dischargePosition, t1.pulseCount, t1.isupload,
t1.dischargeWaveform,
t1.create_time, t1.update_time
FROM
data_byq_jbfd t1
INNER JOIN ( SELECT MAX( id ) AS id FROM data_byq_jbfd where isupload is null or isupload = #{isupload} GROUP BY
eqmid ) t2 ON t1.id = t2.id
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Byq_Jbfd">
update data_byq_jbfd
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_byq_jbfd
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<update id="updateDataList">
update data_byq_jbfd
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where isupload is null
<if test="idlist != null and idlist.size > 0">
and (
<foreach collection="idlist" item="item" index="index" separator="or">
(
<if test="item.eqmid != null">
eqmid = #{item.eqmid}
</if>
<if test="item.maxid != null">
and id <![CDATA[<=]]> #{item.maxid}
</if>
)
</foreach>
)
</if>
</update>
<update id="updateDataList2">
update data_byq_jbfd
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where isupload is null
and id <![CDATA[<=]]> #{maxid}
<if test="idlist != null and idlist.size > 0">
and eqmid in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<delete id="deleteData" >
delete
from data_byq_jbfd
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -30,68 +30,4 @@
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_cnj where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_cnj
where isupload is null or isupload = #{isupload}
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Cnj">
update data_cnj
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_cnj
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_cnj
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -30,68 +30,4 @@
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_dcyw where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_dcyw
where isupload is null or isupload = #{isupload}
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Dcyw">
update data_dcyw
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_dcyw
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_dcyw
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -37,124 +37,4 @@
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_dlq_jbfd where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
SELECT
t1.id, t1.eqmid, t1.acquisitionTime,t1.phase, t1.dischargeCapacity, t1.dischargePosition, t1.pulseCount,
t1.isupload,
t1.dischargeWaveform,
t1.create_time, t1.update_time
FROM
data_dlq_jbfd t1
INNER JOIN ( SELECT MAX( id ) AS id FROM data_dlq_jbfd where isupload is null or isupload = #{isupload} GROUP BY
eqmid ) t2 ON t1.id = t2.id
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Dlq_Jbfd">
update data_dlq_jbfd
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_dlq_jbfd
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<update id="updateDataList">
update data_dlq_jbfd
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where isupload is null
<if test="idlist != null and idlist.size > 0">
and (
<foreach collection="idlist" item="item" index="index" separator="or">
(
<if test="item.eqmid != null">
eqmid = #{item.eqmid}
</if>
<if test="item.maxid != null">
and id <![CDATA[<=]]> #{item.maxid}
</if>
)
</foreach>
)
</if>
</update>
<update id="updateDataList2">
update data_dlq_jbfd
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where isupload is null
and id <![CDATA[<=]]> #{maxid}
<if test="idlist != null and idlist.size > 0">
and eqmid in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<delete id="deleteData" >
delete
from data_dlq_jbfd
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -37,64 +37,4 @@
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_dr_jyjc
where isupload is null or isupload = #{isupload} order by id desc limit 1
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Dr_Jyjc">
update data_dr_jyjc
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_dr_jyjc
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_dr_jyjc
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -32,65 +32,4 @@
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_fhdlbx where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_fhdlbx
where isupload is null or isupload = #{isupload}
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Fhdlbx">
update data_fhdlbx
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_fhdlbx
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_fhdlbx
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -36,68 +36,4 @@
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_jsyhw_jyjc
where isupload is null or isupload = #{isupload} order by id desc limit 1
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Jsyhw_Jyjc">
update data_jsyhw_jyjc
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_jsyhw_jyjc
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_jsyhw_jyjc
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -38,63 +38,4 @@
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_microclimate where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_microclimate
where isupload is null or isupload = #{isupload}
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Microclimate">
update data_microclimate
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_microclimate
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_microclimate
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -31,62 +31,4 @@
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_sf6_qtsf where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_sf6_qtsf
where isupload is null or isupload = #{isupload}
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_SF6_Qtsf">
update data_sf6_qtsf
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_sf6_qtsf
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_sf6_qtsf
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -48,74 +48,4 @@
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_sf6_qtyl where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_sf6_qtyl
where isupload is null or isupload = #{isupload}
</select>
<select id="selectUploadList" resultMap="listResultMap">
select
<include refid="Base_Column_List"/>
from data_sf6_qtyl
where isupload is null or isupload = #{isupload}
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_SF6_Qtyl">
update data_sf6_qtyl
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_sf6_qtyl
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_sf6_qtyl
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -24,75 +24,10 @@
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_tx where acquisitionTime >= #{date}
</select>
<select id="selectUploadById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_tx
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_tx
where isupload is null or isupload = #{isupload}
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Tx">
update data_tx
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_tx
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_tx
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -30,62 +30,4 @@
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_ws where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_ws
where isupload is null or isupload = #{isupload}
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Ws">
update data_ws
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_ws
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_ws
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -44,121 +44,4 @@
data_ysp t1 where t1.id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectUpload" resultMap="BaseResultMap">
<!-- select-->
<!-- <include refid="Base_Column_List"/>-->
<!-- from data_ysp-->
<!-- where isupload is null or isupload = #{isupload} order by id desc limit 1-->
SELECT
t1.id, t1.eqmid, t1.acquisitionTime, t1.H2, t1.CH4, t1.C2H6, t1.C2H4, t1.C2H2,t1.CO, t1.CO2, t1.O2, t1.N2,
t1.TotalHydrocarbon,
t1.isupload, t1.create_time, t1.update_time
FROM
data_ysp t1
INNER JOIN ( SELECT MAX( id ) AS id FROM data_ysp where isupload is null or isupload = #{isupload} GROUP BY
eqmid ) t2 ON t1.id = t2.id
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Ysp">
update data_ysp
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_ysp
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<update id="updateDataList">
update data_ysp
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where isupload is null
<if test="idlist != null and idlist.size > 0">
and (
<foreach collection="idlist" item="item" index="index" separator="or">
(
<if test="item.eqmid != null">
eqmid = #{item.eqmid}
</if>
<if test="item.maxid != null">
and id <![CDATA[<=]]> #{item.maxid}
</if>
)
</foreach>
)
</if>
</update>
<update id="updateDataList2">
update data_ysp
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where isupload is null
and id <![CDATA[<=]]> #{maxid}
<if test="idlist != null and idlist.size > 0">
and eqmid in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<delete id="deleteData" >
delete
from data_ysp
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -30,69 +30,4 @@
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_fhzxq where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_fhzxq
where isupload is null or isupload = #{isupload}
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Fhzxq">
update data_fhzxq
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id <![CDATA[<=]]> #{maxid}
<if test="idlist = null and idlist.size > 0">
and id not in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</update>
<update id="updateList">
update data_fhzxq
<set>
<if test="isupload != null">
isupload = #{isupload,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
id in
<foreach collection="idlist" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</update>
<delete id="deleteData" >
delete
from data_fhzxq
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>
Loading…
Cancel
Save