maohu vor 1 Monat
Ursprung
Commit
3230cd07a5

+ 12 - 10
Functions/DButilsFunction/checkFlightAlert.py

@@ -79,6 +79,8 @@ def checkFlightAlert(database:flightDB, singlePeopleNotice):
                         b = get_dic("taskType")[data[0][3]]
                         std=data[0][5]
                         singlelogs=baseFunction.TuplefindInList33(logs,i[0],1,8)#未处理的警告信息
+
+                        singlelogstext=baseFunction.TuplefindInList33(logs,i[0],1,2)#未处理的警告信息
                         singlelogsall=baseFunction.TuplefindInList33(logsall, i[0], 1, 2) #所有警告信息
                         singlelogsall1=baseFunction.TuplefindInList11(logsall1, i[0], 1) #所有和这个id相关的提示信息
                         jjdw=baseFunction.TuplefindInList3(flightsts,i[0],0,3)
@@ -135,7 +137,7 @@ def checkFlightAlert(database:flightDB, singlePeopleNotice):
 
                             if ETA_40 < now and BAY_A == "" and "机位未出提醒" not in str(singlelogsall):
                                 WarningInsert(database,i[0],"[机位未出提醒]请确认%s/%s机位情况!"%(a,b),"机位警告")
-                            elif BAY_A != "" and "机位未出提醒" in str(singlelogsall):
+                            elif BAY_A != "" and "机位未出提醒" in str(singlelogstext):
                                 mesg="[机位未出提醒]请确认%s/%s机位情况!"%(a,b)
                                 newdic = {"处理人": "'系统确认状态'", "处理时间": "'%s'" % now}
                                 database.lazyUpdateItem('logs', newdic, "航班编号='%s' and 警告信息='%s'" % (i[0],mesg))
@@ -191,7 +193,7 @@ def checkFlightAlert(database:flightDB, singlePeopleNotice):
                                 WarningInsert(database,i[0],"请注意安排%s %s长短停值守,如无需则忽略!" % (a,c),"长短停值守提示")
                             if ETA_40 < now and BAY_A == "" and "机位未出提醒" not in str(singlelogsall):
                                 WarningInsert(database,i[0],"[机位未出提醒]请确认%s/%s机位情况!"%(a,b),"机位警告")
-                            elif BAY_A != "" and "机位未出提醒" in str(singlelogsall):
+                            elif BAY_A != "" and "机位未出提醒" in str(singlelogstext):
                                 mesg="[机位未出提醒]请确认%s/%s机位情况!"%(a,b)
                                 newdic = {"处理人": "'系统确认状态'", "处理时间": "'%s'" % now}
                                 database.lazyUpdateItem('logs', newdic, "航班编号='%s' and 警告信息='%s'" % (i[0],mesg))
@@ -241,7 +243,7 @@ def checkFlightAlert(database:flightDB, singlePeopleNotice):
 
                             if ETA_40 < now and BAY_A == "" and "机位未出提醒" not in str(singlelogsall):
                                 WarningInsert(database,i[0],"[机位未出提醒]请确认%s/%s机位情况!"%(a,b),"机位警告")
-                            elif BAY_A != "" and "机位未出提醒" in str(singlelogsall):
+                            elif BAY_A != "" and "机位未出提醒" in str(singlelogstext):
                                 mesg="[机位未出提醒]请确认%s/%s机位情况!"%(a,b)
                                 newdic = {"处理人": "'系统确认状态'", "处理时间": "'%s'" % now}
                                 database.lazyUpdateItem('logs', newdic, "航班编号='%s' and 警告信息='%s'" % (i[0],mesg))
@@ -300,8 +302,8 @@ def checkFlightAlert(database:flightDB, singlePeopleNotice):
                                     if mesg not in str(singlelogsall):
                                         WarningInsert(database, i[0], mesg, "任务接收监控")
                                 else:
