From 0a4c32ca70dd7543596ac7234b06db343917f65e Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期一, 19 六月 2023 14:53:58 +0800
Subject: [PATCH] 新建接口
---
igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 115 insertions(+), 0 deletions(-)
diff --git a/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml b/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml
index a580638..f1d0bbd 100644
--- a/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml
+++ b/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml
@@ -44,5 +44,120 @@
<if test="deptId != null and deptId != ''">AND d.DEPT_ID_ = #{deptId}</if>
ORDER BY d.ID_
</select>
+ <!--瀹炴椂閰嶇數-->
+ <select id="getRealEnergyByDept" resultType="com.ld.igds.phone35.dto.Dto5501" parameterType="java.lang.String">
+ SELECT d.ID_ as depotId,
+ d.NAME_ as depotName,
+ d.DEPOT_TYPE_ as depotType,
+ e.UA_ as ua,
+ e.UB_ as ub,
+ e.UC_ as uc,
+ e.IA_ as ia,
+ e.IB_ as ib,
+ e.IC_ as ic,
+ e.UPDATE_TIME_ as updateTime
+ FROM d_depot d
+ LEFT JOIN d_energy e
+ ON d.ID_ = e.DEPOT_ID_
+ WHERE d.COMPANY_ID_ = #{companyId}
+ <if test="deptId != null and deptId != ''">AND d.DEPT_ID_ = #{deptId}</if>
+ ORDER BY d.ID_
+ </select>
+ <!--璀﹀憡璁板綍-->
+ <select id="getWarnByDept" resultType="com.ld.igds.phone35.dto.DtoWarn"
+ parameterType="com.ld.igds.phone35.param.Phone35DepotCommonParam">
+ SELECT w.ID_ as id,
+ w.NAME_ as name,
+ w.TYPE_ as type,
+ w.BIZ_TYPE_ as bizType,
+ w.LEVEL_ as level,
+ w.STATUS_ as status,
+ w.TIME_ as `time`,
+ w.INFO_ as info,
+ w.DEPOT_ID_ as depotId,
+ w.REMARK_ as remark
+ FROM D_M_WARN_INFO w
+ WHERE w.COMPANY_ID_ = #{param.companyId}
+ <if test="param.deptId != null and param.deptId != ''">AND w.DEPT_ID_ = #{param.deptId}</if>
+ <if test="param.startTime != null and param.endTime != null">AND w.TIME_ between #{param.startTime} and
+ #{param.endTime}
+ </if>
+ </select>
+ <!--璀﹀憡澶勭悊-->
+ <update id="updateWarn">
+ UPDATE D_M_WARN_INFO
+ <set>
+ <if test="param.status != null and param.status != ''">STATUS_ = #{param.status},</if>
+ <if test="param.remark != null and param.remark != ''">REMARK_ = #{param.remark},</if>
+ <if test="param.completeUser != null and param.completeUser != ''">COMPLETE_USER_ = #{param.completeUser},
+ </if>
+ </set>
+ WHERE ID_ = #{param.id}
+ </update>
+ <!--杩滅▼鎶勮〃-->
+ <select id="getMeter" resultType="com.ld.igds.phone35.dto.DtoEnergy">
+ SELECT EP_INC_ AS epSum,
+ EQ_INC_ AS eqSum,
+ ES_INC_ AS esSum,
+ DEPOT_ID_ AS depotId,
+ UPDATE_TIME_ AS updateTime
+ FROM D_ENERGY
+ <where>
+ <if test="param.companyId != null">AND COMPANY_ID_ = #{param.companyId}</if>
+ <if test="param.startTime != null and param.endTime != null">AND UPDATE_TIME_ between #{param.startTime}
+ and
+ #{param.endTime}
+ </if>
+ </where>
+ ORDER BY UPDATE_TIME_ desc
+ </select>
+ <!-- 浠撳簱鑳借�楁煡璇�-->
+ <select id="getEnergy" resultType="com.ld.igds.phone35.dto.DtoEnergy">
+ SELECT EP_INC_ AS epSum,
+ EQ_INC_ AS eqSum,
+ ES_INC_ AS esSum,
+ ES_ AS es,
+ DEPOT_ID_ AS depotId,
+ UPDATE_TIME_ AS updateTime
+ FROM D_ENERGY
+ <where>
+ <if test="param.companyId != null">AND COMPANY_ID_ = #{param.companyId}</if>
+ <if test="param.depotId != null and param.depotId != ''">AND DEPOT_ID_ = #{param.depotId}</if>
+ <if test="param.startTime != null">AND
+ UPDATE_TIME_ <![CDATA[ > ]]>#{param.startTime,jdbcType=TIMESTAMP}
+ </if>
+ <if test="param.endTime != null">AND
+ UPDATE_TIME_ <![CDATA[ < ]]>#{param.endTime,jdbcType=TIMESTAMP}
+ </if>
+ </where>
+ ORDER BY UPDATE_TIME_ desc
+ </select>
+ <!-- 鐢靛瓙宸℃洿璁板綍-->
+ <select id="getPatrol" resultType="com.ld.igds.phone35.dto.DtoPatrol">
+ SELECT ID_ AS id,
+ USER_NAME_ AS userName,
+ LONGITUDE_ As longitude,
+ LATITUDE_ AS latitude,
+ IMG_NAME_ AS base64Img,
+ CREATE_TIME_ AS createTime
+ FROM D_SEC_PATROL_RECORD
+ <where>
+ <if test="param.companyId != null and companyId != ''">AND COMPANY_ID_ = #{param.companyId}</if>
+ <if test="param.deptId != null and param.deptId != ''">AND DEPT_ID_ = #{param.deptId}</if>
+ <if test="param.startTime != null and param.endTime != null">AND CREATE_TIME_ between #{param.startTime}
+ and #{param.endTime}
+ </if>
+ </where>
+ </select>
+ <!-- 鐩戞帶璁惧鍒楄〃-->
+ <select id="getCamera" resultType="com.ld.igds.phone35.dto.DtoVideo">
+ SELECT ID_ AS id,
+ TYPE_ AS type,
+ PLAY_TYPE_ AS playType,
+ NAME_ AS name
+ FROM D_SEC_CAMERA
+ WHERE COMPANY_ID_ = #{param.companyId}
+ AND DEPT_ID_ = #{param.deptId}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3