From e2aa651db9f17d58819329de571037edc0f9eba2 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期一, 23 六月 2025 18:13:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/resources/mapper/device/DeviceLedgerMapper.xml |   69 ++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/device/DeviceLedgerMapper.xml b/src/main/resources/mapper/device/DeviceLedgerMapper.xml
new file mode 100644
index 0000000..588e518
--- /dev/null
+++ b/src/main/resources/mapper/device/DeviceLedgerMapper.xml
@@ -0,0 +1,69 @@
+<?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.ruoyi.device.mapper.DeviceLedgerMapper">
+
+    <select id="queryPage" resultType="com.ruoyi.device.dto.DeviceLedgerDto">
+        SELECT
+        dl.id,
+        dl.device_name,
+        dl.device_model,
+        dl.supplier_name,
+        dl.unit,
+        dl.number,
+        dl.tax_including_price_unit,
+        dl.tax_including_price_total,
+        dl.tax_rate,
+        dl.un_tax_including_price_total,
+        dl.create_time,
+        dl.update_time ,
+        su.user_name AS createUser,
+        dl.update_user,
+        dl.tenant_id
+        FROM device_ledger dl
+        left join  sys_user  su on dl.create_user = su.user_id
+        <where>
+            <!-- 璁惧鍚嶇О -->
+            <if test="deviceLedger.deviceName != null and deviceLedger.deviceName != ''">
+                AND device_name LIKE CONCAT('%', #{deviceLedger.deviceName}, '%')
+            </if>
+
+            <!-- 瑙勬牸鍨嬪彿 -->
+            <if test="deviceLedger.deviceModel != null and deviceLedger.deviceModel != ''">
+                AND device_model LIKE CONCAT('%', #{deviceLedger.deviceModel}, '%')
+            </if>
+
+            <!-- 渚涘簲鍟嗗悕绉� -->
+            <if test="deviceLedger.supplierName != null and deviceLedger.supplierName != ''">
+                AND supplier_name LIKE CONCAT('%', #{deviceLedger.supplierName}, '%')
+            </if>
+
+            <!-- 鍗曚綅 -->
+            <if test="deviceLedger.unit != null and deviceLedger.unit != ''">
+                AND unit = #{deviceLedger.unit}
+            </if>
+
+            <!-- 褰曞叆浜� -->
+            <if test="deviceLedger.createUser != null and deviceLedger.createUser != ''">
+                AND create_user LIKE CONCAT('%', #{deviceLedger.createUser}, '%')
+            </if>
+
+            <!-- 鏇存柊浜� -->
+            <if test="deviceLedger.updateUser != null and deviceLedger.updateUser != ''">
+                AND update_user LIKE CONCAT('%', #{deviceLedger.updateUser}, '%')
+            </if>
+
+            <!-- 绉熸埛ID -->
+            <if test="deviceLedger.tenantId != null">
+                AND tenant_id = #{deviceLedger.tenantId}
+            </if>
+        </where>
+        ORDER BY create_time DESC
+    </select>
+    <select id="deviceLedgerExportList" resultType="com.ruoyi.device.execl.DeviceLedgerExeclDto">
+
+    </select>
+
+</mapper>

--
Gitblit v1.9.3