Browse Source

no message

zhangchuanxing 1 month ago
parent
commit
c5edbd2da8
1 changed files with 1 additions and 1 deletions
  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
 }