✨ 毛利分析筛选支持编码名称搜索
This commit is contained in:
@@ -37,6 +37,8 @@ public class PrcProfitReportQuery extends BaseEntity
|
||||
/** 客户名称拆分后的多值查询条件。 */
|
||||
private List<String> customerNames;
|
||||
private String belongSalerCode;
|
||||
/** 产品代码或产品名称的统一模糊查询关键字。 */
|
||||
private String productKeyword;
|
||||
private String productCode;
|
||||
private String productName;
|
||||
private String countryCode;
|
||||
|
||||
+4
@@ -171,6 +171,10 @@ public class PrcProfitReportServiceImpl implements IPrcProfitReportService
|
||||
}
|
||||
query.setCustomerArea(query.getCustomerArea().trim());
|
||||
query.setProfitRule(rule.name());
|
||||
if (query.getBelongSalerCode() != null)
|
||||
{
|
||||
query.setBelongSalerCode(query.getBelongSalerCode().trim());
|
||||
}
|
||||
query.setOrderNos(splitFilterValues(query.getOrderNo(), "订单号"));
|
||||
query.setCustomerCodes(splitFilterValues(query.getCustomerCode(), "客户代码"));
|
||||
query.setCustomerNames(splitFilterValues(query.getCustomerName(), "客户名称"));
|
||||
|
||||
@@ -197,12 +197,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and p.country_code <=> #{countryCode}
|
||||
and i.currency <=> #{currency}
|
||||
<if test="belongSalerCode != null and belongSalerCode != ''">
|
||||
and i.belong_saler_code = #{belongSalerCode}
|
||||
and (i.belong_saler_code = #{belongSalerCode}
|
||||
or p.belong_saler_code = #{belongSalerCode}
|
||||
or i.belong_saler like concat('%', #{belongSalerCode}, '%')
|
||||
or p.belong_saler like concat('%', #{belongSalerCode}, '%'))
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="belongSalerCode != null and belongSalerCode != ''">
|
||||
and i.belong_saler_code = #{belongSalerCode}
|
||||
and (i.belong_saler_code = #{belongSalerCode}
|
||||
or p.belong_saler_code = #{belongSalerCode}
|
||||
or i.belong_saler like concat('%', #{belongSalerCode}, '%')
|
||||
or p.belong_saler like concat('%', #{belongSalerCode}, '%'))
|
||||
</if>
|
||||
<if test="productCode != null and productCode != ''">
|
||||
and p.product_code = #{productCode}
|
||||
@@ -215,6 +221,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="productKeyword != null and productKeyword != ''">
|
||||
and (p.product_code like concat('%', #{productKeyword}, '%')
|
||||
or p.product_name like concat('%', #{productKeyword}, '%'))
|
||||
</if>
|
||||
<if test="productName != null and productName != ''">
|
||||
and p.product_name like concat('%', #{productName}, '%')
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user