예제 #1
0
파일: Submit.py 프로젝트: weaming/EasyTrain
 def __getPassengerInfo(self, passengersList):
     passengersDetails = {}
     for passengerJson in passengersList:
         passenger = PassengerDetails()
         passenger.passengerName = passengerJson["passenger_name"] or ""
         passenger.code = passengerJson["code"] or ""
         passenger.sexCode = passengerJson["sex_code"] or ""
         passenger.sexName = passengerJson.get("sex_name") or ""
         passenger.bornDate = passengerJson["born_date"] or ""
         passenger.countryCode = passengerJson["country_code"] or ""
         passenger.passengerIdTypeCode = (
             passengerJson["passenger_id_type_code"] or "")
         passenger.passengerIdTypeName = (
             passengerJson["passenger_id_type_name"] or "")
         passenger.passengerIdNo = passengerJson["passenger_id_no"] or ""
         passenger.passengerType = passengerJson["passenger_type"] or ""
         passenger.passengerFlag = passengerJson["passenger_flag"] or ""
         passenger.passengerTypeName = passengerJson[
             "passenger_type_name"] or ""
         passenger.mobileNo = passengerJson["mobile_no"] or ""
         passenger.phoneNo = passengerJson["phone_no"] or ""
         passenger.email = passengerJson["email"] or ""
         passenger.address = passengerJson["address"] or ""
         passenger.postalcode = passengerJson["postalcode"] or ""
         passenger.firstLetter = passengerJson["first_letter"] or ""
         passenger.recordCount = passengerJson["recordCount"] or ""
         passenger.totalTimes = passengerJson["total_times"] or ""
         passenger.indexId = passengerJson["index_id"] or ""
         passengersDetails[passenger.passengerIdNo] = passenger
     return passengersDetails
예제 #2
0
 def __getPassengerInfo(self, passengersList):
     passengersDetails = {}
     for passengerJson in passengersList:
         passenger = PassengerDetails()
         passenger.passengerName = passengerJson['passenger_name'] or ''
         passenger.code = passengerJson['code'] or ''
         passenger.sexCode = passengerJson['sex_code'] or ''
         passenger.sexName = passengerJson['sex_name'] or ''
         passenger.bornDate = passengerJson['born_date'] or ''
         passenger.countryCode = passengerJson['country_code'] or ''
         passenger.passengerIdTypeCode = passengerJson[
             'passenger_id_type_code'] or ''
         passenger.passengerIdTypeName = passengerJson[
             'passenger_id_type_name'] or ''
         passenger.passengerIdNo = passengerJson['passenger_id_no'] or ''
         passenger.passengerType = passengerJson['passenger_type'] or ''
         passenger.passengerFlag = passengerJson['passenger_flag'] or ''
         passenger.passengerTypeName = passengerJson[
             'passenger_type_name'] or ''
         passenger.mobileNo = passengerJson['mobile_no'] or ''
         passenger.phoneNo = passengerJson['phone_no'] or ''
         passenger.email = passengerJson['email'] or ''
         passenger.address = passengerJson['address'] or ''
         passenger.postalcode = passengerJson['postalcode'] or ''
         passenger.firstLetter = passengerJson['first_letter'] or ''
         passenger.recordCount = passengerJson['recordCount'] or ''
         passenger.totalTimes = passengerJson['total_times'] or ''
         passenger.indexId = passengerJson['index_id'] or ''
         passengersDetails[passenger.passengerIdNo] = passenger
     return passengersDetails
예제 #3
0
    def __getPassengerInfo(self, passengersList):
        passengersDetails = {}
        for passengerJson in passengersList:
            passenger = PassengerDetails()
            passenger.passengerName = passengerJson.get('passenger_name') or ''
            passenger.code = passengerJson.get('code') or ''
            passenger.sexCode = passengerJson.get('sex_code') or ''
            passenger.sexName = passengerJson.get('sex_name') or ''
            passenger.bornDate = passengerJson.get('born_date') or ''
            passenger.countryCode = passengerJson.get('country_code') or ''
            passenger.passengerIdTypeCode = passengerJson.get(
                'passenger_id_type_code') or ''
            passenger.passengerIdTypeName = passengerJson.get(
                'passenger_id_type_name') or ''
            passenger.passengerIdNo = passengerJson.get(
                'passenger_id_no') or ''
            passenger.passengerType = passengerJson.get('passenger_type') or ''
            passenger.passengerFlag = passengerJson.get('passenger_flag') or ''
            passenger.passengerTypeName = passengerJson.get(
                'passenger_type_name') or ''
            passenger.mobileNo = passengerJson.get('mobile_no') or ''
            passenger.phoneNo = passengerJson.get('phone_no') or ''
            passenger.email = passengerJson.get('email') or ''
            passenger.address = passengerJson.get('address') or ''
            passenger.postalcode = passengerJson.get('postalcode') or ''
            passenger.firstLetter = passengerJson.get('first_letter') or ''
            passenger.recordCount = passengerJson.get('recordCount') or ''
            passenger.totalTimes = passengerJson.get('total_times') or ''
            passenger.indexId = passengerJson.get('index_id') or ''
            passenger.allEncStr = passengerJson.get('allEncStr') or ''

            #12306版本更新隐藏了证件号,直接取最后三位
            passengersDetails[passenger.passengerIdNo[-3:]] = passenger
            # passengersDetails[passenger.passengerIdNo] = passenger
        return passengersDetails
예제 #4
0
 def __getPassengerInfo(self, passengersList):
     passengersDetails = {}
     for passengerJson in passengersList:
         passenger = PassengerDetails()
         passenger.passengerName = passengerJson['passenger_name'] or ''
         passenger.code = passengerJson['code'] or ''
         passenger.countryCode = passengerJson['country_code'] or ''
         passenger.passengerIdTypeCode = passengerJson[
             'passenger_id_type_code'] or ''
         passenger.passengerIdTypeName = passengerJson[
             'passenger_id_type_name'] or ''
         passenger.passengerIdNo = passengerJson['passenger_id_no'] or ''
         passenger.passengerType = passengerJson['passenger_type'] or ''
         passenger.passengerFlag = passengerJson['passenger_flag'] or ''
         passenger.passengerTypeName = passengerJson[
             'passenger_type_name'] or ''
         passenger.mobileNo = passengerJson['mobile_no'] or ''
         passenger.phoneNo = passengerJson['phone_no'] or ''
         passenger.postalcode = passengerJson['postalcode'] or ''
         passenger.indexId = passengerJson['index_id'] or ''
         passengersDetails[passenger.passengerName] = passenger
     return passengersDetails