Browse Source

[fix] 销售管理

修复客户报价列表页面错误的物料名称字段和物料号字段
客户报价实体类新增物料名称和物料号字段
修改客户报价的分页查询接口新增关联客户资料子表并通过物料名称和物料号进行模糊查询
dev
liuxiaoxu 3 months ago
parent
commit
3bdcf240bf
  1. 26
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuote.java
  2. 34
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml
  3. 2
      ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html

26
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuote.java

@ -107,6 +107,13 @@ public class SysCustomerQuote extends BaseEntity
private List<SysCustomerQuoteChild> sysCustomerQuoteChildList;
/** 子表表中的物料编号 */
private String materialCode;
/** 子表表中的物料名称 */
private String materialName;
public String getConfirmTax() {
return confirmTax;
}
@ -377,6 +384,23 @@ public class SysCustomerQuote extends BaseEntity
this.restoreInstanceId = restoreInstanceId;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -418,6 +442,8 @@ public class SysCustomerQuote extends BaseEntity
.append("applyUser", getApplyUser())
.append("applyTime", getApplyTime())
.append("sysCustomerQuoteChildList", getSysCustomerQuoteChildList())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())
.toString();
}
}

34
ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml

@ -44,6 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
<result property="delFlag" column="del_flag" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
</resultMap>
<sql id="selectSysCustomerQuoteVo">
@ -60,16 +63,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
s.degin_flag,s.del_flag,s.create_by,s.create_time,s.update_by,s.update_time,s.remark,
s.audit_status,s.use_status,s.instance_id,s.instance_type,
s.submit_instance_id,s.cancel_instance_id,s.restore_instance_id,s.apply_time,s.apply_user,s.apply_title,
p.dict_value as instance_type_name,
s.submit_instance_id, s.cancel_instance_id, s.restore_instance_id, s.apply_title, s.apply_user, s.apply_time
p.dict_value as instance_type_name
from sys_customer_quote as s
left join(
select dict_value,dict_label from sys_dict_data
left join (
select dict_value, dict_label from sys_dict_data
where dict_type = 'processType'
) as p
on s.instance_type = p.dict_value
left join sys_customer_quotechild as c
on s.supplierCode = c.quoteId
<where>
<if test="businessMembers != null and businessMembers != ''"> and s.business_members = #{businessMembers}</if>
<if test="businessMembers != null and businessMembers != ''"> and s.business_members = #{businessMembers}</if>
<if test="supplierCode!= null and supplierCode != ''"> and s.supplierCode like concat('%', #{supplierCode}, '%')</if>
<if test="customerCode!= null and customerCode != ''"> and s.customerCode like concat('%', #{customerCode}, '%')</if>
<if test="customerName!= null and customerName != ''"> and s.customerName like concat('%', #{customerName}, '%')</if>
@ -84,14 +88,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyUser != null and applyUser != ''"> and s.apply_user = #{applyUser}</if>
<if test="applyTime != null "> and s.apply_time = #{applyTime}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and s.pricingDate between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
and s.pricingDate between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="params.beginCreateTime1 != null and params.beginCreateTime1 != '' and params.endCreateTime1 != null and params.endCreateTime1 != ''">
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="keyword != null and keyword != ''"> and ((s.customerCode like concat('%',#{keyword},'%') or s.customerName like concat('%',#{keyword},'%'))</if>
<if test="keyword != null and keyword != ''"> and ((s.customerCode like concat('%',#{keyword},'%') or s.customerName like concat('%',#{keyword},'%')))</if>
<if test="materialCode != null and materialCode != ''">
and c.materialCode like concat('%',#{materialCode},'%')
</if>
<if test="materialName != null and materialName != ''">
and c.materialName like concat('%',#{materialName},'%')
</if>
</where>
order by s.audit_status asc ,s.create_time desc
group by s.id, s.supplierCode, s.customerCode, s.customerName, s.pricingDate, s.enterprise, s.enterpriseSum, s.common_currency,
s.confirm_tax, s.rmbTax, s.usdTax, s.noRmb, s.noRmbSum, s.rmb, s.rmbSum, s.noUsd, s.noUsdSum, s.usd, s.usdSum, s.business_members,
s.degin_flag, s.del_flag, s.create_by, s.create_time, s.update_by, s.update_time, s.remark,
s.audit_status, s.use_status, s.instance_id, s.instance_type,
s.submit_instance_id, s.cancel_instance_id, s.restore_instance_id, s.apply_time, s.apply_user, s.apply_title,
p.dict_value
order by s.audit_status asc, s.create_time desc
</select>
<select id="selectSysCustomerQuoteById" parameterType="Long" resultMap="SysCustomerQuoteResult">

2
ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html

@ -31,7 +31,7 @@
</li>
<li>
<label>料号:</label>
<input type="text" name="materialNo"/>
<input type="text" name="materialCode"/>
</li>
<li>
<label>物料名称:</label>

Loading…
Cancel
Save