|
@@ -0,0 +1,51 @@
|
|
|
|
+<?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">
|
|
|
|
+<mapper namespace="com.persagy.dmp.rwd.simple.dao.SystemCustomMapper">
|
|
|
|
+
|
|
|
|
+ <!-- 确定建筑不确定楼层 buildingId is not null , floorId is null -->
|
|
|
|
+ <select id="querySystemNotSureFloor" resultType="java.util.Map">
|
|
|
|
+ select * from dt_object
|
|
|
|
+ where 1=1
|
|
|
|
+ <include refid="commonWhereSql"/>
|
|
|
|
+ <if test="null!=param.classCode and param.classCode.length>0">
|
|
|
|
+ AND class_code = #{classCode}
|
|
|
|
+ </if>
|
|
|
|
+ AND id in
|
|
|
|
+ (select obj_from from
|
|
|
|
+ (
|
|
|
|
+ select obj_from from dt_relation where rel_code='Sy2Bd' AND graph_code='MechInArch' AND obj_to=#{param.buildingId} AND obj_from not in
|
|
|
|
+ (select obj_from from dt_relation where rel_code='Sy2Fl' AND graph_code='MechInArch' ) order by id asc
|
|
|
|
+ <include refid="com.persagy.dmp.rwd.digital.dao.ObjectDigitalMapper.pageSet">
|
|
|
|
+ <property name="param" value="#{param}"/>
|
|
|
|
+ </include>
|
|
|
|
+ ) temp
|
|
|
|
+ )
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <!-- 不确定建筑 buildingId is null-->
|
|
|
|
+ <select id="querySystemNotSureBuilding" resultType="java.util.Map">
|
|
|
|
+ SELECT * FROM `dt_object`
|
|
|
|
+ where 1=1
|
|
|
|
+ <include refid="commonWhereSql"/>
|
|
|
|
+ <if test="null!=param.classCode and param.classCode.length>0">
|
|
|
|
+ AND class_code = #{classCode}
|
|
|
|
+ </if>
|
|
|
|
+ AND id not in (select obj_from from dt_relation where rel_code='Sy2Bd' AND graph_code='MechInArch' order by id asc) ORDER BY id asc
|
|
|
|
+ <include refid="com.persagy.dmp.rwd.digital.dao.ObjectDigitalMapper.pageSet">
|
|
|
|
+ <property name="param" value="#{param}"/>
|
|
|
|
+ </include>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <sql id="commonWhereSql">
|
|
|
|
+ <if test="null!=param.objType and param.objType.length>0">
|
|
|
|
+ AND obj_type=#{param.objType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="null!=param.projectId and param.projectId.length>0">
|
|
|
|
+ AND project_id=#{param.projectId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="null!=param.groupCode and param.groupCode.length>0">
|
|
|
|
+ AND group_code=#{param.groupCode}
|
|
|
|
+ </if>
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+</mapper>
|