Эх сурвалжийг харах

Merge branch 'feature/v4.8.83' of https://jygit.jydev.jianyu360.cn/qmx/jy into dev/v4.8.83_wmh

wenmenghao321 1 жил өмнө
parent
commit
bbb0ae7295

+ 929 - 3
src/dataService.json

@@ -1,5 +1,931 @@
 {
-  "purchasingData": ["DR", "物业管理", "信息系统", "数字档案", "服务器", "工程监理", "无人机网络安全"],
-  "area": ["广东","河南","北京","江苏","湖北","山东","河北","四川","陕西"],
-  "industry": ["信息技术","服务采购","行政办公","弱电安防","建筑工程","水利水电","医疗卫生","交通工程","机械设备"]
+  "industryArr": [
+    {
+      "areaArr": [{
+        "area": "广东",
+        "quarterArr": [{
+          "firstQuarter": 37588
+        }, {
+          "secondQuarter": 47537
+        }, {
+          "thirdQuarter": 44969
+        }, {
+          "fourthQuarter": 38246
+        }]
+      }, {
+        "area": "河南",
+        "quarterArr": [{
+          "firstQuarter": 5107
+        }, {
+          "secondQuarter": 7002
+        }, {
+          "thirdQuarter": 9423
+        }, {
+          "fourthQuarter": 9289
+        }]
+      }, {
+        "area": "北京",
+        "quarterArr": [{
+          "firstQuarter": 8591
+        }, {
+          "secondQuarter": 12634
+        }, {
+          "thirdQuarter": 14005
+        }, {
+          "fourthQuarter": 12150
+        }]
+      }, {
+        "area": "江苏",
+        "quarterArr": [{
+          "firstQuarter": 11404
+        }, {
+          "secondQuarter": 15346
+        }, {
+          "thirdQuarter": 16518
+        }, {
+          "fourthQuarter": 14523
+        }]
+      }, {
+        "area": "湖北",
+        "quarterArr": [{
+          "firstQuarter": 9211
+        }, {
+          "secondQuarter": 13292
+        }, {
+          "thirdQuarter": 13539
+        }, {
+          "fourthQuarter": 13637
+        }]
+      }, {
+        "area": "山东",
+        "quarterArr": [{
+          "firstQuarter": 10696
+        }, {
+          "secondQuarter": 18387
+        }, {
+          "thirdQuarter": 16995
+        }, {
+          "fourthQuarter": 16732
+        }]
+      }, {
+        "area": "河北",
+        "quarterArr": [{
+          "firstQuarter": 4713
+        }, {
+          "secondQuarter": 5844
+        }, {
+          "thirdQuarter": 5807
+        }, {
+          "fourthQuarter": 4732
+        }]
+      }, {
+        "area": "四川",
+        "quarterArr": [{
+          "firstQuarter": 7101
+        }, {
+          "secondQuarter": 11730
+        }, {
+          "thirdQuarter": 12218
+        }, {
+          "fourthQuarter": 10853
+        }]
+      }, {
+        "area": "陕西",
+        "quarterArr": [{
+          "firstQuarter": 3950
+        }, {
+          "secondQuarter": 6025
+        }, {
+          "thirdQuarter": 6928
+        }, {
+          "fourthQuarter": 6849
+        }]
+      }],
+      "industry": "信息技术"
+    },
+    {
+      "areaArr": [{
+        "area": "广东",
+        "quarterArr": [{
+          "firstQuarter": 60029
+        }, {
+          "secondQuarter": 72589
+        }, {
+          "thirdQuarter": 62958
+        }, {
+          "fourthQuarter": 49048
+        }]
+      }, {
+        "area": "河南",
+        "quarterArr": [{
+          "firstQuarter": 5341
+        }, {
+          "secondQuarter": 7035
+        }, {
+          "thirdQuarter": 6622
+        }, {
+          "fourthQuarter": 5549
+        }]
+      }, {
+        "area": "北京",
+        "quarterArr": [{
+          "firstQuarter": 6352
+        }, {
+          "secondQuarter": 8897
+        }, {
+          "thirdQuarter": 9414
+        }, {
+          "fourthQuarter": 6977
+        }]
+      }, {
+        "area": "江苏",
+        "quarterArr": [{
+          "firstQuarter": 11857
+        }, {
+          "secondQuarter": 14898
+        }, {
+          "thirdQuarter": 15141
+        }, {
+          "fourthQuarter": 13500
+        }]
+      }, {
+        "area": "湖北",
+        "quarterArr": [{
+          "firstQuarter": 14518
+        }, {
+          "secondQuarter": 20741
+        }, {
+          "thirdQuarter": 20124
+        }, {
+          "fourthQuarter": 19911
+        }]
+      }, {
+        "area": "山东",
+        "quarterArr": [{
+          "firstQuarter": 133107
+        }, {
+          "secondQuarter": 124809
+        }, {
+          "thirdQuarter": 46409
+        }, {
+          "fourthQuarter": 53874
+        }]
+      }, {
+        "area": "河北",
+        "quarterArr": [{
+          "firstQuarter": 5680
+        }, {
+          "secondQuarter": 6376
+        }, {
+          "thirdQuarter": 5744
+        }, {
+          "fourthQuarter": 4618
+        }]
+      }, {
+        "area": "四川",
+        "quarterArr": [{
+          "firstQuarter": 9328
+        }, {
+          "secondQuarter": 12639
+        }, {
+          "thirdQuarter": 12146
+        }, {
+          "fourthQuarter": 9450
+        }]
+      }, {
+        "area": "陕西",
+        "quarterArr": [{
+          "firstQuarter": 3862
+        }, {
+          "secondQuarter": 6642
+        }, {
+          "thirdQuarter": 6799
+        }, {
+          "fourthQuarter": 5968
+        }]
+      }],
+      "industry": "服务采购"
+    },
+    {
+      "areaArr": [{
+        "area": "广东",
+        "quarterArr": [{
+          "firstQuarter": 69553
+        }, {
+          "secondQuarter": 96976
+        }, {
+          "thirdQuarter": 82592
+        }, {
+          "fourthQuarter": 68195
+        }]
+      }, {
+        "area": "河南",
+        "quarterArr": [{
+          "firstQuarter": 7809
+        }, {
+          "secondQuarter": 12327
+        }, {
+          "thirdQuarter": 14705
+        }, {
+          "fourthQuarter": 14721
+        }]
+      }, {
+        "area": "北京",
+        "quarterArr": [{
+          "firstQuarter": 3679
+        }, {
+          "secondQuarter": 6218
+        }, {
+          "thirdQuarter": 7792
+        }, {
+          "fourthQuarter": 6304
+        }]
+      }, {
+        "area": "江苏",
+        "quarterArr": [{
+          "firstQuarter": 8911
+        }, {
+          "secondQuarter": 12066
+        }, {
+          "thirdQuarter": 12907
+        }, {
+          "fourthQuarter": 10532
+        }]
+      }, {
+        "area": "湖北",
+        "quarterArr": [{
+          "firstQuarter": 15318
+        }, {
+          "secondQuarter": 23237
+        }, {
+          "thirdQuarter": 25002
+        }, {
+          "fourthQuarter": 27866
+        }]
+      }, {
+        "area": "山东",
+        "quarterArr": [{
+          "firstQuarter": 22094
+        }, {
+          "secondQuarter": 51520
+        }, {
+          "thirdQuarter": 36310
+        }, {
+          "fourthQuarter": 40360
+        }]
+      }, {
+        "area": "河北",
+        "quarterArr": [{
+          "firstQuarter": 5923
+        }, {
+          "secondQuarter": 8513
+        }, {
+          "thirdQuarter": 7514
+        }, {
+          "fourthQuarter": 7097
+        }]
+      }, {
+        "area": "四川",
+        "quarterArr": [{
+          "firstQuarter": 8246
+        }, {
+          "secondQuarter": 14750
+        }, {
+          "thirdQuarter": 15428
+        }, {
+          "fourthQuarter": 13677
+        }]
+      }, {
+        "area": "陕西",
+        "quarterArr": [{
+          "firstQuarter": 4375
+        }, {
+          "secondQuarter": 7868
+        }, {
+          "thirdQuarter": 8601
+        }, {
+          "fourthQuarter": 8258
+        }]
+      }],
+      "industry": "行政办公"
+    },
+    {
+    "areaArr": [{
+      "area": "广东",
+      "quarterArr": [{
+        "firstQuarter": 1137
+      }, {
+        "secondQuarter": 1457
+      }, {
+        "thirdQuarter": 1334
+      }, {
+        "fourthQuarter": 1158
+      }]
+    }, {
+      "area": "河南",
+      "quarterArr": [{
+        "firstQuarter": 347
+      }, {
+        "secondQuarter": 461
+      }, {
+        "thirdQuarter": 574
+      }, {
+        "fourthQuarter": 431
+      }]
+    }, {
+      "area": "北京",
+      "quarterArr": [{
+        "firstQuarter": 527
+      }, {
+        "secondQuarter": 809
+      }, {
+        "thirdQuarter": 956
+      }, {
+        "fourthQuarter": 801
+      }]
+    }, {
+      "area": "江苏",
+      "quarterArr": [{
+        "firstQuarter": 853
+      }, {
+        "secondQuarter": 1150
+      }, {
+        "thirdQuarter": 1236
+      }, {
+        "fourthQuarter": 964
+      }]
+    }, {
+      "area": "湖北",
+      "quarterArr": [{
+        "firstQuarter": 459
+      }, {
+        "secondQuarter": 586
+      }, {
+        "thirdQuarter": 652
+      }, {
+        "fourthQuarter": 547
+      }]
+    }, {
+      "area": "山东",
+      "quarterArr": [{
+        "firstQuarter": 648
+      }, {
+        "secondQuarter": 1142
+      }, {
+        "thirdQuarter": 1125
+      }, {
+        "fourthQuarter": 1102
+      }]
+    }, {
+      "area": "河北",
+      "quarterArr": [{
+        "firstQuarter": 308
+      }, {
+        "secondQuarter": 422
+      }, {
+        "thirdQuarter": 407
+      }, {
+        "fourthQuarter": 329
+      }]
+    }, {
+      "area": "四川",
+      "quarterArr": [{
+        "firstQuarter": 433
+      }, {
+        "secondQuarter": 698
+      }, {
+        "thirdQuarter": 692
+      }, {
+        "fourthQuarter": 593
+      }]
+    }, {
+      "area": "陕西",
+      "quarterArr": [{
+        "firstQuarter": 252
+      }, {
+        "secondQuarter": 375
+      }, {
+        "thirdQuarter": 516
+      }, {
+        "fourthQuarter": 438
+      }]
+    }],
+    "industry": "弱电安防"
+  },
+    {
+      "areaArr": [{
+        "area": "广东",
+        "quarterArr": [{
+          "firstQuarter": 77910
+        }, {
+          "secondQuarter": 102403
+        }, {
+          "thirdQuarter": 100886
+        }, {
+          "fourthQuarter": 76437
+        }]
+      }, {
+        "area": "河南",
+        "quarterArr": [{
+          "firstQuarter": 15269
+        }, {
+          "secondQuarter": 20334
+        }, {
+          "thirdQuarter": 21529
+        }, {
+          "fourthQuarter": 16354
+        }]
+      }, {
+        "area": "北京",
+        "quarterArr": [{
+          "firstQuarter": 10557
+        }, {
+          "secondQuarter": 20155
+        }, {
+          "thirdQuarter": 28390
+        }, {
+          "fourthQuarter": 17564
+        }]
+      }, {
+        "area": "江苏",
+        "quarterArr": [{
+          "firstQuarter": 28858
+        }, {
+          "secondQuarter": 37495
+        }, {
+          "thirdQuarter": 37819
+        }, {
+          "fourthQuarter": 30337
+        }]
+      }, {
+        "area": "湖北",
+        "quarterArr": [{
+          "firstQuarter": 20369
+        }, {
+          "secondQuarter": 27262
+        }, {
+          "thirdQuarter": 29323
+        }, {
+          "fourthQuarter": 21413
+        }]
+      }, {
+        "area": "山东",
+        "quarterArr": [{
+          "firstQuarter": 31881
+        }, {
+          "secondQuarter": 41197
+        }, {
+          "thirdQuarter": 34228
+        }, {
+          "fourthQuarter": 26156
+        }]
+      }, {
+        "area": "河北",
+        "quarterArr": [{
+          "firstQuarter": 66598
+        }, {
+          "secondQuarter": 42512
+        }, {
+          "thirdQuarter": 22753
+        }, {
+          "fourthQuarter": 15983
+        }]
+      }, {
+        "area": "四川",
+        "quarterArr": [{
+          "firstQuarter": 21925
+        }, {
+          "secondQuarter": 29653
+        }, {
+          "thirdQuarter": 30201
+        }, {
+          "fourthQuarter": 22670
+        }]
+      }, {
+        "area": "陕西",
+        "quarterArr": [{
+          "firstQuarter": 10028
+        }, {
+          "secondQuarter": 15798
+        }, {
+          "thirdQuarter": 20436
+        }, {
+          "fourthQuarter": 15296
+        }]
+      }],
+      "industry": "建筑工程"
+    },
+    {
+    "areaArr": [{
+      "area": "广东",
+      "quarterArr": [{
+        "firstQuarter": 10680
+      }, {
+        "secondQuarter": 13009
+      }, {
+        "thirdQuarter": 12454
+      }, {
+        "fourthQuarter": 9943
+      }]
+    }, {
+      "area": "河南",
+      "quarterArr": [{
+        "firstQuarter": 3632
+      }, {
+        "secondQuarter": 4388
+      }, {
+        "thirdQuarter": 4342
+      }, {
+        "fourthQuarter": 3331
+      }]
+    }, {
+      "area": "北京",
+      "quarterArr": [{
+        "firstQuarter": 3443
+      }, {
+        "secondQuarter": 5079
+      }, {
+        "thirdQuarter": 5804
+      }, {
+        "fourthQuarter": 4468
+      }]
+    }, {
+      "area": "江苏",
+      "quarterArr": [{
+        "firstQuarter": 7049
+      }, {
+        "secondQuarter": 8339
+      }, {
+        "thirdQuarter": 7610
+      }, {
+        "fourthQuarter": 6650
+      }]
+    }, {
+      "area": "湖北",
+      "quarterArr": [{
+        "firstQuarter": 5261
+      }, {
+        "secondQuarter": 6425
+      }, {
+        "thirdQuarter": 6259
+      }, {
+        "fourthQuarter": 4801
+      }]
+    }, {
+      "area": "山东",
+      "quarterArr": [{
+        "firstQuarter": 5960
+      }, {
+        "secondQuarter": 8703
+      }, {
+        "thirdQuarter": 8462
+      }, {
+        "fourthQuarter": 7197
+      }]
+    }, {
+      "area": "河北",
+      "quarterArr": [{
+        "firstQuarter": 11906
+      }, {
+        "secondQuarter": 8907
+      }, {
+        "thirdQuarter": 5471
+      }, {
+        "fourthQuarter": 3921
+      }]
+    }, {
+      "area": "四川",
+      "quarterArr": [{
+        "firstQuarter": 4600
+      }, {
+        "secondQuarter": 6305
+      }, {
+        "thirdQuarter": 6138
+      }, {
+        "fourthQuarter": 4879
+      }]
+    }, {
+      "area": "陕西",
+      "quarterArr": [{
+        "firstQuarter": 2638
+      }, {
+        "secondQuarter": 3685
+      }, {
+        "thirdQuarter": 4174
+      }, {
+        "fourthQuarter": 3203
+      }]
+    }],
+    "industry": "水利水电"
+  },
+    {
+      "areaArr": [{
+        "area": "广东",
+        "quarterArr": [{
+          "firstQuarter": 6165
+        }, {
+          "secondQuarter": 7124
+        }, {
+          "thirdQuarter": 6342
+        }, {
+          "fourthQuarter": 5190
+        }]
+      }, {
+        "area": "河南",
+        "quarterArr": [{
+          "firstQuarter": 1826
+        }, {
+          "secondQuarter": 2117
+        }, {
+          "thirdQuarter": 2119
+        }, {
+          "fourthQuarter": 1401
+        }]
+      }, {
+        "area": "北京",
+        "quarterArr": [{
+          "firstQuarter": 1233
+        }, {
+          "secondQuarter": 1476
+        }, {
+          "thirdQuarter": 1694
+        }, {
+          "fourthQuarter": 1608
+        }]
+      }, {
+        "area": "江苏",
+        "quarterArr": [{
+          "firstQuarter": 2582
+        }, {
+          "secondQuarter": 3053
+        }, {
+          "thirdQuarter": 3107
+        }, {
+          "fourthQuarter": 2790
+        }]
+      }, {
+        "area": "湖北",
+        "quarterArr": [{
+          "firstQuarter": 1995
+        }, {
+          "secondQuarter": 2394
+        }, {
+          "thirdQuarter": 2238
+        }, {
+          "fourthQuarter": 1879
+        }]
+      }, {
+        "area": "山东",
+        "quarterArr": [{
+          "firstQuarter": 2493
+        }, {
+          "secondQuarter": 3384
+        }, {
+          "thirdQuarter": 3346
+        }, {
+          "fourthQuarter": 2966
+        }]
+      }, {
+        "area": "河北",
+        "quarterArr": [{
+          "firstQuarter": 2174
+        }, {
+          "secondQuarter": 1955
+        }, {
+          "thirdQuarter": 1886
+        }, {
+          "fourthQuarter": 1459
+        }]
+      }, {
+        "area": "四川",
+        "quarterArr": [{
+          "firstQuarter": 2490
+        }, {
+          "secondQuarter": 2686
+        }, {
+          "thirdQuarter": 2871
+        }, {
+          "fourthQuarter": 2782
+        }]
+      }, {
+        "area": "陕西",
+        "quarterArr": [{
+          "firstQuarter": 1225
+        }, {
+          "secondQuarter": 1188
+        }, {
+          "thirdQuarter": 1332
+        }, {
+          "fourthQuarter": 1162
+        }]
+      }],
+      "industry": "医疗卫生"
+    },
+    {
+      "areaArr": [{
+        "area": "广东",
+        "quarterArr": [{
+          "firstQuarter": 6269
+        }, {
+          "secondQuarter": 8241
+        }, {
+          "thirdQuarter": 7401
+        }, {
+          "fourthQuarter": 6372
+        }]
+      }, {
+        "area": "河南",
+        "quarterArr": [{
+          "firstQuarter": 1905
+        }, {
+          "secondQuarter": 2753
+        }, {
+          "thirdQuarter": 2761
+        }, {
+          "fourthQuarter": 2249
+        }]
+      }, {
+        "area": "北京",
+        "quarterArr": [{
+          "firstQuarter": 1113
+        }, {
+          "secondQuarter": 1968
+        }, {
+          "thirdQuarter": 2667
+        }, {
+          "fourthQuarter": 2071
+        }]
+      }, {
+        "area": "江苏",
+        "quarterArr": [{
+          "firstQuarter": 3034
+        }, {
+          "secondQuarter": 4147
+        }, {
+          "thirdQuarter": 4236
+        }, {
+          "fourthQuarter": 3413
+        }]
+      }, {
+        "area": "湖北",
+        "quarterArr": [{
+          "firstQuarter": 2640
+        }, {
+          "secondQuarter": 3669
+        }, {
+          "thirdQuarter": 3808
+        }, {
+          "fourthQuarter": 3258
+        }]
+      }, {
+        "area": "山东",
+        "quarterArr": [{
+          "firstQuarter": 51928
+        }, {
+          "secondQuarter": 35797
+        }, {
+          "thirdQuarter": 5690
+        }, {
+          "fourthQuarter": 5180
+        }]
+      }, {
+        "area": "河北",
+        "quarterArr": [{
+          "firstQuarter": 5180
+        }, {
+          "secondQuarter": 2670
+        }, {
+          "thirdQuarter": 2101
+        }, {
+          "fourthQuarter": 1693
+        }]
+      }, {
+        "area": "四川",
+        "quarterArr": [{
+          "firstQuarter": 2361
+        }, {
+          "secondQuarter": 3202
+        }, {
+          "thirdQuarter": 3077
+        }, {
+          "fourthQuarter": 2689
+        }]
+      }, {
+        "area": "陕西",
+        "quarterArr": [{
+          "firstQuarter": 1110
+        }, {
+          "secondQuarter": 1824
+        }, {
+          "thirdQuarter": 2428
+        }, {
+          "fourthQuarter": 1833
+        }]
+      }],
+      "industry": "交通工程"
+    },
+    {
+    "areaArr": [{
+      "area": "广东",
+      "quarterArr": [{
+        "firstQuarter": 12523
+      }, {
+        "secondQuarter": 13059
+      }, {
+        "thirdQuarter": 11343
+      }, {
+        "fourthQuarter": 9738
+      }]
+    }, {
+      "area": "河南",
+      "quarterArr": [{
+        "firstQuarter": 3748
+      }, {
+        "secondQuarter": 4367
+      }, {
+        "thirdQuarter": 4587
+      }, {
+        "fourthQuarter": 4053
+      }]
+    }, {
+      "area": "北京",
+      "quarterArr": [{
+        "firstQuarter": 2867
+      }, {
+        "secondQuarter": 4688
+      }, {
+        "thirdQuarter": 5616
+      }, {
+        "fourthQuarter": 3975
+      }]
+    }, {
+      "area": "江苏",
+      "quarterArr": [{
+        "firstQuarter": 5994
+      }, {
+        "secondQuarter": 7676
+      }, {
+        "thirdQuarter": 6863
+      }, {
+        "fourthQuarter": 6163
+      }]
+    }, {
+      "area": "湖北",
+      "quarterArr": [{
+        "firstQuarter": 6662
+      }, {
+        "secondQuarter": 8626
+      }, {
+        "thirdQuarter": 8208
+      }, {
+        "fourthQuarter": 7651
+      }]
+    }, {
+      "area": "山东",
+      "quarterArr": [{
+        "firstQuarter": 41221
+      }, {
+        "secondQuarter": 35429
+      }, {
+        "thirdQuarter": 25850
+      }, {
+        "fourthQuarter": 30742
+      }]
+    }, {
+      "area": "河北",
+      "quarterArr": [{
+        "firstQuarter": 5040
+      }, {
+        "secondQuarter": 5394
+      }, {
+        "thirdQuarter": 4712
+      }, {
+        "fourthQuarter": 4005
+      }]
+    }, {
+      "area": "四川",
+      "quarterArr": [{
+        "firstQuarter": 6333
+      }, {
+        "secondQuarter": 7427
+      }, {
+        "thirdQuarter": 6764
+      }, {
+        "fourthQuarter": 6057
+      }]
+    }, {
+      "area": "陕西",
+      "quarterArr": [{
+        "firstQuarter": 2993
+      }, {
+        "secondQuarter": 4192
+      }, {
+        "thirdQuarter": 4749
+      }, {
+        "fourthQuarter": 3959
+      }]
+    }],
+    "industry": "机械设备"
+  }
+   ]
 }