-                                    mesg = "请确认%s/%s/%s/%s人员任务接收情况!" % (a, b, c, l)
-                                    if mesg in str(singlelogsall):
+                                    mesg = "请确认%s/%s/%s/%s人员任务接收情况!" % (a, b, c, l.replace("√",""))
+                                    if mesg in str(singlelogstext):
                                         newdic = {"处理人": "'系统确认状态'", "处理时间": "'%s'" % now}
                                         database.lazyUpdateItem('logs', newdic, "航班编号='%s' and 警告信息='%s'" % (i[0],mesg))
 
@@ -324,8 +326,8 @@ def checkFlightAlert(database:flightDB, singlePeopleNotice):
                                     if mesg not in str(singlelogsall):
                                         WarningInsert(database, i[0], mesg, "任务接收监控")
                                 else:
-                                    mesg = "请确认%s/%s/%s/%s人员二送任务接收情况!" % (a, b, c, l)
-                                    if mesg in str(singlelogsall):
+                                    mesg = "请确认%s/%s/%s/%s人员二送任务接收情况!" % (a, b, c, l.replace("√",""))
+                                    if mesg in str(singlelogstext):
                                         newdic = {"处理人": "'系统确认状态'", "处理时间": "'%s'" % now}
                                         database.lazyUpdateItem('logs', newdic, "航班编号='%s' and 警告信息='%s'" % (i[0],mesg))
 
@@ -335,7 +337,7 @@ def checkFlightAlert(database:flightDB, singlePeopleNotice):
                                 WarningInsert(database, i[0], mesg, "任务安排监控")
                         elif wxry != "":
                             mesg = "请及时安排%s/%s/%s保障人员并派工!" % (a, b, c)
-                            if mesg in str(singlelogsall):
+                            if mesg in str(singlelogstext):
                                 newdic = {"处理人": "'系统确认状态'", "处理时间": "'%s'" % now}
                                 database.lazyUpdateItem('logs', newdic, "航班编号='%s' and 警告信息='%s'" % (i[0],mesg))
                         if fxry == "" and pgtime < now:
@@ -344,7 +346,7 @@ def checkFlightAlert(database:flightDB, singlePeopleNotice):
                                 WarningInsert(database, i[0], mesg, "任务安排监控")
                         elif fxry != "":
                             mesg = "请及时安排%s/%s/%s放行人员并派工!" % (a, b, c)
-                            if mesg in str(singlelogsall):
+                            if mesg in str(singlelogstext):
                                 newdic = {"处理人": "'系统确认状态'", "处理时间": "'%s'" % now}
                                 database.lazyUpdateItem('logs', newdic, "航班编号='%s' and 警告信息='%s'" % (i[0],mesg))
 
@@ -354,7 +356,7 @@ def checkFlightAlert(database:flightDB, singlePeopleNotice):
                                 WarningInsert(database, i[0], mesg, "任务安排监控")
                         elif ecsj != "" and b != "航前" :
                             mesg = "请及时安排%s/%s/%s二送保障人员并派工!" % (a, b, c)
-                            if mesg in str(singlelogsall):
+                            if mesg in str(singlelogstext):
                                 newdic = {"处理人": "'系统确认状态'", "处理时间": "'%s'" % now}
                                 database.lazyUpdateItem('logs', newdic, "航班编号='%s' and 警告信息='%s'" % (i[0],mesg))
 

+ 32 - 0
Functions/DButilsFunction/checkTFUairplane.py

@@ -159,6 +159,28 @@ def checkTFUairplane(database:flightDB):
                         database.lazyInsertData('logs', newdic)
                         newdic = {"接机已到位提示": 1}
                         database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'"% flightstskey[0])
