|
|
@@ -221,9 +221,26 @@ func (this *SelectController) GetTList() {
|
|
|
//}
|
|
|
|
|
|
having := ""
|
|
|
+ CerSubName := strings.Split(model.CerSubName, ",")
|
|
|
+ comma := strings.Contains(model.CerSubName, ",")
|
|
|
+
|
|
|
+ if comma {
|
|
|
+ CerSubName = strings.Split(model.CerSubName, ",")
|
|
|
+ } else {
|
|
|
+ CerSubName = strings.Split(model.CerSubName, ",")
|
|
|
+ }
|
|
|
+
|
|
|
//准入范围
|
|
|
if model.CerSubName != "" {
|
|
|
- having = " having CerSubName like '%" + model.CerSubName + "%' "
|
|
|
+ for key, value := range CerSubName {
|
|
|
+ if key == 0 {
|
|
|
+ where += " and (d.Name like '%" + value + "%' "
|
|
|
+ } else {
|
|
|
+ where += "or d.Name like '%" + value + "%' "
|
|
|
+ }
|
|
|
+ }
|
|
|
+ where += ") "
|
|
|
+ //having = " having CerSubName like '%" + model.CerSubName + "%' "
|
|
|
leftjoin = "left join " + OilSupplierCertSubName + " d on d.SupplierCertId = b.Id "
|
|
|
}
|
|
|
//资质
|
|
|
@@ -231,7 +248,8 @@ func (this *SelectController) GetTList() {
|
|
|
having = " having NeedFileType like '%" + model.NeedFileType + "%' "
|
|
|
}
|
|
|
if model.CerSubName != "" && model.NeedFileType != "" {
|
|
|
- having = " having CerSubName like '%" + model.CerSubName + "%' and NeedFileType like '%" + model.NeedFileType + "%' "
|
|
|
+ //having = " having CerSubName like '%" + model.CerSubName + "%' and NeedFileType like '%" + model.NeedFileType + "%' "
|
|
|
+ having = " having NeedFileType like '%" + model.NeedFileType + "%' "
|
|
|
leftjoin = "left join " + OilSupplierCertSubName + " d on d.SupplierCertId = b.Id "
|
|
|
}
|
|
|
svc := selectbusiness.GetSelectService(utils.DBE)
|