+ 17 - 8
src/jfw/config/config.go

@@ -29,11 +29,26 @@ var (
 	Middleground         *middleground.Middleground
 	HotWinnerConfig      HotConfig
 	HotBuyerConfig       HotConfig
-	ServiceArea          DataService
+	IndustryTrendConfig  IndustryTrend
 	IpList               *ipmatch.WhiteIp
 	IpInitLock           sync.RWMutex //锁
 )
 
+type IndustryTrend struct {
+	IndustryArr []struct {
+		AreaArr []struct {
+			Area       string `json:"area"`
+			QuarterArr []struct {
+				FirstQuarter  int `json:"firstQuarter,omitempty"`
+				SecondQuarter int `json:"secondQuarter,omitempty"`
+				ThirdQuarter  int `json:"thirdQuarter,omitempty"`
+				FourthQuarter int `json:"fourthQuarter,omitempty"`
+			} `json:"quarterArr"`
+		} `json:"areaArr"`
+		Industry string `json:"industry"`
+	} `json:"industryArr"`
+}
+
 type HotConfig struct {
 	CacheKey     string `json:"cacheKey"`
 	CacheTimeout int    `json:"cacheTimeout"`
@@ -45,18 +60,12 @@ type entnichePcConf struct {
 	PrivateDataPhone string `json:"privateDataPhone"`
 }
 
-type DataService struct {
-	PurchasingData []string `json:"purchasingData"`
-	Area           []string `json:"area"`
-	Industry       []string `json:"industry"`
-}
-
 func init() {
 	g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("config.yaml")
 	util.ReadConfig(&Sysconfig)
 	util.ReadConfig("./export.json", &ExportConfig)
 	IpInit()
-	util.ReadConfig("./dataService.json", &ServiceArea)
+	util.ReadConfig("./dataService.json", &IndustryTrendConfig)
 	//ClickhouseInit()
 	//log.Println("sysconfig:", Sysconfig)
 	WeixinConfig, _ = Sysconfig["wxJianyu"].(map[string]interface{})

+ 9 - 7
src/jfw/front/classificationTag.go

@@ -12,6 +12,7 @@ import (
 	"github.com/gogf/gf/v2/util/gconv"
 	"jy/src/jfw/config"
 	"log"
+	"math/rand"
 	"strconv"
 	"strings"
 	"sync"
@@ -55,20 +56,21 @@ func RegionAndInformationAndTender() map[string]interface{} {
 	return data
 }
 
-func GetHotIndustry() []map[string][]map[string]interface{} {
+func GetHotIndustry() (rData, importData []map[string][]map[string]interface{}) {
 	if bytes, err := redis.GetBytes(RedisNameNew, "pcIndexHotIndustry"); err == nil && bytes != nil {
-		rData := []map[string][]map[string]interface{}{}
+		rData = []map[string][]map[string]interface{}{}
 		if err := json.Unmarshal(*bytes, &rData); err != nil {
 			log.Printf("[MANAGER-ERR]pcIndexHotIndustry  GetData Error %v \n", err)
-			return nil
+			return nil, nil
 		}
-		return rData
 	}
-	keysMap := getkeysMap() //热门行业
-	if bytes, err := json.Marshal(keysMap); err == nil && bytes != nil {
+	rData = getkeysMap() //热门行业
+	if bytes, err := json.Marshal(rData); err == nil && bytes != nil {
 		_ = redis.PutBytes(RedisNameNew, "pcIndexHotIndustry", &bytes, 2*60*60)
 	}
-	return keysMap
+	r := rand.Intn(11)
+	importData = append(importData, rData[r], rData[r+1])
+	return rData, importData
 }
 
 // 最新更新的200中标企业

+ 137 - 46
src/jfw/front/dataServiceArea.go

@@ -2,20 +2,128 @@ package front
 
 import (
 	"app.yhyue.com/moapp/jybase/common"
-	elastic "app.yhyue.com/moapp/jybase/es"
 	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jypkg/public"
-	"encoding/json"
 	"fmt"
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gctx"
+	"github.com/gogf/gf/v2/util/gconv"
 	"jy/src/jfw/config"
-	"strings"
-	"time"
 )
 
-type subzone struct {
-	industry, province string
+// HotIndustryAndRegion 热门行业/地区年度招标趋势
+func HomeBiddingTrends() config.IndustryTrend {
+	return config.IndustryTrendConfig
 }
 
+type (
+	KeyWordSiteRoot struct {
+		SiteCodeMap map[string]*KeyWordSiteNode //省份直辖市简称对照
+		SiteArr     []*KeyWordSiteNode
+	}
+
+	KeyWordSiteNode struct {
+		Code               string `json:"code" doc:"代码"`
+		Alias              string `json:"alias" doc:"名称"`
+		AreaKeyWord        string `json:"areaKeyword" doc:"省份关键词"`
+		CityKeyWord        string `json:"cityKeyword" doc:"城市关键词"`
+		CitySpecialKeyWord string `json:"citySpecialKeyword" doc:"直辖市关键词"`
+	}
+
+	KeyWordSiteShow struct {
+		Code string `json:"code" doc:"代码"`
+		Name string `json:"name" doc:"名称"`
+		//KeyWord string `json:"keyWord" doc:"对应关键词"`
+	}
+	argument struct {
+		Name string
+		Url  string
+	}
+)
+
+var (
+	siteCodeMap map[string]*KeyWordSiteNode
+	specialArea = map[string]bool{"北京": true, "上海": true, "天津": true, "重庆": true}
+)
+
+func init() {
+	siteCodeMap = make(map[string]*KeyWordSiteNode)
+	res, err := g.DB().Query(gctx.New(), `SELECT * FROM seo_siteKeywords_splicing order by site_code asc`)
+	if err == nil && len(res.List()) > 0 {
+		for _, m := range res.List() {
+			node := &KeyWordSiteNode{
+				Code:               fmt.Sprintf("S%s", gconv.String(m["site_code"])),
+				Alias:              gconv.String(m["alias"]),
+				AreaKeyWord:        gconv.String(m["area"]),
+				CityKeyWord:        gconv.String(m["city"]),
+				CitySpecialKeyWord: gconv.String(m["city_special"]),
+			}
+			siteCodeMap[node.Code] = node
+		}
+	}
+}
+
+// 政府招标
+func GovernmentTender() {
+	areaM := make(map[string]string)
+	//省份
+	areaMap, _ := config.Seoconfig["area"].(map[string]interface{})
+	if areaMap != nil && len(areaMap) > 0 {
+		for k, v := range areaMap {
+			area := v.(map[string]interface{})
+			name := common.ObjToString(area["NAME"])
+			if name != "全国" {
+				areaM[name] = k
+			}
+		}
+	}
+	var (
+		data       []argument
+		upperLimit int
+	)
+	siteCode := make(map[string]bool)
+	for acronym, name := range areaM {
+		upperLimit++
+		if upperLimit > 12 {
+			break
+		}
+		if len(siteCode) < len(siteCodeMap) {
+			for code, node := range siteCodeMap {
+				if !siteCode[code] {
+					tagName := common.If(specialArea[name], node.CitySpecialKeyWord, node.AreaKeyWord).(string)
+					data = append(data, argument{
+						fmt.Sprintf("%s%s", name, tagName),
+						fmt.Sprintf("/list/area/%s_%s", acronym, code),
+					})
+					siteCode[code] = true
+					break
+				}
+			}
+		} else {
+			for code, node := range siteCodeMap {
+				var tagName string
+				if specialArea[name] {
+					tagName = fmt.Sprintf("%s%s", name, node.CitySpecialKeyWord)
+				} else {
+					tagName = fmt.Sprintf("%s%s", name, node.AreaKeyWord)
+				}
+				data = append(data, argument{
+					tagName,
+					fmt.Sprintf("/list/area/%s_%s", acronym, code),
+				})
+				break
+			}
+		}
+
+	}
+}
+
+/*
+const (
+	PSearch_DecMust = `"bidstatus": ["中标","成交","合同","单一"]`
+	query_bool_must = `{"terms": {%s}}`
+)
+
 var (
 	industryMap map[string][]string
 )
@@ -28,34 +136,15 @@ type industryRes struct {
 	name  string
 	areas []areaRes
 }
+
 type areaRes struct {
 	name string
 	data []map[string]interface{}
 }
 
-func init() {
-	IndustryInit()
-	BiddingTrendInit()
-}
 
-// HotIndustryAndRegion 热门行业/地区年度招标趋势
-func HomeBiddingTrends() ServiceRes {
-	var sRes ServiceRes
-	for _, industry := range config.ServiceArea.Industry {
-		var ind industryRes
-		ind.name = industry
-		for _, area := range config.ServiceArea.Area {
-			var aRes areaRes
-			aRes.name = area
-			redisData, _ := redis.Get(RedisNameNew, fmt.Sprintf("biddingTrend_%s_%s", industry, area)).([]interface{})
-			if redisData != nil && len(redisData) > 0 {
-				aRes.data = common.ObjArrToMapArr(redisData)
-			}
-			ind.areas = append(ind.areas, aRes)
-		}
-		sRes.industry = append(sRes.industry, ind)
-	}
-	return sRes
+type subzone struct {
+	industry, province string
 }
 
 type marketBuckets struct {
@@ -72,6 +161,11 @@ func getQuarter(st int64) int {
 	return (currentMonth-1)/3 + 1
 }
 
+func init() {
+    IndustryInit()
+    BiddingTrendInit()
+}
+
 func BiddingTrend(st int64, et int64) {
 	currentQuarter := getQuarter(st)
 	for _, industry := range config.ServiceArea.Industry {
@@ -175,23 +269,6 @@ func BiddingTrendInit() {
 	}
 }
 
-func Quarter() time.Time {
-	currentTime := time.Now()
-
-	// 获取当前季度
-	currentQuarter := (currentTime.Month()-1)/3 + 1
-
-	// 计算当前季度的开始时间
-	startMonth := (currentQuarter-1)*3 + 1
-	quarterStart := time.Date(currentTime.Year(), startMonth, 1, 0, 0, 0, 0, currentTime.Location())
-	return quarterStart
-}
-
-const (
-	PSearch_DecMust = `"bidstatus": ["中标","成交","合同","单一"]`
-	query_bool_must = `{"terms": {%s}}`
-)
-
 // GetCommonQuerySql 公共筛选
 func GetCommonQuerySql(st, et int64, area, industry string) string {
 	var musts, bools []string
@@ -213,6 +290,20 @@ func GetCommonQuerySql(st, et int64, area, industry string) string {
 	return fmt.Sprintf(`{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match": %d}},"aggs":{"project_count": {"filter": {"match_all":{}}}},"size":0}`, strings.Join(musts, ","), strings.Join(bools, ","), common.If(len(bools) > 0, 1, 0).(int))
 }
 
+func Quarter() time.Time {
+	currentTime := time.Now()
+
+	// 获取当前季度
+	currentQuarter := (currentTime.Month()-1)/3 + 1
+
+	// 计算当前季度的开始时间
+	startMonth := (currentQuarter-1)*3 + 1
+	quarterStart := time.Date(currentTime.Year(), startMonth, 1, 0, 0, 0, 0, currentTime.Location())
+	return quarterStart
+}
+*/
+
+// 热门采购数据
 func PurchasingData() []string {
 	redisData, _ := redis.Get(RedisNameNew, "hotPurchasingData").([]interface{})
 	if len(redisData) > 0 {
@@ -224,7 +315,7 @@ func PurchasingData() []string {
 		for _, m := range *data {
 			keyWords = append(keyWords, common.InterfaceToStr(m["keyword"]))
 		}
-		redis.Put(RedisNameNew, "hotPurchasingData", keyWords, 24*3600)
+		redis.Put(RedisNameNew, "hotPurchasingData", keyWords, 24*3600*30)
 	}
 
 	return keyWords

+ 31 - 2
src/jfw/front/index.go

@@ -68,8 +68,10 @@ func (nIndex *NewIndex) NewIndex() error {
 
 	//项目专区
 
-	//热门行业
-	nIndex.T["hotIndustry"] = GetHotIndustry()
+	//中标喜报
+	nIndex.T["winnerGlad"] = WinnerGladTidings()
+	//热门行业  ////重点招标
+	nIndex.T["hotIndustry"], nIndex.T["importBidding"] = GetHotIndustry()
 	//热门中标企业
 	nIndex.T["hotWinner"] = NewHotEnt(true)
 	//热门采购单位
@@ -80,6 +82,8 @@ func (nIndex *NewIndex) NewIndex() error {
 	nIndex.T["strategyList"] = GetStrategyList()
 	//剑鱼课堂
 	nIndex.T["jySchool"] = jyutil.Course(6, 3)
+	//地区导航
+	nIndex.T["areaNav"] = GetAreaNav()
 	//顶部菜单
 	nIndex.T["topMenu"] = g.Cfg("index").MustGet(context.Background(), "topMenu").Maps()
 	return nIndex.Render("/pc/newIndex.html", &nIndex.T)
@@ -128,6 +132,31 @@ func (nIndex *NewIndex) EntServerTransfer(code string) {
 	_ = nIndex.Redirect(toUrl)
 }
 
+type AreaStruct struct {
+	Name string `json:"name"`
+	Url  string `json:"url"`
+}
+
+func GetAreaNav() []map[string]interface{} {
+	areaData := []map[string]interface{}{}
+	areaNode := common.ObjArrToMapArr(config.Seoconfig["areaLocation"].([]interface{}))
+	for _, v := range areaNode {
+		childArr := []AreaStruct{}
+		singleArea := common.ObjToMap(v)
+		for _, val := range common.ObjArrToMapArr((*singleArea)["child"].([]interface{})) {
+			childArr = append(childArr, AreaStruct{
+				Name: common.ObjToString(val["name"]),
+				Url:  fmt.Sprintf(common.InterfaceToStr(config.Seoconfig["seoWebDomain"]), common.ObjToString(val["value"])),
+			})
+		}
+		areaData = append(areaData, map[string]interface{}{
+			"name":  (*singleArea)["name"],
+			"child": childArr,
+		})
+	}
+	return areaData
+}
+
 // 推荐标讯专区
 func GetRecommendBidZone(typ int, pageSize int) (list []map[string]interface{}) {
 	if typ == 0 {

+ 13 - 13
src/jfw/front/nzjProject.go

@@ -90,12 +90,12 @@ func getDetail(pid string, equity int) map[string]interface{} {
     a.createtime,
     a.projectaddr
 FROM
-	dwd_f_nzj_baseinfo a
-	LEFT JOIN d_nzj_project_stage_code b on a.project_stage_code = b.code
-	LEFT JOIN d_nzj_nature_code c on a.nature_code = c.code
-	LEFT JOIN d_nzj_category_code d on a.category_code = d.code
-	LEFT JOIN d_nzj_ownerclass_code e on a.ownerclass_code = e.code
-    LEFT JOIN d_topsubtype_code f on a.industry_code = f.code
+	Jianyu_subjectdb.dwd_f_nzj_baseinfo a
+	LEFT JOIN Jianyu_subjectdb.d_nzj_project_stage_code b on a.project_stage_code = b.code
+	LEFT JOIN Jianyu_subjectdb.d_nzj_nature_code c on a.nature_code = c.code
+	LEFT JOIN Jianyu_subjectdb.d_nzj_category_code d on a.category_code = d.code
+	LEFT JOIN Jianyu_subjectdb.d_nzj_ownerclass_code e on a.ownerclass_code = e.code
+    LEFT JOIN Jianyu_subjectdb.d_topsubtype_code f on a.industry_code = f.code
 WHERE
 	proposed_id = '%s'`, pid))
 	if dataDetail != nil && len(*dataDetail) > 0 {
@@ -113,8 +113,8 @@ WHERE
 			detail["project_scale"] = config.Seoconfig["nzjConstructionContent"]
 		}
 		//项目进展
-		follRecord := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT a.publishtime,CONCAT('进展', a.follow_num) AS follow,CONCAT(a.title,'-',b.name)  as remark,a.jybxhref FROM dwd_f_nzj_follw_record a
-LEFT JOIN d_nzj_project_stage_code b on a.project_stage_code =  b.code WHERE proposed_id = '%s'
+		follRecord := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT a.publishtime,CONCAT('进展', a.follow_num) AS follow,CONCAT(a.title,'-',b.name)  as remark,a.jybxhref FROM Jianyu_subjectdb.dwd_f_nzj_follw_record a
+LEFT JOIN Jianyu_subjectdb.d_nzj_project_stage_code b on a.project_stage_code =  b.code WHERE proposed_id = '%s'
 ORDER BY publishtime DESC `, pid))
 		if follRecord != nil && len(*follRecord) > 0 {
 			if equity < 3 {
@@ -128,14 +128,14 @@ ORDER BY publishtime DESC `, pid))
 
 		var ids []string
 		//获取企业主题id
-		entId := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT name_id FROM dwd_f_nzj_ent WHERE proposed_id = '%s' ORDER BY identity_type DESC , createtime ASC`, pid))
+		entId := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT name_id FROM Jianyu_subjectdb.dwd_f_nzj_ent WHERE proposed_id = '%s' ORDER BY identity_type DESC , createtime ASC`, pid))
 		if entId != nil && len(*entId) > 0 {
 			for _, v := range *entId {
 				ids = append(ids, fmt.Sprintf(`"%s"`, common.InterfaceToStr(v["name_id"])))
 			}
 			connection := make(map[RemovalKey]map[string]interface{})
 			var data []map[string]interface{}
-			nzjContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dwd_f_nzj_contact WHERE name_id in (%s) ORDER BY createtime DESC `, strings.Join(ids, ",")))
+			nzjContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_nzj_contact WHERE name_id in (%s) ORDER BY createtime DESC `, strings.Join(ids, ",")))
 			if nzjContact != nil && len(*nzjContact) > 0 {
 				for _, v := range *nzjContact {
 					v["lasttime"] = v["createtime"]
@@ -148,7 +148,7 @@ ORDER BY publishtime DESC `, pid))
 			}
 			if equity > 3 {
 				//企业联系人
-				entContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dws_f_ent_contact WHERE name_id in (%s)`, strings.Join(ids, ",")))
+				entContact := public.GlobalCommonMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dws_f_ent_contact WHERE name_id in (%s)`, strings.Join(ids, ",")))
 				if entContact != nil && len(*entContact) > 0 {
 					for _, v := range *entContact {
 						v["lasttime"] = v["createtime"]
@@ -166,7 +166,7 @@ ORDER BY publishtime DESC `, pid))
 					data = append(data, m)
 				}
 				//私有联系人用户
-				userContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dwd_f_user_contact_record WHERE name_id in (%s) `, strings.Join(ids, ",")))
+				userContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_user_contact_record WHERE name_id in (%s) `, strings.Join(ids, ",")))
 				if userContact != nil && len(*userContact) > 0 {
 					for _, m := range *userContact {
 						data = append(data, m)
@@ -322,7 +322,7 @@ func nzjEmptySearch(pageNum, pageSize int) (int64, *[]map[string]interface{}) {
 		ds := common.ObjArrToMapArr(data)[(pageNum-1)*pageSize : pageNum*pageSize]
 		return common.Int64All(len(ds)), &ds
 	} //获取
-	dataArr := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dwd_f_nzj_baseinfo ORDER BY lasttime DESC LIMIT %v`, config.Sysconfig["nzjLimit"]))
+	dataArr := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_nzj_baseinfo ORDER BY lasttime DESC LIMIT %v`, config.Sysconfig["nzjLimit"]))
 	if dataArr != nil && len(*dataArr) > 0 {
 		redis.Put("newother", nzjRedisKey, *dataArr, 3600*24)
 	}

+ 0 - 4
src/jfw/timetask/timetask.go

@@ -5,7 +5,6 @@ import (
 	"app.yhyue.com/moapp/jypkg/public"
 	"fmt"
 	"jy/src/jfw/config"
-    "jy/src/jfw/front"
     "jy/src/jfw/nodemgr"
 	"log"
 	"math"
@@ -59,9 +58,6 @@ func updateHotKeys() {
 		}
 	})
 
-    c.AddFunc("0 0 1 1,4,7,10 * *", func() {
-        front.BiddingTrend(time.Now().AddDate(0,-3,0).Unix(),time.Now().Unix())
-    })
 	c.Start()
 	defer c.Stop()
 	chan bool(nil) <- true

+ 163 - 1
src/seo.json

@@ -4800,5 +4800,167 @@
   "secSeoWebConfig": {
     "areaCodeMap": {"上海": "shanghai", "云南": "yunnan", "内蒙古": "neimenggu", "北京": "beijing", "吉林": "jilin", "四川": "sichuan", "天津": "tianjin", "宁夏": "ningxia", "安徽": "anhui", "山东": "shandong", "山西": "shanxi", "广东": "guangdong", "广西": "guangxi", "新疆": "xinjiang", "江苏": "jiangsu", "江西": "jiangxi", "河北": "hebei", "河南": "henan", "浙江": "zhejiang", "海南": "hainan", "湖北": "hubei", "湖南": "hunan", "甘肃": "gansu", "福建": "fujian", "西藏": "xizang", "贵州": "guizhou", "辽宁": "liaoning", "重庆": "chongqing", "陕西": "shaanxi", "青海": "qinghai", "黑龙江": "heilongjiang"},
     "area_href_format": "https://%s.jianyu360.cn"
-  }
+  },
+  "areaLocation": [
+    {
+      "name": "华北",
+      "child": [
+        {
+          "name":"北京",
+          "value":"beijing"
+        },
+        {
+          "name":"天津",
+          "value":"tianjin"
+        },
+        {
+          "name":"河北",
+          "value":"hebei"
+        },
+        {
+          "name":"山西",
+          "value":"shanxi"
+        },
+        {
+          "name":"内蒙古",
+          "value":"neimenggu"
+        }
+      ]
+    },
+    {
+      "name": "华中",
+      "child": [
+        {
+          "name":"河南",
+          "value":"henan"
+        },
+        {
+          "name":"湖北",
+          "value":"hubei"
+        },
+        {
+          "name":"湖南",
+          "value":"hunan"
+        }
+      ]
+    },
+    {
+      "name": "东北",
+      "child": [
+        {
+          "name":"辽宁",
+          "value":"liaoning"
+        },
+        {
+          "name":"吉林",
+          "value":"jilin"
+        },
+        {
+          "name":"黑龙江",
+          "value":"heilongjiang"
+        }
+      ]
+    },
+    {
+      "name": "华东",
+      "child": [
+        {
+          "name":"上海",
+          "value":"shanghai"
+        },
+        {
+          "name":"江苏",
+          "value":"jiangsu"
+        },
+        {
+          "name":"浙江",
+          "value":"zhejiang"
+        },
+        {
+          "name":"安徽",
+          "value":"anhui"
+        },
+        {
+          "name":"福建",
+          "value":"fujian"
+        },
+        {
+          "name":"江西",
+          "value":"jiangxi"
+        },
+        {
+          "name":"山东",
+          "value":"shandong"
+        }
+      ]
+    },
+    {
+      "name": "华南",
+      "child": [
+        {
+          "name":"广东",
+          "value":"guangdong"
+        },
+        {
+          "name":"广西",
+          "value":"guangxi"
+        },
+        {
+          "name":"海南",
+          "value":"hainan"
+        }
+      ]
+    },
+    {
+      "name": "西南",
+      "child": [
+        {
+          "name":"重庆",
+          "value":"chongqing"
+        },
+        {
+          "name":"四川",
+          "value":"sichuan"
+        },
+        {
+          "name":"贵州",
+          "value":"guizhou"
+        },
+        {
+          "name":"云南",
+          "value":"yunnan"
+        },
+        {
+          "name":"西藏",
+          "value":"xizang"
+        }
+      ]
+    },
+    {
+      "name": "西北",
+      "child": [
+        {
+          "name":"陕西",
+          "value":"shaanxi"
+        },
+        {
+          "name":"甘肃",
+          "value":"gansu"
+        },
+        {
+          "name":"青海",
+          "value":"qinghai"
+        },
+        {
+          "name":"宁夏",
+          "value":"ningxia"
+        },
+        {
+          "name":"新疆",
+          "value":"xinjiang"
+        }
+      ]
+    }
+  ],
+  "seoWebDomain": "http://%s.myjy.cn"
 }

+ 27 - 0
src/web/templates/pc/newIndex.html

@@ -285,6 +285,13 @@
       </div>
       <div class="border" style="height: 200px">
         19会员中标喜报
+        <ul>
+          {{range $k,$v := .T.winnerGlad}}
+          {{range $kk,$vv := $v}}
+          <li><a href="/nologin/content/{{$vv}}">{{$kk}}</a></li>
+          {{end}}
+          {{end}}
+        </ul>
       </div>
       <div class="border" style="height: 500px">
         20热门行业
@@ -362,6 +369,26 @@
     </div>
     {{end}}
   </div>
+  <div style="height: 260px;">
+    31地区导航
+    {{range $v := .T.areaNav}}
+    <div>
+      {{$v.name}}
+      {{range $vv := $v.child}}
+      <a href="{{$vv.Url}}">{{$vv.Name}}</a>
+      {{end}}
+    </div>
+    {{end}}
+  </div>
+  <div style="height: 400px;">
+    <div style="height: 200px;">
+      重点招标
+    </div>
+    <div style="height: 200px;">
+      政府招标
+    </div>
+
+  </div>