|
@@ -1198,7 +1198,7 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
|
|
|
amountPars = append(amountPars, summaryIds)
|
|
|
if req.SellerIds != "" {
|
|
|
sellerIds := strings.Split(req.SellerIds, ",")
|
|
|
- amountCond += ` AND (( a.invoice_id <> 0 AND c.invoice_time BETWEEN ? AND ?)`
|
|
|
+ amountCond += ` AND (( a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
|
|
|
amountCond += `OR ( a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) AND seller_id = ? `
|
|
|
amountPars = append(amountPars, st, ed, st, ed, sellerIds)
|
|
|
} else {
|
|
@@ -1288,7 +1288,7 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
|
|
|
//校验日期,分段查询
|
|
|
if prevStartDateTime.After(historyTime) || prevStartDateTime.Equal(historyTime) {
|
|
|
//全部走新查询
|
|
|
- prevCond += ` AND ((c.invoice_time BETWEEN ? AND ?) or (d.invoice_time BETWEEN ? AND ?))`
|
|
|
+ prevCond += ` AND ((b.invoice_time BETWEEN ? AND ?) or (d.invoice_time BETWEEN ? AND ?))`
|
|
|
prevPars = append(prevPars, prevSt, prevEd, prevSt, prevEd)
|
|
|
prevSummaryIds, e := fms.GetInvoicePaymentCensusSummaryDataIds(prevCond, prevPars)
|
|
|
if e != nil {
|