lining 6 년 전
부모
커밋
106fe0034b

+ 18 - 18
src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go

@@ -1426,9 +1426,9 @@ func (this *OilGoodsAptitudeController) InsertGoodsAptitude() {
 // @router /updatasuppiercertsub [get]
 func (this *OilGoodsAptitudeController) UpdataSuppierCertSub() {
 
-	excelFileName := "F:/ssa.xlsx"
-	xlFile, _ := xlsx.OpenFile(excelFileName)
-	var sheet = xlFile.Sheets[0]
+	//excelFileName := "F:/ssa.xlsx"
+	//xlFile, _ := xlsx.OpenFile(excelFileName)
+	//var sheet = xlFile.Sheets[0]
 
 	t := time.Now()
 
@@ -1437,7 +1437,7 @@ func (this *OilGoodsAptitudeController) UpdataSuppierCertSub() {
 
 	supsvc := supplier.GetOilSupplierService(utils.DBE)
 	var suppliercertList []suppliercert.OilSupplierCert
-	where := "AccessCardNo='2018WZ048'"//"SupplierTypeCode='01' AND OutsideFlog = '' AND (InFlag IN ('1','2')) "
+	where := "SupplierTypeCode='01' AND OutsideFlog = '' AND (InFlag IN ('1','2')) "
 	supsvc.GetEntities(&suppliercertList, where)
 
 	var goodsaptitudeClassList []goodsaptitudeclass.OilGoodsAptitudeClass
@@ -1446,9 +1446,9 @@ func (this *OilGoodsAptitudeController) UpdataSuppierCertSub() {
 
 	var colsname = []string{"Name"}
 	for _, suppliercert :=  range suppliercertList {
-		row := sheet.AddRow()
-		cell := row.AddCell()
-		cell.Value = strconv.Itoa(suppliercert.SupplierId)
+		//row := sheet.AddRow()
+		//cell := row.AddCell()
+		//cell.Value = strconv.Itoa(suppliercert.SupplierId)
 		log.Println(suppliercert.SupplierId)
 		var supplierCertSubList []suppliercertsub.OilSupplierCertSub
 		wheresup := "SupplierId = " + strconv.Itoa(suppliercert.SupplierId) + " and SupplierTypeCode='01' AND Type IN ('1', '3')"
@@ -1458,9 +1458,9 @@ func (this *OilGoodsAptitudeController) UpdataSuppierCertSub() {
 		//for idx, supplierCertSub := range supplierCertSubList {
 
 		for idx :=0; idx < len(supplierCertSubList); idx++{
-			row := sheet.AddRow()
-			cell := row.AddCell()
-			cell.Value = "删除"
+			//row := sheet.AddRow()
+			//cell := row.AddCell()
+			//cell.Value = "删除"
 
 			supplierCertSub := supplierCertSubList[idx]
 			decCode := supplierCertSub.Code
@@ -1475,8 +1475,8 @@ func (this *OilGoodsAptitudeController) UpdataSuppierCertSub() {
 						where := "SupplierId=" + strconv.Itoa(suppliercert.SupplierId) + " and NeedFileType='" + val + "'" + " and SupplierTypeCode IN ('000', '01')"
 						has := supsvc.GetEntityByWhere(OilSupplierFileName, where, &supplierFile)
 						if !has {
-							cell := row.AddCell()
-							cell.Value = supplierCertSub.Code + "  " + supplierCertSub.Name
+							//cell := row.AddCell()
+							//cell.Value = supplierCertSub.Code + "  " + supplierCertSub.Name
 							log.Println(supplierCertSub.Code + "====" + val)
 							//wheredel := "Id = " + strconv.Itoa(supplierCertSub.Id)
 							//supsvc.DeleteEntityBytbl(OilSupplierCertSubName, wheredel)
@@ -1484,9 +1484,9 @@ func (this *OilGoodsAptitudeController) UpdataSuppierCertSub() {
 							break
 						}
 						if  supplierCertSub.Name != goodsaptitudeClass.Name {
-							row := sheet.AddRow()
-							cell := row.AddCell()
-							cell.Value = supplierCertSub.Code + ":" + supplierCertSub.Name + "==" + goodsaptitudeClass.Name
+							//row := sheet.AddRow()
+							//cell := row.AddCell()
+							//cell.Value = supplierCertSub.Code + ":" + supplierCertSub.Name + "==" + goodsaptitudeClass.Name
 							var entity  suppliercertsub.OilSupplierCertSub
 							entity.Name = goodsaptitudeClass.Name
 							where := "Id = " + strconv.Itoa(supplierCertSub.Id)
@@ -1501,14 +1501,14 @@ func (this *OilGoodsAptitudeController) UpdataSuppierCertSub() {
 				//supsvc.DeleteEntityBytbl(OilSupplierCertSubName, wheredel)
 				supsvc.InsertEntityBytbl(TmpOilSupplierCertSubName, supplierCertSub)
 			}
-			cell1 := row.AddCell()
-			cell1.Value = decCode
+			//cell1 := row.AddCell()
+			//cell1.Value = decCode
 
 		}
 	}
 	elapsed := time.Since(t)
 	log.Println(elapsed)
-	xlFile.Save(excelFileName)
+	//xlFile.Save(excelFileName)
 
 }
 

+ 2 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/select.go

@@ -911,6 +911,7 @@ func (this *SelectController) GetAllBusinessLicense() {
 	where := "1=1"
 	svc.GetEntities(&supplierList, where)
 	_dir := utils.Cfg.MustValue("file", "tmplateDir") + "营业执照"
+	downFileUrl := "http://10.76.248.23"
 	for _,item := range supplierList {
 		var supplierFile supplierfile.OilSupplierFile
 		where := "SupplierId=" + strconv.Itoa(item.Id) + " and NeedFileType='" + needFileType + "'"
@@ -919,7 +920,7 @@ func (this *SelectController) GetAllBusinessLicense() {
 			fileArr := strings.Split(supplierFile.FileName, ".")
 			fileUrl := strings.Split(supplierFile.FileUrl, "|")
 			if len(fileUrl) == 2 && len(fileArr) == 2 {
-				utils.DownloadFile("http://" + fileUrl[0], item.SupplierName + "." + fileArr[1] , _dir)
+				utils.DownloadFile( downFileUrl + fileUrl[0], item.SupplierName + "." + fileArr[1] , _dir)
 			}
 		}
 	}

+ 5 - 5
src/dashoo.cn/frontend_web/nuxt.config.js

@@ -183,11 +183,11 @@ module.exports = {
 
     /* --------Nuxt Start发版用 START-------------- */
     /*
-    appclient:  'gfgl',                            //供方信息管理平台
-    upfilehost: '/uploadfile',                     //附件上传
-    baseURL:    '/api/',                           //本地工作流图片
-    LOCAL_IP:   '10.76.248.23'                     //定义服务器内网IP,word转PDF时用到
-    // API_URL:    'http://10.76.248.23:10091/api/'   //服务器渲染时调用
+        appclient:  'gfgl',                            //供方信息管理平台
+        upfilehost: '/uploadfile',                     //附件上传
+        baseURL:    '/api/',                           //本地工作流图片
+        LOCAL_IP:   '10.76.248.23'                     //定义服务器内网IP,word转PDF时用到
+        // API_URL:    'http://10.76.248.23:10091/api/'   //服务器渲染时调用
     */
     /* --------Nuxt Start发版用 END-------------- */
   },