|
@@ -3,10 +3,8 @@ package main
|
|
|
import (
|
|
|
"fmt"
|
|
|
"github.com/xuri/excelize/v2"
|
|
|
- util "jygit.jydev.jianyu360.cn/data_processing/common_utils"
|
|
|
"jygit.jydev.jianyu360.cn/data_processing/common_utils/mongodb"
|
|
|
"log"
|
|
|
- "strings"
|
|
|
"testing"
|
|
|
)
|
|
|
|
|
@@ -149,7 +147,7 @@ func TestAAA(t *testing.T) {
|
|
|
sess := Mgo.GetMgoConn()
|
|
|
defer Mgo.DestoryMongoConn(sess)
|
|
|
|
|
|
- f, err := excelize.OpenFile("./河南2024专项债.xlsx")
|
|
|
+ f, err := excelize.OpenFile("./四川专项债.xlsx")
|
|
|
if err != nil {
|
|
|
fmt.Println(err)
|
|
|
return
|
|
@@ -220,15 +218,15 @@ func TestAAA(t *testing.T) {
|
|
|
for _, bond := range bonds {
|
|
|
if bondData, ok := bond.(map[string]interface{}); ok {
|
|
|
if jcxx, ok := bondData["jbxx"].(map[string]interface{}); ok {
|
|
|
- if strings.Contains(util.ObjToString(jcxx["bondName"]), "2024") {
|
|
|
- bondInsert := make([]interface{}, 0)
|
|
|
- bondInsert = append(bondInsert, projectName)
|
|
|
- for _, v := range keys2 {
|
|
|
- bondInsert = append(bondInsert, jcxx[v])
|
|
|
- }
|
|
|
- bondLine++
|
|
|
- f.SetSheetRow("债券详情", fmt.Sprintf("%s%d", "A", line), &bondInsert)
|
|
|
+ //if strings.Contains(util.ObjToString(jcxx["bondName"]), "2024") {
|
|
|
+ bondInsert := make([]interface{}, 0)
|
|
|
+ bondInsert = append(bondInsert, projectName)
|
|
|
+ for _, v := range keys2 {
|
|
|
+ bondInsert = append(bondInsert, jcxx[v])
|
|
|
}
|
|
|
+ bondLine++
|
|
|
+ f.SetSheetRow("债券详情", fmt.Sprintf("%s%d", "A", line), &bondInsert)
|
|
|
+ //}
|
|
|
}
|
|
|
}
|
|
|
}
|