订单列表和计费列表调整使用客户下拉全查接口

This commit is contained in:
liuminghui
2026-10-29 10:33:41 +08:00
parent 3bb7267b0b
commit d02d3dd881
10 changed files with 119 additions and 2 deletions
@@ -112,6 +112,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by c.customer_id desc
</select>
<resultMap type="BmsCustomerOption" id="BmsCustomerOptionResult">
<result property="customerId" column="customer_id" />
<result property="customerCode" column="customer_code" />
<result property="customerName" column="customer_name" />
</resultMap>
<!-- 客户下拉:不关联账户、套餐,只取名称和编码;对外代码仅参与模糊条件 -->
<select id="selectCustomerOptions" parameterType="BmsCustomer" resultMap="BmsCustomerOptionResult">
select c.customer_id, c.customer_code, c.customer_name
from ctr_customer c
left join sys_user su
on su.del_flag = '0'
and cast(su.user_id as char) = c.sales_user_id
<where>
c.del_flag = '0'
<if test="keywordList != null and keywordList.size() > 0">
and (
<foreach collection="keywordList" item="kw" separator=" or ">
(c.customer_name like concat('%', #{kw}, '%')
or c.customer_code like concat('%', #{kw}, '%')
or c.customer_code_dw like concat('%', #{kw}, '%'))
</foreach>
)
</if>
${params.dataScope}
</where>
order by c.customer_id desc
</select>
<select id="countValidSalesUserId" resultType="int">
select count(1)
from sys_user