|
|
@@ -12,6 +12,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="firmBid" column="firmBid" />
|
|
|
<result property="devclassBid" column="devclassBid" />
|
|
|
<result property="devconnBid" column="devconnBid" />
|
|
|
+ <result property="devtypeName" column="devtypeName" />
|
|
|
+ <result property="devclassName" column="devclassName" />
|
|
|
<result property="devCode" column="devCode" />
|
|
|
<result property="devName" column="devName" />
|
|
|
<result property="devVersion" column="devVersion" />
|
|
|
@@ -43,46 +45,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectIotDeviceVo">
|
|
|
- select id, devBid, tid, devtypeBid, firmBid, devclassBid, devconnBid, devCode, devName, devVersion, devStatus, devProvince, devCity, devDistrict, devLng, devLat, devPositionstatus, devPositiontype, devTag, devRecogtype, devNetworktype, devOfflinedate, devProvincealign, devCityalign, devDistrictalign, devLngalign, devLatalign, devContacts, devTel, devCreator, devModifier, devUpdateddate, devModifieddate, devCreateddate, devDelstatus from IotDevice
|
|
|
+ SELECT d.devBid, d.tid, d.devtypeBid, d.firmBid, d.devclassBid, d.devconnBid, d.devCode, d.devName, d.devVersion,
|
|
|
+ d.devStatus, d.devProvince, d.devCity, d.devDistrict, d.devLng, d.devLat, d.devPositionstatus, d.devPositiontype,
|
|
|
+ d.devTag, d.devRecogtype, d.devNetworktype, d.devOfflinedate, d.devProvincealign, d.devCityalign, d.devDistrictalign,
|
|
|
+ d.devLngalign, d.devLatalign, d.devContacts, d.devTel, d.devCreator, d.devModifier, d.devUpdateddate, d.devModifieddate,
|
|
|
+ d.devCreateddate, d.devDelstatus, dt.devtypeName, dc.devclassName
|
|
|
+ FROM IotDevice AS d
|
|
|
+ LEFT JOIN TosDevicetype AS dt ON dt.devtypeBid = d.devtypeBid
|
|
|
+ LEFT JOIN TosDeviceclass AS dc ON dc.devclassBid = d.devclassBid
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectIotDeviceList" parameterType="IotDevice" resultMap="IotDeviceResult">
|
|
|
<include refid="selectIotDeviceVo"/>
|
|
|
- <where>
|
|
|
- <if test="devBid != null and devBid != ''"> and devBid = #{devBid}</if>
|
|
|
- <if test="tid != null and tid != ''"> and tid = #{tid}</if>
|
|
|
- <if test="devtypeBid != null and devtypeBid != ''"> and devtypeBid = #{devtypeBid}</if>
|
|
|
- <if test="firmBid != null and firmBid != ''"> and firmBid = #{firmBid}</if>
|
|
|
- <if test="devclassBid != null and devclassBid != ''"> and devclassBid = #{devclassBid}</if>
|
|
|
- <if test="devconnBid != null and devconnBid != ''"> and devconnBid = #{devconnBid}</if>
|
|
|
- <if test="devCode != null and devCode != ''"> and devCode = #{devCode}</if>
|
|
|
- <if test="devName != null and devName != ''"> and devName like concat('%', #{devName}, '%')</if>
|
|
|
- <if test="devVersion != null and devVersion != ''"> and devVersion = #{devVersion}</if>
|
|
|
- <if test="devStatus != null and devStatus != ''"> and devStatus = #{devStatus}</if>
|
|
|
- <if test="devProvince != null and devProvince != ''"> and devProvince = #{devProvince}</if>
|
|
|
- <if test="devCity != null and devCity != ''"> and devCity = #{devCity}</if>
|
|
|
- <if test="devDistrict != null and devDistrict != ''"> and devDistrict = #{devDistrict}</if>
|
|
|
- <if test="devLng != null "> and devLng = #{devLng}</if>
|
|
|
- <if test="devLat != null "> and devLat = #{devLat}</if>
|
|
|
- <if test="devPositionstatus != null and devPositionstatus != ''"> and devPositionstatus = #{devPositionstatus}</if>
|
|
|
- <if test="devPositiontype != null and devPositiontype != ''"> and devPositiontype = #{devPositiontype}</if>
|
|
|
- <if test="devTag != null and devTag != ''"> and devTag = #{devTag}</if>
|
|
|
- <if test="devRecogtype != null and devRecogtype != ''"> and devRecogtype = #{devRecogtype}</if>
|
|
|
- <if test="devNetworktype != null and devNetworktype != ''"> and devNetworktype = #{devNetworktype}</if>
|
|
|
- <if test="devOfflinedate != null and devOfflinedate != ''"> and devOfflinedate = #{devOfflinedate}</if>
|
|
|
- <if test="devProvincealign != null and devProvincealign != ''"> and devProvincealign = #{devProvincealign}</if>
|
|
|
- <if test="devCityalign != null and devCityalign != ''"> and devCityalign = #{devCityalign}</if>
|
|
|
- <if test="devDistrictalign != null and devDistrictalign != ''"> and devDistrictalign = #{devDistrictalign}</if>
|
|
|
- <if test="devLngalign != null "> and devLngalign = #{devLngalign}</if>
|
|
|
- <if test="devLatalign != null "> and devLatalign = #{devLatalign}</if>
|
|
|
- <if test="devContacts != null and devContacts != ''"> and devContacts = #{devContacts}</if>
|
|
|
- <if test="devTel != null and devTel != ''"> and devTel = #{devTel}</if>
|
|
|
- <if test="devCreator != null and devCreator != ''"> and devCreator = #{devCreator}</if>
|
|
|
- <if test="devModifier != null and devModifier != ''"> and devModifier = #{devModifier}</if>
|
|
|
- <if test="devUpdateddate != null and devUpdateddate != ''"> and devUpdateddate = #{devUpdateddate}</if>
|
|
|
- <if test="devModifieddate != null and devModifieddate != ''"> and devModifieddate = #{devModifieddate}</if>
|
|
|
- <if test="devCreateddate != null and devCreateddate != ''"> and devCreateddate = #{devCreateddate}</if>
|
|
|
- <if test="devDelstatus != null and devDelstatus != ''"> and devDelstatus = #{devDelstatus}</if>
|
|
|
+ <where>
|
|
|
+ d.tid = #{tid} and d.devDelstatus = '0'
|
|
|
+ <if test="devBid != null and devBid != ''"> and d.devBid = #{devBid}</if>
|
|
|
+ <if test="devtypeBid != null and devtypeBid != ''"> and d.devtypeBid = #{devtypeBid}</if>
|
|
|
+ <if test="firmBid != null and firmBid != ''"> and d.firmBid = #{firmBid}</if>
|
|
|
+ <if test="devclassBid != null and devclassBid != ''"> and d.devclassBid = #{devclassBid}</if>
|
|
|
+ <if test="devconnBid != null and devconnBid != ''"> and d.devconnBid = #{devconnBid}</if>
|
|
|
+ <if test="devCode != null and devCode != ''"> and d.devCode = #{devCode}</if>
|
|
|
+ <if test="devName != null and devName != ''"> and d.devName like concat('%', #{devName}, '%')</if>
|
|
|
+ <if test="devVersion != null and devVersion != ''"> and d.devVersion = #{devVersion}</if>
|
|
|
+ <if test="devStatus != null and devStatus != ''"> and d.devStatus = #{devStatus}</if>
|
|
|
+ <if test="devProvince != null and devProvince != ''"> and d.devProvince = #{devProvince}</if>
|
|
|
+ <if test="devCity != null and devCity != ''"> and d.devCity = #{devCity}</if>
|
|
|
+ <if test="devDistrict != null and devDistrict != ''"> and d.devDistrict = #{devDistrict}</if>
|
|
|
+ <if test="devLng != null "> and d.devLng = #{devLng}</if>
|
|
|
+ <if test="devLat != null "> and d.devLat = #{devLat}</if>
|
|
|
+ <if test="devPositionstatus != null and devPositionstatus != ''"> and d.devPositionstatus = #{devPositionstatus}</if>
|
|
|
+ <if test="devPositiontype != null and devPositiontype != ''"> and d.devPositiontype = #{devPositiontype}</if>
|
|
|
+ <if test="devTag != null and devTag != ''"> and d.devTag = #{devTag}</if>
|
|
|
+ <if test="devRecogtype != null and devRecogtype != ''"> and d.devRecogtype = #{devRecogtype}</if>
|
|
|
+ <if test="devNetworktype != null and devNetworktype != ''"> and d.devNetworktype = #{devNetworktype}</if>
|
|
|
+ <if test="devOfflinedate != null and devOfflinedate != ''"> and d.devOfflinedate = #{devOfflinedate}</if>
|
|
|
+ <if test="devProvincealign != null and devProvincealign != ''"> and d.devProvincealign = #{devProvincealign}</if>
|
|
|
+ <if test="devCityalign != null and devCityalign != ''"> and d.devCityalign = #{devCityalign}</if>
|
|
|
+ <if test="devDistrictalign != null and devDistrictalign != ''"> and d.devDistrictalign = #{devDistrictalign}</if>
|
|
|
+ <if test="devLngalign != null "> and d.devLngalign = #{devLngalign}</if>
|
|
|
+ <if test="devLatalign != null "> and d.devLatalign = #{devLatalign}</if>
|
|
|
+ <if test="devContacts != null and devContacts != ''"> and d.devContacts = #{devContacts}</if>
|
|
|
+ <if test="devTel != null and devTel != ''"> and d.devTel = #{devTel}</if>
|
|
|
+ <if test="devCreator != null and devCreator != ''"> and d.devCreator = #{devCreator}</if>
|
|
|
+ <if test="devModifier != null and devModifier != ''"> and d.devModifier = #{devModifier}</if>
|
|
|
+ <if test="devUpdateddate != null and devUpdateddate != ''"> and d.devUpdateddate = #{devUpdateddate}</if>
|
|
|
+ <if test="devModifieddate != null and devModifieddate != ''"> and d.devModifieddate = #{devModifieddate}</if>
|
|
|
+ <if test="devCreateddate != null and devCreateddate != ''"> and d.devCreateddate = #{devCreateddate}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|