fix(wms): 修正退货申请查询中的表别名引用错误
- 将查询条件中的表别名从 a 修改为 rr - 确保所有字段引用都使用正确的表别名 - 修复了 application_no、supplier_code、po_num 等字段的表别名 - 统一了 approval_status、document_type、purchase_group 字段的表别名 - 修正了 approve_time 时间范围查询的表别名引用
This commit is contained in:
parent
74f351b572
commit
6c7d9e1d59
|
|
@ -46,28 +46,28 @@
|
||||||
left join user_supplier us on rr.supplier_code=us.supplier_code
|
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})
|
where (rr.create_user_id=#{request.userId} or rr.purchase_group=#{request.purchaseGroup})
|
||||||
<if test="request.applicationNo !=null and request.applicationNo !=''">
|
<if test="request.applicationNo !=null and request.applicationNo !=''">
|
||||||
and a.application_no =#{request.applicationNo}
|
and rr.application_no =#{request.applicationNo}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.supplierCode !=null and request.supplierCode !=''">
|
<if test="request.supplierCode !=null and request.supplierCode !=''">
|
||||||
and a.supplier_code =#{ request.supplierCode}
|
and rr.supplier_code =#{ request.supplierCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.poNum !=null and request.poNum !=''">
|
<if test="request.poNum !=null and request.poNum !=''">
|
||||||
and a.po_num =#{ request.poNum}
|
and rr.po_num =#{ request.poNum}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.approvalStatus !=null and request.approvalStatus !=''">
|
<if test="request.approvalStatus !=null and request.approvalStatus !=''">
|
||||||
and a.approval_status =#{ request.approvalStatus}
|
and rr.approval_status =#{ request.approvalStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.documentType !=null and request.documentType !=''">
|
<if test="request.documentType !=null and request.documentType !=''">
|
||||||
and a.document_type =#{ request.documentType}
|
and rr.document_type =#{ request.documentType}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.purchaseGroup !=null and request.purchaseGroup !=''">
|
<if test="request.purchaseGroup !=null and request.purchaseGroup !=''">
|
||||||
and a.purchase_group =#{ request.purchaseGroup}
|
and rr.purchase_group =#{ request.purchaseGroup}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.startDate !=null">
|
<if test="request.startDate !=null">
|
||||||
and a.approve_time>= #{request.startDate}
|
and rr.approve_time>= #{request.startDate}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.endDate !=null">
|
<if test="request.endDate !=null">
|
||||||
and a.approve_time <= #{request.endDate}
|
and rr.approve_time <= #{request.endDate}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue