客户管理,供应商管理查询修改
This commit is contained in:
+24
@@ -1,6 +1,8 @@
|
||||
package com.bms.customer.customerinfo.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -123,4 +125,26 @@ public class BmsCustomer extends BaseEntity
|
||||
/** 删除标记(0正常 2删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 列表查询用:关键词多行文本(每行一个),对客户编码/名称/对外代码模糊匹配,行间为 OR;非表字段 */
|
||||
private String keywords;
|
||||
|
||||
/** 供 MyBatis 动态 SQL 使用:按行拆分去空白后的关键词列表 */
|
||||
public List<String> getKeywordList()
|
||||
{
|
||||
if (keywords == null || keywords.trim().isEmpty())
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String line : keywords.split("\\r?\\n"))
|
||||
{
|
||||
String s = line.trim();
|
||||
if (!s.isEmpty())
|
||||
{
|
||||
list.add(s);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+23
@@ -1,6 +1,8 @@
|
||||
package com.bms.customer.supplierinfo.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -144,5 +146,26 @@ public class BmsSupplier extends BaseEntity
|
||||
/** 删除标记(0正常 2删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 列表查询用:关键词多行文本(每行一个),对供应商编码/名称/对外代码模糊匹配,行间为 OR;非表字段 */
|
||||
private String keywords;
|
||||
|
||||
/** 供 MyBatis 动态 SQL 使用:按行拆分去空白后的关键词列表 */
|
||||
public List<String> getKeywordList()
|
||||
{
|
||||
if (keywords == null || keywords.trim().isEmpty())
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String line : keywords.split("\\r?\\n"))
|
||||
{
|
||||
String s = line.trim();
|
||||
if (!s.isEmpty())
|
||||
{
|
||||
list.add(s);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,6 +66,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customerCode != null and customerCode != ''"> and c.customer_code = #{customerCode}</if>
|
||||
<if test="customerName != null and customerName != ''"> and c.customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="customerCodeDw != null and customerCodeDw != ''"> and c.customer_code_dw = #{customerCodeDw}</if>
|
||||
<!-- 关键词多行文本:每行对编码/名称/对外代码模糊匹配,行间为 OR -->
|
||||
<if test="keywordList != null and keywordList.size() > 0">
|
||||
and (
|
||||
<foreach collection="keywordList" item="kw" separator=" or ">
|
||||
(c.customer_code like concat('%', #{kw}, '%')
|
||||
or c.customer_name like concat('%', #{kw}, '%')
|
||||
or c.customer_code_dw like concat('%', #{kw}, '%'))
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="creditCode != null and creditCode != ''"> and c.credit_code = #{creditCode}</if>
|
||||
<if test="customerType != null and customerType != ''"> and c.customer_type = #{customerType}</if>
|
||||
<if test="isEnable != null and isEnable != ''"> and c.is_enable = #{isEnable}</if>
|
||||
|
||||
@@ -60,6 +60,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="supplierCode != null and supplierCode != ''"> and s.supplier_code = #{supplierCode}</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and s.supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="supplierCodeDw != null and supplierCodeDw != ''"> and s.supplier_code_dw = #{supplierCodeDw}</if>
|
||||
<!-- 关键词多行文本:每行对编码/名称/对外代码模糊匹配,行间为 OR -->
|
||||
<if test="keywordList != null and keywordList.size() > 0">
|
||||
and (
|
||||
<foreach collection="keywordList" item="kw" separator=" or ">
|
||||
(s.supplier_code like concat('%', #{kw}, '%')
|
||||
or s.supplier_name like concat('%', #{kw}, '%')
|
||||
or s.supplier_code_dw like concat('%', #{kw}, '%'))
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="creditCode != null and creditCode != ''"> and s.credit_code = #{creditCode}</if>
|
||||
<if test="supplierType != null and supplierType != ''"> and s.supplier_type = #{supplierType}</if>
|
||||
<if test="invoiceType != null and invoiceType != ''"> and s.invoice_type = #{invoiceType}</if>
|
||||
|
||||
Reference in New Issue
Block a user