|
|
@@ -967,6 +967,18 @@ func (this *SelectController) GetBusinessLicenseById() {
|
|
|
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
|
|
|
+ if SupplierId == "0" && this.User.IsCompanyUser == 1 {
|
|
|
+ var registerUser register.OilCorporateInfo
|
|
|
+ var company supplier.OilSupplier
|
|
|
+
|
|
|
+ sql := " UserName='" + this.User.Username + "'"
|
|
|
+ svc.GetEntity(®isterUser,sql)
|
|
|
+ sql1:= " CreateUserId = '" + this.User.Id + "' or CommercialNo='"+registerUser.CommercialNo+"'"
|
|
|
+ svc.GetEntity(&company,sql1)
|
|
|
+ SupplierId = strconv.Itoa(company.Id)
|
|
|
+ SupplierName = company.SupplierName
|
|
|
+ }
|
|
|
+
|
|
|
_dir := utils.Cfg.MustValue("file", "tmplateDir") + SupplierName
|
|
|
downFileUrl := "http://" + utils.Cfg.MustValue("server", "localIP")
|
|
|
var supplierFile []supplierfile.OilSupplierFile
|
|
|
@@ -979,6 +991,7 @@ func (this *SelectController) GetBusinessLicenseById() {
|
|
|
errinfo.Message = "该公司没有可导出的资质!"
|
|
|
this.Data["json"] = &errinfo
|
|
|
this.ServeJSON()
|
|
|
+ return
|
|
|
}
|
|
|
for _,item := range supplierFile {
|
|
|
fileArr := strings.Split(item.FileName, ".")
|