utils.py 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  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. url = "https://me.sichuanair.com/api/v1/plugins/PROCESS_CLAIM_TASK_PRO_LIST"
  134. data = {
  135. 'user_id': '',
  136. 'userId': '',
  137. 'accountType': 'ARCHIVE',
  138. 'page': '1',
  139. 'rows': '11'
  140. }
  141. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  142. "Cookie": cookie}
  143. result = requests.post(url, data, headers=header).json()
  144. #print(result['code'], result['msg'], result['data'])
  145. return result['code']
  146. def checkCookieStsFLIGHTplan(self,cookie):
  147. url = "http://172.30.142.253/platform/api/act/act/task/execute/count"
  148. params = {"_t": int(datetime.datetime.now().timestamp())}
  149. header = {
  150. "Content-Type" : "application/json;charset=UTF-8" , # 明确请求体为 JSON 格式
  151. "Accept" : "application/json, text/plain, */*" ,
  152. "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" ,
  153. "X-Access-Token": cookie}
  154. result = requests.get(url, params, headers=header).json()
  155. #print(result['code'])
  156. return result['code']
  157. def checkWorkjob(self,taskids,acno,taskType,actype,startDate,endDate,cookie):
  158. data = {"taskids": taskids,
  159. "acno": acno,
  160. "taskType": taskType,
  161. "actype": actype,
  162. "startDate": startDate,
  163. "endDate": endDate
  164. }
  165. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  166. "Cookie": cookie}
  167. try:
  168. self.LM_FJ_TASK_PG_json = requests.post(url=self.LM_FJ_TASK_PG, data=data, headers=header).json()
  169. except Exception:
  170. self.LM_FJ_TASK_PG_json = None
  171. return self.LM_FJ_TASK_PG_json
  172. def request_jobcard(self, cookie, filename): # 需要自动逻辑白班夜班
  173. one_year_later = datetime.datetime.now() + datetime.timedelta(days=365)
  174. timestamp = int(one_year_later.timestamp()*1000)
  175. header = {
  176. "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",
  177. "Cookie": cookie}
  178. try:
  179. task_jobcard_json = requests.get(url=f'https://cscsupplier.sichuanair.com{filename}?_cache_timestamp={timestamp}',headers=header).content
  180. except Exception:
  181. task_jobcard_json = None
  182. return task_jobcard_json
  183. def request_MM_GJJH_LIST(self,cookie):
  184. yesterday=(datetime.date.today() - datetime.timedelta(days=1)).strftime("%Y-%m-%d")
  185. today = datetime.date.today().strftime("%Y-%m-%d")
  186. data={"mfrpn":"",
  187. "zjcdats": yesterday,
  188. "zjcdate": today,
  189. "zwgh": "Y",
  190. "zlynam":"",
  191. "zbmtxt":"",
  192. "zkstxt":"",
  193. "zfdtxt":"",
  194. "zlgort": "TF20",
  195. "zghnam":"",
  196. "ghrbm":"",
  197. "ghrks":"",
  198. "ghrfd":"",
  199. "zghkcd":"",
  200. "sort": "ZBMTXT",
  201. "order": "asc"
  202. }
  203. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  204. "Cookie": cookie}
  205. try:
  206. self.MM_GJJH_LIST_json = requests.post(url=self.MM_GJJH_LIST, data=data, headers=header).json()
  207. except Exception:
  208. self.MM_GJJH_LIST_json = None
  209. return self.MM_GJJH_LIST_json
  210. def request_flight_from_flightplan(self,startday,endday,token) : #从飞机排班获取
  211. url = "http://172.30.142.253/platform/api/dynamic/tfltschedule/selectByCondition"
  212. headers = {
  213. "Content-Type" : "application/json;charset=UTF-8" ,
  214. "Accept" : "application/json, text/plain, */*" ,
  215. "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" ,
  216. "X-Access-Token" : token
  217. }
  218. payload = {
  219. "flightDateStart": startday,
  220. "flightDateEnd" : endday,
  221. "haveDelay" : 0
  222. }
  223. try:
  224. response = requests.post(url = url,headers = headers,data = json.dumps(payload),timeout = 10)
  225. response.raise_for_status()
  226. response_data = response.json()
  227. return response_data
  228. except requests.exceptions.Timeout :
  229. print("请求超时!请检查网络连接或接口响应速度。")
  230. except requests.exceptions.ConnectionError :
  231. print("连接失败!请检查接口 URL 是否正确,或目标服务器是否可达。")
  232. except requests.exceptions.HTTPError as e :
  233. print(f"请求失败(状态码异常):{e}")
  234. print(f"服务器返回内容:{response.text}") # 打印原始响应,辅助排查问题
  235. except json.JSONDecodeError :
  236. print("响应解析失败!服务器返回的不是合法 JSON 格式。")
  237. print(f"原始响应内容:{response.text}")
  238. except Exception as e :
  239. print(f"请求过程中发生未知错误:{str(e)}")
  240. def request_task_filght_list(self, flightDate:str,cookie): #需要自动逻辑白班夜班
  241. data = {"airportCode": "ZUTF",
  242. "ddate": flightDate,
  243. "notView":"",
  244. "baseCode": "TF01",
  245. "actype1":"(A319|A320|A321)",
  246. "aclocArea1": "()",
  247. "tasktype1": "()",
  248. "shift":"",
  249. "tasktype":"",
  250. "actype": "A319,A320,A321",
  251. "aclocArea":"",
  252. "isshiftex":"",
  253. "repush":"",
  254. "page": "1",
  255. "rows": "500"
  256. }
  257. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  258. "Cookie": cookie}
  259. try:
  260. self.task_flight_list_json = requests.post(url=self.task_flight_list_url, data=data, headers=header).json()
  261. except Exception:
  262. self.task_flight_list_json = None
  263. #with open('./temp/task_flight_list_json/fl{}.json'.format(int(time.time())), 'w') as f:
  264. #json.dump(self.task_flight_list_json, f, indent=4)
  265. return self.task_flight_list_json
  266. def request_task_filght_third_list(self, flightDate:str, cookie): #需要自动逻辑白班夜班
  267. data = {"airportCode": "ZUTF",
  268. "ddate": flightDate,
  269. "notView":"",
  270. "baseCode": "TF01",
  271. "isThird": "Y",
  272. "actype1":"",
  273. "aclocArea1": "()",
  274. "tasktype1": "()",
  275. "shift":"",
  276. "tasktype":"",
  277. "actype": "(A319|A320|A321|B737NG|B737MAX|C919)",
  278. "aclocArea":"",
  279. "isshiftex":"",
  280. "repush":"",
  281. "page": "1",
  282. "rows": "500"
  283. }
  284. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  285. "Cookie": cookie}
  286. try:
  287. self.task_filght_third_list = requests.post(url=self.task_filght_third_list_url, data=data, headers=header).json()
  288. except Exception:
  289. self.task_filght_third_list = None
  290. #with open('./temp/task_filght_third_list/fl{}.json'.format(int(time.time())), 'w') as f:
  291. # json.dump(self.task_filght_third_list, f, indent=4)
  292. return self.task_filght_third_list
  293. def request_LM_TASK_ARCHIVE_LIST(self, flightDate:str, cookie): #需要自动逻辑白班夜班
  294. startdatePlStart=flightDate+" 00:00:00"
  295. flightDate2=(datetime.datetime.strptime(flightDate, "%Y%m%d")+datetime.timedelta(days=1)).strftime("%Y%m%d")
  296. startdatePlEnd=flightDate2+" 09:00:00"
  297. data = {"startdatePlStart": startdatePlStart,
  298. "startdatePlEnd": startdatePlEnd,
  299. "airportCode":'ZUTF',
  300. "taskTypeDefault": "LM",
  301. "actype1": '(A319|A320|A321)',
  302. "actype": "A319,A320,A321",
  303. "baseCode": "TF01",
  304. "page":"1",
  305. "rows": "500"
  306. }
  307. header = {"Accept": "application/json, text/javascript, */*; q=0.01","Cookie": cookie}
  308. try:
  309. self.task_LM_TASK_ARCHIVE_LIST = requests.post(url=self.LM_TASK_ARCHIVE_LIST, data=data, headers=header).json()
  310. except Exception:
  311. self.task_LM_TASK_ARCHIVE_LIST = None
  312. #with open('./temp/task_LM_FLIGHT_SEARCH_LIST/fl{}.json'.format(int(time.time())), 'w') as f:
  313. # json.dump(self.task_LM_FLIGHT_SEARCH_LIST, f, indent=4)
  314. return self.task_LM_TASK_ARCHIVE_LIST
  315. def request_LM_FLIGHT_SEARCH_LIST(self, flightDate:str, cookie): #需要自动逻辑白班夜班
  316. data = {"base4code": "ZUTF",
  317. "flightDate": flightDate,
  318. "flightDate1":flightDate,
  319. "jcType": "",
  320. "actype1": '(A319|A320|A321)',
  321. "dep_4code": "",
  322. "arr_4code": "",
  323. "acno":'',
  324. "actype": "A319,A320,A321",
  325. "flightNo":"",
  326. "notView":"",
  327. "page":"1",
  328. "onlyAf":"",
  329. "rows": "500"
  330. }
  331. header = {"Accept": "application/json, text/javascript, */*; q=0.01","Cookie": cookie}
  332. try:
  333. self.task_LM_FLIGHT_SEARCH_LIST = requests.post(url=self.LM_FLIGHT_SEARCH_LIST, data=data, headers=header).json()
  334. except Exception:
  335. self.task_LM_FLIGHT_SEARCH_LIST = None
  336. #with open('./temp/task_LM_FLIGHT_SEARCH_LIST/fl{}.json'.format(int(time.time())), 'w') as f:
  337. # json.dump(self.task_LM_FLIGHT_SEARCH_LIST, f, indent=4)
  338. return self.task_LM_FLIGHT_SEARCH_LIST
  339. def request_filght_list(self, flightDate:str, cookie):
  340. data = {"base4code": "ZUTF",
  341. "flightDate": flightDate,#2023-06-02
  342. "tasktype": "",
  343. "notView": "",
  344. "jcType": "",
  345. "actype1": "(A319|A320|A321)",
  346. "actype": "A319,A320,A321",
  347. "acno": "",
  348. "dep_4code": "",
  349. "arr_4code": "",
  350. "flightNo": "",
  351. "repush": ""
  352. }
  353. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  354. "Cookie": cookie}
  355. try:
  356. self.flight_list_json = requests.post(url=self.flight_list_url, data=data, headers=header).json()
  357. except Exception:
  358. self.flight_list_json = None
  359. #with open('./temp/filght_list/fl{}.json'.format(int(time.time())), 'w') as f:
  360. # json.dump(self.flight_list_json, f, indent=4)
  361. return self.flight_list_json
  362. def request_LM_TSK_HANDOVER(self,dict:dict,cookie):
  363. data = {
  364. "taskids": dict["taskid"],
  365. "tasksts": dict["sts"], # 必须,可能需要修改,不知道影响不
  366. "FunctionCode": "LM_TSK_HANDOVER"
  367. }
  368. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  369. "Cookie": cookie}
  370. try:
  371. self.LM_TSK_HANDOVER = requests.post(url=self.LM_TSK_HANDOVER_url, data=data, headers=header).json()
  372. #print(self.LM_TSK_HANDOVER)
  373. except Exception:
  374. self.LM_TSK_HANDOVER = None
  375. return self.LM_TSK_HANDOVER
  376. def request_LM_TSK_DINGDONG(self,dict:dict,cookie):
  377. data = {"tasksts": "1", # 必须
  378. "taskid": "{}".format(dict["taskid"]),
  379. "acno": dict["acno"],
  380. "actype": dict["actype"],
  381. "tasktype": dict["tasktype"],
  382. "tatd": dict["tatd"],
  383. "msgInfo": dict["msgInfo"],
  384. "bay": dict["bay"],
  385. "wxemp": dict["wxemp"], # 必须dict["wxemp"]
  386. "fxemp": dict["fxemp"],
  387. "wx": dict["wx"],
  388. "fx": dict["fx"],
  389. "ecsj": dict["ecsj"],
  390. "ecsjEmp": "",
  391. "FunctionCode": "LM_TSK_DINGDONG"
  392. }
  393. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  394. "Cookie": cookie}
  395. try:
  396. self.LM_TSK_DINGDONG = requests.post(url=self.LM_TSK_DINGDONG_url, data=data, headers=header).json()
  397. except Exception:
  398. self.LM_TSK_DINGDONG = None
  399. return self.LM_TSK_DINGDONG
  400. def request_flight_third_list(self, flightDate: str, cookie):
  401. data = {"base4code": "ZUTF",
  402. "flightDate": flightDate,
  403. "flightDateStart": flightDate,
  404. "tasktype": "",
  405. "notView": "",
  406. "isThird":"Y",
  407. "actype1": "(21N|319|320|321|32N|332|738|73G|A21N|A319|A319|A320|A321|A32N|A738|A73G|AZZZ|B737|C919|ARJ21)",
  408. "actype": "B737NG,B737MAX,A319,A320,A321,C919,ARJ21"
  409. #"actype": "A319%2CA320%2CA321%2CB737MAX%2CB737NG"
  410. }
  411. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  412. "Cookie": cookie}
  413. try:
  414. self.flight_third_list = requests.post(url=self.flight_list_third_url, data=data, headers=header).json()
  415. except Exception:
  416. self.flight_third_list = None
  417. #with open('./temp/filght_list/fl{}.json'.format(int(time.time())), 'w') as f:
  418. # json.dump(self.flight_third_list, f, indent=4)
  419. return self.flight_third_list
  420. def request_LM_TSK_SURE_PG(self,dict:dict,cookie):
  421. empNos = dict["empNos"]
  422. taskid = dict["taskid"]
  423. type = dict["type"]
  424. shiftDate = dict["shiftDate"]
  425. shift = dict["shift"]
  426. data = {"empNos": empNos,
  427. "taskid": taskid,
  428. "type": type, #ECSJ 二次送机 WX FX
  429. "shiftDate": shiftDate, #夜班航前需要前一天
  430. "shift": shift,
  431. "FunctionCode": "LM_TSK_SURE_PG"
  432. }
  433. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  434. "Cookie": cookie}
  435. try:
  436. #print(data)
  437. self.LM_TSK_SURE_PG = requests.post(url=self.LM_TSK_SURE_PG_url, data=data, headers=header).json()
  438. #print(self.LM_TSK_SURE_PG )
  439. except Exception:
  440. self.LM_TSK_SURE_PG = None
  441. return self.LM_TSK_SURE_PG
  442. def request_LM_TSK_EMP_PGLIST(self,taskid:str,shiftDate:str,shift:str,cookie):
  443. data = {"flightDate": shiftDate,
  444. "shift": shift,
  445. "type": "WX",
  446. "taskid":taskid,
  447. "wx": "wx",
  448. "baseCode": "TF01", #EMP_NO,NAME,MAINLY_ROLE
  449. "deptNo": "",
  450. "fx": "fx",
  451. }
  452. header = {"Accept": "application/json, text/javascript, */*; q=0.01",
  453. "Cookie": cookie}
  454. try:
  455. self.LM_TSK_EMP_PGLIST = requests.post(url=self.LM_TSK_EMP_PGLIST_url, data=data, headers=header).json()
  456. except Exception:
  457. self.LM_TSK_EMP_PGLIST = None
  458. #with open('./temp/LM_TSK_EMP_PGLIST/fl{}.json'.format(int(time.time())), 'w') as f:
  459. # json.dump(self.LM_TSK_EMP_PGLIST, f, indent=4)
  460. return self.LM_TSK_EMP_PGLIST
  461. if __name__ == '__main__':
  462. fl = flight_list()
  463. #fl.start()
  464. nowDay = datetime.datetime.now().replace(microsecond=0)
  465. nowDayStr = nowDay.strftime("%Y-%m-%d")