|
@@ -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
|
|
|
}
|