Browse Source

Merge branch 'fms_2.8'

ziwen 1 year ago
parent
commit
7afa7fa296
1 changed files with 4 additions and 4 deletions
  1. 4 4
      controller/census/invoice_payment.go

+ 4 - 4
controller/census/invoice_payment.go

@@ -1203,8 +1203,8 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
 					amountPars = append(amountPars, summaryIds)
 					if req.SellerIds != "" {
 						sellerIds := strings.Split(req.SellerIds, ",")
-						amountCond += ` AND (( b.seller_id = ? AND a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
-						amountCond += `OR ( d.seller_id = ? AND  a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) `
+						amountCond += ` AND (( b.seller_id IN ? AND a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
+						amountCond += `OR ( d.seller_id IN ? AND  a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) `
 						amountPars = append(amountPars, sellerIds,st, ed, sellerIds,st, ed)
 					} else {
 						amountCond += ` AND ((a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
@@ -1309,8 +1309,8 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
 					amountPars = append(amountPars, prevSummaryIds)
 					if req.SellerIds != "" {
 						sellerIds := strings.Split(req.SellerIds, ",")
-						amountCond += ` AND (( b.seller_id = ? AND a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
-						amountCond += `OR ( d.seller_id = ? AND  a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) `
+						amountCond += ` AND (( b.seller_id IN ? AND a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
+						amountCond += `OR ( d.seller_id IN ? AND  a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) `
 						amountPars = append(amountPars, sellerIds,prevSt, prevEd, sellerIds,prevSt, prevEd)
 					} else {
 						amountCond += ` AND ((a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`