| 
					
				 | 
			
			
				@@ -1,44 +1,57 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <?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"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <mapper namespace="com.jjt.calc.mapper.TwinCalcStopMapper"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <resultMap type="TwinCalcStop" id="TwinCalcStopResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="id"    column="ID"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="deviceId"    column="DEVICE_ID"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="dataDate"    column="DATA_DATE"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="hour"    column="HOUR"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="startTime"    column="START_TIME"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="endTime"    column="END_TIME"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="stopType"    column="STOP_TYPE"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="calcStatus"    column="CALC_STATUS"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="createdBy"    column="CREATED_BY"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="createdTime"    column="CREATED_TIME"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="updatedBy"    column="UPDATED_BY"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="updatedTime"    column="UPDATED_TIME"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="remark"    column="REMARK"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="id" column="ID"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="deviceId" column="DEVICE_ID"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="dataDate" column="DATA_DATE"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="hour" column="HOUR"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="startTime" column="START_TIME"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="endTime" column="END_TIME"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="stopType" column="STOP_TYPE"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="calcStatus" column="CALC_STATUS"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="createdBy" column="CREATED_BY"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="createdTime" column="CREATED_TIME"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="updatedBy" column="UPDATED_BY"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="updatedTime" column="UPDATED_TIME"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="remark" column="REMARK"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <sql id="selectTwinCalcStopVo"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        select ID, DEVICE_ID, DATA_DATE, HOUR, START_TIME, END_TIME, STOP_TYPE, CALC_STATUS, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, REMARK from TWIN_CALC_STOP 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select ID, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               DEVICE_ID, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               DATA_DATE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               HOUR, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               START_TIME, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               END_TIME, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               STOP_TYPE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               CALC_STATUS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               CREATED_BY, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               CREATED_TIME, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               UPDATED_BY, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               UPDATED_TIME, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               REMARK 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        from TWIN_CALC_STOP 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectTwinCalcStopList" parameterType="TwinCalcStop" resultMap="TwinCalcStopResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <include refid="selectTwinCalcStopVo"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="deviceId != null "> and DEVICE_ID = #{deviceId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dataDate != null "> and DATA_DATE = #{dataDate}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="hour != null "> and HOUR = #{hour}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="startTime != null "> and START_TIME = #{startTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="endTime != null "> and END_TIME = #{endTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stopType != null "> and STOP_TYPE = #{stopType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="calcStatus != null  and calcStatus != ''"> and CALC_STATUS = #{calcStatus}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="createdBy != null  and createdBy != ''"> and CREATED_BY = #{createdBy}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="updatedBy != null  and updatedBy != ''"> and UPDATED_BY = #{updatedBy}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="updatedTime != null "> and UPDATED_TIME = #{updatedTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="remark != null  and remark != ''"> and REMARK = #{remark}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="deviceId != null ">and DEVICE_ID = #{deviceId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="dataDate != null ">and cast(DATEADD(hour, HOUR-7, DATA_DATE) as date) = #{dataDate}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="hour != null ">and HOUR = #{hour}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="startTime != null ">and START_TIME = #{startTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="endTime != null ">and END_TIME = #{endTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stopType != null ">and STOP_TYPE = #{stopType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="calcStatus != null  and calcStatus != ''">and CALC_STATUS = #{calcStatus}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="createdBy != null  and createdBy != ''">and CREATED_BY = #{createdBy}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="createdTime != null ">and CREATED_TIME = #{createdTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="updatedBy != null  and updatedBy != ''">and UPDATED_BY = #{updatedBy}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="updatedTime != null ">and UPDATED_TIME = #{updatedTime}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="remark != null  and remark != ''">and REMARK = #{remark}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="params.sTime != null and params.eTime != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 and DATEADD(hour, HOUR, DATA_DATE) between #{params.sTime} and #{params.eTime} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -68,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="updatedBy != null">UPDATED_BY,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="updatedTime != null">UPDATED_TIME,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="remark != null">REMARK,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="values (" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="deviceId != null">#{deviceId},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="dataDate != null">#{dataDate},</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -82,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="updatedBy != null">#{updatedBy},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="updatedTime != null">#{updatedTime},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="remark != null">#{remark},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <update id="updateTwinCalcStop" parameterType="TwinCalcStop"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -105,7 +118,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <delete id="deleteTwinCalcStopById" parameterType="Long"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        delete from TWIN_CALC_STOP where ID = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        delete 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        from TWIN_CALC_STOP 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        where ID = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </delete> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <delete id="deleteTwinCalcStopByIds" parameterType="String"> 
			 |