|
@@ -787,9 +787,6 @@ func (this *OilSupplierController) JzpsListExport() {
|
|
|
if SupplierName != "" {
|
|
if SupplierName != "" {
|
|
|
where = where + " and a.SupplierName like '%" + SupplierName + "%'"
|
|
where = where + " and a.SupplierName like '%" + SupplierName + "%'"
|
|
|
}
|
|
}
|
|
|
- if SupplierTypeName != "" {
|
|
|
|
|
- where = where + " and b.SupplierTypeName like '%" + SupplierTypeName + "%'"
|
|
|
|
|
- }
|
|
|
|
|
if CreateOn != "" {
|
|
if CreateOn != "" {
|
|
|
dates := strings.Split(CreateOn, ",")
|
|
dates := strings.Split(CreateOn, ",")
|
|
|
if len(dates) == 2 {
|
|
if len(dates) == 2 {
|
|
@@ -921,13 +918,24 @@ func (this *OilSupplierController) JzpsListExport() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ where1 := where
|
|
|
|
|
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
var list []supplier.OilSupplierExport
|
|
var list []supplier.OilSupplierExport
|
|
|
- svc.GetMyPagingEntitiesWithOrderBytblExport(OilSupplierName, OilSupplierCertName, &list, where)
|
|
|
|
|
|
|
+ var list1 []supplier.OilSupplierExport
|
|
|
|
|
+ if SupplierTypeName == "物资类" {
|
|
|
|
|
+ svc.GetMyPagingEntitiesWithOrderBytblExportNew(OilSupplierName, OilSupplierCertName, &list1, where1)
|
|
|
|
|
+ } else if SupplierTypeName == "服务类" || SupplierTypeName == "基建类"{
|
|
|
|
|
+ where = where + " and b.SupplierTypeName like '%" + SupplierTypeName + "%'"
|
|
|
|
|
+ svc.GetMyPagingEntitiesWithOrderBytblExport(OilSupplierName, OilSupplierCertName, &list, where)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ where = where + " and (b.SupplierTypeCode = '02' or b.SupplierTypeCode = '03')"
|
|
|
|
|
+ svc.GetMyPagingEntitiesWithOrderBytblExport(OilSupplierName, OilSupplierCertName, &list, where)
|
|
|
|
|
+ svc.GetMyPagingEntitiesWithOrderBytblExportNew(OilSupplierName, OilSupplierCertName, &list1, where1)
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
fileTitle := "集中评审"
|
|
fileTitle := "集中评审"
|
|
|
- showColumnArr := "序号,审核状态,企业名称,准入类别,审核处室,推荐单位,法人,工商注册号,注册资本,币种,公司类型,成立时间,手机号,准入范围"
|
|
|
|
|
|
|
+ showColumnArr := "序号,审核状态,企业名称,准入类别,审核处室,推荐单位,法人,工商注册号,注册资本,币种,公司类型,成立时间,手机号,二位准入范围,八位准入范围"
|
|
|
|
|
|
|
|
f := xlsx.NewFile()
|
|
f := xlsx.NewFile()
|
|
|
sheet, _ := f.AddSheet(fileTitle)
|
|
sheet, _ := f.AddSheet(fileTitle)
|
|
@@ -940,7 +948,35 @@ func (this *OilSupplierController) JzpsListExport() {
|
|
|
svc.GetEntitysByWhere(OilSupplierCertSubName, "SupplierCertId = "+strconv.Itoa(item.CertId), &certSubList)
|
|
svc.GetEntitysByWhere(OilSupplierCertSubName, "SupplierCertId = "+strconv.Itoa(item.CertId), &certSubList)
|
|
|
subName := ""
|
|
subName := ""
|
|
|
for _, certSub := range certSubList {
|
|
for _, certSub := range certSubList {
|
|
|
- subName += "," + certSub.Name
|
|
|
|
|
|
|
+ subName += "," + certSub.Code + ":" + certSub.Name
|
|
|
|
|
+ }
|
|
|
|
|
+ regCapital := strconv.FormatFloat(item.RegCapital, 'f', 2, 64)
|
|
|
|
|
+ currency := "人民币"
|
|
|
|
|
+ if item.Currency == "人民币元" {
|
|
|
|
|
+ currency = "人民币"
|
|
|
|
|
+ }
|
|
|
|
|
+ if item.Currency == "JPY" {
|
|
|
|
|
+ currency = "日元"
|
|
|
|
|
+ }
|
|
|
|
|
+ if item.Currency == "USD" {
|
|
|
|
|
+ currency = "美元"
|
|
|
|
|
+ }
|
|
|
|
|
+ if item.Currency == "EUR" {
|
|
|
|
|
+ currency = "欧元"
|
|
|
|
|
+ }
|
|
|
|
|
+ dataString := strconv.Itoa(idx+1) + "+待集中评审+" + item.SupplierName + "+" + item.SupplierTypeName + "+" + item.FullName + "+" + item.RecUnitName + "+" + item.LegalPerson + "+" + item.CommercialNo + "+" +
|
|
|
|
|
+ regCapital + "+" + currency + "+" + item.CompanyType + "+" + utils.ToStr(item.SetupTime.Format("2006-01-02")) + "+" + item.Mobile + "+" + item.SubName + "+" + strings.TrimLeft(subName, ",")
|
|
|
|
|
+ cellName := strings.Split(dataString, "+")
|
|
|
|
|
+ row := sheet.AddRow()
|
|
|
|
|
+ row.WriteSlice(&cellName, -1)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for idx, item := range list1 {
|
|
|
|
|
+ var certSubList []suppliercertsub.OilSupplierCertSub
|
|
|
|
|
+ svc.GetEntitysByWhere(OilSupplierCertSubName, "SupplierCertId = "+strconv.Itoa(item.CertId), &certSubList)
|
|
|
|
|
+ subName := ""
|
|
|
|
|
+ for _, certSub := range certSubList {
|
|
|
|
|
+ subName += "," + certSub.Code + ":" + certSub.Name
|
|
|
}
|
|
}
|
|
|
regCapital := strconv.FormatFloat(item.RegCapital, 'f', 2, 64)
|
|
regCapital := strconv.FormatFloat(item.RegCapital, 'f', 2, 64)
|
|
|
currency := "人民币"
|
|
currency := "人民币"
|
|
@@ -957,7 +993,7 @@ func (this *OilSupplierController) JzpsListExport() {
|
|
|
currency = "欧元"
|
|
currency = "欧元"
|
|
|
}
|
|
}
|
|
|
dataString := strconv.Itoa(idx+1) + "+待集中评审+" + item.SupplierName + "+" + item.SupplierTypeName + "+" + item.FullName + "+" + item.RecUnitName + "+" + item.LegalPerson + "+" + item.CommercialNo + "+" +
|
|
dataString := strconv.Itoa(idx+1) + "+待集中评审+" + item.SupplierName + "+" + item.SupplierTypeName + "+" + item.FullName + "+" + item.RecUnitName + "+" + item.LegalPerson + "+" + item.CommercialNo + "+" +
|
|
|
- regCapital + "+" + currency + "+" + item.CompanyType + "+" + utils.ToStr(item.SetupTime.Format("2006-01-02")) + "+" + item.Mobile + "+" + strings.TrimLeft(subName, ",")
|
|
|
|
|
|
|
+ regCapital + "+" + currency + "+" + item.CompanyType + "+" + utils.ToStr(item.SetupTime.Format("2006-01-02")) + "+" + item.Mobile + "+" + item.SubName + "+" + strings.TrimLeft(subName, ",")
|
|
|
cellName := strings.Split(dataString, "+")
|
|
cellName := strings.Split(dataString, "+")
|
|
|
row := sheet.AddRow()
|
|
row := sheet.AddRow()
|
|
|
row.WriteSlice(&cellName, -1)
|
|
row.WriteSlice(&cellName, -1)
|