From 0c8b8c908925d26fd3f176efa112edbf569c1283 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期五, 07 七月 2023 19:17:40 +0800
Subject: [PATCH] 称重调整
---
igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 53 insertions(+), 4 deletions(-)
diff --git a/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml b/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml
index f1d0bbd..67047c7 100644
--- a/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml
+++ b/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml
@@ -103,7 +103,7 @@
UPDATE_TIME_ AS updateTime
FROM D_ENERGY
<where>
- <if test="param.companyId != null">AND COMPANY_ID_ = #{param.companyId}</if>
+ <if test="param.companyId != null and param.companyId != ''">AND COMPANY_ID_ = #{param.companyId}</if>
<if test="param.startTime != null and param.endTime != null">AND UPDATE_TIME_ between #{param.startTime}
and
#{param.endTime}
@@ -121,7 +121,7 @@
UPDATE_TIME_ AS updateTime
FROM D_ENERGY
<where>
- <if test="param.companyId != null">AND COMPANY_ID_ = #{param.companyId}</if>
+ <if test="param.companyId != null and param.companyId != ''">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}
@@ -138,17 +138,38 @@
USER_NAME_ AS userName,
LONGITUDE_ As longitude,
LATITUDE_ AS latitude,
- IMG_NAME_ AS base64Img,
+ IMG_NAME_ AS imgName,
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.id != null and param.id != ''">AND ID_ = #{param.id}</if>
+ <if test="param.companyId != null and param.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>
+
+ <insert id="addPatrolRecord">
+ INSERT INTO D_SEC_PATROL_RECORD
+ (ID_,
+ COMPANY_ID_,
+ DEPT_ID_,
+ USER_NAME_,
+ CREATE_TIME_,
+ LONGITUDE_,
+ LATITUDE_,
+ IMG_NAME_)
+ VALUES (#{param.id},
+ #{param.companyId},
+ #{param.deptId},
+ #{param.userName},
+ #{param.createTime},
+ #{param.longitude},
+ #{param.latitude},
+ #{param.imgName})
+ </insert>
<!-- 鐩戞帶璁惧鍒楄〃-->
<select id="getCamera" resultType="com.ld.igds.phone35.dto.DtoVideo">
@@ -160,4 +181,32 @@
WHERE COMPANY_ID_ = #{param.companyId}
AND DEPT_ID_ = #{param.deptId}
</select>
+ <select id="getOrderList" resultType="com.ld.igds.phone35.dto.DtoOrder">
+ SELECT
+ ID_ as id,
+ COMPANY_ID_ as companyId,
+ DEPT_ID_ as deptId,
+ TYPE_ as type,
+ DEPOT_ID_ as depotId,
+ APPLY_USER_ as applyUser,
+ APPLY_USER_NAME_ as applyUserName,
+ APPLY_TIME_ as applyTime,
+ AUDIT_USER_ as auditUser,
+ AUDIT_USER_NAME_ as auditUserName,
+ CONDUCT_USER_ as conductUser,
+ AUDIT_TIME_ as auditTime,
+ STATUS_ as status,
+ RECORD_ as record,
+ START_ as startTime,
+ END_ as endTime
+ FROM
+ D_APPLY_ORDER
+ <where>
+ <if test="param.companyId != null and param.companyId != ''">and COMPANY_ID_ = #{param.companyId}</if>
+ <if test="param.deptId != null and param.deptId != ''">and DEPT_ID_ = #{param.deptId}</if>
+ <if test="param.userName != null and param.userName != ''">and APPLY_USER_ = #{param.userName}</if>
+ <if test="param.status != null and param.status != ''">and STATUS_ = #{param.status}</if>
+ </where>
+ order by APPLY_TIME_ DESC
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3