|
@@ -1,12 +1,16 @@
|
|
|
package oilsupplier
|
|
package oilsupplier
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
|
+ "encoding/json"
|
|
|
|
|
+ "fmt"
|
|
|
|
|
+ "strconv"
|
|
|
|
|
+ "time"
|
|
|
|
|
+
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
|
|
"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/infochange"
|
|
"dashoo.cn/backend/api/business/oilsupplier/infochange"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/qualchange"
|
|
"dashoo.cn/backend/api/business/oilsupplier/qualchange"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
|
|
|
- "encoding/json"
|
|
|
|
|
- "fmt"
|
|
|
|
|
|
|
+
|
|
|
// "fmt"
|
|
// "fmt"
|
|
|
|
|
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/selectbusiness"
|
|
"dashoo.cn/backend/api/business/oilsupplier/selectbusiness"
|
|
@@ -47,8 +51,8 @@ type NeedFileTypeStruct struct {
|
|
|
func (this *SelectController) GetTList() {
|
|
func (this *SelectController) GetTList() {
|
|
|
|
|
|
|
|
var model supplier.OilSupplierView
|
|
var model supplier.OilSupplierView
|
|
|
- var model1 RegCapitalRange
|
|
|
|
|
- var model2 NeedFileTypeStruct
|
|
|
|
|
|
|
+ var model1 RegCapitalRange //注册资金范围
|
|
|
|
|
+ var model2 NeedFileTypeStruct //资质结构体
|
|
|
|
|
|
|
|
var jsonBlob = this.Ctx.Input.RequestBody
|
|
var jsonBlob = this.Ctx.Input.RequestBody
|
|
|
json.Unmarshal(jsonBlob, &model)
|
|
json.Unmarshal(jsonBlob, &model)
|
|
@@ -58,104 +62,110 @@ func (this *SelectController) GetTList() {
|
|
|
// //获取分页信息
|
|
// //获取分页信息
|
|
|
page := this.GetPageInfoForm()
|
|
page := this.GetPageInfoForm()
|
|
|
where := " 1=1"
|
|
where := " 1=1"
|
|
|
- orderby := "a.Id"
|
|
|
|
|
|
|
+ orderby := "ab.Id"
|
|
|
asc := false
|
|
asc := false
|
|
|
Order := this.GetString("Order")
|
|
Order := this.GetString("Order")
|
|
|
Prop := this.GetString("Prop")
|
|
Prop := this.GetString("Prop")
|
|
|
fmt.Println(Prop)
|
|
fmt.Println(Prop)
|
|
|
if Order != "" && Prop != "" {
|
|
if Order != "" && Prop != "" {
|
|
|
- orderby = Prop
|
|
|
|
|
|
|
+ orderby = "ab." + Prop
|
|
|
if Order == "asc" {
|
|
if Order == "asc" {
|
|
|
asc = true
|
|
asc = true
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //准入证号
|
|
|
if model.AccessCardNo != "" {
|
|
if model.AccessCardNo != "" {
|
|
|
- where = where + " and b.AccessCardNo like '%" + model.AccessCardNo + "%'"
|
|
|
|
|
|
|
+ where = where + " and ab.AccessCardNo like '%" + model.AccessCardNo + "%'"
|
|
|
}
|
|
}
|
|
|
|
|
+ //企业名称
|
|
|
if model.SupplierName != "" {
|
|
if model.SupplierName != "" {
|
|
|
- where = where + " and a.SupplierName like '%" + model.SupplierName + "%'"
|
|
|
|
|
|
|
+ where = where + " and ab.SupplierName like '%" + model.SupplierName + "%'"
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if model.OldSupplierName != "" {
|
|
|
|
|
+ where = where + " and ab.OldSupplierName like '%" + model.OldSupplierName + "%'"
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ //准入类别(基建,物资,技术服务)
|
|
|
if model.SupplierTypeCode != "" {
|
|
if model.SupplierTypeCode != "" {
|
|
|
- where = where + " and b.SupplierTypeCode = '" + model.SupplierTypeCode + "'"
|
|
|
|
|
|
|
+ where = where + " and ab.SupplierTypeCode = '" + model.SupplierTypeCode + "'"
|
|
|
}
|
|
}
|
|
|
|
|
+ //准入标识 1 准入 2 暂停 3取消
|
|
|
if model.InFlag != "" {
|
|
if model.InFlag != "" {
|
|
|
- where = where + " and b.InFlag = '" + model.InFlag + "'"
|
|
|
|
|
|
|
+ where = where + " and ab.InFlag = '" + model.InFlag + "'"
|
|
|
}
|
|
}
|
|
|
|
|
+ //法人
|
|
|
if model.LegalPerson != "" {
|
|
if model.LegalPerson != "" {
|
|
|
- where = where + " and a.LegalPerson like '%" + model.LegalPerson + "%'"
|
|
|
|
|
|
|
+ where = where + " and ab.LegalPerson like '%" + model.LegalPerson + "%'"
|
|
|
}
|
|
}
|
|
|
|
|
+ //联系人
|
|
|
if model.ContactName != "" {
|
|
if model.ContactName != "" {
|
|
|
- where = where + " and a.ContactName like '%" + model.ContactName + "%'"
|
|
|
|
|
|
|
+ where = where + " and ab.ContactName like '%" + model.ContactName + "%'"
|
|
|
}
|
|
}
|
|
|
|
|
+ //统一社会信用代码
|
|
|
if model.CommercialNo != "" {
|
|
if model.CommercialNo != "" {
|
|
|
- where = where + " and a.CommercialNo like '%" + model.CommercialNo + "%'"
|
|
|
|
|
|
|
+ where = where + " and ab.CommercialNo like '%" + model.CommercialNo + "%'"
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- if model.CompanyType != "" {
|
|
|
|
|
- where = where + " and a.CompanyType like '%" + model.CompanyType + "%'"
|
|
|
|
|
|
|
+ //开户银行
|
|
|
|
|
+ if model.DepositBank != "" {
|
|
|
|
|
+ where = where + " and ab.DepositBank like '%" + model.DepositBank + "%'"
|
|
|
}
|
|
}
|
|
|
- HseTraining := this.GetString("HseTraining")
|
|
|
|
|
- if HseTraining != "" {
|
|
|
|
|
- where = where + " and a.HseTraining = '" + HseTraining + "'"
|
|
|
|
|
|
|
+ //HSE审查
|
|
|
|
|
+ if model.HseTraining != "" {
|
|
|
|
|
+ where = where + " and ab.HseTraining = '" + model.HseTraining + "'"
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- BusinessScope := this.GetString("BusinessScope")
|
|
|
|
|
- if BusinessScope != "" {
|
|
|
|
|
- where = where + " and a.BusinessScope like '%" + BusinessScope + "%'"
|
|
|
|
|
|
|
+ //公司类型
|
|
|
|
|
+ if model.CompanyType != "" {
|
|
|
|
|
+ where = where + " and ab.CompanyType like '%" + model.CompanyType + "%'"
|
|
|
}
|
|
}
|
|
|
- //OldSupplierName := this.GetString("OldSupplierName")
|
|
|
|
|
- //if OldSupplierName != "" {
|
|
|
|
|
- // where = where + " and c.OldSupplierName like '%" + OldSupplierName + "%'"
|
|
|
|
|
- //}
|
|
|
|
|
- Province := this.GetString("Province")
|
|
|
|
|
- if Province != "" {
|
|
|
|
|
- where = where + " and a.Province = '" + Province + "'"
|
|
|
|
|
|
|
+ //成立时间
|
|
|
|
|
+ SetupTime := this.GetString("SetupTime")
|
|
|
|
|
+ if SetupTime != "" {
|
|
|
|
|
+ where = where + " and ab.SetupTime ='" + SetupTime + "'"
|
|
|
}
|
|
}
|
|
|
- City := this.GetString("City")
|
|
|
|
|
- if City != "" {
|
|
|
|
|
- where = where + " and a.City = '" + City + "'"
|
|
|
|
|
|
|
+ //注册资金范围
|
|
|
|
|
+ if model1.RegCapital1 != "" {
|
|
|
|
|
+ where = where + " and ab.RegCapital >= '" + model1.RegCapital1 + "'"
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- Street := this.GetString("Street")
|
|
|
|
|
- if Street != "" {
|
|
|
|
|
- where = where + " and a.Street = '" + Street + "'"
|
|
|
|
|
|
|
+ if model1.RegCapital2 != "" {
|
|
|
|
|
+ where = where + " and ab.RegCapital <= '" + model1.RegCapital2 + "'"
|
|
|
}
|
|
}
|
|
|
- Address := this.GetString("Address")
|
|
|
|
|
- if Address != "" {
|
|
|
|
|
- where = where + " and a.Address like '%" + Address + "%'"
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //注册省份
|
|
|
|
|
+ if model.Province != "" {
|
|
|
|
|
+ where = where + " and ab.Province = '" + model.Province + "'"
|
|
|
}
|
|
}
|
|
|
- LinkProvince := this.GetString("LinkProvince")
|
|
|
|
|
- if LinkProvince != "" {
|
|
|
|
|
- where = where + " and a.LinkProvince = '" + LinkProvince + "'"
|
|
|
|
|
|
|
+ //注册市
|
|
|
|
|
+ if model.City != "" {
|
|
|
|
|
+ where = where + " and ab.City = '" + model.City + "'"
|
|
|
}
|
|
}
|
|
|
- LinkCity := this.GetString("LinkCity")
|
|
|
|
|
- if LinkCity != "" {
|
|
|
|
|
- where = where + " and a.LinkCity = '" + LinkCity + "'"
|
|
|
|
|
|
|
+ //注册区
|
|
|
|
|
+ if model.Street != "" {
|
|
|
|
|
+ where = where + " and ab.Street = '" + model.Street + "'"
|
|
|
}
|
|
}
|
|
|
- LinkStreet := this.GetString("LinkStreet")
|
|
|
|
|
- if LinkStreet != "" {
|
|
|
|
|
- where = where + " and a.LinkStreet = '" + LinkStreet + "'"
|
|
|
|
|
|
|
+ //注册详细地址
|
|
|
|
|
+ if model.Address != "" {
|
|
|
|
|
+ where = where + " and ab.Address like '%" + model.Address + "%'"
|
|
|
}
|
|
}
|
|
|
- LinkAddress := this.GetString("LinkAddress")
|
|
|
|
|
- if LinkAddress != "" {
|
|
|
|
|
- where = where + " and a.LinkAddress like '%" + LinkAddress + "%'"
|
|
|
|
|
|
|
+ if model.LinkProvince != "" {
|
|
|
|
|
+ where = where + " and ab.LinkProvince = '" + model.LinkProvince + "'"
|
|
|
}
|
|
}
|
|
|
- DepositBank := this.GetString("DepositBank")
|
|
|
|
|
- if DepositBank != "" {
|
|
|
|
|
- where = where + " and a.DepositBank like '%" + DepositBank + "%'"
|
|
|
|
|
|
|
+ if model.LinkCity != "" {
|
|
|
|
|
+ where = where + " and ab.LinkCity = '" + model.LinkCity + "'"
|
|
|
}
|
|
}
|
|
|
- SetupTime := this.GetString("SetupTime")
|
|
|
|
|
- if SetupTime != "" {
|
|
|
|
|
- where = where + " and a.SetupTime ='" + SetupTime + "'"
|
|
|
|
|
|
|
+ if model.LinkStreet != "" {
|
|
|
|
|
+ where = where + " and ab.LinkStreet = '" + model.LinkStreet + "'"
|
|
|
}
|
|
}
|
|
|
- if model1.RegCapital1 != "" {
|
|
|
|
|
- where = where + " and a.RegCapital >= '" + model1.RegCapital1 + "'"
|
|
|
|
|
|
|
+ if model.LinkAddress != "" {
|
|
|
|
|
+ where = where + " and ab.LinkAddress like '%" + model.LinkAddress + "%'"
|
|
|
}
|
|
}
|
|
|
- if model1.RegCapital2 != "" {
|
|
|
|
|
- where = where + " and a.RegCapital <= '" + model1.RegCapital2 + "'"
|
|
|
|
|
|
|
+ //营业范围
|
|
|
|
|
+ if model.BusinessScope != "" {
|
|
|
|
|
+ where = where + " and ab.BusinessScope like '%" + model.BusinessScope + "%'"
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //包含资质
|
|
|
if model2.NeedFileType != nil && len(model2.NeedFileType) > 0 {
|
|
if model2.NeedFileType != nil && len(model2.NeedFileType) > 0 {
|
|
|
pararm := ""
|
|
pararm := ""
|
|
|
for i := 0; i < len(model2.NeedFileType); i++ {
|
|
for i := 0; i < len(model2.NeedFileType); i++ {
|