xuzhiheng 1 жил өмнө
parent
commit
a9abdce2af

+ 32 - 15
CMPlatform/history/historytask.go

@@ -1,22 +1,23 @@
 package history
 
 import (
-	"app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/go-xweb/log"
-	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
-	"app.yhyue.com/moapp/jybase/mongodb"
 	"cmplatform/util"
 	"encoding/json"
 	"fmt"
-	"github.com/antonmedv/expr"
-	"github.com/tealeg/xlsx"
-	"go.mongodb.org/mongo-driver/bson"
 	"io"
 	"os"
 	"regexp"
 	"strings"
 	"sync"
 	"time"
+
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/log"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/mongodb"
+	"github.com/antonmedv/expr"
+	"github.com/tealeg/xlsx"
+	"go.mongodb.org/mongo-driver/bson"
 )
 
 type HistoryData struct {
@@ -707,9 +708,17 @@ func (this *HistoryData) ImportDataUpload() error {
 				for i := 0; i < len(row.Cells); i++ {
 					valueStr := row.Cells[i].String()
 					isOk := false
-					for _, fieldValue := range util.FieldMap {
-						if fieldValue == valueStr {
-							isOk = true
+					if strings.Contains(fileName, "铁塔") {
+						for _, fieldValue := range TtFieldMap {
+							if fieldValue == valueStr {
+								isOk = true
+							}
+						}
+					} else {
+						for _, fieldValue := range util.FieldMap {
+							if fieldValue == valueStr {
+								isOk = true
+							}
 						}
 					}
 					if !isOk {
@@ -760,7 +769,7 @@ func (this *HistoryData) ImportData() {
 	if dataTable == "1" {
 		dataTables = "usermail"
 	}
-	go SaveImportData(fileUrl, dataTables, appid, historyId)
+	go SaveImportData(fileName, fileUrl, dataTables, appid, historyId)
 	util.MgoSave.Save("importData", map[string]interface{}{
 		"fileName":   fileName,
 		"userName":   userName,
@@ -791,7 +800,7 @@ func (this *HistoryData) DelImportData() {
 	}
 }
 
-func SaveImportData(fileUrl, dataTables, appid, historyId string) {
+func SaveImportData(fileName, fileUrl, dataTables, appid, historyId string) {
 	filePath := "/nas/jyqyfw/datatag" + fileUrl
 	xlFile, err := xlsx.OpenFile(filePath)
 	if err != nil {
@@ -811,9 +820,17 @@ func SaveImportData(fileUrl, dataTables, appid, historyId string) {
 				// continue
 				for i := 0; i < len(row.Cells); i++ {
 					valueStr := row.Cells[i].String()
-					for filed, fieldValue := range util.FieldMap {
-						if fieldValue == valueStr {
-							filedArr = append(filedArr, filed)
+					if strings.Contains(fileName, "铁塔") {
+						for filed, fieldValue := range TtFieldMap {
+							if fieldValue == valueStr {
+								filedArr = append(filedArr, filed)
+							}
+						}
+					} else {
+						for filed, fieldValue := range util.FieldMap {
+							if fieldValue == valueStr {
+								filedArr = append(filedArr, filed)
+							}
 						}
 					}
 				}

+ 53 - 8
CMPlatform/history/util_history.go

@@ -1,23 +1,24 @@
 package history
 
 import (
+	"cmplatform/util"
+	"encoding/json"
+	"fmt"
+	"os"
+	"regexp"
+	"sort"
+	"strings"
+	"time"
+
 	"app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/encrypt"
 	"app.yhyue.com/moapp/jybase/go-xweb/log"
 	"app.yhyue.com/moapp/jybase/mail"
 	"app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jybase/redis"
-	"cmplatform/util"
-	"encoding/json"
-	"fmt"
 	"github.com/tealeg/xlsx"
 	"go.mongodb.org/mongo-driver/bson"
 	"go.mongodb.org/mongo-driver/bson/primitive"
-	"os"
-	"regexp"
-	"sort"
-	"strings"
-	"time"
 )
 
 var LetterCase = regexp.MustCompile("[A-Za-z]")
@@ -40,6 +41,50 @@ var MatchType = map[string]interface{}{
 	"9": "s_winner",
 }
 
+var TtFieldMap = map[string]string{
+	//铁塔
+	"infoId":            "唯一标识",
+	"projectId":         "项目标识",
+	"infoTitle":         "标题",
+	"areaCity":          "城市",
+	"areaCountry":       "区县",
+	"areaProvince":      "省份",
+	"keywords":          "关键词",
+	"infoPublishTime":   "发布时间",
+	"bidWinnerAmount":   "中标金额(元)",
+	"businessType":      "业务场景标签",
+	"bidingAcquireTime": "招标文件获取开始时间",
+	"bidingEndTime":     "招标文件获取截止时间",
+	"openBidingTime":    "开标日期",
+	"tenderBeginTime":   "投标文件递交开始时间",
+	"tenderEndTime":     "投标文件递交截止时间",
+	"isElectronic":      "投标方式",
+	"infoType":          "公告类型一级",
+	"infoTypeSegment":   "公告类型二级",
+	"zhaoIndustry":      "铁塔行业",
+	"firstLevel":        "采购单位类型",
+	"secondLevel":       "采购单位标签",
+	"zhongIndustry":     "中标单位标签",
+	"zhaoRelationName":  "采购单位联系人",
+	"zhaoRelationWay":   "采购单位联系电话",
+	"zhaoBiaoUnit":      "采购单位",
+	"xmNumber":          "项目编号",
+	"zhongRelationWay":  "中标单位联系电话",
+	"biddingType":       "招标方式",
+	"zhongRelationName": "中标单位联系人",
+	"agentUnit":         "招标代理机构",
+	"agentRelationName": "招标代理机构联系人",
+	"agentRelationWay":  "招标代理机构联系电话",
+	"zhongBiaoUnit":     "中标单位",
+	"isOptimization":    "是否优选",
+	"bidBudget":         "预算(元)",
+	"infoContent":       "信息内容",
+	"infoFile":          "附件下载链接",
+	"projectname":       "项目名称",
+	"href":              "公告地址",
+	"jybxhref":          "剑鱼标讯地址",
+}
+
 type (
 	OwnerContact struct {
 		ContactData []ContactDataStruct `json:"contactData"`

+ 260 - 91
CMPlatform/push/push.go

@@ -1,18 +1,22 @@
 package push
 
 import (
+	"bytes"
+	. "cmplatform/util"
+	"encoding/json"
+	"fmt"
+	"net/url"
+	"strings"
+	"time"
+
+	"app.yhyue.com/moapp/jybase/mongodb"
+
 	"app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/encrypt"
 	"app.yhyue.com/moapp/jybase/go-xweb/log"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"app.yhyue.com/moapp/jybase/redis"
-	"cmplatform/util"
-	"encoding/json"
-	"fmt"
 	"github.com/tealeg/xlsx"
-	"net/url"
-	"strings"
-	"time"
 )
 
 type Push struct {
@@ -26,6 +30,46 @@ var (
 	fields1 = "city,projectname,budget,bidopentime,buyer,publishtime,buyer_type,href,district,bidtype,bidway,bidendtime,docamount,agency,buyerperson,buyertel,projectcode,id,projectId,jybxhref"
 	fields2 = "city,projectname,bidamount,s_winner,winner_type,buyer,publishtime,buyer_type,href,district,winner_style,bidtype,budget,agency,agency_fee,projectcode,jybxhref,id,projectId"
 	SE      = encrypt.SimpleEncrypt{Key: "topJYBX2019"}
+	subMap  = map[string]map[string]string{
+		"招标":   map[string]string{"0": "3"},
+		"竞谈":   map[string]string{"0": "3"},
+		"单一":   map[string]string{"0": "3"},
+		"询价":   map[string]string{"0": "3"},
+		"竞价":   map[string]string{"0": "3"},
+		"邀标":   map[string]string{"0": "3"},
+		"论证意见": map[string]string{"1": "2"},
+		"预告":   map[string]string{"1": "2"},
+		"预审":   map[string]string{"1": "2"},
+		"预审结果": map[string]string{"1": "2"},
+		"需求公示": map[string]string{"1": "2"},
+		"采购意向": map[string]string{"1": "2"},
+		"变更":   map[string]string{"2": "5"},
+		"废标":   map[string]string{"3": "7"},
+		"流标":   map[string]string{"3": "8"},
+		"中标":   map[string]string{"3": "10"},
+		"成交":   map[string]string{"3": "11"},
+		"结果变更": map[string]string{"3": "11"},
+		"合同":   map[string]string{"3": "12"},
+		"验收":   map[string]string{"5": "13"},
+		"违规":   map[string]string{"5": "14"},
+	}
+	bidtypeMap = map[string]string{
+		"招标": "0",
+		"邀标": "1",
+		"竞谈": "2",
+		"单一": "3",
+		"询价": "4",
+		"竞价": "6",
+	}
+	subtypeMap = map[string]string{
+		"招标": "0",
+		"邀标": "1",
+		"竞谈": "2",
+		"单一": "3",
+		"询价": "4",
+		"其它": "5",
+		"竞价": "6",
+	}
 )
 
 func (this *Push) Index() {
@@ -45,87 +89,92 @@ func (this *Push) DataPush() {
 	} else {
 		fields = fields2
 	}
-	if getDataType == "0" {
-		query := map[string]interface{}{"appid": appid, "historyId": historyId}
-		// fieldMap := map[string]int{}
-		// for _, v := range strings.Split(fields, ",") {
-		// 	fieldMap[v] = 1
-		// }
-		data, ok := util.MgoSave.Find(dataSource, query, nil, nil, false, -1, -1)
-		if ok && data != nil && len(*data) > 0 {
-			datasArr := []map[string]interface{}{}
-			for _, v := range *data {
-				datamap := map[string]interface{}{}
-				for _, vv := range strings.Split(fields, ",") {
-					if v[vv] != nil {
-						datamap[vv] = fmt.Sprint(v[vv])
-					} else {
-						datamap[vv] = ""
+	if appid == "jyIhxXQQoJAgVZQURLLwRE" {
+		errstr := ttCRM(dataSource, historyId)
+		this.ServeJson(map[string]interface{}{"errMsg": errstr})
+	} else {
+		if getDataType == "0" {
+			query := map[string]interface{}{"appid": appid, "historyId": historyId}
+			// fieldMap := map[string]int{}
+			// for _, v := range strings.Split(fields, ",") {
+			// 	fieldMap[v] = 1
+			// }
+			data, ok := MgoSave.Find(dataSource, query, nil, nil, false, -1, -1)
+			if ok && data != nil && len(*data) > 0 {
+				datasArr := []map[string]interface{}{}
+				for _, v := range *data {
+					datamap := map[string]interface{}{}
+					for _, vv := range strings.Split(fields, ",") {
+						if v[vv] != nil {
+							datamap[vv] = fmt.Sprint(v[vv])
+						} else {
+							datamap[vv] = ""
+						}
 					}
+					id := common.ObjToString(v["id"])
+					datamap["id"] = SE.EncodeString(id)
+					datasArr = append(datasArr, datamap)
 				}
-				id := common.ObjToString(v["id"])
-				datamap["id"] = SE.EncodeString(id)
-				datasArr = append(datasArr, datamap)
+				dataMap["dataList"] = datasArr
 			}
-			dataMap["dataList"] = datasArr
+		} else if getDataType == "1" {
+			dataMap["dataList"] = ExcelParse(dataType)
 		}
-	} else if getDataType == "1" {
-		dataMap["dataList"] = ExcelParse(dataType)
-	}
-	log.Debug(dataMap)
-	databyte, _ := json.Marshal(dataMap)
-	dataStr := string(databyte)
-	//
-	token := getAccessToken()
-	// token := "f9cb92a6-356b-433f-a8bd-09f1deef6d52"
-	log.Debug("token111:", token)
-	//
-	tokens := getAccessTokens(token)
-	log.Debug("token222:", tokens)
-	//
-	dataStr = strings.ReplaceAll(dataStr, `"`, `\"`)
-	data := `{"access_token":"` + tokens + `","postjson":"` + dataStr + `"}`
-	log.Debug("data:", data)
-	dataTypes := ""
-	if dataType == "0" {
-		dataTypes = "JY_TO_DICT_fishBid2"
-	} else {
-		dataTypes = "JY_TO_DICT_WinBid2"
-	}
-	apiurl := "http://111.7.112.55:20110/oppf?method=" + dataTypes + "&appId=1068246&appKey=15c1da231a946f9615ee9d56138952a2&format=json&busiSerial=1&OPCODE=A888888&version=1.0&accessToken=" + tokens + "&timestamp=" + fmt.Sprint(time.Now().Format("20060102150405")) + "&sign=abc"
-	log.Debug("apiurl:", apiurl)
-	errstr := ""
-	response, err := util.HttpPostJson(apiurl, data)
-	result := map[string]interface{}{}
-	if err == nil {
-		errstr = string(response)
-		resMap := common.ObjToMap(string(response))
-		result = *resMap
-		log.Debug("响应信息 ", *resMap)
-		if resMap != nil && *resMap != nil {
-			respCode := common.ObjToString((*resMap)["respCode"])
-			if respCode == "00000" {
-				log.Debug("成功")
-			} else {
-				log.Debug("异常")
+		log.Println(dataMap)
+		databyte, _ := json.Marshal(dataMap)
+		dataStr := string(databyte)
+		//
+		token := getAccessToken()
+		// token := "f9cb92a6-356b-433f-a8bd-09f1deef6d52"
+		log.Println("token111:", token)
+		//
+		tokens := getAccessTokens(token)
+		log.Println("token222:", tokens)
+		//
+		dataStr = strings.ReplaceAll(dataStr, `"`, `\"`)
+		data := `{"access_token":"` + tokens + `","postjson":"` + dataStr + `"}`
+		log.Println("data:", data)
+		dataTypes := ""
+		if dataType == "0" {
+			dataTypes = "JY_TO_DICT_fishBid2"
+		} else {
+			dataTypes = "JY_TO_DICT_WinBid2"
+		}
+		apiurl := "http://111.7.112.55:20110/oppf?method=" + dataTypes + "&appId=1068246&appKey=15c1da231a946f9615ee9d56138952a2&format=json&busiSerial=1&OPCODE=A888888&version=1.0&accessToken=" + tokens + "&timestamp=" + fmt.Sprint(time.Now().Format("20060102150405")) + "&sign=abc"
+		log.Println("apiurl:", apiurl)
+		errstr := ""
+		response, err := HttpPostJson(apiurl, data)
+		result := map[string]interface{}{}
+		if err == nil {
+			errstr = string(response)
+			resMap := common.ObjToMap(string(response))
+			result = *resMap
+			log.Println("响应信息 ", *resMap)
+			if resMap != nil && *resMap != nil {
+				respCode := common.ObjToString((*resMap)["respCode"])
+				if respCode == "00000" {
+					log.Println("成功")
+				} else {
+					log.Println("异常")
+				}
 			}
+		} else {
+			errstr = "响应失败 " + err.Error()
+			log.Println("响应失败 ", err)
 		}
-	} else {
-		errstr = "响应失败 " + err.Error()
-		log.Debug("响应失败 ", err)
+		MgoSave.Save("dataPushLog", map[string]interface{}{
+			"dataLenth":   len(dataMap["dataList"]),
+			"createtime":  time.Now().Unix(),
+			"appid":       appid,
+			"getDataType": getDataType,
+			"dataType":    dataType,
+			"historyId":   historyId,
+			"dataSource":  dataSource,
+			"result":      result,
+			"errMsg":      errstr,
+		})
+		this.ServeJson(map[string]interface{}{"errMsg": errstr})
 	}
-	util.MgoSave.Save("dataPushLog", map[string]interface{}{
-		"dataLenth":   len(dataMap["dataList"]),
-		"createtime":  time.Now().Unix(),
-		"appid":       appid,
-		"getDataType": getDataType,
-		"dataType":    dataType,
-		"historyId":   historyId,
-		"dataSource":  dataSource,
-		"result":      result,
-		"errMsg":      errstr,
-	})
-	this.ServeJson(map[string]interface{}{"errMsg": errstr})
 }
 
 func ExcelParse(dataType string) []map[string]interface{} {
@@ -178,24 +227,24 @@ func getAccessToken() string {
 		apiurls := "http://111.7.112.55:20200/aopoauth/oauth/token?app_id=1077846&app_key=c1165e4efc7b83831c4b76282f7f61c2&grant_type=client_credentials"
 		data := make(url.Values)
 		now := time.Now().Unix()
-		bs, err := util.HttpPostForm(apiurls, map[string]string{
+		bs, err := HttpPostForm(apiurls, map[string]string{
 			"timestamp": fmt.Sprint(now),
 		}, data)
-		log.Debug("返回内容", err, string(bs))
+		log.Println("返回内容", err, string(bs))
 		resMap := common.ObjToMap(string(bs))
 		if *resMap != nil {
-			log.Debug("调用token成功 ", *resMap)
+			log.Println("调用token成功 ", *resMap)
 			token := common.ObjToString((*resMap)["access_token"])
 			if token != "" {
-				log.Debug("成功")
+				log.Println("成功")
 				redis.Put("datag", "yidongtoken1", token, 60*60*24)
 				return token
 			} else {
-				log.Debug("异常")
+				log.Println("异常")
 				return ""
 			}
 		} else {
-			log.Debug("调用token失败")
+			log.Println("调用token失败")
 			return ""
 		}
 	}
@@ -207,7 +256,7 @@ func getAccessTokens(token string) string {
 		return res
 	} else {
 		apiurls := "http://111.7.112.55:20110/oppf?method=JY_TO_DICT_TOKEN&appId=1068246&appKey=15c1da231a946f9615ee9d56138952a2&format=json&busiSerial=1&OPCODE=A888888&version=1.0&accessToken=" + token + "&timestamp=" + fmt.Sprint(time.Now().Format("20060102150405")) + "&sign=abc"
-		log.Debug("EPMtokenapiurl:", apiurls)
+		log.Println("EPMtokenapiurl:", apiurls)
 		grant_type := "client_credentials"
 		scope := "all"
 		client_id := "jianyu_client"
@@ -218,20 +267,140 @@ func getAccessTokens(token string) string {
 		data["client_id"] = client_id
 		data["client_secret"] = client_secret
 		bytestr, _ := json.Marshal(data)
-		bs, err := util.HttpPostJson(apiurls, string(bytestr))
+		bs, err := HttpPostJson(apiurls, string(bytestr))
 		if err != nil {
-			log.Debug("调用 token 失败", err)
+			log.Println("调用 token 失败", err)
 		}
 		resMap := common.ObjToMap(string(bs))
 		if *resMap != nil {
-			log.Debug("调用token成功 ", *resMap)
+			log.Println("调用token成功 ", *resMap)
 			resMaps := common.ObjToMap((*resMap)["result"])
 			jsonMap := common.ObjToMap((*resMaps)["response"])
 			redis.Put("datag", "yidongtoken2", common.ObjToString((*jsonMap)["access_token"]), 7200)
 			return common.ObjToString((*jsonMap)["access_token"])
 		} else {
-			log.Debug("调用token失败")
+			log.Println("调用token失败")
 			return ""
 		}
 	}
 }
+
+func ttCRM(dataSource, historyId string) string {
+	query, errStr := map[string]interface{}{"historyId": historyId}, ""
+	data, ok := MgoSave.Find(dataSource, query, nil, nil, false, -1, -1)
+	if ok && data != nil && len(*data) > 0 {
+		for _, v := range *data {
+			id := common.ObjToString(v["infoId"])
+			v["infoId"] = SE.EncodeString(id)
+			bidtype := common.ObjToString(v["biddingType"])
+			toptype := common.ObjToString(v["infoType"])
+			subtype := common.ObjToString(v["infoTypeSegment"])
+			bidway := common.ObjToString(v["isElectronic"])
+			if bidtype != "" {
+				v["biddingType"] = bidtypeMap[bidtype]
+			} else {
+				v["biddingType"] = subtypeMap[subtype]
+			}
+			if bidway == "电子投标" {
+				v["isElectronic"] = "1"
+			} else {
+				v["isElectronic"] = "0"
+			}
+			if subtype == "其它" {
+				if toptype == "预告" {
+					v["infoType"] = "1"
+					v["infoTypeSegment"] = "2"
+				} else if toptype == "招标" {
+					v["infoType"] = "2"
+					v["infoTypeSegment"] = "6"
+				} else if toptype == "结果" {
+					v["infoType"] = "3"
+					v["infoTypeSegment"] = "9"
+				} else {
+					v["infoType"] = "5"
+					v["infoTypeSegment"] = "15"
+				}
+			} else {
+				for t, s := range subMap[subtype] {
+					v["infoType"] = t
+					v["infoTypeSegment"] = s
+				}
+			}
+			infos, ok := MgoBidding.FindOne(BiddingColl, map[string]interface{}{"_id": mongodb.StringTOBsonId(id)})
+			if ok && infos != nil && len(*infos) > 0 {
+				info := *infos
+				if info["projectinfo"] != nil {
+					projectInfo := common.ObjToMap(info["projectinfo"])
+					if projectInfo != nil && len(*projectInfo) > 0 {
+						if (*projectInfo)["attachments"] != nil {
+							filesArr := []string{}
+							fileUrl := "http://jy-datafile.oss-cn-beijing.aliyuncs.com/"
+							if attachments, oks := (*projectInfo)["attachments"].(map[string]interface{}); oks {
+								for _, v := range attachments {
+									if atta, ok := v.(map[string]interface{}); ok {
+										if atta["fid"] != nil && common.ObjToString(atta["fid"]) != "" {
+											filesArr = append(filesArr, fileUrl+common.ObjToString(atta["fid"]))
+										} else {
+											if atta["org_url"] != nil {
+												filesArr = append(filesArr, common.ObjToString(atta["org_url"]))
+											}
+										}
+									}
+								}
+							}
+							log.Println("查询附件结果:", id, "附件数量:", len(filesArr))
+							if len(filesArr) > 0 {
+								v["infoFile"] = strings.Join(filesArr, ",")
+							}
+						}
+					}
+				}
+			}
+			delete(v, "_id")
+			delete(v, "appid")
+			delete(v, "createtime")
+			delete(v, "historyId")
+			errStr = postTT(dataSource, v)
+			if strings.Contains(errStr, "失败") {
+				return errStr
+			}
+		}
+	}
+	return errStr
+}
+
+func postTT(dataSource string, data map[string]interface{}) string {
+	apiurl := "https://zlbss-crm.chinatowercom.cn/erp/syncdata/open/objdata/push"
+	log.Println("apiurl:", apiurl)
+	header := map[string]string{
+		"token":             "43f8e3c05a8edf8ee85bbc8755043b01",
+		"tenantId":          "40070007",
+		"objectApiName":     "object_HDngT__c",
+		"dataCenterId":      "649d4eb19ced6c0001587f26",
+		"id":                common.ObjToString(data["infoId"]),
+		"version":           "v1",
+		"Content-Type":      "application/json",
+		"directSync":        "true",
+		"destObjectApiName": "object_HDngT__c",
+	}
+	dataMap := map[string]interface{}{"objAPIName": "object_HDngT__c", "masterFieldVal": data, "detailFieldVals": map[string]interface{}{}}
+	dataJson, _ := json.Marshal(&dataMap)
+	log.Println("dataJson ", string(dataJson))
+	response, err := HttpPost(apiurl, header, bytes.NewReader(dataJson))
+	errstr := ""
+	if err == nil {
+		errstr = string(response)
+		resMap := common.ObjToMap(string(response))
+		log.Println("响应信息 ", *resMap)
+		if resMap != nil && *resMap != nil {
+			errMsg := common.ObjToString((*resMap)["errMsg"])
+			if errMsg == "成功" {
+				log.Println("成功")
+			}
+		}
+	} else {
+		errstr = "响应失败 " + err.Error()
+		log.Println("响应失败 ", err)
+	}
+	return errstr
+}

+ 3 - 3
CMPlatform/web/templates/push/index.html

@@ -102,17 +102,17 @@
                 "historyId": historyId
             }
             if (pushType == 0) {
-                com.maskShow("正在生成数据...");
+                com.maskShow("正在推送数据...");
                 $.ajax({
                     url: "/push/dataPush",
                     type: 'POST',
                     data: param,
                     success: function (r) {
                         com.maskHide();
-                        showTip(r.errMsg, 2000);
+                        showTip(r.errMsg, 4000);
                     },
                     error: function (r) {
-                        showTip("数据生成失败", 5000);
+                        showTip("数据推送失败", 5000);
                     }
                 })
             } else if (dataType == 1){