From b9b712a7701eb83c7dbd8367c534d4c880503adb Mon Sep 17 00:00:00 2001
From: zmk <496160012@qq.com>
Date: 星期六, 18 五月 2024 16:51:19 +0800
Subject: [PATCH] 提交代码
---
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml
index 4313582..15e6ad0 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml
@@ -10,9 +10,11 @@
<result property="projectId" column="project_id" />
<result property="projectName" column="project_name" />
<result property="deviceId" column="device_id" />
+ <result property="deviceCode" column="device_code" />
<result property="deviceName" column="device_name" />
<result property="type" column="type" />
- <result property="transactionDate" column="transaction_date" />
+ <result property="outboundDate" column="outbound_date" />
+ <result property="inboundDate" column="inbound_date" />
<result property="optUser" column="opt_user" />
<result property="applyUser" column="apply_user" />
<result property="number" column="number" />
@@ -21,39 +23,46 @@
</resultMap>
<sql id="selectDeviceLogVo">
- select id, code, project_id, project_name, device_id, device_name, type, transaction_date, opt_user, apply_user, number, create_date, remark from js_device_log
+ select id, code, project_id, project_name, device_id, device_code, device_name, type, outbound_date, inbound_date, opt_user, apply_user, number, create_date, remark from js_device_log
</sql>
<select id="selectDeviceLogList" parameterType="DeviceLog" resultMap="DeviceLogResult">
<include refid="selectDeviceLogVo"/>
<where>
- <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
- <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
<if test="code != null and code != ''"> and code = #{code}</if>
+ <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
+ <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
+ <if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="optUser != null and optUser != ''"> and opt_user = #{optUser}</if>
<if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if>
</where>
+ ORDER BY create_date
</select>
<select id="selectDeviceLogById" parameterType="String" resultMap="DeviceLogResult">
<include refid="selectDeviceLogVo"/>
where id = #{id}
</select>
-
+
+ <select id="selectMaxDeviceLogId" resultType="java.lang.Integer">
+ SELECT MAX(id) FROM js_device_log where project_id = #{projectId}
+ </select>
+
<insert id="insertDeviceLog" parameterType="DeviceLog">
insert into js_device_log
<trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null and id != ''">id,</if>
<if test="code != null and code != ''">code,</if>
<if test="projectId != null and projectId != ''">project_id,</if>
<if test="projectName != null and projectName != ''">project_name,</if>
<if test="deviceId != null and deviceId != ''">device_id,</if>
+ <if test="deviceCode != null and deviceCode != ''">device_code,</if>
<if test="deviceName != null and deviceName != ''">device_name,</if>
<if test="type != null and type != ''">type,</if>
- <if test="transactionDate != null and transactionDate != ''">transaction_date,</if>
+ <if test="outboundDate != null and outboundDate != ''">outbound_date,</if>
+ <if test="inboundDate != null and inboundDate != ''">inbound_date,</if>
<if test="optUser != null and optUser != ''">opt_user,</if>
<if test="applyUser != null and applyUser != ''">apply_user,</if>
<if test="number != null and number != ''">number,</if>
@@ -61,14 +70,15 @@
<if test="remark != null and remark != ''">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null and id != ''">#{id},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="projectId != null and projectId != ''">#{projectId},</if>
<if test="projectName != null and projectName != ''">#{projectName},</if>
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
+ <if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
<if test="type != null and type != ''">#{type},</if>
- <if test="transactionDate != null and transactionDate != ''">#{transactionDate},</if>
+ <if test="outboundDate != null and outboundDate != ''">#{outboundDate},</if>
+ <if test="inboundDate != null and inboundDate != ''">#{inboundDate},</if>
<if test="optUser != null and optUser != ''">#{optUser},</if>
<if test="applyUser != null and applyUser != ''">#{applyUser},</if>
<if test="number != null and number != ''">#{number},</if>
@@ -84,9 +94,11 @@
<if test="projectId != null and projectId != ''">project_id = #{projectId},</if>
<if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
+ <if test="deviceCode != null and deviceCode != ''">device_code = #{deviceCode},</if>
<if test="deviceName != null and deviceName != ''">device_name = #{deviceName},</if>
<if test="type != null and type != ''">type = #{type},</if>
- <if test="transactionDate != null and transactionDate != ''">transaction_date = #{transactionDate},</if>
+ <if test="outboundDate != null and outboundDate != ''">outbound_date = #{outboundDate},</if>
+ <if test="inboundDate != null and inboundDate != ''">inbound_date = #{inboundDate},</if>
<if test="optUser != null and optUser != ''">opt_user = #{optUser},</if>
<if test="applyUser != null and applyUser != ''">apply_user = #{applyUser},</if>
<if test="number != null and number != ''">number = #{number},</if>
--
Gitblit v1.9.1