Explorar o código

fix:行业趋势修改

duxin hai 1 ano
pai
achega
8ae6c0f98a
Modificáronse 4 ficheiros con 991 adicións e 71 borrados
  1. 929 3
      src/dataService.json
  2. 17 8
      src/jfw/config/config.go
  3. 32 47
      src/jfw/front/dataServiceArea.go
  4. 13 13
      src/jfw/front/nzjProject.go

+ 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{})

+ 32 - 47
src/jfw/front/dataServiceArea.go

@@ -2,20 +2,22 @@ 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"
 	"jy/src/jfw/config"
-	"strings"
-	"time"
 )
 
-type subzone struct {
-	industry, province string
+// HotIndustryAndRegion 热门行业/地区年度招标趋势
+func HomeBiddingTrends() config.IndustryTrend {
+	return config.IndustryTrendConfig
 }
 
+/*
+const (
+	PSearch_DecMust = `"bidstatus": ["中标","成交","合同","单一"]`
+	query_bool_must = `{"terms": {%s}}`
+)
+
 var (
 	industryMap map[string][]string
 )
@@ -28,34 +30,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 +55,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 +163,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 +184,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 +209,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

+ 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)
 	}