1.修复供应商采购汇总处的缺陷;

This commit is contained in:
chenlin 2024-07-30 11:11:03 +08:00
parent 7d0a36dff1
commit 8efca2321e

View File

@ -470,7 +470,7 @@ type ErpPurchaseReportBySupplierReq struct {
IsExport uint32 `json:"is_export"` // 1-导出
PageIndex int `json:"pageIndex"` // 页码
PageSize int `json:"pageSize"` // 页面条数
StoreList []uint32 `json:"store_list"` // 门店复选
StoreList []uint32 `json:"store_id"` // 门店复选
}
// ErpPurchaseReportBySupplierResp 供应商采购汇总出参
@ -4892,9 +4892,14 @@ func GetReportBySupplier(req *ErpPurchaseReportBySupplierReq, c *gin.Context) (
}
if len(req.StoreList) > 0 {
if len(req.StoreList) == 1 {
query = query.Where("erp_purchase_order.store_id = ?", req.StoreList[0])
countQuery = countQuery.Where("erp_purchase_order.store_id = ?", req.StoreList[0])
} else {
query = query.Where("erp_purchase_order.store_id IN (?)", req.StoreList)
countQuery = countQuery.Where("erp_purchase_order.store_id IN (?)", req.StoreList)
}
}
//获取总数
var total int64