tongce.py 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. from excel_util import ExcelUtil
  2. from mysql_db import MysqlDB
  3. from itertools import groupby
  4. class TongCe:
  5. """
  6. 同策测试数据清洗
  7. """
  8. # 统计筒体结果
  9. sql_1 = '''
  10. SELECT
  11. a.sub_question_id,
  12. b.sub_question_content,
  13. a.score,
  14. b.sub_option_content,
  15. count(1)
  16. FROM
  17. f_t_daren_score_2 a
  18. LEFT JOIN d_shangju_tiku_02 b ON a. STATUS = b. STATUS = 1
  19. WHERE
  20. a.testcase_id in %s and
  21. a.testcase_id = b.testcase_id
  22. AND a.sub_question_id = b.sub_question_id
  23. AND (
  24. a.score = b.score
  25. OR a.score = b.sub_option_id
  26. )
  27. GROUP BY
  28. b.sub_question_content,
  29. a.score,
  30. b.sub_option_content
  31. '''
  32. # 选项信息
  33. sql_2 = '''
  34. SELECT
  35. b.id as question_id,
  36. b. NAME as question_title,
  37. a.id as sub_question_id,
  38. a. NAME as sub_question_title,
  39. d.id as option_id,
  40. d.content as option_title,
  41. c.id as sub_option_id,
  42. c.content as sub_option_title
  43. FROM
  44. bq_sub_question a
  45. LEFT JOIN bq_question b ON a.father_id = b.id
  46. LEFT JOIN bq_sub_option c ON a.id = c.sub_question_id
  47. LEFT JOIN bq_option d ON c.father_id = d.id
  48. WHERE
  49. FIND_IN_SET(
  50. a.id,
  51. (
  52. SELECT
  53. GROUP_CONCAT(question_ids)
  54. FROM
  55. bq_testcase
  56. WHERE
  57. house_ids = %s
  58. GROUP BY
  59. house_ids
  60. )
  61. )
  62. AND a. STATUS = b. STATUS = c. STATUS = 1
  63. ORDER BY
  64. a.id
  65. '''
  66. # 表
  67. sql_3 = '''
  68. INSERT INTO mvp_page_display_match (
  69. house_id,
  70. question_id,
  71. question_title,
  72. sub_question_id,
  73. sub_question_title,
  74. option_id,
  75. option_content,
  76. sub_option_id,
  77. sub_option_content,
  78. data_item_tab,
  79. data_item_title,
  80. data_item_name,
  81. STATUS,
  82. creator,
  83. created
  84. )
  85. VALUES
  86. (
  87. %s,
  88. %s,
  89. %s,
  90. %s,
  91. %s,
  92. %s,
  93. %s,
  94. %s,
  95. %s,
  96. %s,
  97. %s,
  98. %s,
  99. 1,
  100. 'binren',
  101. now()
  102. )
  103. '''
  104. sql_4 = '''
  105. SELECT
  106. id,
  107. sub_question_id,
  108. sub_option_id,
  109. data_item_name
  110. FROM
  111. mvp_page_display_match
  112. WHERE
  113. STATUS = 1
  114. '''
  115. sql_5 = '''
  116. SELECT
  117. id
  118. FROM
  119. bq_testcase
  120. WHERE
  121. STATUS = 1
  122. AND FIND_IN_SET(
  123. (
  124. SELECT
  125. id
  126. FROM
  127. bq_house
  128. WHERE
  129. STATUS = 1
  130. AND NAME = %s
  131. ),
  132. house_ids
  133. )
  134. '''
  135. sql_6 = '''
  136. insert INTO mvp_page_display_data (
  137. crowd_info_id,
  138. match_id,
  139. page_display_rule_id,
  140. name,
  141. value,
  142. STATUS,
  143. creator,
  144. created
  145. )
  146. VALUES
  147. (%s, %s, %s, %s, %s, 1, 'binren', now())
  148. '''
  149. sql_7 = '''
  150. SELECT
  151. a.testcase_id,
  152. a.uuid,
  153. GROUP_CONCAT(
  154. DISTINCT b.sub_option_content
  155. )
  156. FROM
  157. f_t_daren_score_2 a
  158. LEFT JOIN d_shangju_tiku_02 b ON a.score = b.sub_option_id
  159. WHERE
  160. a.testcase_id IN (84, 85, 86, 87)
  161. AND b.father_id IN (47, 48, 234, 254)
  162. and a.sub_question_id = b.sub_question_id and a.testcase_id = b.testcase_id
  163. GROUP BY
  164. a.testcase_id,
  165. a.uuid
  166. '''
  167. sql_8 = '''
  168. SELECT
  169. a.uuid,
  170. a.title,
  171. a.testcase_id,
  172. b.father_id,
  173. b.father_content,
  174. b.sub_option_id,
  175. b.sub_option_content
  176. FROM
  177. f_t_daren_score_2 a
  178. LEFT JOIN d_shangju_tiku_02 b ON a.score = b.sub_option_id
  179. WHERE
  180. a.testcase_id = b.testcase_id
  181. AND a.sub_question_id = b.sub_question_id
  182. AND a.testcase_id IN (84, 85, 86, 87)
  183. '''
  184. sql_9 = '''
  185. SELECT
  186. x.city
  187. ,x.uuid
  188. ,x.sex
  189. ,x.nld
  190. ,x.zhifuli
  191. ,x.juzhujiegou
  192. ,m.father_content
  193. ,m.father_id
  194. ,m.sub_question_id
  195. ,m.sub_question_content
  196. ,m.option_tags as option_id
  197. ,m.father_content as option_content
  198. ,m.sub_option_id
  199. ,m.sub_option_content
  200. ,m.testcase_id
  201. ,m.title
  202. FROM
  203. (
  204. SELECT
  205. e.uuid,
  206. e.sex,
  207. f.nld,
  208. c.zhifuli,
  209. d.city,
  210. w.juzhujiegou
  211. FROM
  212. (
  213. SELECT
  214. a.testcase_id,
  215. a.uuid,
  216. b.sub_option_content AS sex
  217. FROM
  218. f_t_daren_score_2 a
  219. LEFT JOIN d_shangju_tiku_02 b ON a.score = b.sub_option_id
  220. WHERE
  221. a.testcase_id IN (84, 85, 86, 87)
  222. AND b.father_id = 47
  223. AND a.sub_question_id = b.sub_question_id
  224. AND a.testcase_id = b.testcase_id
  225. GROUP BY
  226. a.testcase_id,
  227. a.uuid
  228. ) e
  229. LEFT JOIN (
  230. SELECT
  231. a.uuid,
  232. b.sub_option_content AS nld
  233. FROM
  234. f_t_daren_score_2 a
  235. LEFT JOIN d_shangju_tiku_02 b ON a.score = b.sub_option_id
  236. WHERE
  237. a.testcase_id IN (84, 85, 86, 87)
  238. AND b.father_id = 48
  239. AND a.sub_question_id = b.sub_question_id
  240. AND a.testcase_id = b.testcase_id
  241. GROUP BY
  242. a.testcase_id,
  243. a.uuid
  244. ) f ON e.uuid = f.uuid
  245. LEFT JOIN (
  246. SELECT
  247. a.uuid,
  248. b.sub_option_content AS zhifuli
  249. FROM
  250. f_t_daren_score_2 a
  251. LEFT JOIN d_shangju_tiku_02 b ON a.score = b.sub_option_id
  252. WHERE
  253. a.testcase_id IN (84, 85, 86, 87)
  254. AND b.father_id = 234
  255. AND a.sub_question_id = b.sub_question_id
  256. AND a.testcase_id = b.testcase_id
  257. GROUP BY
  258. a.testcase_id,
  259. a.uuid
  260. ) c ON f.uuid = c.uuid
  261. LEFT JOIN (
  262. SELECT
  263. a.uuid,
  264. b.sub_option_content AS city
  265. FROM
  266. f_t_daren_score_2 a
  267. LEFT JOIN d_shangju_tiku_02 b ON a.score = b.sub_option_id
  268. WHERE
  269. a.testcase_id IN (84, 85, 86, 87)
  270. AND b.father_id = 254
  271. AND a.sub_question_id = b.sub_question_id
  272. AND a.testcase_id = b.testcase_id
  273. GROUP BY
  274. a.testcase_id,
  275. a.uuid
  276. ) d ON c.uuid = d.uuid
  277. left join (
  278. SELECT
  279. a.uuid,
  280. b.sub_option_content AS juzhujiegou
  281. FROM
  282. f_t_daren_score_2 a
  283. LEFT JOIN d_shangju_tiku_02 b ON a.score = b.sub_option_id
  284. WHERE
  285. a.testcase_id IN (84, 85, 86, 87)
  286. AND b.father_id = 211
  287. AND a.sub_question_id = b.sub_question_id
  288. AND a.testcase_id = b.testcase_id
  289. GROUP BY
  290. a.testcase_id,
  291. a.uuid
  292. ) w on d.uuid = w.uuid
  293. ) x
  294. LEFT JOIN (
  295. SELECT
  296. a.uuid,
  297. a.title,
  298. a.testcase_id,
  299. b.father_id,
  300. b.father_content,
  301. b.sub_question_id,
  302. b.sub_question_content,
  303. b.sub_option_id,
  304. b.sub_option_content,
  305. b.option_tags
  306. FROM
  307. f_t_daren_score_2 a
  308. LEFT JOIN d_shangju_tiku_02 b ON a.score = b.sub_option_id
  309. WHERE
  310. a.testcase_id = b.testcase_id
  311. AND a.sub_question_id = b.sub_question_id
  312. AND a.testcase_id IN (84, 85, 86, 87)
  313. ) m ON x.uuid = m.uuid
  314. '''
  315. sql_10 = '''
  316. INSERT INTO f_t_daren_score_2 (
  317. testcase_id,
  318. title,
  319. uuid, score, created, sub_question_id
  320. )
  321. VALUE
  322. (84, '有钱人的生活就是很枯燥的……', %s, %s, %s, %s)
  323. '''
  324. sql_11 = '''
  325. select id, title_type, title_in_page, sub_question_id from mvp_page_display_rule where status = 1
  326. '''
  327. sql_12 = '''
  328. INSERT INTO mvp_page_display_rule (
  329. house_id,
  330. function_id,
  331. title_type,
  332. title_in_page,
  333. sub_question_id,
  334. STATUS,
  335. creator,
  336. created
  337. )
  338. VALUE
  339. (
  340. 67,
  341. 1,
  342. %s,
  343. %s,
  344. %s,
  345. 1,
  346. 'binren',
  347. now()
  348. )
  349. '''
  350. sql_13 = '''
  351. INSERT INTO mvp_crowd_info (
  352. house_id,
  353. pay_ability,
  354. age_area,
  355. city_name,
  356. life_cycle,
  357. STATUS,
  358. creator,
  359. created
  360. )
  361. VALUES
  362. (
  363. 67,
  364. %s,
  365. %s,
  366. %s,
  367. %s,
  368. 1,
  369. 'binren',
  370. now()
  371. )
  372. '''
  373. def __init__(self):
  374. self.shangju_db = MysqlDB('shangju')
  375. self.marketing_db = MysqlDB('bi_report')
  376. self.linshi_db = MysqlDB('linshi', db_type=1)
  377. self.options_info = ExcelUtil('工作表6', 'tongce.xlsx').read_options_info()
  378. self.table_type_info = ExcelUtil('新增项目数据项类型排序与展示图表类型管理表', 'table_type.xlsx').get_table_type_info()
  379. def close(self):
  380. self.shangju_db.close()
  381. self.linshi_db.close()
  382. self.marketing_db.close()
  383. def get_question_info_from_db(self):
  384. result = self.shangju_db.select(self.sql_2, [67])
  385. insert_data = []
  386. for rt in result:
  387. rt = list(rt)
  388. option_configuration = self.options_info.get('67' + str(rt[6]))
  389. if option_configuration and len(option_configuration) == 4:
  390. rt.insert(0, 67)
  391. rt.extend(option_configuration[0:3])
  392. insert_data.append(rt)
  393. return insert_data
  394. def get_option_match_info(self):
  395. result = self.linshi_db.select(self.sql_4)
  396. return result
  397. # 支付力:376,年龄:29,城市:377,居住结构:395。
  398. sql_14 = '''
  399. select content from bq_sub_option where sub_question_id = %s
  400. '''
  401. def insert_into_mvp_crowd_info(self):
  402. zhifuli = self.shangju_db.select(self.sql_14, [376])
  403. age = self.shangju_db.select(self.sql_14, [29])
  404. city = self.shangju_db.select(self.sql_14, [377])
  405. juzhujiegou = self.shangju_db.select(self.sql_14, [395])
  406. insert_data = []
  407. for zfl in zhifuli:
  408. for a in age:
  409. for cy in city:
  410. for jzjg in juzhujiegou:
  411. insert_data.append([zfl, a, cy, jzjg])
  412. if len(insert_data) > 0:
  413. # self.linshi_db.truncate('mvp_crowd_info')
  414. self.linshi_db.add_some(self.sql_13, insert_data)
  415. sql_15 = '''
  416. select id, pay_ability, age_area, city_name, life_cycle from mvp_crowd_info where status = 1 and house_id = 67
  417. '''
  418. def get_crowd_info(self):
  419. data = self.linshi_db.select(self.sql_15)
  420. return data
  421. def insert_into_rule(self):
  422. option_info = self.options_info
  423. insert_data = []
  424. sub_question_ids = []
  425. for key in option_info.keys():
  426. data = option_info[key]
  427. if data[3] not in sub_question_ids:
  428. insert_data.append([data[0], data[1], data[3]])
  429. sub_question_ids.append(data[3])
  430. if len(insert_data) > 0:
  431. self.linshi_db.truncate('mvp_page_display_rule')
  432. self.linshi_db.add_some(self.sql_12, insert_data)
  433. def get_rule_data_info(self):
  434. data = self.linshi_db.select(self.sql_11)
  435. return data
  436. sql_16 = '''
  437. insert INTO mvp_page_display_data (
  438. crowd_info_id,
  439. match_id,
  440. value,
  441. STATUS,
  442. creator,
  443. created
  444. )
  445. VALUES
  446. (%s, %s, %s, 1, 'binren', now())
  447. '''
  448. def lingdi_data_scores(self):
  449. # 1: 写入mvp_crowd_info
  450. # self.insert_into_mvp_crowd_info()
  451. crowd_info = self.get_crowd_info()
  452. # 2: 写入rule
  453. # self.insert_into_rule()
  454. rule = self.get_rule_data_info()
  455. # 3: 读入答题数据
  456. self.answers = self.marketing_db.select(self.sql_9)
  457. # 4: 写入match信息
  458. match_data = self.get_question_info_from_db()
  459. self.linshi_db.truncate('mvp_page_display_match')
  460. self.linshi_db.add_some(self.sql_3, match_data)
  461. self.match_data_info = self.get_option_match_info()
  462. self.linshi_db.truncate('mvp_page_display_data')
  463. # 筛选写入data的数据
  464. count = 0
  465. no_data_case = []
  466. try:
  467. for ci in crowd_info:
  468. insert_data = []
  469. crowd_info_id = ci[0]
  470. zhifuli = ci[1]
  471. age = ci[2]
  472. city = ci[3]
  473. juzhujiegou = ci[4]
  474. data = self.filter_people(city, age, zhifuli, juzhujiegou)
  475. data.sort(key=lambda obj: obj[0])
  476. for key, questions_data in groupby(data, key=lambda obj: obj[0]):
  477. question_data_list = []
  478. for qd in questions_data:
  479. question_data_list.append([x for x in qd])
  480. rule_id = self.get_rule_id(key, rule)
  481. if rule_id is not None:
  482. question_people = len(question_data_list)
  483. if question_people > 0:
  484. question_data_list.sort(key=lambda obj: obj[3])
  485. for option_name, option_data_1 in groupby(question_data_list, key=lambda obj: obj[3]):
  486. option_data_list = []
  487. for od in option_data_1:
  488. option_data_list.append([x for x in od])
  489. if len(option_data_list) > 0:
  490. match_id = 0
  491. option_name_alias = option_name
  492. option_id = option_data_list[0][2]
  493. for md in self.match_data_info:
  494. if str(md[1]) == str(key) and str(md[2]) == str(option_id):
  495. match_id = md[0]
  496. option_name_alias = md[3]
  497. insert_data.append([crowd_info_id, match_id, rule_id, option_name_alias, len(option_data_list)])
  498. else:
  499. no_data_case.append([zhifuli, city, age, juzhujiegou, option_name])
  500. else:
  501. no_data_case.append([zhifuli, city, age, juzhujiegou, key])
  502. count += len(insert_data)
  503. self.linshi_db.add_some(self.sql_6, insert_data)
  504. isnert_data_all = []
  505. quanliang_scores = self.scores()
  506. for q_s in quanliang_scores:
  507. rule_id = self.get_rule_id(q_s[0], rule)
  508. if rule_id:
  509. for md in self.match_data_info:
  510. if str(md[1]) == str(q_s[0]) and str(md[2]) == str(q_s[1]):
  511. match_id = md[0]
  512. option_name_alias = md[3]
  513. isnert_data_all.append([5405, match_id, rule_id, option_name_alias, q_s[2]])
  514. self.linshi_db.add_some(self.sql_6, isnert_data_all)
  515. count += len(isnert_data_all)
  516. return {'写入库中的数据': count, '无数据': len(no_data_case)}
  517. except Exception as e:
  518. return str(e)
  519. sql_20 = '''
  520. UPDATE mvp_page_display_rule
  521. SET display_type = %s,
  522. display_size = %s
  523. WHERE
  524. title_in_page = %s
  525. '''
  526. def table_type_insert(self):
  527. for data in self.table_type_info:
  528. self.linshi_db.update(self.sql_20, data)
  529. def get_rule_id(self, sub_question_id, rule):
  530. for re in rule:
  531. if str(re[3]) == str(sub_question_id):
  532. return re[0]
  533. def filter_people(self, city, age, zhifuli, juzhujiegou):
  534. result = []
  535. for answer in self.answers:
  536. if answer[0] == city and answer[3] == age and answer[4] == zhifuli and answer[5] == juzhujiegou:
  537. # 子题id, 子题题目,子选项id,子选项题目
  538. if answer[8] is not None and answer[9] is not None and answer[12] is not None and answer[13]:
  539. result.append([answer[8], answer[9], answer[12], answer[13]])
  540. return result
  541. def get_testcase_ids_by_house_name(self, house_name):
  542. testcase_ids = self.shangju_db.select(self.sql_5, [house_name])
  543. return testcase_ids
  544. def scores(self):
  545. testcase_ids = self.get_testcase_ids_by_house_name('同策 领地')
  546. db_data = self.marketing_db.select(self.sql_1, [testcase_ids])
  547. answer = []
  548. for data in db_data:
  549. answer.append([data[0], data[2], data[4]])
  550. answer.sort(key=lambda obj: obj[0])
  551. sub_option_score = []
  552. for sub_question_id, others in groupby(answer, key=lambda obj: obj[0]):
  553. others_data = []
  554. for ot in others:
  555. others_data.append([x for x in ot])
  556. sub_question_count = sum([x[2] for x in others_data])
  557. for td in others_data:
  558. sub_option_id = td[1]
  559. sub_option_count = td[2]
  560. rate = int(sub_option_count) / sub_question_count
  561. sub_option_score.append([sub_question_id, sub_option_id, sub_option_count])
  562. return sub_option_score
  563. def tongce(self):
  564. """
  565. tongce测试数据清洗
  566. :return:
  567. """
  568. match_data = self.get_question_info_from_db()
  569. # self.linshi_db.truncate('mvp_page_display_match')
  570. self.linshi_db.add_some(self.sql_3, match_data)
  571. scores = self.scores()
  572. match_data_info = self.get_option_match_info()
  573. dispaly_data = []
  574. for score in scores:
  575. sub_question_id = score[0]
  576. sub_option_id = score[1]
  577. value = score[2]
  578. for mi in match_data_info:
  579. if str(mi[1]) == str(sub_question_id) and str(mi[2]) == str(sub_option_id):
  580. dispaly_data.append([mi[0], value])
  581. if len(dispaly_data) > 0:
  582. self.linshi_db.truncate('mvp_page_display_data')
  583. self.linshi_db.add_some(self.sql_6, dispaly_data)
  584. return {'插入数据条数': len(dispaly_data), 'scores': dispaly_data}
  585. def wenjuanxin_84(self):
  586. excel = ExcelUtil('Sheet1', '84_1500.xlsx')
  587. insert_data = excel.wenjuanxin_84()
  588. self.linshi_db.add_some(self.sql_10, insert_data)
  589. print()
  590. sql_17 = '''
  591. SELECT
  592. id,
  593. uuid,
  594. created,
  595. `status`,
  596. sub_question_id,
  597. testcase_id,
  598. title,
  599. score,
  600. province,
  601. city,
  602. district
  603. FROM
  604. f_t_daren_score_2
  605. WHERE
  606. testcase_id IN (84, 85, 86, 87)
  607. AND sub_question_id = 377
  608. AND score = 2917
  609. AND (
  610. city IN (
  611. '昆明市',
  612. '西安市',
  613. '咸阳市',
  614. '郑州市',
  615. '洛阳市',
  616. '武汉市',
  617. '襄阳市',
  618. '重庆市',
  619. '璧山'
  620. )
  621. OR province IN (
  622. '昆明市',
  623. '西安市',
  624. '咸阳市',
  625. '郑州市',
  626. '洛阳市',
  627. '武汉市',
  628. '襄阳市',
  629. '重庆市',
  630. '璧山'
  631. )
  632. OR district IN (
  633. '昆明市',
  634. '西安市',
  635. '咸阳市',
  636. '郑州市',
  637. '洛阳市',
  638. '武汉市',
  639. '襄阳市',
  640. '重庆市',
  641. '璧山区'
  642. )
  643. )
  644. '''
  645. sql_18 = '''
  646. update f_t_daren_score_2 set score = %s where id = %s
  647. '''
  648. city_info = {
  649. '昆明市': 2918,
  650. '西安市': 2919,
  651. '咸阳市': 2920,
  652. '郑州市': 2921,
  653. '洛阳市': 2922,
  654. '武汉市': 2923,
  655. '襄阳市': 2924,
  656. '重庆市': 2925,
  657. '璧山市': 2926
  658. }
  659. def other_city_clean(self):
  660. update_data = []
  661. need_update_data = self.marketing_db.select(self.sql_17)
  662. for nd in need_update_data:
  663. id = nd[0]
  664. province = nd[8]
  665. city = nd[9]
  666. district = nd[10]
  667. bishan = self.city_info.get(district)
  668. if bishan:
  669. update_data.append([bishan, id])
  670. else:
  671. city_id = self.city_info.get(city)
  672. if city_id:
  673. update_data.append([city_id, id])
  674. else:
  675. province_id = self.city_info.get(province)
  676. if province_id:
  677. update_data.append([province_id, id])
  678. self.marketing_db.add_some(self.sql_18, update_data)
  679. return len(update_data)
  680. sql_19 = '''
  681. select GROUP_CONCAT(id)from f_t_daren_score_2 where testcase_id in (84, 85, 86, 87) and score = 2925 and district = '璧山区'
  682. update f_t_daren_score_2 set score = 2926 where id in (979728,979890,981251,984783,985250,985564,990999)
  683. '''
  684. def chongqin_to_bishan(self):
  685. pass
  686. if __name__ == '__main__':
  687. tongce = TongCe()
  688. match_data = tongce.get_question_info_from_db()
  689. tongce.linshi_db.truncate('mvp_page_display_match')
  690. tongce.linshi_db.add_some(tongce.sql_3, match_data)