Browse Source

mapper 添加

pra 3 years ago
parent
commit
bf990dcca9

+ 14 - 0
src/main/resources/mapper/SchedulerFileMapper.xml

@@ -0,0 +1,14 @@
+<?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.tofly.zmrq.mapper.SchedulerFileMapper">
+    <resultMap id="schedulerFileMap" type="com.tofly.zmrq.entity.SchedulerFile">
+        <id property="id" column="ID"/>
+        <result property="schedulerId" column="SCHEDULER_ID"/>
+        <result property="filePath" column="FILE_PATH"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="fileType" column="FILE_TYPE"/>
+        <result property="processId" column="PROCESS_ID"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+</mapper>

+ 140 - 0
src/main/resources/mapper/SchedulerMapper.xml

@@ -0,0 +1,140 @@
+<?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.tofly.zmrq.mapper.SchedulerMapper">
+    <resultMap id="schedulerMap" type="com.tofly.zmrq.entity.Scheduler">
+        <id property="id" column="ID"/>
+        <result property="emergencyHandling" column="EMERGENCY_HANDLING"/>
+        <result property="mdispatchingDepartment" column="MDISPATCHING_DEPARTMENT"/>
+        <result property="mdispatchingUserId" column="MDISPATCHING_USER_ID"/>
+        <result property="assistantDepartment" column="ASSISTANT_DEPARTMENT"/>
+        <result property="assistantUserId" column="ASSISTANT_USER_ID"/>
+        <result property="checkUserId" column="CHECK_USER_ID"/>
+        <result property="mdispatchingNotes" column="MDISPATCHING_NOTES"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="createUser" column="CREATE_USER"/>
+        <result property="createTime" column="CREATE_TIME"/>
+        <result property="workOrderState" column="WORK_ORDER_STATE"/>
+        <result property="x" column="X"/>
+        <result property="y" column="Y"/>
+        <result property="alarmPeopleName" column="ALARM_PEOPLE_NAME"/>
+        <result property="address" column="ADDRESS"/>
+        <result property="contactPhone" column="CONTACT_PHONE"/>
+        <result property="type" column="TYPE"/>
+        <result property="departmentId" column="DEPARTMENT_ID"/>
+        <result property="dispatchUserId" column="DISPATCH_USER_ID"/>
+        <result property="description" column="DESCRIPTION"/>
+        <result property="isMaintenance" column="IS_MAINTENANCE"/>
+        <result property="overTime" column="OVER_TIME"/>
+        <result property="completeTime" column="COMPLETE_TIME"/>
+        <result property="checkTime" column="CHECK_TIME"/>
+        <result property="maintenanceTime" column="MAINTENANCE_TIME"/>
+        <result property="responsibleDepartment" column="RESPONSIBLE_DEPARTMENT"/>
+        <result property="responsibleUserId" column="RESPONSIBLE_USER_ID"/>
+        <result property="maintenanceNotes" column="MAINTENANCE_NOTES"/>
+        <result property="companyId" column="COMPANY_ID"/>
+        <association property="companyName" column="COMPANY_ID" select="com.tofly.common.mapper.ToflyCodeCommonMapper.getCompanyName"></association>
+        <association property="checkUserName" column="CHECK_USER_ID" select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName"></association>
+        <association property="dispatchUserName" column="DISPATCH_USER_ID" select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName"></association>
+        <association property="responsibleUserName" column="RESPONSIBLE_USER_ID" select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName"></association>
+        <association property="createUserName" javaType="java.lang.String" column="CREATE_USER" select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName"></association>
+        <association property="responsibleDepartmentName" javaType="java.lang.String" column="RESPONSIBLE_DEPARTMENT" select="getdepartmentName"></association>
+        <association property="workOrderStateName" column="WORK_ORDER_STATE" select="getworkOrderStateName"></association>
+        <association property="typeName" column="TYPE" select="gettypeName"></association>
+        <association property="mdispatchingUserName" javaType="java.lang.String" column="MDISPATCHING_USER_ID" select="getmdispatchingUserName"></association>
+        <association property="mdispatchingDepartmentName" javaType="java.lang.String" column="MDISPATCHING_DEPARTMENT" select="getmdispatchingDepartmentName"></association>
+        <association property="assistantUserName" javaType="java.lang.String" column="ASSISTANT_USER_ID" select="getassistantUserName"></association>
+        <association property="assistantDepartmentName" javaType="java.lang.String" column="ASSISTANT_DEPARTMENT" select="getassistantDepartmentName"></association>
+        <collection property="takeOrderFile" column="ID" select="gettakeOrderFile" ofType="java.util.List"></collection>
+        <collection property="emergencyVoice" column="ID" select="getemergencyVoice" ofType="java.util.List"></collection>
+        <collection property="emergencyFile" column="ID" select="getemergencyFile" ofType="java.util.List"></collection>
+        <collection property="confirmingTheLink" column="ID" select="getconfirmingTheLink" ofType="java.util.List"></collection>
+        <collection property="mdispatchingFile" column="ID" select="getmdispatchingFile" ofType="java.util.List"></collection>
+        <collection property="maintenanceVoice" column="ID" select="getmaintenanceVoice" ofType="java.util.List"></collection>
+        <collection property="maintenanceFile" column="ID" select="getmaintenanceFile" ofType="java.util.List"></collection>
+    </resultMap>
+
+    <resultMap id="fileMap" type="java.util.Map">
+        <result property="path" column="FILE_PATH"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+
+    <select id="getworkOrderStateName" resultType="java.lang.Object">
+        select decode(#{workOrderState},'1','待工单执行回报','2','待审核','3','3待抢修','4','工单完成') as workOrderStateName from dual
+    </select>
+
+    <select id="gettypeName" resultType="java.lang.Object">
+        select decode(#{type},'0','非漏气','1','漏气') as typeName from dual
+    </select>
+
+    <select id="gettakeOrderFile" resultMap="fileMap">
+        select f.file_path,f.file_name from TF_SCHEDULER_FILE f where f.scheduler_id =#{ID}  and f.process_id = '1'
+    </select>
+
+    <select id="getemergencyVoice" resultMap="fileMap">
+        select f.file_path,f.file_name from TF_SCHEDULER s,TF_SCHEDULER_FILE f where s.id = f.scheduler_id and
+                ((f.scheduler_id =#{ID} and f.file_type = 1 and f.process_id = '2')
+                or  (s.is_maintenance = '0' and  f.scheduler_id =#{ID} and f.file_type = 1 and f.process_id = '4'))
+    </select>
+
+    <select id="getemergencyFile" resultMap="fileMap">
+        select f.file_path,f.file_name from TF_SCHEDULER s,TF_SCHEDULER_FILE f where s.id = f.scheduler_id and
+                ((f.scheduler_id =#{ID} and f.file_type = 0 and f.process_id = '2')
+                or (s.is_maintenance = '0' and f.scheduler_id =#{ID} and f.file_type = 0 and f.process_id = '4'))
+    </select>
+
+    <select id="getconfirmingTheLink" resultMap="fileMap">
+        select f.file_path,f.file_name from  TF_SCHEDULER s, TF_SCHEDULER_FILE f where
+                s.id = f.scheduler_id and s.is_maintenance = '0' and s.id =#{ID} and f.file_type = 3 and f.process_id = '4'
+    </select>
+
+    <select id="getmdispatchingFile" resultMap="fileMap">
+        select f.file_path,f.file_name from TF_SCHEDULER_FILE f where f.scheduler_id =#{ID} and f.file_type = 0 and f.process_id = '3'
+    </select>
+
+    <select id="getmaintenanceVoice" resultMap="fileMap">
+        select f.file_path,f.file_name from TF_SCHEDULER s,TF_SCHEDULER_FILE f where s.id = f.scheduler_id and
+                s.is_maintenance = '1' and f.scheduler_id =#{ID} and f.file_type = 1 and f.process_id = '4'
+    </select>
+
+    <select id="getmaintenanceFile" resultMap="fileMap">
+        select f.file_path,f.file_name from TF_SCHEDULER s,TF_SCHEDULER_FILE f where s.id = f.scheduler_id and
+                s.is_maintenance = '1' and f.scheduler_id =#{ID} and f.file_type = 0 and f.process_id = '4'
+    </select>
+
+    <select id="getdepartmentName" resultType="java.lang.Object">
+        select name as departmentName from tf_smpn_department_x where id = #{responsibleDepartment}
+    </select>
+
+    <select id="getmdispatchingUserName" resultType="java.lang.String">
+        select LISTAGG(b.real_name,',') within group(order by b.real_name) from
+                (select regexp_substr(#{MDISPATCHING_USER_ID}, '[^,]+', 1, rownum) as id
+                 from dual
+     <![CDATA[   connect by rownum <= REGEXP_COUNT(#{MDISPATCHING_USER_ID}, '[^,]+') ) a  ]]>
+        left join tf_smpn_user_x b on a.id = b.id
+    </select>
+
+    <select id="getmdispatchingDepartmentName" resultType="java.lang.String">
+        select LISTAGG(b.name,',') within group(order by b.name) from
+                (select regexp_substr(#{MDISPATCHING_DEPARTMENT}, '[^,]+', 1, rownum) as id
+                 from dual
+     <![CDATA[   connect by rownum <= REGEXP_COUNT(#{MDISPATCHING_DEPARTMENT}, '[^,]+') ) a  ]]>
+        left join tf_smpn_department_x b on a.id = b.id
+    </select>
+
+    <select id="getassistantUserName" resultType="java.lang.String">
+        select LISTAGG(b.real_name,',') within group(order by b.real_name) from
+                (select regexp_substr(#{ASSISTANT_USER_ID}, '[^,]+', 1, rownum) as id
+                 from dual
+     <![CDATA[   connect by rownum <= REGEXP_COUNT(#{ASSISTANT_USER_ID}, '[^,]+') ) a  ]]>
+        left join tf_smpn_user_x b on a.id = b.id
+    </select>
+
+    <select id="getassistantDepartmentName" resultType="java.lang.String">
+        select LISTAGG(b.name,',') within group(order by b.name) from
+                (select regexp_substr(#{ASSISTANT_DEPARTMENT}, '[^,]+', 1, rownum) as id
+                 from dual
+     <![CDATA[   connect by rownum <= REGEXP_COUNT(#{ASSISTANT_DEPARTMENT}, '[^,]+') ) a  ]]>
+        left join tf_smpn_department_x b on a.id = b.id
+    </select>
+</mapper>

+ 13 - 0
src/main/resources/mapper/SchedulerPlanFileMapper.xml

@@ -0,0 +1,13 @@
+<?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.tofly.zmrq.mapper.SchedulerPlanFileMapper">
+    <resultMap id="schedulerPlanFileMap" type="com.tofly.zmrq.entity.SchedulerPlanFile">
+        <id property="id" column="ID"/>
+        <result property="planId" column="PLAN_ID"/>
+        <result property="filePath" column="FILE_PATH"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="fileType" column="FILE_TYPE"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+</mapper>

+ 29 - 0
src/main/resources/mapper/SchedulerPlanMapper.xml

@@ -0,0 +1,29 @@
+<?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.tofly.zmrq.mapper.SchedulerPlanMapper">
+    <resultMap id="schedulerPlanMap" type="com.tofly.zmrq.entity.SchedulerPlan">
+        <id property="id" column="ID"/>
+        <result property="createUser" column="CREATE_USER"/>
+        <result property="createTime" column="CREATE_TIME"/>
+        <result property="name" column="NAME"/>
+        <result property="condition" column="CONDITION"/>
+        <result property="notes" column="NOTES"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="companyId" column="COMPANY_ID"/>
+        <association property="companyName" column="COMPANY_ID" select="com.tofly.common.mapper.ToflyCodeCommonMapper.getCompanyName"></association>
+        <association property="createUserName" column="CREATE_USER"
+                     select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName">
+        </association>
+        <association property="file" column="ID" select="getFile"></association>
+    </resultMap>
+
+    <resultMap id="fileMap" type="java.util.Map">
+        <result property="path" column="FILE_PATH"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+
+    <select id="getFile" resultMap="fileMap">
+        select f.file_path,f.file_name from TF_SCHEDULER_PLAN_FILE f where f.plan_id =#{ID} and del_flag ='1'
+    </select>
+</mapper>

+ 15 - 0
src/main/resources/mapper/SurverFileMapper.xml

@@ -0,0 +1,15 @@
+<?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.tofly.zmrq.mapper.SurverFileMapper">
+    <resultMap id="surverFileMap" type="com.tofly.zmrq.entity.SurverFile">
+        <id property="id" column="ID"/>
+        <result property="orderId" column="ORDER_ID"/>
+        <result property="filePath" column="FILE_PATH"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="fileType" column="FILE_TYPE"/>
+        <result property="stateId" column="STATE_ID"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+
+</mapper>

+ 63 - 0
src/main/resources/mapper/SurverMapper.xml

@@ -0,0 +1,63 @@
+<?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.tofly.zmrq.mapper.SurverMapper">
+    <resultMap id="surverMap" type="com.tofly.zmrq.entity.Surver">
+        <id property="id" column="ID"/>
+        <result property="createUser" column="CREATE_USER"/>
+        <result property="createTime" column="CREATE_TIME"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="state" column="STATE"/>
+        <result property="buriedTime" column="BURIED_TIME"/>
+        <result property="buriedUser" column="BURIED_USER"/>
+        <result property="buriedAddress" column="BURIED_ADDRESS"/>
+        <result property="description" column="DESCRIPTION"/>
+        <result property="notes" column="NOTES"/>
+        <result property="checkTime" column="CHECK_TIME"/>
+        <result property="companyId" column="COMPANY_ID"/>
+        <result property="type" column="TYPE"/>
+        <result property="houseHolds" column="HOUSE_HOLDS"/>
+        <result property="isBuried" column="IS_BURIED"/>
+        <result property="code" column="CODE"/>
+        <result property="addDevice" column="ADD_DEVICE"/>
+        <result property="addDeviceNum" column="ADD_DEVICE_NUM"/>
+        <result property="contacts" column="CONTACTS"/>
+        <result property="contactsNumber" column="CONTACTS_NUMBER"/>
+        <result property="name" column="NAME"/>
+        <association property="companyName" column="COMPANY_ID" select="com.tofly.common.mapper.ToflyCodeCommonMapper.getCompanyName"></association>
+        <association property="createUserName" column="CREATE_USER"
+                     select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName">
+        </association>
+        <association property="stateName" column="STATE" select="getstateName"></association>
+        <association property="typeName" column="TYPE" select="gettypeName"></association>
+        <association property="isBuriedName" column="IS_BURIED" select="getisBuriedName"></association>
+        <association property="addDeviceName" column="ADD_DEVICE" select="getaddDeviceName"></association>
+        <association property="reportFile" column="ID" select="getreportFile"></association>
+        <association property="detectFile" column="ID" select="getdetectFile"></association>
+    </resultMap>
+
+    <select id="getstateName" resultType="java.lang.String">
+        select decode(#{state},'1','待探测','2','完成探测') as stateName from dual
+    </select>
+    <select id="gettypeName" resultType="java.lang.String">
+        select decode(#{type},'1','商业','2','工业','3','民用','4','公服','5','燃气主管工程','6','改造整改') as typeName from dual
+    </select>
+    <select id="getisBuriedName" resultType="java.lang.String">
+        select decode(#{isBuried},'0','否','1','是') as isBuriedName from dual
+    </select>
+    <select id="getaddDeviceName" resultType="java.lang.String">
+        select decode(#{addDevice},'1','调压器(柜)','2','阀井','3','无') as addDeviceName from dual
+    </select>
+
+    <resultMap id="fileMap" type="java.util.Map">
+        <result property="path" column="FILE_PATH"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+
+    <select id="getreportFile" resultMap="fileMap">
+        select f.file_path,f.file_name from TF_SURVER_FILE f where f.ORDER_ID =#{ID}  and f.STATE_ID = '1' and del_flag ='1'
+    </select>
+    <select id="getdetectFile" resultMap="fileMap">
+        select f.file_path,f.file_name from TF_SURVER_FILE f where f.ORDER_ID =#{ID}  and f.STATE_ID = '2' and del_flag ='1'
+    </select>
+</mapper>

+ 44 - 0
src/main/resources/mapper/TroubleCoordinateMapper.xml

@@ -0,0 +1,44 @@
+<?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.tofly.zmrq.mapper.TroubleCoordinateMapper">
+    <resultMap id="troubleCoordinateMap" type="com.tofly.zmrq.entity.TroubleCoordinate">
+        <id property="id" column="ID"/>
+        <result property="troubleId" column="TROUBLE_ID"/>
+        <result property="coordinateTime" column="COORDINATE_TIME"/>
+        <result property="coordinateNote" column="COORDINATE_NOTE"/>
+        <result property="createUser" column="CREATE_USER"/>
+        <result property="count" column="COUNT"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="checkNote" column="CHECK_NOTE"/>
+        <result property="checkTime" column="CHECK_TIME"/>
+        <association property="createUserName" column="CREATE_USER"
+                     select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName">
+        </association>
+        <collection property="coordinatePhotos" select="getCoordinatePhotos" column="ID"></collection>
+        <collection property="coordinateAudios" select="getCoordinateAudios" column="ID"></collection>
+        <collection property="coordinateFiles" select="getCoordinateFiles" column="ID"></collection>
+    </resultMap>
+
+    <select id="getCoordinatePhotos" resultMap="fileMap">
+        select f.file_name,f.file_path from TF_TROUBLE_FILE f where f.coordinate_id = #{id} and f.file_type = '0' and f.del_flag = '1'
+    </select>
+
+    <select id="getCoordinateAudios" resultMap="fileMap">
+        select f.file_name,f.file_path from TF_TROUBLE_FILE f where f.coordinate_id = #{id} and f.file_type = '1' and f.del_flag = '1'
+    </select>
+
+    <select id="getCoordinateFiles" resultMap="fileMap">
+        select f.file_name,f.file_path from TF_TROUBLE_FILE f where f.coordinate_id = #{id} and f.file_type = '2' and f.del_flag = '1'
+    </select>
+
+    <resultMap id="fileMap" type="java.util.Map">
+        <result property="path" column="FILE_PATH"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+
+    <select id="getCoordinateList" resultMap="troubleCoordinateMap">
+        select * from tf_trouble_coordinate t where t.trouble_id = #{id}
+    </select>
+
+</mapper>

+ 42 - 0
src/main/resources/mapper/TroubleHandleMapper.xml

@@ -0,0 +1,42 @@
+<?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.tofly.zmrq.mapper.TroubleHandleMapper">
+    <resultMap id="troubleHandleMap" type="com.tofly.zmrq.entity.TroubleHandle">
+        <id property="id" column="ID"/>
+        <result property="count" column="COUNT"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="troubleId" column="TROUBLE_ID"/>
+        <result property="handleTime" column="HANDLE_TIME"/>
+        <result property="handleNote" column="HANDLE_NOTE"/>
+        <result property="createUser" column="CREATE_USER"/>
+        <result property="isEnd" column="IS_END"/>
+        <association property="createUserName" column="CREATE_USER"
+                     select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName">
+        </association>
+        <collection property="handlePhotos"  select="getHandlePhotos" column="ID"></collection>
+        <collection property="handleAudios"  select="getHandleAudios" column="ID"></collection>
+        <collection property="handleFiles"  select="getHandleFiles" column="ID"></collection>
+    </resultMap>
+
+    <resultMap id="fileMap" type="java.util.Map">
+        <result property="path" column="FILE_PATH"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+
+    <select id="getHandlePhotos" resultMap="fileMap">
+        select f.file_name,f.file_path from TF_TROUBLE_FILE f where f.handle_id = #{id} and f.file_type = '0' and f.del_flag = '1'
+    </select>
+
+    <select id="getHandleAudios" resultMap="fileMap">
+        select f.file_name,f.file_path from TF_TROUBLE_FILE f where f.handle_id = #{id} and f.file_type = '1' and f.del_flag = '1'
+    </select>
+
+    <select id="getHandleFiles" resultMap="fileMap">
+        select f.file_name,f.file_path from TF_TROUBLE_FILE f where f.handle_id = #{id} and f.file_type = '2' and f.del_flag = '1'
+    </select>
+
+    <select id="getHandleList" resultMap="troubleHandleMap">
+        select * from tf_trouble_handle t where t.trouble_id = #{id}
+    </select>
+</mapper>

+ 12 - 0
src/main/resources/mapper/XjConMapper.xml

@@ -0,0 +1,12 @@
+<?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.tofly.zmrq.mapper.XjConMapper">
+    <resultMap id="xjConMap" type="com.tofly.zmrq.entity.XjCon">
+        <id property="id" column="ID"/>
+        <result property="recordId" column="RECORD_ID"/>
+        <result property="typeId" column="TYPE_ID"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="menuId" column="MENU_ID"/>
+    </resultMap>
+</mapper>

+ 14 - 0
src/main/resources/mapper/XjFileMapper.xml

@@ -0,0 +1,14 @@
+<?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.tofly.zmrq.mapper.XjFileMapper">
+    <resultMap id="xjFileMap" type="com.tofly.zmrq.entity.XjFile">
+        <id property="id" column="ID"/>
+        <result property="recordId" column="RECORD_ID"/>
+        <result property="filePath" column="FILE_PATH"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="xjType" column="XJ_TYPE"/>
+        <result property="fileName" column="FILE_NAME"/>
+        <result property="fileType" column="FILE_TYPE"/>
+    </resultMap>
+</mapper>

+ 36 - 0
src/main/resources/mapper/XjFjMapper.xml

@@ -0,0 +1,36 @@
+<?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.tofly.zmrq.mapper.XjFjMapper">
+    <resultMap id="xjFjMap" type="com.tofly.zmrq.entity.XjFj">
+        <id property="id" column="ID"/>
+        <result property="deviceId" column="DEVICE_ID"/>
+        <result property="checkDate" column="CHECK_DATE"/>
+        <result property="address" column="ADDRESS"/>
+        <result property="createUser" column="CREATE_USER"/>
+        <result property="createDate" column="CREATE_DATE"/>
+        <result property="userid" column="USERID"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="planTempPointId" column="PLAN_TEMP_POINT_ID"/>
+        <result property="childPlanId" column="CHILD_PLAN_ID"/>
+        <result property="x" column="X"/>
+        <result property="y" column="Y"/>
+        <result property="material" column="MATERIAL"/>
+        <result property="specification" column="SPECIFICATION"/>
+        <result property="note" column="NOTE"/>
+        <result property="companyId" column="COMPANY_ID"/>
+        <association property="createUserName" column="CREATE_USER"
+                     select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName">
+        </association>
+        <association property="file" column="ID" select="getFile"></association>
+    </resultMap>
+
+    <resultMap id="fileMap" type="java.util.Map">
+        <result property="path" column="FILE_PATH"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+
+    <select id="getFile" resultMap="fileMap">
+        select t.file_path,t.file_name from TF_XJ_FILE t where t.xj_type = 3 and t.record_id =#{id} and del_flag ='1'
+    </select>
+</mapper>

+ 36 - 0
src/main/resources/mapper/XjLdtyxMapper.xml

@@ -0,0 +1,36 @@
+<?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.tofly.zmrq.mapper.XjLdtyxMapper">
+    <resultMap id="xjLdtyxMap" type="com.tofly.zmrq.entity.XjLdtyx">
+        <id property="id" column="ID"/>
+        <result property="deviceId" column="DEVICE_ID"/>
+        <result property="checkDate" column="CHECK_DATE"/>
+        <result property="address" column="ADDRESS"/>
+        <result property="createUser" column="CREATE_USER"/>
+        <result property="createDate" column="CREATE_DATE"/>
+        <result property="userid" column="USERID"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="planTempPointId" column="PLAN_TEMP_POINT_ID"/>
+        <result property="childPlanId" column="CHILD_PLAN_ID"/>
+        <result property="x" column="X"/>
+        <result property="y" column="Y"/>
+        <result property="runPressure" column="RUN_PRESSURE"/>
+        <result property="truncationPressure" column="TRUNCATION_PRESSURE"/>
+        <result property="note" column="NOTE"/>
+        <result property="companyId" column="COMPANY_ID"/>
+        <association property="createUserName" column="CREATE_USER"
+                     select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName">
+        </association>
+        <association property="file" column="ID" select="getFile"></association>
+    </resultMap>
+
+    <resultMap id="fileMap" type="java.util.Map">
+        <result property="path" column="FILE_PATH"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+
+    <select id="getFile" resultMap="fileMap">
+        select t.file_path,t.file_name from TF_XJ_FILE t where t.xj_type = 1 and t.record_id =#{id} and del_flag ='1'
+    </select>
+</mapper>

+ 20 - 0
src/main/resources/mapper/XjMenuMapper.xml

@@ -0,0 +1,20 @@
+<?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.tofly.zmrq.mapper.XjMenuMapper">
+    <resultMap id="xjMenuMap" type="com.tofly.zmrq.entity.XjMenu">
+        <id property="id" column="ID"/>
+        <result property="name" column="NAME"/>
+        <result property="createUser" column="CREATE_USER"/>
+        <result property="createTime" column="CREATE_TIME"/>
+        <result property="updateTime" column="UPDATE_TIME"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="typeId" column="TYPE_ID"/>
+        <association property="typeName" column="TYPE_ID" select="getTypeName"></association>
+        <association property="createUserName" column="CREATE_USER" select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName"></association>
+    </resultMap>
+
+    <select id="getTypeName" resultType="java.lang.Object">
+        select name from TF_XJ_TYPE  where id = #{TYPE_ID}
+    </select>
+</mapper>

+ 37 - 0
src/main/resources/mapper/XjTygMapper.xml

@@ -0,0 +1,37 @@
+<?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.tofly.zmrq.mapper.XjTygMapper">
+    <resultMap id="xjTygMap" type="com.tofly.zmrq.entity.XjTyg">
+        <id property="id" column="ID"/>
+        <result property="deviceId" column="DEVICE_ID"/>
+        <result property="checkDate" column="CHECK_DATE"/>
+        <result property="address" column="ADDRESS"/>
+        <result property="createUser" column="CREATE_USER"/>
+        <result property="createDate" column="CREATE_DATE"/>
+        <result property="userid" column="USERID"/>
+        <result property="delFlag" column="DEL_FLAG"/>
+        <result property="planTempPointId" column="PLAN_TEMP_POINT_ID"/>
+        <result property="childPlanId" column="CHILD_PLAN_ID"/>
+        <result property="x" column="X"/>
+        <result property="y" column="Y"/>
+        <result property="runPressure" column="RUN_PRESSURE"/>
+        <result property="diffusePressure" column="DIFFUSE_PRESSURE"/>
+        <result property="workPressure" column="WORK_PRESSURE"/>
+        <result property="note" column="NOTE"/>
+        <result property="companyId" column="COMPANY_ID"/>
+        <association property="createUserName" column="CREATE_USER"
+                     select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName">
+        </association>
+        <association property="file" column="ID" select="getFile"></association>
+    </resultMap>
+
+    <resultMap id="fileMap" type="java.util.Map">
+        <result property="path" column="FILE_PATH"/>
+        <result property="fileName" column="FILE_NAME"/>
+    </resultMap>
+
+    <select id="getFile" resultMap="fileMap">
+        select t.file_path,t.file_name from TF_XJ_FILE t where t.xj_type = 2 and t.record_id =#{id} and del_flag ='1'
+    </select>
+</mapper>

+ 16 - 0
src/main/resources/mapper/XjTypeMapper.xml

@@ -0,0 +1,16 @@
+<?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.tofly.zmrq.mapper.XjTypeMapper">
+
+  <resultMap id="xjTypeMap" type="com.tofly.zmrq.entity.XjType">
+                <id property="id" column="ID"/>
+                                                                  <result property="name" column="NAME"/>
+                      <result property="createUser" column="CREATE_USER"/>
+                      <result property="createDate" column="CREATE_DATE"/>
+                                                                  <association property="createUserName"  column="CREATE_USER" select="com.tofly.common.mapper.ToflyCodeCommonMapper.getUserName" ></association>
+                                                                        </resultMap>
+
+
+                          
+</mapper>