utils.py 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. import datetime
  2. import json
  3. import time
  4. import requests
  5. from selenium import webdriver
  6. from selenium.webdriver import ActionChains
  7. from selenium.webdriver.chrome.options import Options
  8. from selenium.webdriver.common.by import By
  9. from selenium.webdriver.support import expected_conditions as EC
  10. from selenium.webdriver.support.wait import WebDriverWait
  11. class flight_list(object):
  12. def __init__(self):
  13. self.flightplanurl = r"http://172.30.142.253"
  14. self.url = r"http://me.sichuanair.com/login.shtml"
  15. self.login_url = "https://login.sichuanair.com/idp/AuthnEngine?currentAuth=urn_oasis_names_tc_SAML_2.0_ac_classes_BAMUsernamePassword"
  16. self.flight_list_url = "https://me.sichuanair.com/api/v1/plugins/LM_FLIGHT_LIST"
  17. self.flight_list_third_url = "https://me.sichuanair.com/api/v1/plugins/LM_FLIGHT_THIRD_LIST"
  18. self.task_flight_list_url="https://me.sichuanair.com/api/v1/plugins/LM_TASK_ASSIGNMENT_LIST"
  19. self.LM_FJ_TASK_PG="https://me.sichuanair.com/api/v1/plugins/LM_FJ_TASK_PG"
  20. self.task_filght_third_list_url="https://cscsupplier.sichuanair.com/api/v1/plugins/LM_TASK_ASSIGNMENT_THIRD_LIST"
  21. self.LM_TSK_DINGDONG_url ="https://cscsupplier.sichuanair.com/api/v1/plugins/LM_TSK_DINGDONG"
  22. self.LM_TSK_SURE_PG_url="https://cscsupplier.sichuanair.com/api/v1/plugins/LM_TSK_SURE_PG"
  23. self.LM_TSK_EMP_PGLIST_url="https://cscsupplier.sichuanair.com/api/v1/plugins/LM_TSK_EMP_PGLIST"
  24. self.MM_GJJH_LIST="https://cscsupplier.sichuanair.com/api/v1/plugins/MM_GJJH_LIST"
  25. self.LM_TSK_HANDOVER_url="https://cscsupplier.sichuanair.com/api/v1/plugins/LM_TSK_HANDOVER"
  26. self.LM_FLIGHT_SEARCH_LIST='https://cscsupplier.sichuanair.com/api/v1/plugins/LM_FLIGHT_SEARCH_LIST'
  27. self.LM_TASK_ARCHIVE_LIST='https://cscsupplier.sichuanair.com/api/v1/plugins/LM_TASK_ARCHIVE_LIST'
  28. self.jobcard='https://cscsupplier.sichuanair.com'
  29. self.token = None
  30. self.flightplantoken = None #飞机排班token
  31. #amro状态
  32. self.amro_status = 0
  33. self.flight_list_json = None
  34. self.flight_list_third_json = None
  35. def start(self, username, password):
  36. try:
  37. self.token = self.login(username, password)
  38. except Exception:
  39. pass
  40. try:
  41. self.flightplantoken = self.loginflight(username, password)
  42. except Exception:
  43. print("飞机排班系统登录失败")
  44. pass
  45. return self.token, self.flightplantoken
  46. def login(self, username, password):
  47. try:
  48. options = webdriver.EdgeOptions()
  49. options.use_chromium = True
  50. #options.add_experimental_option('excludeSwitches', ['enable-logging'])
  51. #options.add_argument("headless")
  52. #options.add_argument("disable-gpu")
  53. #options.add_argument('start-maximized')
  54. #options.add_argument('window-size=1920x1080')
  55. self.driver = webdriver.Edge(options=options)
  56. self.actions = ActionChains(self.driver)
  57. except:
  58. chrome_options = Options()
  59. chrome_options.add_argument("--headless")
  60. chrome_options.add_argument("window-size=1920x1080")
  61. chrome_options.add_argument("--start-maximized")
  62. chrome_options.add_argument('--disable-gpu') # 如果不加这个选项,有时定位会出现问题
  63. self.driver = webdriver.Chrome(executable_path=r'D:\flightinfo\Google\Chrome\Application\chromedriver.exe',
  64. # executable_path=path
  65. options=chrome_options)
  66. self.actions = ActionChains(self.driver)
  67. self.driver.get(self.url)
  68. WebDriverWait(self.driver, 10).until(EC.presence_of_element_located((By.ID, 'singleSubmit')))
  69. loginbtn = self.driver.find_element('id', 'singleSubmit')
  70. time.sleep(0.5)
  71. self.actions.click(loginbtn)
  72. self.actions.perform()
  73. WebDriverWait(self.driver, 10).until(EC.presence_of_element_located((By.NAME, "j_username"))).send_keys(
  74. username)
  75. time.sleep(0.5)
  76. self.driver.find_element('name', "j_password").send_keys(password)
  77. #time.sleep(0.5)
  78. time.sleep(0.5)
  79. self.driver.find_element_by_xpath("//button[@type='button']").click()
  80. time.sleep(1)
  81. for cookie in self.driver.get_cookies():
  82. if "_amro_sk" in cookie.values():
  83. self.amro_status = 1
  84. self.driver.quit()
  85. return "_amro_sk=" +cookie["value"]
  86. else:
  87. pass
  88. self.driver.quit()
  89. def loginflight(self , username , password) :#飞机排班
  90. try :
  91. options = webdriver.EdgeOptions()
  92. options.use_chromium = True
  93. # options.add_experimental_option('excludeSwitches', ['enable-logging'])
  94. # options.add_argument("headless")
  95. # options.add_argument("disable-gpu")
  96. # options.add_argument('start-maximized')
  97. # options.add_argument('window-size=1920x1080')
  98. self.driver = webdriver.Edge(options = options)
  99. self.actions = ActionChains(self.driver)
  100. except :
  101. chrome_options = Options()
  102. chrome_options.add_argument("--headless")
  103. chrome_options.add_argument("window-size=1920x1080")
  104. chrome_options.add_argument("--start-maximized")
  105. chrome_options.add_argument('--disable-gpu') # 如果不加这个选项,有时定位会出现问题
  106. self.driver = webdriver.Chrome(executable_path = r'D:\flightinfo\Google\Chrome\Application\chromedriver.exe' ,
  107. # executable_path=path
  108. options = chrome_options)
  109. self.actions = ActionChains(self.driver)
  110. self.driver.get(self.flightplanurl)
  111. WebDriverWait(self.driver , 10).until(EC.presence_of_element_located((By.NAME , "j_username"))).send_keys(
  112. username)
  113. time.sleep(0.5)
  114. self.driver.find_element('name' , "j_password").send_keys(password)
  115. # time.sleep(0.5)
  116. time.sleep(0.5)
  117. self.driver.find_element_by_xpath("//button[@type='button']").click()
  118. time.sleep(1)
  119. for cookie in self.driver.get_cookies() :
  120. if "X-Access-Token" in cookie.values() :
  121. self.amro_status = 1
  122. self.driver.quit()
  123. return cookie["value"]
  124. else :
  125. pass
  126. self.driver.quit()
  127. def get_cookie(self):
  128. if self.token!=None:
  129. return self.token
  130. else:
  131. return None
  132. def checkCookieSts(self,cookie):
  133. try:
  134. url = "https://me.sichuanair.com/api/v1/plugins/PROCESS_CLAIM_TASK_PRO_LIST"
  135. data = {
  136. 'user_id': '',
  137. 'userId': '',
  138. 'accountType': 'ARCHIVE',
  139. 'page': '1',
  140. 'rows': '11'
  141. }
  142. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  143. "Cookie": cookie}
  144. result = requests.post(url, data, headers=header).json()
  145. #print(result['code'], result['msg'], result['data'])
  146. return result['code']
  147. except:
  148. return 403
  149. def checkCookieStsFLIGHTplan(self,cookie):
  150. try:
  151. url = "http://172.30.142.253/platform/api/act/act/task/execute/count"
  152. params = {"_t": int(datetime.datetime.now().timestamp())}
  153. header = {
  154. "Content-Type" : "application/json;charset=UTF-8" , # 明确请求体为 JSON 格式
  155. "Accept" : "application/json, text/plain, */*" ,
  156. "User-Agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0" ,
  157. "X-Access-Token": cookie}
  158. result = requests.get(url, params, headers=header).json()
  159. #print(result['code'])
  160. return result['code']
  161. except:
  162. return 403
  163. def checkWorkjob(self,taskids,acno,taskType,actype,startDate,endDate,cookie):
  164. data = {"taskids": taskids,
  165. "acno": acno,
  166. "taskType": taskType,
  167. "actype": actype,
  168. "startDate": startDate,
  169. "endDate": endDate
  170. }
  171. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  172. "Cookie": cookie}
  173. try:
  174. self.LM_FJ_TASK_PG_json = requests.post(url=self.LM_FJ_TASK_PG, data=data, headers=header).json()
  175. except Exception:
  176. self.LM_FJ_TASK_PG_json = None
  177. return self.LM_FJ_TASK_PG_json
  178. def request_jobcard(self, cookie, filename): # 需要自动逻辑白班夜班
  179. one_year_later = datetime.datetime.now() + datetime.timedelta(days=365)
  180. timestamp = int(one_year_later.timestamp()*1000)
  181. header = {
  182. "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
  183. "Cookie": cookie}
  184. try:
  185. task_jobcard_json = requests.get(url=f'https://cscsupplier.sichuanair.com{filename}?_cache_timestamp={timestamp}',headers=header).content
  186. except Exception:
  187. task_jobcard_json = None
  188. return task_jobcard_json
  189. def request_MM_GJJH_LIST(self,cookie):
  190. yesterday=(datetime.date.today() - datetime.timedelta(days=1)).strftime("%Y-%m-%d")
  191. today = datetime.date.today().strftime("%Y-%m-%d")
  192. data={"mfrpn":"",
  193. "zjcdats": yesterday,
  194. "zjcdate": today,
  195. "zwgh": "Y",
  196. "zlynam":"",
  197. "zbmtxt":"",
  198. "zkstxt":"",
  199. "zfdtxt":"",
  200. "zlgort": "TF20",
  201. "zghnam":"",
  202. "ghrbm":"",
  203. "ghrks":"",
  204. "ghrfd":"",
  205. "zghkcd":"",
  206. "sort": "ZBMTXT",
  207. "order": "asc"
  208. }
  209. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  210. "Cookie": cookie}
  211. try:
  212. self.MM_GJJH_LIST_json = requests.post(url=self.MM_GJJH_LIST, data=data, headers=header).json()
  213. except Exception:
  214. self.MM_GJJH_LIST_json = None
  215. return self.MM_GJJH_LIST_json
  216. def request_flight_from_flightplan(self,startday,endday,token) : #从飞机排班获取
  217. url = "http://172.30.142.253/platform/api/dynamic/tfltschedule/selectByCondition"
  218. headers = {
  219. "Content-Type" : "application/json;charset=UTF-8" ,
  220. "Accept" : "application/json, text/plain, */*" ,
  221. "User-Agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0" ,
  222. "X-Access-Token" : token
  223. }
  224. payload = {
  225. "flightDateStart": startday,
  226. "flightDateEnd" : endday,
  227. "haveDelay" : 0
  228. }
  229. try:
  230. response = requests.post(url = url,headers = headers,data = json.dumps(payload),timeout = 10)
  231. response.raise_for_status()
  232. response_data = response.json()
  233. return response_data
  234. except requests.exceptions.Timeout :
  235. print("请求超时!请检查网络连接或接口响应速度。")
  236. except requests.exceptions.ConnectionError :
  237. print("连接失败!请检查接口 URL 是否正确,或目标服务器是否可达。")
  238. except requests.exceptions.HTTPError as e :
  239. print(f"请求失败(状态码异常):{e}")
  240. print(f"服务器返回内容:{response.text}") # 打印原始响应,辅助排查问题
  241. except json.JSONDecodeError :
  242. print("响应解析失败!服务器返回的不是合法 JSON 格式。")
  243. print(f"原始响应内容:{response.text}")
  244. except Exception as e :
  245. print(f"请求过程中发生未知错误:{str(e)}")
  246. def request_task_filght_list(self, flightDate:str,cookie): #需要自动逻辑白班夜班
  247. data = {"airportCode": "ZUTF",
  248. "ddate": flightDate,
  249. "notView":"",
  250. "baseCode": "TF01",
  251. "actype1":"(A319|A320|A321)",
  252. "aclocArea1": "()",
  253. "tasktype1": "()",
  254. "shift":"",
  255. "tasktype":"",
  256. "actype": "A319,A320,A321",
  257. "aclocArea":"",
  258. "isshiftex":"",
  259. "repush":"",
  260. "page": "1",
  261. "rows": "500"
  262. }
  263. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  264. "Cookie": cookie}
  265. try:
  266. self.task_flight_list_json = requests.post(url=self.task_flight_list_url, data=data, headers=header).json()
  267. except Exception:
  268. self.task_flight_list_json = None
  269. #with open('./temp/task_flight_list_json/fl{}.json'.format(int(time.time())), 'w') as f:
  270. #json.dump(self.task_flight_list_json, f, indent=4)
  271. return self.task_flight_list_json
  272. def request_task_filght_third_list(self, flightDate:str, cookie): #需要自动逻辑白班夜班
  273. data = {"airportCode": "ZUTF",
  274. "ddate": flightDate,
  275. "notView":"",
  276. "baseCode": "TF01",
  277. "isThird": "Y",
  278. "actype1":"",
  279. "aclocArea1": "()",
  280. "tasktype1": "()",
  281. "shift":"",
  282. "tasktype":"",
  283. "actype": "(A319|A320|A321|B737NG|B737MAX|C919)",
  284. "aclocArea":"",
  285. "isshiftex":"",
  286. "repush":"",
  287. "page": "1",
  288. "rows": "500"
  289. }
  290. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  291. "Cookie": cookie}
  292. try:
  293. self.task_filght_third_list = requests.post(url=self.task_filght_third_list_url, data=data, headers=header).json()
  294. except Exception:
  295. self.task_filght_third_list = None
  296. #with open('./temp/task_filght_third_list/fl{}.json'.format(int(time.time())), 'w') as f:
  297. # json.dump(self.task_filght_third_list, f, indent=4)
  298. return self.task_filght_third_list
  299. def request_LM_TASK_ARCHIVE_LIST(self, flightDate:str, cookie): #需要自动逻辑白班夜班
  300. startdatePlStart=flightDate+" 00:00:00"
  301. flightDate2=(datetime.datetime.strptime(flightDate, "%Y%m%d")+datetime.timedelta(days=1)).strftime("%Y%m%d")
  302. startdatePlEnd=flightDate2+" 09:00:00"
  303. data = {"startdatePlStart": startdatePlStart,
  304. "startdatePlEnd": startdatePlEnd,
  305. "airportCode":'ZUTF',
  306. "taskTypeDefault": "LM",
  307. "actype1": '(A319|A320|A321)',
  308. "actype": "A319,A320,A321",
  309. "baseCode": "TF01",
  310. "page":"1",
  311. "rows": "500"
  312. }
  313. header = {"Accept": "application/json, text/javascript, */*; q=0.01","Cookie": cookie}
  314. try:
  315. self.task_LM_TASK_ARCHIVE_LIST = requests.post(url=self.LM_TASK_ARCHIVE_LIST, data=data, headers=header).json()
  316. except Exception:
  317. self.task_LM_TASK_ARCHIVE_LIST = None
  318. #with open('./temp/task_LM_FLIGHT_SEARCH_LIST/fl{}.json'.format(int(time.time())), 'w') as f:
  319. # json.dump(self.task_LM_FLIGHT_SEARCH_LIST, f, indent=4)
  320. return self.task_LM_TASK_ARCHIVE_LIST
  321. def request_LM_FLIGHT_SEARCH_LIST(self, flightDate:str, cookie): #需要自动逻辑白班夜班
  322. data = {"base4code": "ZUTF",
  323. "flightDate": flightDate,
  324. "flightDate1":flightDate,
  325. "jcType": "",
  326. "actype1": '(A319|A320|A321)',
  327. "dep_4code": "",
  328. "arr_4code": "",
  329. "acno":'',
  330. "actype": "A319,A320,A321",
  331. "flightNo":"",
  332. "notView":"",
  333. "page":"1",
  334. "onlyAf":"",
  335. "rows": "500"
  336. }
  337. header = {"Accept": "application/json, text/javascript, */*; q=0.01","Cookie": cookie}
  338. try:
  339. self.task_LM_FLIGHT_SEARCH_LIST = requests.post(url=self.LM_FLIGHT_SEARCH_LIST, data=data, headers=header).json()
  340. except Exception:
  341. self.task_LM_FLIGHT_SEARCH_LIST = None
  342. #with open('./temp/task_LM_FLIGHT_SEARCH_LIST/fl{}.json'.format(int(time.time())), 'w') as f:
  343. # json.dump(self.task_LM_FLIGHT_SEARCH_LIST, f, indent=4)
  344. return self.task_LM_FLIGHT_SEARCH_LIST
  345. def request_filght_list(self, flightDate:str, cookie):
  346. data = {"base4code": "ZUTF",
  347. "flightDate": flightDate,#2023-06-02
  348. "tasktype": "",
  349. "notView": "",
  350. "jcType": "",
  351. "actype1": "(A319|A320|A321)",
  352. "actype": "A319,A320,A321",
  353. "acno": "",
  354. "dep_4code": "",
  355. "arr_4code": "",
  356. "flightNo": "",
  357. "repush": ""
  358. }
  359. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  360. "Cookie": cookie}
  361. try:
  362. self.flight_list_json = requests.post(url=self.flight_list_url, data=data, headers=header).json()
  363. except Exception:
  364. self.flight_list_json = None
  365. #with open('./temp/filght_list/fl{}.json'.format(int(time.time())), 'w') as f:
  366. # json.dump(self.flight_list_json, f, indent=4)
  367. return self.flight_list_json
  368. def request_LM_TSK_HANDOVER(self,dict:dict,cookie):
  369. data = {
  370. "taskids": dict["taskid"],
  371. "tasksts": dict["sts"], # 必须,可能需要修改,不知道影响不
  372. "FunctionCode": "LM_TSK_HANDOVER"
  373. }
  374. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  375. "Cookie": cookie}
  376. try:
  377. self.LM_TSK_HANDOVER = requests.post(url=self.LM_TSK_HANDOVER_url, data=data, headers=header).json()
  378. #print(self.LM_TSK_HANDOVER)
  379. except Exception:
  380. self.LM_TSK_HANDOVER = None
  381. return self.LM_TSK_HANDOVER
  382. def request_LM_TSK_DINGDONG(self,dict:dict,cookie):
  383. data = {"tasksts": "1", # 必须
  384. "taskid": "{}".format(dict["taskid"]),
  385. "acno": dict["acno"],
  386. "actype": dict["actype"],
  387. "tasktype": dict["tasktype"],
  388. "tatd": dict["tatd"],
  389. "msgInfo": dict["msgInfo"],
  390. "bay": dict["bay"],
  391. "wxemp": dict["wxemp"], # 必须dict["wxemp"]
  392. "fxemp": dict["fxemp"],
  393. "wx": dict["wx"],
  394. "fx": dict["fx"],
  395. "ecsj": dict["ecsj"],
  396. "ecsjEmp": "",
  397. "FunctionCode": "LM_TSK_DINGDONG"
  398. }
  399. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  400. "Cookie": cookie}
  401. try:
  402. self.LM_TSK_DINGDONG = requests.post(url=self.LM_TSK_DINGDONG_url, data=data, headers=header).json()
  403. except Exception:
  404. self.LM_TSK_DINGDONG = None
  405. return self.LM_TSK_DINGDONG
  406. def request_flight_third_list(self, flightDate: str, cookie):
  407. data = {"base4code": "ZUTF",
  408. "flightDate": flightDate,
  409. "flightDateStart": flightDate,
  410. "tasktype": "",
  411. "notView": "",
  412. "isThird":"Y",
  413. "actype1": "(21N|319|320|321|32N|332|738|73G|A21N|A319|A319|A320|A321|A32N|A738|A73G|AZZZ|B737|C919|ARJ21)",
  414. "actype": "B737NG,B737MAX,A319,A320,A321,C919,ARJ21"
  415. #"actype": "A319%2CA320%2CA321%2CB737MAX%2CB737NG"
  416. }
  417. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  418. "Cookie": cookie}
  419. try:
  420. self.flight_third_list = requests.post(url=self.flight_list_third_url, data=data, headers=header).json()
  421. except Exception:
  422. self.flight_third_list = None
  423. #with open('./temp/filght_list/fl{}.json'.format(int(time.time())), 'w') as f:
  424. # json.dump(self.flight_third_list, f, indent=4)
  425. return self.flight_third_list
  426. def request_LM_TSK_SURE_PG(self,dict:dict,cookie):
  427. empNos = dict["empNos"]
  428. taskid = dict["taskid"]
  429. type = dict["type"]
  430. shiftDate = dict["shiftDate"]
  431. shift = dict["shift"]
  432. data = {"empNos": empNos,
  433. "taskid": taskid,
  434. "type": type, #ECSJ 二次送机 WX FX
  435. "shiftDate": shiftDate, #夜班航前需要前一天
  436. "shift": shift,
  437. "FunctionCode": "LM_TSK_SURE_PG"
  438. }
  439. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  440. "Cookie": cookie}
  441. try:
  442. #print(data)
  443. self.LM_TSK_SURE_PG = requests.post(url=self.LM_TSK_SURE_PG_url, data=data, headers=header).json()
  444. #print(self.LM_TSK_SURE_PG )
  445. except Exception:
  446. self.LM_TSK_SURE_PG = None
  447. return self.LM_TSK_SURE_PG
  448. def request_LM_TSK_EMP_PGLIST(self,taskid:str,shiftDate:str,shift:str,cookie):
  449. data = {"flightDate": shiftDate,
  450. "shift": shift,
  451. "type": "WX",
  452. "taskid":taskid,
  453. "wx": "wx",
  454. "baseCode": "TF01", #EMP_NO,NAME,MAINLY_ROLE
  455. "deptNo": "",
  456. "fx": "fx",
  457. }
  458. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  459. "Cookie": cookie}
  460. try:
  461. self.LM_TSK_EMP_PGLIST = requests.post(url=self.LM_TSK_EMP_PGLIST_url, data=data, headers=header).json()
  462. except Exception:
  463. self.LM_TSK_EMP_PGLIST = None
  464. #with open('./temp/LM_TSK_EMP_PGLIST/fl{}.json'.format(int(time.time())), 'w') as f:
  465. # json.dump(self.LM_TSK_EMP_PGLIST, f, indent=4)
  466. return self.LM_TSK_EMP_PGLIST
  467. if __name__ == '__main__':
  468. fl = flight_list()
  469. #fl.start()
  470. nowDay = datetime.datetime.now().replace(microsecond=0)
  471. nowDayStr = nowDay.strftime("%Y-%m-%d")