Bläddra i källkod

sqlserver的查询 和 本地库查询逻辑分开

wangmiaomiao 11 månader sedan
förälder
incheckning
5d440bd433

+ 6 - 2
slibra-system/src/main/resources/mapper/business/TXinyiRobotMapper.xml

@@ -38,10 +38,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createdTime"    column="CREATED_TIME"    />
     </resultMap>
 
-    <sql id="selectTXinyiRobotVo">
+    <sql id="selectTXinyiSqlServer">
         select V_DATE, V_TIME, COD_YB, COD_JQR, COD_YZ, TP_HL1_JQR, TP_HL2_JQR, TP_RCC_JQR, TP_1_YZ, TP_2_YZ, TP_RCC_YZ, NH3_1_JQR, NH3_2_JQR, NH3_1_YZ, NO3_HLC1_YZ, NH3_2_YZ, NO3_HLC2_YZ, NO3_HLJ1_JQR, NO3_HLJ2_JQR, TYLL, NO3_QYC_1_JQR, NO3_QYC_2_JQR, NO3_QYC_1_YZ, NO3_QYC_2_YZ, JSLL from V_SHUJU
     </sql>
 
+    <sql id="selectTXinyiRobotVo">
+        select V_DATE, V_TIME, COD_YB, COD_JQR, COD_YZ, TP_HL1_JQR, TP_HL2_JQR, TP_RCC_JQR, TP_1_YZ, TP_2_YZ, TP_RCC_YZ, NH3_1_JQR, NH3_2_JQR, NH3_1_YZ, NO3_HLC1_YZ, NH3_2_YZ, NO3_HLC2_YZ, NO3_HLJ1_JQR, NO3_HLJ2_JQR, TYLL, NO3_QYC_1_JQR, NO3_QYC_2_JQR, NO3_QYC_1_YZ, NO3_QYC_2_YZ, JSLL from t_xinyi_robot
+    </sql>
+
     <select id="selectTXinyiRobotList" parameterType="TXinyiRobot" resultMap="TXinyiRobotResult">
         <include refid="selectTXinyiRobotVo"/>
         <where>
@@ -202,7 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectTXinyiRobotListByTime" parameterType="string" resultMap="TXinyiRobotResult">
-        <include refid="selectTXinyiRobotVo"/> where 1 = 1
+        <include refid="selectTXinyiSqlServer"/> where 1 = 1
         <if test="lastTime != null  and lastTime != ''"> and CONVERT ( datetime, LTRIM( RTRIM( V_DATE ) ) + ' ' + LTRIM( RTRIM( V_TIME ) ) ) > = #{lastTime}</if>
     </select>
 </mapper>