+                    if "1" in baseFunction.TuplefindInList3(flightsts_flight_ids, flightstskey[0], 0, 9) and "人工" not in baseFunction.TuplefindInList3(flightsts_flight_ids, flightstskey[0], 0, 4):
+                        newdic = {"放行": "''"}
+                        database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'" % flightstskey[0])
+                        newdic={"航班编号":"%s"% flightstskey[0],"警告信息":"","信息状态":"","提示信息":"AMRO:%s放行退回至到位!%s"%(a,now11),"产生时间":"%s"%now,"处理人":"","处理时间":"","变更字段":"","显示对象":"","提示内容":""}
+                        database.lazyInsertData('logs', newdic)
+                        newdic = {"已放行提示": 0}
+                        database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'"% flightstskey[0])
+                elif  str(flightstskey[0]) in str(flightsts_flight_ids_arr):
+                    if "1" in baseFunction.TuplefindInList3(flightsts_flight_ids, flightstskey[0], 0, 8) and "人工" not in baseFunction.TuplefindInList3(flightsts_flight_ids, flightstskey[0], 0, 3):
+                        newdic = {"接机到位": "''"}
+                        database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'" % flightstskey[0])
+                        newdic={"航班编号":"%s"% flightstskey[0],"警告信息":"","信息状态":"","提示信息":"AMRO:%s状态退回至初始状态!%s"%(a,now11),"产生时间":"%s"%now,"处理人":"","处理时间":"","变更字段":"","显示对象":"","提示内容":""}
+                        database.lazyInsertData('logs', newdic)
+                        newdic = {"接机已到位提示": 0}
+                        database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'"% flightstskey[0])
+                    if "1" in baseFunction.TuplefindInList3(flightsts_flight_ids, flightstskey[0], 0, 9) and "人工" not in baseFunction.TuplefindInList3(flightsts_flight_ids, flightstskey[0], 0, 4):
+                        newdic = {"放行": "''"}
+                        database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'" % flightstskey[0])
+                        newdic={"航班编号":"%s"% flightstskey[0],"警告信息":"","信息状态":"","提示信息":"AMRO:%s状态退回至初始状态!%s"%(a,now11),"产生时间":"%s"%now,"处理人":"","处理时间":"","变更字段":"","显示对象":"","提示内容":""}
+                        database.lazyInsertData('logs', newdic)
+                        newdic = {"已放行提示": 0}
+                        database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'"% flightstskey[0])
 
                 ECSJ_worksts_str = baseFunction.TuplefindInList3(flightinfo_flight_ids, flightstskey[0], 0, 20)
                 ECSJ_worksts_STR = ECSJ_worksts_str if len(ECSJ_worksts_str) != 0 else 0
@@ -173,6 +195,16 @@ def checkTFUairplane(database:flightDB):
                             database.lazyInsertData('logs', newdic)
                             newdic = {"%s"%i: 1}
                             database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'" % flightstskey[0])
+                elif str(flightstskey[0]) in str(flightsts_flight_ids_arr) and "人工" not in baseFunction.TuplefindInList3(flightsts_flight_ids, flightstskey[0], 0, 7):
+                    #newdic = {"接机到位": "'已到位'", "放行": "'已放行'", "二送到位": "'已到位'"}
+                    newdic = {"二送到位": "''"}
+                    database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'" % flightstskey[0])
+                    for i in code:
+                        if "1" in baseFunction.TuplefindInList3(flightsts_flight_ids, flightstskey[0], 0, code2num[i]):
+                            newdic={"航班编号":"%s"% flightstskey[0],"警告信息":"","信息状态":"","提示信息":"AMRO:%s%s!%s"%(a,i,now11),"产生时间":"%s"%now,"处理人":"","处理时间":"","变更字段":"","显示对象":"","提示内容":""}
+                            database.lazyInsertData('logs', newdic)
+                            newdic = {"%s"%i: 0}
+                            database.lazyUpdateItem('flightsts{}'.format(nowDayStr), newdic, "航班编号='%s'" % flightstskey[0])
         database.FunctionCommit()
 
     except Exception as e:

