|
@@ -26,13 +26,13 @@ func (n *Network) ProjectExport() {
|
|
|
if export_id == "" {
|
|
|
return
|
|
|
}
|
|
|
- export_id = redis.GetStr("newother", fmt.Sprintf("network_export_%s", export_id))
|
|
|
+ exportIds := redis.GetStr("newother", fmt.Sprintf("network_export_%s", export_id))
|
|
|
args := []interface{}{}
|
|
|
wh, bIds := []string{}, []string{}
|
|
|
pool := make(chan bool, 3)
|
|
|
wait := &sync.WaitGroup{}
|
|
|
lock := &sync.Mutex{}
|
|
|
- for _, v := range strings.Split(export_id, ",") {
|
|
|
+ for _, v := range strings.Split(exportIds, ",") {
|
|
|
args = append(args, v)
|
|
|
wh = append(wh, "?")
|
|
|
if len(args) == 200 {
|
|
@@ -64,11 +64,15 @@ func (n *Network) ProjectExport() {
|
|
|
}
|
|
|
bidList, err := dataexport.GetDataExportSearchResult(util.Mgo_bidding, config.Config.Mongobidding.DbName, config.Config.Elasticsearch, scd, "2", -2)
|
|
|
if err != nil {
|
|
|
+ log.Println("人脉通项目导出", export_id, err)
|
|
|
http.Error(n.ResponseWriter, err.Error(), http.StatusInternalServerError)
|
|
|
return
|
|
|
} else if bidList == nil {
|
|
|
+ log.Println("人脉通项目导出", export_id, "未找到项目的标讯信息")
|
|
|
+ http.Error(n.ResponseWriter, "未找到项目的标讯信息", http.StatusInternalServerError)
|
|
|
return
|
|
|
}
|
|
|
+ log.Println("人脉通项目导出", export_id, len(*bidList))
|
|
|
bidList = dataexport.FormatExportData(util.MQFWENT, bidList, config.Config.WebDomain, "2")
|
|
|
file, err := util.ExportExcelFile(bidList, true)
|
|
|
if err != nil {
|