zhangchuanxing hace 1 mes
padre
commit
c5edbd2da8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      models/seal/seal.go

+ 1 - 1
models/seal/seal.go

@@ -66,7 +66,7 @@ func GetSealInfoByContractId(sealId int) (sealInfo *Seal, err error) {
 func GetSealInfoByDateAndCompanyId(startDate, endDate string, companyId int) (sealInfo *Seal, err error) {
 	o := orm.NewOrm()
 
-	sql := `select * from seal where start_date = ? and end_date = ? AND company_id =?  AND  product_id = 2  order by seal_id asc limit 1 `
+	sql := `select * from seal where start_date = ? and end_date = ? AND company_id =?  AND  product_id = 2   AND  company_contract_id  = 0  order by seal_id asc limit 1 `
 	err = o.Raw(sql, startDate, endDate, companyId).QueryRow(&sealInfo)
 	return
 }