|
@@ -1169,8 +1169,8 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
|
|
|
amountCond := `a.id IN ? AND (a.invoice_id <> 0 OR (a.payment_id <> 0 AND a.invoice_id =0))`
|
|
|
amountPars := make([]interface{}, 0)
|
|
|
amountPars = append(amountPars, summaryIds)
|
|
|
- amountCond += ` AND (b.invoice_time BETWEEN ? AND ?)`
|
|
|
- amountPars = append(amountPars, st, ed)
|
|
|
+ amountCond += ` AND (b.invoice_time BETWEEN ? AND ?) OR (d.invoice_time BETWEEN ? AND ?)`
|
|
|
+ amountPars = append(amountPars, st, ed, st, ed)
|
|
|
results, e := fms.GetContractSummaryIncomeAmount(amountCond, amountPars)
|
|
|
if e != nil {
|
|
|
err = fmt.Errorf("获取汇总数据失败, Err: %s", e.Error())
|
|
@@ -1260,7 +1260,7 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
|
|
|
amountCond := `a.id IN ? AND (a.invoice_id <> 0 OR (a.payment_id <> 0 AND a.invoice_id =0))`
|
|
|
amountPars := make([]interface{}, 0)
|
|
|
amountPars = append(amountPars, prevSummaryIds)
|
|
|
- amountCond += ` AND (b.invoice_time BETWEEN ? AND ?)`
|
|
|
+ amountCond += ` AND (b.invoice_time BETWEEN ? AND ?) OR (d.invoice_time BETWEEN ? AND ?)`
|
|
|
amountPars = append(amountPars, prevSt, prevEd)
|
|
|
results, e := fms.GetContractSummaryIncomeAmount(amountCond, amountPars)
|
|
|
if e != nil {
|