|
@@ -309,7 +309,7 @@ func GetLastContractListByEndDate(companyId, productId int, endDate string) (ite
|
|
|
// 获取权益近一年是否有新签合同
|
|
|
func GetCompanyContractCountRaiByLastYear(companyId int, startDate string) (count int, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := `SELECT COUNT(1) AS total FROM company_contract AS a WHERE product_id = 2 AND contract_type = '新签合同' AND company_id = ? AND start_date >= ? `
|
|
|
+ sql := `SELECT COUNT(1) AS total FROM company_contract AS a WHERE product_id = 2 AND rai_contract_type = '新签合同' AND company_id = ? AND start_date > ? `
|
|
|
err = o.Raw(sql, companyId, startDate).QueryRow(&count)
|
|
|
return
|
|
|
}
|