feat:完善公司导入模块
This commit is contained in:
@ -47,21 +47,21 @@ type (
|
|||||||
}
|
}
|
||||||
// CompanyExcel 公司企业表格信息
|
// CompanyExcel 公司企业表格信息
|
||||||
CompanyExcel struct {
|
CompanyExcel struct {
|
||||||
Name string `json:"name" xlsx:"企业名称"`
|
Name string `json:"name" xlsx:"企业名称"`
|
||||||
Province string `json:"province" xlsx:"所在省"`
|
Province string `json:"province" xlsx:"所在省"`
|
||||||
City string `json:"city" xlsx:"所在市"`
|
City string `json:"city" xlsx:"所在市"`
|
||||||
District string `json:"district" xlsx:"所在区"`
|
District string `json:"district" xlsx:"所在区"`
|
||||||
Address string `json:"address" xlsx:"详细地址"`
|
Address string `json:"address" xlsx:"详细地址"`
|
||||||
Code string `json:"code" xlsx:"信用代码"`
|
Code string `json:"code" xlsx:"信用代码"`
|
||||||
RegisterAt string `json:"register_at" xlsx:"注册时间"`
|
RegisterAt string `json:"register_at" xlsx:"注册时间"`
|
||||||
Industry string `json:"industry" xlsx:"所属领域"`
|
Industry string `json:"industry" xlsx:"所属领域"`
|
||||||
Url string `json:"url" xlsx:"企业网站"`
|
Url string `json:"url" xlsx:"企业网站"`
|
||||||
Introduce string `json:"introduce" xlsx:"企业简介"`
|
Introduce string `json:"introduce" xlsx:"企业简介"`
|
||||||
Kind string `json:"kind" xlsx:"企业类型"`
|
Kind string `json:"kind" xlsx:"企业类型"`
|
||||||
TechnologyScene string `json:"technology_scene" xlsx:"核心技术与产品及应用场景"`
|
Product string `json:"product" xlsx:"核心技术与产品及应用场景"`
|
||||||
Keyword string `json:"keyword" xlsx:"关键词"`
|
Keyword string `json:"keyword" xlsx:"关键词"`
|
||||||
Contact string `json:"contact" xlsx:"联系人"` // 联系人
|
Contact string `json:"contact" xlsx:"联系人"` // 联系人
|
||||||
ContactMobile string `json:"contact_mobile" xlsx:"联系电话"` // 联系方式
|
ContactMobile string `json:"contact_mobile" xlsx:"联系电话"` // 联系方式
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -243,7 +243,6 @@ func (c *Company) Import(file string) error {
|
|||||||
|
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
|
|
||||||
//now := time.Now()
|
|
||||||
for _, v := range data {
|
for _, v := range data {
|
||||||
_data := v.(*CompanyExcel)
|
_data := v.(*CompanyExcel)
|
||||||
|
|
||||||
@ -263,12 +262,12 @@ func (c *Company) Import(file string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// 所属领域
|
// 所属领域
|
||||||
row.ModelTenant = model2.ModelTenant{}
|
row.ModelTenant = model2.ModelTenant{TenantID: _data.tenant()}
|
||||||
row.Kind = _data.kind()
|
row.Kind = _data.kind()
|
||||||
row.Name = _data.Name
|
row.Name = _data.Name
|
||||||
row.Code = _data.Code
|
row.Code = _data.Code
|
||||||
row.Area = _data.area()
|
row.Area = _data.area()
|
||||||
row.Product = ""
|
row.Product = _data.Product
|
||||||
row.Url = _data.Url
|
row.Url = _data.Url
|
||||||
row.License = ""
|
row.License = ""
|
||||||
row.SetIndustryAttribute(industrys)
|
row.SetIndustryAttribute(industrys)
|
||||||
|
Reference in New Issue
Block a user