feat(crm): 添加合同号字段并优化发货单联查

- 在CrmOrder实体类中新增contractCode字段用于存储合同号
- 在CrmOrderBo业务对象中添加contractCode字段支持
- 在CrmOrderMapper中增加按合同号查询的方法
- 更新CrmOrderMapper.xml映射文件以支持合同号字段映射
- 实现CrmOrderServiceImpl中合同号条件查询功能
- 在CrmOrderVo视图对象中添加合同号字段并支持Excel导出
- 为WmsDeliveryWaybill添加关联订单ID字段建立与CRM订单关联
- 在WMS模块中实现发货单与CRM订单的关联查询功能
- 重构WmsDeliveryWaybillServiceImpl中的查询方法以支持多表关联查询
- 完善WMS发货单查询界面以支持按关联订单筛选功能
This commit is contained in:
2026-02-03 11:26:10 +08:00
parent 733432adc8
commit 7b75548da0
12 changed files with 198 additions and 4 deletions

View File

@@ -9,6 +9,7 @@
<result property="waybillNo" column="waybill_no"/>
<result property="waybillName" column="waybill_name"/>
<result property="planId" column="plan_id"/>
<result property="orderId" column="order_id"/>
<result property="licensePlate" column="license_plate"/>
<result property="consigneeUnit" column="consignee_unit"/>
<result property="senderUnit" column="sender_unit"/>
@@ -26,5 +27,87 @@
<result property="updateBy" column="update_by"/>
</resultMap>
<resultMap type="com.klp.domain.vo.WmsDeliveryWaybillVo" id="WmsDeliveryWaybillVoResult">
<result property="waybillId" column="waybill_id"/>
<result property="waybillNo" column="waybill_no"/>
<result property="waybillName" column="waybill_name"/>
<result property="planId" column="plan_id"/>
<result property="orderId" column="order_id"/>
<result property="orderCode" column="order_code"/>
<result property="contractCode" column="contract_code"/>
<result property="licensePlate" column="license_plate"/>
<result property="consigneeUnit" column="consignee_unit"/>
<result property="senderUnit" column="sender_unit"/>
<result property="deliveryTime" column="delivery_time"/>
<result property="weighbridge" column="weighbridge"/>
<result property="salesPerson" column="sales_person"/>
<result property="principal" column="principal"/>
<result property="principalPhone" column="principal_phone"/>
<result property="status" column="status"/>
<result property="remark" column="remark"/>
<result property="delFlag" column="del_flag"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
</resultMap>
<select id="selectVoPagePlus" resultMap="WmsDeliveryWaybillVoResult">
SELECT
wd.waybill_id AS waybill_id,
wd.waybill_no AS waybill_no,
wd.waybill_name AS waybill_name,
wd.plan_id AS plan_id,
wd.order_id AS order_id,
co.order_code AS order_code,
co.contract_code AS contract_code,
wd.license_plate AS license_plate,
wd.consignee_unit AS consignee_unit,
wd.sender_unit AS sender_unit,
wd.delivery_time AS delivery_time,
wd.weighbridge AS weighbridge,
wd.sales_person AS sales_person,
wd.principal AS principal,
wd.principal_phone AS principal_phone,
wd.status AS status,
wd.remark AS remark,
wd.del_flag AS del_flag,
wd.create_time AS create_time,
wd.create_by AS create_by,
wd.update_time AS update_time,
wd.update_by AS update_by
FROM wms_delivery_waybill wd
LEFT JOIN crm_order co ON wd.order_id = co.order_id
${ew.customSqlSegment}
</select>
<select id="selectVoListPlus" resultMap="WmsDeliveryWaybillVoResult">
SELECT
wd.waybill_id AS waybill_id,
wd.waybill_no AS waybill_no,
wd.waybill_name AS waybill_name,
wd.plan_id AS plan_id,
wd.order_id AS order_id,
co.order_code AS order_code,
co.contract_code AS contract_code,
wd.license_plate AS license_plate,
wd.consignee_unit AS consignee_unit,
wd.sender_unit AS sender_unit,
wd.delivery_time AS delivery_time,
wd.weighbridge AS weighbridge,
wd.sales_person AS sales_person,
wd.principal AS principal,
wd.principal_phone AS principal_phone,
wd.status AS status,
wd.remark AS remark,
wd.del_flag AS del_flag,
wd.create_time AS create_time,
wd.create_by AS create_by,
wd.update_time AS update_time,
wd.update_by AS update_by
FROM wms_delivery_waybill wd
LEFT JOIN crm_order co ON wd.order_id = co.order_id
${ew.customSqlSegment}
</select>
</mapper>