From 00a6c486eb0f4aec35af265ff9851bff41f18bd2 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 18 三月 2024 16:43:26 +0800
Subject: [PATCH] 修改报工前端判断流程卡位数
---
north-glass-erp/src/main/resources/mapper/sd/Customer.xml | 94 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 94 insertions(+), 0 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/sd/Customer.xml b/north-glass-erp/src/main/resources/mapper/sd/Customer.xml
new file mode 100644
index 0000000..9092f50
--- /dev/null
+++ b/north-glass-erp/src/main/resources/mapper/sd/Customer.xml
@@ -0,0 +1,94 @@
+<!DOCTYPE mapper
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.erp.mapper.sd.CustomerMapper">
+
+ <select id="getCustomerList">
+ select
+ *
+ from
+ sd.customer
+ </select>
+ <select id="getSelectCustomer">
+ select
+ *
+ from
+ sd.customer c
+ <where>
+ <if test="customer.id != null and customer.id != ''">
+ and c.id regexp #{customer.id}
+ </if>
+ <if test="customer.customerName != null and customer.customerName != ''">
+ and c.customer_name regexp #{customer.customerName}
+ </if>
+ <if test="customer.grade != null and customer.grade != ''">
+ and c.grade regexp #{customer.grade}
+ </if>
+ <if test="customer.moneyLimit != null and customer.moneyLimit != ''">
+ and c.money_limit regexp REGEXP_REPLACE(#{customer.moneyLimit},'\\.0+$','')
+ </if>
+ <if test="customer.address != null and customer.address != ''">
+ and c.address regexp #{customer.address}
+ </if>
+ <if test="customer.contact != null and customer.contact != ''">
+ and c.contact regexp #{customer.contact}
+ </if>
+ <if test="customer.phone != null and customer.phone != ''">
+ and c.phone regexp #{customer.phone}
+ </if>
+
+ </where>
+ limit #{offset},#{pageSize};
+ </select>
+
+ <select id="getSelectCustomerPageTotal">
+ select
+ CEILING(count(id)/#{pageSize}) as 'pageTotal',
+ count(id) as 'total'
+ from
+ sd.customer c
+ <where>
+ <if test="customer.id != null and customer.id != ''">
+ and c.id regexp #{customer.id}
+ </if>
+ <if test="customer.customerName != null and customer.customerName != ''">
+ and c.customer_name regexp #{customer.customerName}
+ </if>
+ <if test="customer.grade != null and customer.grade != ''">
+ and c.grade regexp #{customer.grade}
+ </if>
+ <if test="customer.moneyLimit != null and customer.moneyLimit != ''">
+ and c.money_limit regexp REGEXP_REPLACE(#{customer.moneyLimit},'\\.0+$','')
+ </if>
+ <if test="customer.address != null and customer.address != ''">
+ and c.address regexp #{customer.address}
+ </if>
+ <if test="customer.contact != null and customer.contact != ''">
+ and c.contact regexp #{customer.contact}
+ </if>
+ <if test="customer.phone != null and customer.phone != ''">
+ and c.phone regexp #{customer.phone}
+ </if>
+
+ </where>
+ limit #{offset},#{pageSize};
+ </select>
+
+ <insert id="insertCustomer" useGeneratedKeys="true" >
+ insert into sd.customer(customer_name,grade,money_limit,address,contact,phone)
+ values (
+ #{customer.customerName},#{customer.grade},#{customer.moneyLimit},
+ #{customer.address},#{customer.contact},#{customer.phone}
+ )
+ </insert>
+
+ <update id="updateCustomer" useGeneratedKeys="true" >
+ update sd.customer set customer_name=#{customer.customerName},grade=#{customer.grade},
+ money_limit=#{customer.moneyLimit},address= #{customer.address},
+ contact=#{customer.contact},phone=#{customer.phone} where id=#{customer.id}
+ </update>
+
+ <delete id="deleteCustomer" >
+ delete from sd.customer where id=#{customer.id}
+ </delete>
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0