|
@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="landId" column="landId" />
|
|
<result property="landId" column="landId" />
|
|
|
<result property="blockName" column="blockName" />
|
|
<result property="blockName" column="blockName" />
|
|
|
<result property="blockType" column="blockType" />
|
|
<result property="blockType" column="blockType" />
|
|
|
|
|
+ <result property="blockSeq" column="blockSeq"/>
|
|
|
<result property="blockManager" column="blockManager" />
|
|
<result property="blockManager" column="blockManager" />
|
|
|
<result property="blockManagername" column="blockManagername" />
|
|
<result property="blockManagername" column="blockManagername" />
|
|
|
<result property="blockArea" column="blockArea" />
|
|
<result property="blockArea" column="blockArea" />
|
|
@@ -17,10 +18,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="blockColor" column="blockColor" />
|
|
<result property="blockColor" column="blockColor" />
|
|
|
<result property="blockRemark" column="blockRemark" />
|
|
<result property="blockRemark" column="blockRemark" />
|
|
|
<result property="blockPreview" column="blockPreview" />
|
|
<result property="blockPreview" column="blockPreview" />
|
|
|
- <result property="blockSeq" column="blockSeq"/>
|
|
|
|
|
<result property="blockIcon" column="blockIcon"/>
|
|
<result property="blockIcon" column="blockIcon"/>
|
|
|
|
|
+ <result property="tid" column="tid"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
+ <sql id="selectFmsBlockVo">
|
|
|
|
|
+ select blockId, landId, blockName, blockType, blockManager, blockManagername, blockArea, blockAreaplant,blockSeq,blockIcon,
|
|
|
|
|
+ blockLngrange, blockColor, blockRemark from FmsBlock
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
<select id="selectFmsBlockListByDeviceBind" resultType="FmsBlockListByDeviceBindResVo" parameterType="String">
|
|
<select id="selectFmsBlockListByDeviceBind" resultType="FmsBlockListByDeviceBindResVo" parameterType="String">
|
|
|
SELECT fb.blockId, fb.blockName, IFNULL(f2.devNum, 0) AS devNum, fb.blockSeq
|
|
SELECT fb.blockId, fb.blockName, IFNULL(f2.devNum, 0) AS devNum, fb.blockSeq
|
|
|
FROM FmsBlock AS fb
|
|
FROM FmsBlock AS fb
|
|
@@ -41,49 +47,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
ORDER BY fb.blockSeq
|
|
ORDER BY fb.blockSeq
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="selectFmsBlockBaseDataList" resultType="FmsBlock">
|
|
|
|
|
+ <include refid="selectFmsBlockVo"/>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ tid = #{tid}
|
|
|
|
|
+ <if test="landId != null and landId != ''"> and landId = #{landId}</if>
|
|
|
|
|
+ <if test="blockName != null and blockName != ''"> and blockName like concat('%', #{blockName}, '%')</if>
|
|
|
|
|
+ <if test="blockNameEq != null and blockNameEq != ''"> and blockName = #{blockNameEq}</if>
|
|
|
|
|
+ <if test="blockType != null and blockType != ''"> and blockType = #{blockType}</if>
|
|
|
|
|
+ <if test="blockManager != null and blockManager != ''"> and blockManager = #{blockManager}</if>
|
|
|
|
|
+ <if test="blockManagername != null and blockManagername != ''"> and blockManagername like concat('%', #{blockManagername}, '%')</if>
|
|
|
|
|
+ <if test="blockArea != null "> and blockArea = #{blockArea}</if>
|
|
|
|
|
+ <if test="blockAreaplant != null "> and blockAreaplant = #{blockAreaplant}</if>
|
|
|
|
|
+ <if test="blockLngrange != null and blockLngrange != ''"> and blockLngrange = #{blockLngrange}</if>
|
|
|
|
|
+ <if test="blockColor != null and blockColor != ''"> and blockColor = #{blockColor}</if>
|
|
|
|
|
+ <if test="blockRemark != null and blockRemark != ''"> and blockRemark = #{blockRemark}</if>
|
|
|
|
|
+ <if test="blockId != null and blockId != ''">
|
|
|
|
|
+ and blockId = #{blockId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="landIds != null and landIds.size()!=0">
|
|
|
|
|
+ and landId in
|
|
|
|
|
+ <foreach collection="landIds" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
-<!-- <sql id="selectFmsBlockVo">-->
|
|
|
|
|
-<!-- select blockId, landId, blockName, blockType, blockManager, blockManagername, blockArea, blockAreaplant,blockSeq,blockIcon,-->
|
|
|
|
|
-<!-- blockLngrange, blockColor, blockRemark from FmsBlock-->
|
|
|
|
|
-<!-- </sql>-->
|
|
|
|
|
|
|
|
|
|
<!-- <select id="selectFmsBlockByBlockId" parameterType="String" resultMap="FmsBlockResult">-->
|
|
<!-- <select id="selectFmsBlockByBlockId" parameterType="String" resultMap="FmsBlockResult">-->
|
|
|
<!-- <include refid="selectFmsBlockVo"/>-->
|
|
<!-- <include refid="selectFmsBlockVo"/>-->
|
|
|
<!-- where blockId = #{blockId}-->
|
|
<!-- where blockId = #{blockId}-->
|
|
|
<!-- </select>-->
|
|
<!-- </select>-->
|
|
|
|
|
|
|
|
-<!-- <select id="selectFmsBlockBaseDataList" resultType="FmsBlock">-->
|
|
|
|
|
-<!-- <include refid="selectFmsBlockVo"/>-->
|
|
|
|
|
-<!-- <where>-->
|
|
|
|
|
-<!-- <if test="landId != null and landId != ''"> and landId = #{landId}</if>-->
|
|
|
|
|
-<!-- <if test="blockName != null and blockName != ''"> and blockName like concat('%', #{blockName}, '%')</if>-->
|
|
|
|
|
-<!-- <if test="blockNameEq != null and blockNameEq != ''"> and blockName = #{blockNameEq}</if>-->
|
|
|
|
|
-<!-- <if test="blockType != null and blockType != ''"> and blockType = #{blockType}</if>-->
|
|
|
|
|
-<!-- <if test="blockManager != null and blockManager != ''"> and blockManager = #{blockManager}</if>-->
|
|
|
|
|
-<!-- <if test="blockManagername != null and blockManagername != ''"> and blockManagername like concat('%', #{blockManagername}, '%')</if>-->
|
|
|
|
|
-<!-- <if test="blockArea != null "> and blockArea = #{blockArea}</if>-->
|
|
|
|
|
-<!-- <if test="blockAreaplant != null "> and blockAreaplant = #{blockAreaplant}</if>-->
|
|
|
|
|
-<!-- <if test="blockLngrange != null and blockLngrange != ''"> and blockLngrange = #{blockLngrange}</if>-->
|
|
|
|
|
-<!-- <if test="blockColor != null and blockColor != ''"> and blockColor = #{blockColor}</if>-->
|
|
|
|
|
-<!-- <if test="blockRemark != null and blockRemark != ''"> and blockRemark = #{blockRemark}</if>-->
|
|
|
|
|
-<!-- <if test="blockId != null and blockId != ''">-->
|
|
|
|
|
-<!-- and blockId = #{blockId}-->
|
|
|
|
|
-<!-- </if>-->
|
|
|
|
|
-<!-- <if test="dataFilter == true and blockIds !=null and blockIds.size()>0">-->
|
|
|
|
|
-<!-- and b.blockId in-->
|
|
|
|
|
-<!-- <foreach collection="blockIds" item="blockId" index="index" open="(" close=")" separator=",">-->
|
|
|
|
|
-<!-- #{blockId}-->
|
|
|
|
|
-<!-- </foreach>-->
|
|
|
|
|
-<!-- </if>-->
|
|
|
|
|
-<!-- <if test="landIds != null and landIds.size()!=0">-->
|
|
|
|
|
-<!-- and landId in-->
|
|
|
|
|
-<!-- <foreach collection="landIds" item="item" index="index" open="(" separator="," close=")">-->
|
|
|
|
|
-<!-- #{item}-->
|
|
|
|
|
-<!-- </foreach>-->
|
|
|
|
|
-<!-- </if>-->
|
|
|
|
|
-<!-- </where>-->
|
|
|
|
|
-<!-- </select>-->
|
|
|
|
|
-<!-- -->
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <select id="selectFmsBlockListWithDevice" resultType="FmsBlockListWithDeviceResVo">-->
|
|
<!-- <select id="selectFmsBlockListWithDevice" resultType="FmsBlockListWithDeviceResVo">-->
|