|
|
@@ -91,7 +91,7 @@ func (this *SelectController) GetTList() {
|
|
|
asc = false
|
|
|
}
|
|
|
}
|
|
|
- leftjoin := ""
|
|
|
+
|
|
|
//准入证号
|
|
|
if model.AccessCardNo != "" {
|
|
|
where = where + " and b.AccessCardNo like '%" + model.AccessCardNo + "%'"
|
|
|
@@ -235,34 +235,31 @@ func (this *SelectController) GetTList() {
|
|
|
} else {
|
|
|
CerSubName = strings.Split(model.CerSubName, ",")
|
|
|
}
|
|
|
-
|
|
|
+ var Ids supplier.OilCertIds
|
|
|
//准入范围
|
|
|
if model.CerSubName != "" {
|
|
|
+ svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
+ where1 := ""
|
|
|
for key, value := range CerSubName {
|
|
|
if key == 0 {
|
|
|
- where += " and (d.Name like '%" + value + "%' "
|
|
|
+ where1 += " (Name like '%" + value + "%' "
|
|
|
} else {
|
|
|
- where += "or d.Name like '%" + value + "%' "
|
|
|
+ where1 += "or Name like '%" + value + "%' "
|
|
|
}
|
|
|
}
|
|
|
- where += ") "
|
|
|
- //having = " having CerSubName like '%" + model.CerSubName + "%' "
|
|
|
- leftjoin = "left join " + OilSupplierCertSubName + " d on d.SupplierCertId = b.Id "
|
|
|
+ where1 += ") "
|
|
|
+ svc.GetCertIds(&Ids, where1)
|
|
|
}
|
|
|
//资质
|
|
|
if model.NeedFileType != "" {
|
|
|
having = " having NeedFileType like '%" + model.NeedFileType + "%' "
|
|
|
}
|
|
|
- if model.CerSubName != "" && 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)
|
|
|
var list []supplier.OilSupplierSelect
|
|
|
|
|
|
total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, OilInfoChangeName, OilCorporateInfoName, OilSupplierCertSubName,
|
|
|
- OilSupplierFileName, page.CurrentPage, page.Size, orderby, asc, &list, where, having, leftjoin)
|
|
|
+ OilSupplierFileName, page.CurrentPage, page.Size, orderby, asc, &list, where, having, model.CerSubName, Ids.Ids)
|
|
|
|
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = list
|