fix(wms): 修正退货申请查询中的表别名引用错误

- 将查询条件中的表别名从 a 修改为 rr
- 确保所有字段引用都使用正确的表别名
- 修复了 application_no、supplier_code、po_num 等字段的表别名
- 统一了 approval_status、document_type、purchase_group 字段的表别名
- 修正了 approve_time 时间范围查询的表别名引用
This commit is contained in:
曹鹏飞 2026-03-30 13:35:20 +08:00
parent 74f351b572
commit 6c7d9e1d59
1 changed files with 8 additions and 8 deletions

View File

@ -46,28 +46,28 @@
left join user_supplier us on rr.supplier_code=us.supplier_code
where (rr.create_user_id=#{request.userId} or rr.purchase_group=#{request.purchaseGroup})
<if test="request.applicationNo !=null and request.applicationNo !=''">
and a.application_no =#{request.applicationNo}
and rr.application_no =#{request.applicationNo}
</if>
<if test="request.supplierCode !=null and request.supplierCode !=''">
and a.supplier_code =#{ request.supplierCode}
and rr.supplier_code =#{ request.supplierCode}
</if>
<if test="request.poNum !=null and request.poNum !=''">
and a.po_num =#{ request.poNum}
and rr.po_num =#{ request.poNum}
</if>
<if test="request.approvalStatus !=null and request.approvalStatus !=''">
and a.approval_status =#{ request.approvalStatus}
and rr.approval_status =#{ request.approvalStatus}
</if>
<if test="request.documentType !=null and request.documentType !=''">
and a.document_type =#{ request.documentType}
and rr.document_type =#{ request.documentType}
</if>
<if test="request.purchaseGroup !=null and request.purchaseGroup !=''">
and a.purchase_group =#{ request.purchaseGroup}
and rr.purchase_group =#{ request.purchaseGroup}
</if>
<if test="request.startDate !=null">
and a.approve_time>= #{request.startDate}
and rr.approve_time>= #{request.startDate}
</if>
<if test="request.endDate !=null">
and a.approve_time &lt;= #{request.endDate}
and rr.approve_time &lt;= #{request.endDate}
</if>
</select>