新版本

This commit is contained in:
hoteas 2022-09-27 09:22:49 +08:00
parent 4ccf7d2f9d
commit 531ef23287
29 changed files with 58 additions and 48 deletions

View File

@ -3,4 +3,12 @@ golang web服务框架
支持数据库dbmysql、sqlite3
支持缓存cacheredismemory数据库
自带工具类上下文以及session等功能
下载分析接口
http://192.168.6.27:8081/app/analyse/home_excel?org_id=4
使用方式直接后台上传
分析使用接口
http://127.0.0.1:8081/admin/test/analyse?org_id=4
整体分析接口
http://127.0.0.1:8081/admin/company_inout/total_analyse?org_id=4
行业分析接口
http://127.0.0.1:8081/admin/company_inout/industry_analyse?org_id=4

View File

@ -1,7 +1,7 @@
package admin
import (
. "../../../hotime"
. "../../../iedc-go"
. "../../common"
"fmt"
"github.com/chain-zhang/pinyin"

View File

@ -1,7 +1,7 @@
package admin
import (
. "../../../hotime"
. "../../../iedc-go"
. "../../common"
"fmt"
"github.com/chain-zhang/pinyin"

View File

@ -1,7 +1,7 @@
package admin
import (
. "../../../hotime"
. "../../../iedc-go"
. "../../common"
"../../dri/baidu"
"fmt"

View File

@ -1,7 +1,7 @@
package app
import (
. "../../../hotime"
. "../../../iedc-go"
. "../../common"
"fmt"
"github.com/xuri/excelize"
@ -64,6 +64,7 @@ var analyseCtr = Ctr{
filePath := "temp/home" + ObjToStr(orgId) + ".xlsx"
f, e := excelize.OpenFile(this.Config.GetString("tpt") + "/" + filePath)
//fmt.Println(e)
// 设置单元格的值
tagCompany1 := this.Db.Select("tag", "*", Map{"AND": Map{"type": 2, "org_id": orgId}, "ORDER": Slice{"`sort` DESC", "id ASC"}})
if e != nil {
@ -77,38 +78,39 @@ var analyseCtr = Ctr{
f.NewSheet("“3”项定性")
f.NewSheet("“N”项特色")
f.DeleteSheet("Sheet1")
}
//cs := append(NewCompanys{}, companys...)
f.SetCellValue("企业分析", convertToTitle(1)+"1", "企业名")
for k, tag := range tagCompany1 {
//cs := append(NewCompanys{}, companys...)
f.SetCellValue("企业分析", convertToTitle(1)+"1", "企业名")
for k, tag := range tagCompany1 {
f.SetCellValue("企业分析", convertToTitle(k+2)+"1", tag.GetString("name"))
}
// 设置单元格的值
f.SetCellValue("IEDC全局分析", "A1", "指标项")
f.SetCellValue("IEDC全局分析", "B1", "指标值")
// 设置单元格的值
f.SetCellValue("“6”项量化", "A1", "指标项")
f.SetCellValue("“6”项量化", "B1", "指标值")
// 设置单元格的值
f.SetCellValue("“3”项定性", "A1", "指标项")
f.SetCellValue("“3”项定性", "B1", "指标值")
// 设置单元格的值
f.SetCellValue("“N”项特色", "A1", "指标项")
f.SetCellValue("“N”项特色", "B1", "指标值")
os.MkdirAll(this.Config.GetString("tpt")+"/temp/", os.ModeDir)
// 根据指定路径保存文件
if err := f.SaveAs(this.Config.GetString("tpt") + "/" + filePath); err != nil {
fmt.Println(err)
this.Display(4, "输出异常")
return
}
f.SetCellValue("企业分析", convertToTitle(k+2)+"1", tag.GetString("name"))
}
// 设置单元格的值
f.SetCellValue("IEDC全局分析", "A1", "指标项")
f.SetCellValue("IEDC全局分析", "B1", "指标值")
// 设置单元格的值
f.SetCellValue("“6”项量化", "A1", "指标项")
f.SetCellValue("“6”项量化", "B1", "指标值")
// 设置单元格的值
f.SetCellValue("“3”项定性", "A1", "指标项")
f.SetCellValue("“3”项定性", "B1", "指标值")
// 设置单元格的值
f.SetCellValue("“N”项特色", "A1", "指标项")
f.SetCellValue("“N”项特色", "B1", "指标值")
os.MkdirAll(this.Config.GetString("tpt")+"/temp/", os.ModeDir)
// 根据指定路径保存文件
if err := f.SaveAs(this.Config.GetString("tpt") + "/" + filePath); err != nil {
fmt.Println(err)
this.Display(4, "输出异常")
return
}
//}
run := func(str string, data Map, f *excelize.File) {
var keys []string
for k := range data {

View File

@ -1,8 +1,8 @@
package app
import (
. "../../../hotime"
. "../../../hotime/common"
. "../../../iedc-go"
. "../../common"
//"strings"
)

View File

@ -1,8 +1,8 @@
package app
import (
. "../../../hotime"
. "../../../hotime/common"
. "../../../iedc-go"
. "../../common"
"../../dri/aliyun"
"../../dri/tencent"
"fmt"

View File

@ -1,8 +1,8 @@
package app
import (
. "../../../hotime"
. "../../../hotime/common"
. "../../../iedc-go"
. "../../common"
"fmt"
"time"
//"strings"

View File

@ -1,7 +1,7 @@
package app
import (
. "../../../hotime"
. "../../../iedc-go"
"../../dri/ddsms"
)

View File

@ -1,7 +1,7 @@
package app
import (
. "../../../hotime"
. "../../../iedc-go"
. "../../common"
)

View File

@ -1,10 +1,10 @@
package app
import (
. "../../../hotime"
. "../../../hotime/common"
"../../../hotime/dri/download"
"../../../hotime/dri/tencent"
. "../../../iedc-go"
. "../../common"
"../../dri/download"
"../../dri/tencent"
"encoding/base64"
"fmt"
"io/ioutil"

View File

@ -1,9 +1,9 @@
package app
import (
. "../../../hotime"
. "../../../hotime/cache"
. "../../../hotime/common"
. "../../../iedc-go"
. "../../../iedc-go/cache"
. "../../../iedc-go/common"
"fmt"
"github.com/silenceper/wechat"
"github.com/silenceper/wechat/cache"

Binary file not shown.

View File

@ -1,7 +1,7 @@
package main
import (
"../../hotime"
"../../iedc-go"
"strings"
//"../dri/aliyun"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.