lining 6 vuotta sitten
vanhempi
commit
2ec3c6c3de

+ 1 - 1
src/dashoo.cn/backend/api/business/oilsupplier/selectbusiness/selectservice.go

@@ -41,7 +41,7 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, sup
 	sql += `a.LegalPerson,a.RegCapital,a.Mobile,b.AuditDate,b.ApplyTime,b.InFlag,a.ContactName,a.CommercialNo, `
 	sql += `a.DepositBank,a.HseTraining,a.CompanyType,a.SetupTime,a.Address,a.Province,a.City,a.Street, `
 	sql += `a.LinkAddress,a.LinkProvince,a.LinkCity,a.LinkStreet,a.BusinessScope, `
-	sql += `b.InStyle,`
+	sql += `b.InStyle, b.Id CertId,`
 	sql += `group_concat(distinct d.Name) CerSubName,group_concat(distinct e.NeedFileType) NeedFileType `
 	sql += `from ` + supplierTableName + ` a `
 	sql += `left join ` + supplierCertTableName + ` b on b.SupplierId = a.Id `

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplier.go

@@ -133,6 +133,7 @@ type OilSupplierView struct {
 
 type OilSupplierSelect struct {
 	Id               int       //Oilsupplier表id
+	CertId           int
 	AccessCardNo     string    //准入证号
 	SupplierName     string    //企业名称
 	OldSupplierName  string    //企业曾用名

+ 7 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplierdataentry/supplierdataentryService.go

@@ -15,3 +15,10 @@ func GetSupplierDataEntryService(xormEngine *xorm.Engine) *SupplierDataEntryServ
 	return s
 }
 
+func (s *SupplierDataEntryService) GetSelect( tablename, where string, entitiesPtr interface{}){
+
+	var sql string
+	sql = `  select * from ` + tablename
+	sql += ` where ` + where
+	s.DBE.SQL(sql).Find(entitiesPtr)
+}

+ 10 - 6
src/dashoo.cn/backend/api/controllers/oilsupplier/supplierdataentry.go

@@ -85,12 +85,16 @@ func (this *SupplierDataEntryController) DocExport() {
 	var tabledata7 []supplierdataentry.SupplierCertSubEntry
 
 	SupplierCertId := strconv.Itoa(model2.Id)
-	where3 := "SupplierCertId = '" + SupplierCertId + "'"
-	svc.GetEntitysByOrderbyWhere(OilEnterpriseMajorEquipmentName, where3, "1", &tabledata3)
-	svc.GetEntitysByOrderbyWhere(OilThreeYearsPerformanceName, where3, "1", &tabledata4)
-	svc.GetEntitysByOrderbyWhere(OilPatentStatisticalName, where3, "1", &tabledata5)
-	svc.GetEntitysByOrderbyWhere(OilWinningProjectName, where3, "1", &tabledata6)
-	svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where3, "1", &tabledata7)
+	where3 := "SupplierCertId = " + SupplierCertId + " LIMIT 5"
+	svc.GetSelect(OilEnterpriseMajorEquipmentName, where3, &tabledata3)
+	where4 := "SupplierCertId = " + SupplierCertId + " LIMIT 5"
+	svc.GetSelect(OilThreeYearsPerformanceName, where4, &tabledata4)
+	where5 := "SupplierCertId = " + SupplierCertId + " LIMIT 7"
+	svc.GetSelect(OilPatentStatisticalName, where5, &tabledata5)
+	where9 := "SupplierCertId = " + SupplierCertId + " LIMIT 9"
+	svc.GetSelect(OilWinningProjectName, where9, &tabledata6)
+	where := "SupplierCertId = " + SupplierCertId
+	svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, where, "1", &tabledata7)
 
 	datamap := StructToMapDemo(model1.OilSupplier)
 

+ 2 - 1
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -882,8 +882,9 @@ export default {
     },
     // 导出到Word文件
     toWord (val) {
+      console.log(val)
       let params = {
-        CertId: this.certId
+        CertId: val.CertId
       }
       dataapi.docexport(val.Id, params, this.$axios)
         .then(res => {