瀏覽代碼

no message

zhangchuanxing 1 月之前
父節點
當前提交
c5edbd2da8
共有 1 個文件被更改,包括 1 次插入1 次删除
  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
 }