|
@@ -3,10 +3,9 @@ package services
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
+ "github.com/rdlucklib/rdluck_tools/http"
|
|
|
"hongze/hongze_edb_lib/utils"
|
|
|
"net/url"
|
|
|
-
|
|
|
- "github.com/rdlucklib/rdluck_tools/http"
|
|
|
)
|
|
|
|
|
|
type EdbDataFromPb struct {
|
|
@@ -18,20 +17,20 @@ type EdbDataFromPb struct {
|
|
|
|
|
|
// GetEdbDataFromPb 获取Pb数据
|
|
|
func GetEdbDataFromPb(edbCode, startDate, endDate string) (item *EdbDataFromPb, err error) {
|
|
|
- edbCode = url.QueryEscape(edbCode)
|
|
|
+ //edbCode = url.QueryEscape(edbCode)
|
|
|
bpUrl := utils.Hz_Pb_Data_Url + `edbInfo/pb?EdbCode=%s&StartDate=%s&EndDate=%s`
|
|
|
bpUrl = fmt.Sprintf(bpUrl, edbCode, startDate, endDate)
|
|
|
utils.FileLog.Info("bpUrl:" + bpUrl)
|
|
|
body, err := http.Get(bpUrl)
|
|
|
if err != nil {
|
|
|
- utils.FileLog.Info("GetEdbDataByPb Err:"+err.Error())
|
|
|
+ utils.FileLog.Info("GetEdbDataByPb Err:" + err.Error())
|
|
|
return
|
|
|
}
|
|
|
utils.FileLog.Info("GetEdbDataByPb result:" + string(body))
|
|
|
item = new(EdbDataFromPb)
|
|
|
err = json.Unmarshal(body, &item)
|
|
|
if err != nil {
|
|
|
- utils.FileLog.Info("GetEdbDataByPb Unmarshal Err:"+err.Error())
|
|
|
+ utils.FileLog.Info("GetEdbDataByPb Unmarshal Err:" + err.Error())
|
|
|
return
|
|
|
}
|
|
|
edbCode, _ = url.QueryUnescape(edbCode)
|