Forráskód Böngészése

Merge branch 'feature/v4.7.49' of http://192.168.3.207:8080/qmx/jy into feature/v4.7.49

tangshizhe 2 éve
szülő
commit
403253764d

+ 30 - 30
src/jfw/modules/bigmember/src/entity/marketAnalysis/customizad_distribution.go

@@ -70,7 +70,7 @@ func getPreviousMarket(sTime, eTime time.Time) int64 {
 	return os_time
 }
 
-//判断是否月初到月末
+// 判断是否月初到月末
 func SEMonth(sTime, eTime time.Time) bool {
 	var day int
 	month := int(eTime.Month())
@@ -153,8 +153,8 @@ func getBidamountStatistics(sTime, eTime time.Time) string {
 	return timeRange[:len(timeRange)-1]
 }
 
-//getMonthRange获取月份范围
-//isStart true本月月初  false 本月月末(下月月初)
+// getMonthRange获取月份范围
+// isStart true本月月初  false 本月月末(下月月初)
 func getMonthRange(t time.Time, isStart bool) time.Time {
 	if isStart {
 		return time.Date(t.Year(), t.Month(), 1, 0, 0, 0, 0, t.Location())
@@ -172,8 +172,8 @@ func GetYearData(sTime, eTime time.Time) (bool, string) {
 	return _b, getCommonYearStatistics(sTime, eTime)
 }
 
-//getYearRange获取月份范围
-//isStart true本月月初  false 本月月末(下月月初)
+// getYearRange获取月份范围
+// isStart true本月月初  false 本月月末(下月月初)
 func getYearRange(t time.Time, isStart bool) time.Time {
 	if isStart {
 		return time.Date(t.Year(), 1, 1, 0, 0, 0, 0, t.Location())
@@ -181,7 +181,7 @@ func getYearRange(t time.Time, isStart bool) time.Time {
 	return time.Date(t.Year()+1, 1, 1, 0, 0, 0, 0, t.Location())
 }
 
-//年份统计
+// 年份统计
 func getCommonYearStatistics(sTime, eTime time.Time) string {
 	timeRange := ``
 	tmpTime, rTime, tEndTime := sTime, sTime, getYearRange(eTime, false)
@@ -261,7 +261,7 @@ func sequential(now, old float64) interface{} {
 	return (now - old) / old
 }
 
-//市场概况+时间分布
+// 市场概况+时间分布
 func (mae *MarketAnalysisEntity) MarketTime() (map[string]interface{}, error) {
 	var (
 		sql                   []string
@@ -352,7 +352,7 @@ func (mae *MarketAnalysisEntity) MarketTime() (map[string]interface{}, error) {
 	return rMap, nil
 }
 
-//时间分布月,年通用数据处理
+// 时间分布月,年通用数据处理
 func (mae *MarketAnalysisEntity) TimeData(_b bool, thisRow []Buckets) map[string]interface{} {
 	var count_ss, amout_ss []map[string]interface{}
 
@@ -395,35 +395,35 @@ func amountDistribution(v float64, data map[string]*distributionTrend) {
 		data["<10万"].Amount += v
 		data["<10万"].Count++
 	} else if v < 500000 {
-		if data["10万-50万"] == nil {
-			data["10万-50万"] = new(distributionTrend)
+		if data["10万~50万"] == nil {
+			data["10万~50万"] = new(distributionTrend)
 		}
-		data["10万-50万"].Amount += v
-		data["10万-50万"].Count++
+		data["10万~50万"].Amount += v
+		data["10万~50万"].Count++
 	} else if v < 1000000 {
-		if data["50万-100万"] == nil {
-			data["50万-100万"] = new(distributionTrend)
+		if data["50万~100万"] == nil {
+			data["50万~100万"] = new(distributionTrend)
 		}
-		data["50万-100万"].Amount += v
-		data["50万-100万"].Count++
+		data["50万~100万"].Amount += v
+		data["50万~100万"].Count++
 	} else if v < 1000000*5 {
-		if data["100万-500万"] == nil {
-			data["100万-500万"] = new(distributionTrend)
+		if data["100万~500万"] == nil {
+			data["100万~500万"] = new(distributionTrend)
 		}
-		data["100万-500万"].Amount += v
-		data["100万-500万"].Count++
+		data["100万~500万"].Amount += v
+		data["100万~500万"].Count++
 	} else if v < 1000000*10 {
-		if data["500万-1000万"] == nil {
-			data["500万-1000万"] = new(distributionTrend)
+		if data["500万~1000万"] == nil {
+			data["500万~1000万"] = new(distributionTrend)
 		}
-		data["500万-1000万"].Amount += v
-		data["500万-1000万"].Count++
+		data["500万~1000万"].Amount += v
+		data["500万~1000万"].Count++
 	} else if v < 100000000 {
-		if data["1000万-1亿"] == nil {
-			data["1000万-1亿"] = new(distributionTrend)
+		if data["1000万~1亿"] == nil {
+			data["1000万~1亿"] = new(distributionTrend)
 		}
-		data["1000万-1亿"].Amount += v
-		data["1000万-1亿"].Count++
+		data["1000万~1亿"].Amount += v
+		data["1000万~1亿"].Count++
 	} else if v >= 100000000 {
 		if data["≥1亿"] == nil {
 			data["≥1亿"] = new(distributionTrend)
@@ -673,7 +673,7 @@ type distributionTrend struct {
 	Amount float64
 }
 
-var Analysis = []string{"<10万", "10万-50万", "50万-100万", "100万-500万", "500万-1000万", "1000万-1亿", "≥1亿"}
+var Analysis = []string{"<10万", "10万~50万", "50万~100万", "100万~500万", "500万~1000万", "1000万~1亿", "≥1亿"}
 
 func BuyerAnalysis(thisBuyerRow BuyerWinnerRow, rMap map[string]interface{}, winnerName map[string]string) {
 	type buyer struct {
@@ -796,7 +796,7 @@ func BuyerAnalysis(thisBuyerRow BuyerWinnerRow, rMap map[string]interface{}, win
 	rMap["buyer_amount_top3"] = amountMap
 }
 
-//中标单位分析
+// 中标单位分析
 func WinningAnalysis(thisWinnerRow BuyerWinnerRow, rMap map[string]interface{}, winnerName map[string]string) {
 	type s_Winner struct {
 		Name        string      `json:"key"`

+ 7 - 8
src/jfw/modules/common/src/qfw/util/bidsearch/search.go

@@ -41,7 +41,7 @@ const (
 	bidSearch_field   = bidSearch_field_1 + `,"bidopentime","winner","buyer","projectname","projectcode","projectinfo"`
 )
 
-//GetWxsearchlistData 移动端招标信息搜索
+// GetWxsearchlistData 移动端招标信息搜索
 func GetWxsearchlistData(keywords, scope, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists string, pageNum int, selectTypeArr []string, field, notkey string, searchTypeSwitch bool, pageSize int) (list *[]map[string]interface{}, b_word, a_word, s_word string) {
 	var hightlightContent bool = false //是否高亮正文
 	for _, v := range selectTypeArr {
@@ -75,7 +75,7 @@ func GetWxsearchlistData(keywords, scope, city, publishtime, subtype, industry,
 	return list, b_word, a_word, s_word
 }
 
-//GetPcBidSearchData pc端招标信息搜索
+// GetPcBidSearchData pc端招标信息搜索
 func GetPcBidSearchData(searchvalue, area, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists string, start int, isGetCount bool, selectTypeArr []string, field, notkey string, ispayed, searchTypeSwitch bool, bidField string, pageSize int, userId string) (count, totalPage int64, list *[]map[string]interface{}) {
 	var findfields string
 	var hightlightContent bool = false //是否高亮正文
@@ -249,12 +249,12 @@ func GetBidSearchQuery(area, city, publishtime, subtype, winner, buyerclass stri
 	return query
 }
 
-//包含正文或 附件 不包含标题
+// 包含正文或 附件 不包含标题
 func DetailFileORTitle(findfields string) bool {
 	return (strings.Contains(findfields, `"detail"`) || strings.Contains(findfields, `"filetext"`)) && !strings.Contains(findfields, `"title"`)
 }
 
-//包含标题和正文
+// 包含标题和正文
 func DetailTitle(findfields string) bool {
 	return strings.Contains(findfields, `"detail"`) && strings.Contains(findfields, `"title"`)
 }
@@ -419,7 +419,7 @@ func PublicSearch(userId, selectType, publishtime string, bidSearchOldUserLimit
 	return isPayedUser, publishtime, queryItems, currentPage, start
 }
 
-//所有的再次分词查询 只查标题
+// 所有的再次分词查询 只查标题
 func IntegratedData(platform string, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, secondFlag, area, city, publishtime, subtype, buyerclass, notkey string, queryItems []string, list *[]map[string]interface{}, field string, searchTypeSwitch bool, bidField string, pageSize int) (string, string, string, string, *[]map[string]interface{}) {
 	var pcAjaxFlag string
 	var secRel *[]map[string]interface{} = list
@@ -480,8 +480,8 @@ func classify(stp, area, industry string, configData map[string]interface{}) (st
 	return tpadd, areaadd, induadd
 }
 
-//list != nil && len(*list) == bidsearch.SearchPageSize_APP && pageNum < util.If(isPayedUser, bidsearch.SearchMaxPageNum_PAYED, bidsearch.SearchMaxPageNum_APP).(int)
-//数据格式化处理
+// list != nil && len(*list) == bidsearch.SearchPageSize_APP && pageNum < util.If(isPayedUser, bidsearch.SearchMaxPageNum_PAYED, bidsearch.SearchMaxPageNum_APP).(int)
+// 数据格式化处理
 func LisetData(stype, pageNum int, list *[]map[string]interface{}, secondFlag string, configData map[string]interface{}, isPayedUser bool, pageSize int, userId string) ([]map[string]interface{}, int64, bool) {
 	var (
 		secondList  []map[string]interface{}
@@ -556,7 +556,6 @@ func SearchData(platform string, request *http.Request, currentPage int, userId,
 	} else {
 		count, totalPage, list = GetPcBidSearchData(s_word, area, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, start, isGetCount, queryItems, field, notkey, isPayedUser, searchTypeSwitch, bidField, pageSize, userId)
 	}
-
 	if len([]rune(s_word)) > 3 && int(count) < pageSize && start == number && secondSearch {
 		var paramList = list
 		s_word, pcAjaxFlag, secondFlag, second, list = IntegratedData(platform, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, secondFlag, area, city, publishtime, subtype, buyerclass, notkey, queryItems, paramList, field, searchTypeSwitch, bidField, pageSize)