|
|
@@ -132,11 +132,11 @@ func getCompanyContractReportData(ctx context.Context, dataType string, params *
|
|
|
if searchType == "month" {
|
|
|
dateWhere1 = fmt.Sprintf("ctr_contract.contract_start_time LIKE '%v'", date.Format("Y-m")+"-%")
|
|
|
dateWhere2 = fmt.Sprintf("ctr_contract_collection.collection_datetime LIKE '%v'", date.Format("Y-m")+"-%")
|
|
|
- dateWhere3 = fmt.Sprintf("monthly=%v", date.Month())
|
|
|
+ dateWhere3 = fmt.Sprintf("monthly=%v AND created_time LIKE '%v%%'", date.Month(), date.Format("Y"))
|
|
|
} else if searchType == "quarter" {
|
|
|
dateWhere1 = getQuarterWhere(date, "ctr_contract.contract_start_time")
|
|
|
dateWhere2 = getQuarterWhere(date, "ctr_contract_collection.collection_datetime")
|
|
|
- dateWhere3 = getQuarterMonthWhere(date, "monthly")
|
|
|
+ dateWhere3 = getQuarterMonthWhere(date, "monthly") + fmt.Sprintf(" AND created_time LIKE '%v%%'", date.Format("Y"))
|
|
|
}
|
|
|
}
|
|
|
// 统计字段
|