Browse Source

[fix] 销售管理

修复销售订单列表页面错误的物料名称字段和物料号字段
销售订单实体类新增物料名称和物料号字段
修改销售订单的分页查询接口新增关联销售订单子表并通过物料名称和物料号进行模糊查询
dev
liuxiaoxu 3 months ago
parent
commit
ca87819d71
  1. 25
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java
  2. 7
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml
  3. 20
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml

25
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java

@ -207,6 +207,15 @@ public class SysSalesOrder extends BaseEntity {
private List<SelectAftersalesNoticeVO> selectAftersalesNoticeVOList;
//销售子表物料号
private String materialCode;
//销售子表物料名称
private String materialName;
public Long getSalesOrderId() {
return salesOrderId;
}
@ -744,6 +753,22 @@ public class SysSalesOrder extends BaseEntity {
this.deliveryAddressBillto = deliveryAddressBillto;
}
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 Objects.toStringHelper(this)

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

@ -101,12 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and c.materialName like concat('%',#{materialName},'%')
</if>
</where>
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
group by s.id
order by s.audit_status asc, s.create_time desc
</select>

20
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml

@ -72,6 +72,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applyTitle" column="apply_title" />
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
<result property="materialCode" column="materialCode" />
<result property="materialName" column="materialName" />
</resultMap>
<sql id="selectSysSalesOrderVo">
@ -108,8 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dict_type = 'processType'
) as p
on s.instance_type = p.dict_value
left join sys_sales_order_child as c on s.sales_order_code = c.quoteId
<where>
<if test="createBy != null and createBy !=''"> and s.create_by = #{createBy}</if>
<if test="salesOrderCode != null and salesOrderCode != ''"> and s.sales_order_code like concat('%', #{salesOrderCode}, '%')</if>
<if test="salesOrderNumber != null and salesOrderNumber != ''"> and s.sales_order_number like concat('%', #{salesOrderNumber}, '%')</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and s.enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
@ -124,18 +127,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deliveryStatus != null and deliveryStatus != ''"> and s.delivery_status = #{deliveryStatus}</if>
<if test="closeStatus != null and closeStatus != ''"> and s.close_status = #{closeStatus}</if>
<if test="invoice != null and invoice != ''"> and s.invoice = #{invoice}</if>
<if test="instanceType != null and instanceType != ''"> and s.instance_type = #{instanceType}</if>
<if test="instanceId != null and instanceId != ''"> and s.instance_id = #{instanceId}</if>
<if test="applyUser != null and applyUser != ''"> and s.apply_user = #{applyUser}</if>
<if test="applyTime != null and applyTime != ''"> and s.apply_time = #{applyTime}</if>
<if test="applyTitle != null and applyTitle != ''"> and s.apply_title = #{applyTitle}</if>
<if test="applyUsers != null and applyUsers != ''"> and s.apply_user in
<foreach item="user" index="index" collection="applyUsers" open="(" separator="," close=")">
#{user}
</foreach>
<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,s.create_time desc
group by s.sales_order_id
order by s.audit_status asc,s.create_time desc
</select>
<select id="selectSysSalesOrderById" parameterType="Long" resultMap="SysSalesOrderResult">
<include refid="selectSysSalesOrderVo"/>

Loading…
Cancel
Save