+ 2 - 1
Functions/DButilsFunction/checkworkload_New.py

@@ -3,6 +3,7 @@ import datetime
 from unitls.LogerinTxt import app_logger
 import unitls.baseFunction as baseFunction
 from unitls.StaticDataclass import get_dic
+
 newWorkloadLabel=get_dic("newWorkloadLabel")
 startimeReDic={"WXJJ":25,"WXAP":100,"WXAF":0,"WXTAF":0,"FXAP":100,"FXAF":0,"FXTAF":0,"FXTR":0,"WXES":35}
 endtimeReDic={"WXJJ":10,"WXAP":10,"WXAF":120,"WXTAF":60,"FXAP":10,"FXAF":120,"FXTAF":60,"FXTR":30,"WXES":10}
@@ -160,7 +161,7 @@ def checkWorkerlaod_new(database:flightDB, workload:flightDB,nowDayStr1,nowDay_1
                         Computer(workload,workload_ids_arr,flightinfo[8],flightinfo[6],flightinfo[10],flightinfo[13],flightinfo[2],flightinfo[0],
                                  flightinfo[3],day,workloadinfos,startimeReDic['FXAF'],endtimeReDic['FXAF'],standvalueReDic['FXAF'],"航后放行",flightinfo[37])
 
-                    if flightinfo[19] != "" and flightinfo[3] != "AF" and flightinfo[8]:
+                    if flightinfo[19] != "" and flightinfo[3] != "AF" and flightinfo[5]:
                         peopleslist = flightinfo[19].replace("√", "").split(",")
                         for people in peopleslist:
                             workloadAllidsnow.append((flightinfo[0]+"-2-"+people))

+ 1 - 1
Functions/DButilsFunction/manChangests.py

@@ -7,7 +7,7 @@ def manChangests(database:flightDB,flight_id:str,changests_id:str,selectedtime,u
         nowDayStr = selectedtime
         now = datetime.datetime.now()
         now11=str(now).split(".")[0]
-        code = {"接机到位": "已到位", "放行": "已放行", "随机到位": "已到位", "销子夹板": "已取下", "二送到位": "已到位"}
+        code = {"接机到位": "人工已到位", "放行": "人工已放行", "随机到位": "人工已到位", "销子夹板": "人工已取下", "二送到位": "人工已到位"}
         code2 = {"接机到位": "接机已到位提示", "放行": "已放行提示", "随机到位": "随机已到位提示", "销子夹板": "销子夹板已提示", "二送到位": "二送已到位提示"}
         flightsts_search=database.queryTabel("flightsts{}".format(nowDayStr),"%s"%changests_id,"航班编号 = '%s'"%flight_id)
         waringsts=database.queryTabel("logs","*","航班编号='%s' and 处理时间 =''"%flight_id)

+ 2 - 3
SeverStart.py

@@ -43,8 +43,8 @@ databaseWorkLoad = 'workLoad'
 databaseLoginDB = 'loginDB'
 flightDataTransfer,displayDataTransfer=DataTransferMode()
 ServerClas = Server_Class()
-severVersion = "20.0.0"
-displayVersion = "20.0.0"
+severVersion = "17.0.0"
+displayVersion = "17.0.0"
 
 
 # 获取本地IP地址
@@ -320,7 +320,6 @@ async def getFlightData2(type):
     db = flaskDBUtils.flaskDB(host=dbhost, port=dbport, user=dbuser, password=dbpassword, database=database)
     fdb = flightDB(host=dbhost, port=dbport, user=dbuser, password=dbpassword, database=databaseDB4)
     workLoad = flightDB(host=dbhost, port=dbport, user=dbuser, password=dbpassword, database=databaseWorkLoad)
-    print(check_a_availability())
     if (mainseverip and mainseverip == loaclseverip) or mainseverip == "" or (mainseverip and mainseverip != loaclseverip and check_a_availability()):
         try:
             #print(type)