|
|
@@ -58,6 +58,7 @@ func StructToMapDemo(obj interface{}) map[string]interface{} {
|
|
|
func (this *SupplierDataEntryController) DocExport() {
|
|
|
// 填物资类信息表首页信息
|
|
|
Id := this.Ctx.Input.Param(":tbid")
|
|
|
+ certId := this.GetString("CertId")
|
|
|
var Url string
|
|
|
var fileName string
|
|
|
svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
@@ -67,7 +68,7 @@ func (this *SupplierDataEntryController) DocExport() {
|
|
|
svc := supplierdataentry.GetSupplierDataEntryService(utils.DBE)
|
|
|
where1 := "1=1"
|
|
|
where1 += " AND Id = '" + Id + "'"
|
|
|
- where2 := "SupplierId = '" + Id + "'"
|
|
|
+ where2 := "Id = '" + certId + "'"
|
|
|
svc.GetEntityByWhere(OilSupplierName, where1, &model1)
|
|
|
svc.GetEntityByWhere(OilSupplierCertName, where2, &model2)
|
|
|
|
|
|
@@ -91,7 +92,7 @@ func (this *SupplierDataEntryController) DocExport() {
|
|
|
svc.GetEntitysByOrderbyWhere(OilWinningProjectName, where3, "1", &tabledata6)
|
|
|
svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where3, "1", &tabledata7)
|
|
|
|
|
|
- datamap := StructToMapDemo(model1)
|
|
|
+ datamap := StructToMapDemo(model1.OilSupplier)
|
|
|
|
|
|
if model2.SupplierTypeCode == "01" {
|
|
|
//Url = "http://weed1.labsop.cn:9390/1,248318341f7c"
|
|
|
@@ -111,41 +112,61 @@ func (this *SupplierDataEntryController) DocExport() {
|
|
|
|
|
|
//model1
|
|
|
datamap["SetupTime"] = model1.SetupTime.Format("2006年01月02日")
|
|
|
- datamap["QualifCert"] = model1.QualifCert
|
|
|
- datamap["QualifCertLevel"] = model1.QualifCertLevel
|
|
|
- datamap["SpecIndustryCert"] = model1.SpecIndustryCert
|
|
|
- datamap["MaunLicense"] = model1.MaunLicense
|
|
|
- datamap["HseTraining"] = model1.HseTraining
|
|
|
- datamap["Fax"] = model1.Fax
|
|
|
- datamap["CompanyTel"] = model1.CompanyTel
|
|
|
- datamap["SupplierName"] = model1.SupplierName
|
|
|
- datamap["SpecTypeCode"] = model1.SpecTypeName
|
|
|
- datamap["Country"] = model1.Country
|
|
|
- datamap["MaunAgent"] = model1.MaunAgent
|
|
|
- datamap["SupplierCertificate"] = model1.SupplierCertificate
|
|
|
- datamap["MgrUnit"] = model1.MgrUnit
|
|
|
- datamap["Grade"] = model1.Grade
|
|
|
- datamap["CommercialNo"] = model1.CommercialNo
|
|
|
- datamap["CountryTaxNo"] = model1.CountryTaxNo
|
|
|
- datamap["OrganCode"] = model1.OrganCode
|
|
|
- datamap["Address"] = model1.Address
|
|
|
- datamap["ZipCode"] = model1.ZipCode
|
|
|
- datamap["LinkAddress"] = model1.LinkAddress
|
|
|
- datamap["LinkZipCode"] = model1.LinkZipCode
|
|
|
- datamap["QualitySystemCert"] = model1.QualitySystemCert
|
|
|
- datamap["ProductQualityCert"] = model1.ProductQualityCert
|
|
|
- datamap["MaunLicense"] = model1.MaunLicense
|
|
|
- datamap["LegalPerson"] = model1.LegalPerson
|
|
|
- datamap["CompanyType"] = model1.CompanyType
|
|
|
- datamap["ContactName"] = model1.ContactName
|
|
|
- datamap["RegCapital"] = model1.RegCapital
|
|
|
- datamap["DepositBank"] = model1.DepositBank
|
|
|
- datamap["BankAccount"] = model1.BankAccount
|
|
|
- datamap["Mobile"] = model1.Mobile
|
|
|
- datamap["EMail"] = model1.EMail
|
|
|
- datamap["BankCreditRating"] = model1.BankCreditRating
|
|
|
- datamap["BusinessScope"] = model1.BusinessScope
|
|
|
- datamap["Telphone"] = model1.Telphone
|
|
|
+ if model1.OperType != "" {
|
|
|
+ if model1.OperType == "1" || model1.OperType == "制造商"{
|
|
|
+ datamap["OperType"] = "☑制造商 □代理商 □贸易商"
|
|
|
+ }else if model1.OperType == "2" || model1.OperType == "代理商"{
|
|
|
+ datamap["OperType"] = "□制造商 ☑代理商 □贸易商"
|
|
|
+ }else if model1.OperType == "3" || model1.OperType == "代理商"{
|
|
|
+ datamap["OperType"] = "□制造商 □代理商 ☑贸易商"
|
|
|
+ }else {
|
|
|
+ datamap["OperType"] = "□制造商 □代理商 □贸易商"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if model1.SpecTypeCode != "" {
|
|
|
+ if model1.SpecTypeCode == "1"{
|
|
|
+ datamap["SpecTypeCode"] = "☑一般外部 □多元企业"
|
|
|
+ }else if model1.SpecTypeCode == "2"{
|
|
|
+ datamap["SpecTypeCode"] = "□一般外部 ☑多元企业"
|
|
|
+ }else {
|
|
|
+ datamap["SpecTypeCode"] = "□一般外部 □多元企业"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //datamap["QualifCert"] = model1.QualifCert
|
|
|
+ //datamap["QualifCertLevel"] = model1.QualifCertLevel
|
|
|
+ //datamap["SpecIndustryCert"] = model1.SpecIndustryCert
|
|
|
+ //datamap["MaunLicense"] = model1.MaunLicense
|
|
|
+ //datamap["HseTraining"] = model1.HseTraining
|
|
|
+ //datamap["Fax"] = model1.Fax
|
|
|
+ //datamap["CompanyTel"] = model1.CompanyTel
|
|
|
+ //datamap["SupplierName"] = model1.SupplierName
|
|
|
+ //datamap["SpecTypeCode"] = model1.SpecTypeName
|
|
|
+ //datamap["Country"] = model1.Country
|
|
|
+ //datamap["MaunAgent"] = model1.MaunAgent
|
|
|
+ //datamap["SupplierCertificate"] = model1.SupplierCertificate
|
|
|
+ //datamap["MgrUnit"] = model1.MgrUnit
|
|
|
+ //datamap["Grade"] = model1.Grade
|
|
|
+ //datamap["CommercialNo"] = model1.CommercialNo
|
|
|
+ //datamap["CountryTaxNo"] = model1.CountryTaxNo
|
|
|
+ //datamap["OrganCode"] = model1.OrganCode
|
|
|
+ //datamap["Address"] = model1.Address
|
|
|
+ //datamap["ZipCode"] = model1.ZipCode
|
|
|
+ //datamap["LinkAddress"] = model1.LinkAddress
|
|
|
+ //datamap["LinkZipCode"] = model1.LinkZipCode
|
|
|
+ //datamap["QualitySystemCert"] = model1.QualitySystemCert
|
|
|
+ //datamap["ProductQualityCert"] = model1.ProductQualityCert
|
|
|
+ //datamap["MaunLicense"] = model1.MaunLicense
|
|
|
+ //datamap["LegalPerson"] = model1.LegalPerson
|
|
|
+ //datamap["CompanyType"] = model1.CompanyType
|
|
|
+ //datamap["ContactName"] = model1.ContactName
|
|
|
+ //datamap["RegCapital"] = model1.RegCapital
|
|
|
+ //datamap["DepositBank"] = model1.DepositBank
|
|
|
+ //datamap["BankAccount"] = model1.BankAccount
|
|
|
+ //datamap["Mobile"] = model1.Mobile
|
|
|
+ //datamap["EMail"] = model1.EMail
|
|
|
+ //datamap["BankCreditRating"] = model1.BankCreditRating
|
|
|
+ //datamap["BusinessScope"] = model1.BusinessScope
|
|
|
+ //datamap["Telphone"] = model1.Telphone
|
|
|
|
|
|
//审批意见
|
|
|
for i := 0; i < len(historicTasks); i++ {
|
|
|
@@ -244,7 +265,7 @@ func (this *SupplierDataEntryController) DocExport() {
|
|
|
ColsNum: 4,
|
|
|
}
|
|
|
datamap["TableComment"] = []string{"MajorEquipments", "ThreeYears", "Patent", "Winning"}
|
|
|
-
|
|
|
+ //retDocUrl := svcActiviti.FillWordTemplate(datamap, Url, fileName)
|
|
|
retDocUrl := svcActiviti.FillWordWatermarkTemplate(datamap, Url, fileName, model1.SupplierName)
|
|
|
var datainfo ErrorDataInfo
|
|
|
datainfo.Code = 0
|