|
@@ -104,10 +104,10 @@ func GetAuditTemplateByTypeId(chanceTypeId int) (v []*AuditTemplate, err error) |
|
@@ -104,10 +104,10 @@ func GetAuditTemplateByTypeId(chanceTypeId int) (v []*AuditTemplate, err error) |
104
|
return
|
104
|
return
|
105
|
}
|
105
|
}
|
106
|
|
106
|
|
107
|
-func GetAuditTemplateByCode(companyId int64, code string) (v *ChanceType, err error) {
|
107
|
+func GetAuditTemplateByCode(companyId int64, code string, chanceTypeId int) (v *ChanceType, err error) {
|
108
|
o := orm.NewOrm()
|
108
|
o := orm.NewOrm()
|
109
|
- sql := "select * from audit_template where binary code=? and company_id=?"
|
|
|
110
|
- if err = o.Raw(sql, code, companyId).QueryRow(&v); err == nil {
|
109
|
+ sql := "select * from audit_template where binary code=? and company_id=? and chance_type_id=?"
|
|
|
110
|
+ if err = o.Raw(sql, code, companyId, chanceTypeId).QueryRow(&v); err == nil {
|
111
|
return
|
111
|
return
|
112
|
}
|
112
|
}
|
113
|
return
|
113
|
return
|