From 1db3bc9e405c959566dd19b549aff743793362bd Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 18 八月 2023 18:06:33 +0800
Subject: [PATCH] 基础数据与生产计划

---
 inventory-server/src/main/resources/mapper/ConsignmentMapper.xml |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/inventory-server/src/main/resources/mapper/ConsignmentMapper.xml b/inventory-server/src/main/resources/mapper/ConsignmentMapper.xml
index ccc21e2..1724dbe 100644
--- a/inventory-server/src/main/resources/mapper/ConsignmentMapper.xml
+++ b/inventory-server/src/main/resources/mapper/ConsignmentMapper.xml
@@ -2,6 +2,32 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.yuanchu.mom.mapper.ConsignmentMapper">
     <select id="selectAll" resultType="com.yuanchu.mom.pojo.Consignment">
-        select * from mom_ocean.consignment where state=1
+        select *
+        from mom_ocean.consignment
+        where state = 1
+    </select>
+    <select id="selectAllCon" resultType="java.util.Map">
+        select id,
+               name,
+               specifications,
+               quality_traceability,
+               customer_code,
+               unit,
+               number,
+               check_name,
+               fit_name,
+               user_name
+        from mom_ocean.consignment
+        where state=1
+        <if test="name!=null and name!=''">
+            and name like concat('%',#{name},'%')
+        </if>
+        <if test="specifications!=null and specifications!=''">
+            and specifications like concat('%',#{specifications},'%')
+        </if>
+        <if test="time!=null and time!=''">
+            and DATE_FORMAT(create_time, '%Y-%m-%d')=#{time}
+        </if>
+        order by id desc
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3