guangdong_2018_price_crawler.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. /*
  2. * @Descripttion: 广东材料信息价格获取(通过造价通接口)
  3. * @Author: vian
  4. * @Date: 2020-09-29 11:22:59
  5. */
  6. module.exports = {
  7. crawlData,
  8. };
  9. const uuidV1 = require('uuid/v1');
  10. const mongoose = require('mongoose');
  11. const axios = require('axios');
  12. const querystring = require('querystring');
  13. const priceInfoLibModel = mongoose.model('std_price_info_lib');
  14. const priceInfoClassModel = mongoose.model('std_price_info_class');
  15. const priceInfoAreaModel = mongoose.model('std_price_info_areas');
  16. const priceInfoItemModel = mongoose.model('std_price_info_items');
  17. const priceInfoSourceModel = mongoose.model('std_price_info_source');
  18. const gljLibModel = mongoose.model('std_glj_lib_map');
  19. const gljClassModel = mongoose.model('std_glj_lib_gljClass');
  20. // 造价通网页上整理的地区https://gd.zjtcn.com/gov/c_cs_d_t_p1.html
  21. const areas = [
  22. { city: '广州市', county: '广州市' },
  23. { city: '广州市', county: '花都区' },
  24. { city: '广州市', county: '增城市' },
  25. { city: '广州市', county: '从化市' },
  26. { city: '韶关市', county: '韶关市' },
  27. { city: '韶关市', county: '始兴县' },
  28. { city: '韶关市', county: '翁源县' },
  29. { city: '韶关市', county: '新丰县' },
  30. { city: '韶关市', county: '乐昌市' },
  31. { city: '韶关市', county: '南雄市' },
  32. { city: '深圳市', county: '深圳市' },
  33. { city: '珠海市', county: '珠海市' },
  34. { city: '汕头市', county: '汕头市' },
  35. { city: '汕头市', county: '濠江区' },
  36. { city: '汕头市', county: '潮阳区' },
  37. { city: '汕头市', county: '潮南区' },
  38. { city: '汕头市', county: '澄海区' },
  39. { city: '汕头市', county: '南澳县' },
  40. { city: '佛山市', county: '佛山市' },
  41. { city: '佛山市', county: '南海区' },
  42. { city: '佛山市', county: '顺德区' },
  43. { city: '江门市', county: '江门市' },
  44. { city: '江门市', county: '新会区' },
  45. { city: '江门市', county: '台山市' },
  46. { city: '江门市', county: '开平市' },
  47. { city: '江门市', county: '鹤山市' },
  48. { city: '江门市', county: '恩平市' },
  49. { city: '湛江市', county: '湛江市' },
  50. { city: '湛江市', county: '遂溪县' },
  51. { city: '湛江市', county: '徐闻县' },
  52. { city: '湛江市', county: '廉江市' },
  53. { city: '湛江市', county: '雷州市' },
  54. { city: '湛江市', county: '吴川市' },
  55. { city: '茂名市', county: '茂名市' },
  56. { city: '茂名市', county: '电白区' },
  57. { city: '茂名市', county: '高州市' },
  58. { city: '茂名市', county: '化州市' },
  59. { city: '茂名市', county: '信宜市' },
  60. { city: '肇庆市', county: '肇庆市' },
  61. { city: '肇庆市', county: '鼎湖区' },
  62. { city: '肇庆市', county: '广宁县' },
  63. { city: '肇庆市', county: '怀集县' },
  64. { city: '肇庆市', county: '封开县' },
  65. { city: '肇庆市', county: '德庆县' },
  66. { city: '肇庆市', county: '高要市' },
  67. { city: '肇庆市', county: '四会市' },
  68. { city: '惠州市', county: '惠州市' },
  69. { city: '惠州市', county: '惠阳区' },
  70. { city: '惠州市', county: '大亚湾开发区' },
  71. { city: '惠州市', county: '博罗县' },
  72. { city: '惠州市', county: '惠东县' },
  73. { city: '惠州市', county: '龙门县' },
  74. { city: '梅州市', county: '梅州市' },
  75. { city: '梅州市', county: '梅县' },
  76. { city: '梅州市', county: '大埔县' },
  77. { city: '梅州市', county: '丰顺县' },
  78. { city: '梅州市', county: '平远县' },
  79. { city: '汕尾市', county: '汕尾市' },
  80. { city: '汕尾市', county: '海丰县' },
  81. { city: '汕尾市', county: '陆河县' },
  82. { city: '河源市', county: '河源市' },
  83. { city: '河源市', county: '紫金县' },
  84. { city: '河源市', county: '龙川县' },
  85. { city: '河源市', county: '连平县' },
  86. { city: '河源市', county: '和平县' },
  87. { city: '河源市', county: '东源县' },
  88. { city: '阳江市', county: '阳江市' },
  89. { city: '阳江市', county: '海陵岛区' },
  90. { city: '阳江市', county: '阳西县' },
  91. { city: '阳江市', county: '阳春市' },
  92. { city: '清远市', county: '清远市' },
  93. { city: '清远市', county: '佛冈县' },
  94. { city: '清远市', county: '阳山县' },
  95. { city: '清远市', county: '连山县' },
  96. { city: '清远市', county: '连南县' },
  97. { city: '清远市', county: '英德市' },
  98. { city: '清远市', county: '连州市' },
  99. { city: '东莞市', county: '东莞市' },
  100. { city: '中山市', county: '中山市' },
  101. { city: '潮州市', county: '潮州市' },
  102. { city: '潮州市', county: '潮安县' },
  103. { city: '潮州市', county: '饶平县' },
  104. { city: '揭阳市', county: '揭阳市' },
  105. { city: '揭阳市', county: '揭西县' },
  106. { city: '揭阳市', county: '惠来县' },
  107. { city: '揭阳市', county: '普宁市' },
  108. { city: '云浮市', county: '云浮市' },
  109. { city: '云浮市', county: '新兴县' },
  110. { city: '云浮市', county: '郁南县' },
  111. { city: '云浮市', county: '罗定市' },
  112. ];
  113. const TIME_OUT = 120000;
  114. // 创建axios实例
  115. const axiosConfig = {
  116. baseURL: 'http://api.zjtcn.com/user',
  117. timeout: TIME_OUT,
  118. /* proxy: {
  119. host: "127.0.0.1", port: "8888" // Fiddler抓包,需要打开Fiddler否则会报connect error
  120. }, */
  121. headers: {
  122. 'Cache-Control': 'max-age=0',
  123. 'Content-Type': 'application/x-www-form-urlencoded',
  124. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36',
  125. 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
  126. 'Accept-Encoding': 'gzip, deflate',
  127. 'Accept-Language': 'zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6',
  128. },
  129. //responseType: 'document'
  130. };
  131. const axiosInstance = axios.create(axiosConfig);
  132. console.log('axiosConfig=-========================================');
  133. console.log(axiosConfig);
  134. // 响应拦截器
  135. axiosInstance.interceptors.response.use(function (response) {
  136. return response.data;
  137. }, function (error) {
  138. // 对响应错误做点什么
  139. if (error.message.includes('timeout')) {
  140. return Promise.reject(`目标网络超时,请稍后再试。(${TIME_OUT}ms)`);
  141. } else {
  142. return Promise.reject(error);
  143. }
  144. });
  145. async function post(url, data) {
  146. if (url === '/dyn_code') {
  147. console.log(axiosInstance);
  148. }
  149. return await axiosInstance.post(url, querystring.stringify(data));
  150. }
  151. // 有效期一年,通过购买造价通服务获得
  152. const SERVICE_ID = '2020090003';
  153. const SERVICE_KEY = '97F2A441633F10DFEB5BFC29B3862847';
  154. // 获取后续获取信息价期刊必要的token
  155. async function getToken() {
  156. // 获取动态码
  157. const dynData = await post('/dyn_code', { service_id: SERVICE_ID });
  158. if (!dynData.response_code) {
  159. throw `错误代号${dynData.retCode} 获取动态码失败。`;
  160. }
  161. // 获取加密字符串
  162. const serviceSecret = await post('/aes', { service_id: SERVICE_ID, service_key: SERVICE_KEY, service_code: dynData.response_code });
  163. if (typeof serviceSecret !== 'string') {
  164. throw `错误代号${serviceSecret.retCode} 获取加密字符串错误。`;
  165. }
  166. const tokenData = await post('/authentication', { service_id: SERVICE_ID, service_secret: serviceSecret });
  167. if (!tokenData.token) {
  168. throw `错误代号${tokenData.retCode} 获取token失败。`
  169. }
  170. return tokenData.token;
  171. }
  172. const monthMap = {
  173. '1': '01月',
  174. '2': '02月',
  175. '3': '03月',
  176. '4': '04月',
  177. '5': '05月',
  178. '6': '06月',
  179. '7': '07月',
  180. '8': '08月',
  181. '9': '09月',
  182. '10': '10月',
  183. '11': '11月',
  184. '12': '12月',
  185. };
  186. const quaterReg = /季度/;
  187. const quaters = ['一季度', '二季度', '三季度', '四季度'];
  188. // 根据季度期数范围,获得期数数据, 2020年-一季度 - 2021年-四季度
  189. function getQuaterPeriodData(from, to) {
  190. let [fromYear, fromQuater] = from.split('-');
  191. fromYear = +fromYear.replace('年', '');
  192. fromQuater = quaters.indexOf(fromQuater);// 将季度转换为数值,方便对比;
  193. if (fromQuater < 0) {
  194. return null;
  195. }
  196. let [toYear, toQuater] = to.split('-');
  197. toYear = +toYear.replace('年', '');
  198. toQuater = quaters.indexOf(toQuater);// 将季度转换为数值,方便对比;
  199. if (toQuater < 0) {
  200. return null;
  201. }
  202. const newFrom = [fromYear, fromQuater].join('-');
  203. const newTo = [toYear, toQuater].join('-');
  204. if (newFrom > newTo) {
  205. return null;
  206. }
  207. const periods = [];
  208. let curYear = fromYear;
  209. let curQuater = fromQuater;
  210. while ((curYear <= toYear && curQuater <= toQuater) || curYear < toYear) {
  211. periods.push(`${curYear}年-${quaters[curQuater]}`);
  212. if (curQuater === 3) {
  213. curYear++;
  214. curQuater = 0;
  215. } else {
  216. curQuater++;
  217. }
  218. }
  219. return periods;
  220. }
  221. // 根据期数范围,获取期数数据
  222. function getPeriodData(from, to) {
  223. if (from > to) {
  224. return null;
  225. }
  226. const reg = /(\d+)-(\d+)/;
  227. const fromMatch = from.match(reg);
  228. const fromYear = +fromMatch[1];
  229. const fromMonth = +fromMatch[2];
  230. const toMatch = to.match(reg);
  231. const toYear = +toMatch[1];
  232. const toMonth = +toMatch[2];
  233. let curYear = fromYear;
  234. let curMonth = fromMonth;
  235. const periods = [];
  236. while ((curYear <= toYear && curMonth <= toMonth) || curYear < toYear) {
  237. periods.push(`${curYear}年-${monthMap[curMonth]}`);
  238. if (curMonth === 12) {
  239. curYear++;
  240. curMonth = 1;
  241. } else {
  242. curMonth++;
  243. }
  244. }
  245. return periods;
  246. }
  247. // 根据期刊数据,获取需要信息价接口需要的date
  248. function getDateForApi(journalList, period) {
  249. const isQuaterPeriod = quaterReg.test(period);
  250. if (!isQuaterPeriod) {
  251. const monthPeriod = `${period}-05`; // 月度
  252. const matchMonth = journalList.find(dateItem => dateItem.date === monthPeriod);
  253. if (matchMonth) {
  254. return matchMonth.date;
  255. }
  256. }
  257. // 没匹配到月度数据,去匹配季度
  258. const month = period.split('-')[1];
  259. let quaterDate;
  260. if (['1', '01', '2', '02', '3', '03', '一季度'].includes(month)) {
  261. quaterDate = '03-15';
  262. } else if (['4', '04', '5', '05', '6', '06', '二季度'].includes(month)) {
  263. quaterDate = '06-15';
  264. } else if (['7', '07', '8', '08', '9', '09', '三季度'].includes(month)) {
  265. quaterDate = '09-15';
  266. } else if (['10', '11', '12', '四季度'].includes(month)) {
  267. quaterDate = '12-15';
  268. }
  269. const year = period.split('-')[0];
  270. const matchQuater = journalList.find(dateItem => dateItem.date === `${year}-${quaterDate}`);
  271. if (matchQuater || isQuaterPeriod) {
  272. return matchQuater ? matchQuater.date : null;
  273. }
  274. // 没匹配到季度数据,去匹配半年数据
  275. if (month / 6 <= 1) {
  276. const firstHalfYear = journalList.find(dateItem => dateItem.date === `${year}-06-25`);
  277. if (firstHalfYear) {
  278. return firstHalfYear.date;
  279. }
  280. }
  281. if (month / 6 > 1) {
  282. const secondHalfYear = journalList.find(dateItem => dateItem.date === `${year}-12-25`);
  283. if (secondHalfYear) {
  284. return secondHalfYear.date;
  285. }
  286. }
  287. // 匹配全年数据
  288. const fullYear = journalList.find(dateItem => dateItem.date === `${year}-12-30`);
  289. if (fullYear) {
  290. return fullYear;
  291. }
  292. return null;
  293. }
  294. // 获取信息价
  295. async function getPriceInfoSource(token, period, city, county) {
  296. const province = '广东';
  297. const area = `${province}-${city}-${county}`;
  298. const industry = 1;
  299. const body = {
  300. token,
  301. province,
  302. city,
  303. county: county === '电白区' ? '电白市' : county, // 造价通里叫电白市
  304. industry,
  305. // date: `${period}-05` // 天数05表示请求月度数据
  306. };
  307. // 获取期刊数据
  308. const year = period.split('-')[0];
  309. const journalRst = await post('/gov/journal_list', { ...body, date: year });
  310. if (!journalRst || !journalRst.results) {
  311. // 不抛出错误,不同地区更新信息价期刊的时间不同,如果导入数据时,有地区没发布数据,直接跳过并提示
  312. return `retCode: ${journalRst.retCode} ${journalRst.msg} (${period} ${city} ${county})`;
  313. }
  314. const date = getDateForApi(journalRst.results, period);
  315. if (!date) {
  316. return `retCode: 1000 暂无数据 (${period} ${city} ${county})`;
  317. }
  318. const sourceData = await post('/gov/get', { ...body, date });
  319. if (!sourceData.results) {
  320. // 不抛出错误,不同地区更新信息价期刊的时间不同,如果导入数据时,有地区没发布数据,直接跳过并提示
  321. return `retCode: ${sourceData.retCode} ${sourceData.msg} (${period} ${city} ${county})`;
  322. }
  323. // 因为造价通接口请求有次数限制,一个地区只能请求一次,为保险起见,将造价通源数据入库
  324. const insertData = sourceData.results.map(item => ({
  325. period,
  326. area,
  327. industry,
  328. subcid: item.subcid,
  329. code: item.code,
  330. name: item.name,
  331. unit: item.unit,
  332. price: item.price,
  333. taxPrice: item.tax_price,
  334. noTaxPrice: item.no_tax_price,
  335. specs: item.spec,
  336. dateRemark: item.notes,
  337. remark: item.notes,
  338. }));
  339. /* if (insertData.length) {
  340. await priceInfoSourceModel.insertMany(insertData);
  341. } */
  342. return insertData;
  343. }
  344. // 获取数据subcid与分类名称的映射表
  345. async function getClassNameMap(compilationID) {
  346. const gljLib = await gljLibModel.findOne({ compilationId: compilationID }).lean();
  347. if (!gljLib) {
  348. return null;
  349. }
  350. const classData = await gljClassModel.find({ repositoryId: gljLib.ID }).lean();
  351. const map = {};
  352. const reg = /^\d{4}/;
  353. classData.forEach(item => {
  354. const name = item.Name || '';
  355. const matched = name.match(reg);
  356. if (matched) {
  357. map[matched[0]] = name;
  358. }
  359. });
  360. return map;
  361. }
  362. /**
  363. * 将信息价源数据转换入库
  364. * @param {String} compilationID - 费用定额ID
  365. * @param {String} period - 期数 eg: 2020年-09月
  366. * @param {String} areaID - 地区ID
  367. * @param {Array} sourceData - 造价通源数据
  368. * @param {Object} classNameMap - 从标准人材机分类树获取的编号-名称映射表
  369. * @return {Void}
  370. */
  371. async function saveData(compilationID, period, areaID, sourceData, classNameMap) {
  372. let lib = await priceInfoLibModel.findOne({ compilationID, period }).lean();
  373. if (!lib) {
  374. lib = {
  375. compilationID,
  376. period,
  377. ID: uuidV1(),
  378. name: `信息价(${period})`,
  379. createDate: Date.now()
  380. };
  381. await priceInfoLibModel.insertMany([lib]);
  382. }
  383. const libID = lib.ID;
  384. // 如果该期数该地区下存在数据,则不处理,防止重复插入数据
  385. // 造价通地区数据更新不同步,可能需要多次导入数据补全一期数据,如果已经有数据,说明该地区已经导入成功过了,直接跳过
  386. const existCount = await priceInfoItemModel.count({ compilationID, period, areaID });
  387. if (existCount) {
  388. return;
  389. }
  390. // 分类数据应为空才对,如果有就清空
  391. const existClassCount = await priceInfoClassModel.count({ libID: lib.ID, areaID });
  392. if (existClassCount) {
  393. await priceInfoClassModel.remove({ libID: lib.ID, areaID });
  394. }
  395. // 导入分类数据及价格信息数据
  396. const otherClassName = '其他';
  397. const curClassMap = {
  398. [otherClassName]: { libID, areaID, ID: uuidV1(), ParentID: '-1', name: otherClassName }
  399. };
  400. const classData = [];
  401. const priceData = [];
  402. const splitReg = /([0-9.]+)-([0-9.]+)/;
  403. let needOtherClass = false;
  404. sourceData.forEach(item => {
  405. const className = classNameMap[item.subcid] || otherClassName;
  406. if (className === otherClassName) {
  407. needOtherClass = true;
  408. }
  409. if (!curClassMap[className]) {
  410. const classItem = { libID, areaID, ID: uuidV1(), ParentID: '-1', NextSiblingID: '-1', name: className };
  411. curClassMap[className] = classItem;
  412. /* const preClassData = classData[classData.length - 1];
  413. if (preClassData) {
  414. preClassData.NextSiblingID = classItem.ID;
  415. } */
  416. classData.push(classItem);
  417. }
  418. const classID = curClassMap[className].ID;
  419. const price = item.price || '';
  420. const matchSplitPrice = price.match(splitReg);
  421. if (matchSplitPrice) { // 价格字段是区间,需要分割成最低价、最高价两条数据
  422. const minPrice = matchSplitPrice[1];
  423. const maxPrice = matchSplitPrice[2];
  424. priceData.push(transfromSourceItemToPriceItem(item, classID, `${item.name}-最低价`, minPrice));
  425. priceData.push(transfromSourceItemToPriceItem(item, classID, `${item.name}-最高价`, maxPrice));
  426. } else {
  427. priceData.push(transfromSourceItemToPriceItem(item, classID, item.name, item.noTaxPrice));
  428. }
  429. });
  430. // 分类按分类编号排序
  431. classData.sort((a, b) => a.name.localeCompare(b.name));
  432. classData.forEach((classItem, index) => {
  433. const preClassItem = classData[index - 1];
  434. if (preClassItem) {
  435. preClassItem.NextSiblingID = classItem.ID;
  436. }
  437. });
  438. if (needOtherClass) {
  439. const otherClassItem = curClassMap[otherClassName];
  440. otherClassItem.NextSiblingID = classData[0].ID;
  441. classData.push(otherClassItem);
  442. }
  443. const task = [
  444. priceInfoClassModel.insertMany(classData),
  445. priceInfoItemModel.insertMany(priceData)
  446. ];
  447. await Promise.all(task);
  448. // 将信息价源数据转换成信息价数据
  449. function transfromSourceItemToPriceItem(sourceItem, classID, name, noTaxPrice) {
  450. if (/(m³)|(m²)/.test(sourceItem.unit)) {
  451. sourceItem.unit = sourceItem.unit.replace(/m³/g, 'm3');
  452. sourceItem.unit = sourceItem.unit.replace(/m²/g, 'm2');
  453. }
  454. return {
  455. compilationID,
  456. period,
  457. name,
  458. noTaxPrice,
  459. classID,
  460. libID,
  461. areaID,
  462. ID: uuidV1(),
  463. code: sourceItem.subcid,
  464. unit: sourceItem.unit,
  465. specs: sourceItem.specs,
  466. taxPrice: sourceItem.taxPrice,
  467. dateRemark: sourceItem.dateRemark,
  468. remark: sourceItem.remark,
  469. };
  470. }
  471. }
  472. /**
  473. * 获取数据
  474. * @param {String} from - 从哪一期开始 eg: 2020-01
  475. * @param {String} to - 从哪一期结束 eg: 2020-05
  476. * @param {String} compilationID - 费用定额ID
  477. * @return {Object}
  478. */
  479. async function crawlData(from, to, compilationID) {
  480. // 存入信息价相关数据
  481. const token = await getToken();
  482. const periods = quaterReg.test(from) ? getQuaterPeriodData(from, to) : getPeriodData(from, to);
  483. console.log(`periods`);
  484. console.log(periods);
  485. if (!periods) {
  486. throw '无效的期数区间。';
  487. }
  488. const classNameMap = await getClassNameMap(compilationID);
  489. if (!classNameMap) {
  490. throw '无有效的分类数据。';
  491. }
  492. const hintInfos = [];
  493. for (const period of periods) {
  494. const sourcePeriod = period.replace(/年|月/g, '');
  495. for (let i = 0; i < areas.length; i++) {
  496. // 存入地区
  497. const { city, county } = areas[i];
  498. const area = `${city}-${county}`;
  499. if (area === '茂名市-电白区') {
  500. // 电白市是错的,需要改成电白区
  501. const dianBai = await priceInfoAreaModel.findOne({ compilationID, name: '茂名市-电白市' }).lean();
  502. if (dianBai) {
  503. await priceInfoAreaModel.update({ ID: dianBai.ID }, { $set: { name: area } });
  504. }
  505. }
  506. let areaItem = await priceInfoAreaModel.findOne({ compilationID, name: area }).lean();
  507. const serialNo = i + 1;
  508. if (!areaItem) {
  509. areaItem = { compilationID, serialNo, ID: uuidV1(), name: area };
  510. await priceInfoAreaModel.insertMany([areaItem]);
  511. } else { // 需求变更,需要排序
  512. await priceInfoAreaModel.update({ ID: areaItem.ID }, { $set: { serialNo } });
  513. }
  514. const existCount = await priceInfoItemModel.count({ compilationID, period, areaID: areaItem.ID });
  515. if (existCount) {
  516. continue;
  517. }
  518. const sourceData = await getPriceInfoSource(token, sourcePeriod, city, county);
  519. if (typeof sourceData === 'string') {
  520. hintInfos.push(sourceData);
  521. continue;
  522. }
  523. if (!sourceData.length) {
  524. continue;
  525. }
  526. await saveData(compilationID, period, areaItem.ID, sourceData, classNameMap);
  527. }
  528. }
  529. if (hintInfos.length) {
  530. throw hintInfos.join('\n');
  531. }
  532. }