Exemplo n.º 1
0
 def insert(self, doctor):
     doctor_id = getTimeStamp()
     doctor['doctor_id'] = doctor_id
     doctor['create_time'] = getTime()
     doctor['update_time'] = getTime()
     doctor['delete_flag'] = '1'
     doctor_collection = getCollection(collectionName=self.__collectionName)
     doctor_collection.insert(doctor)
     return doctor
Exemplo n.º 2
0
 def insert(self, service):
     service_id = getTimeStamp()
     service['service_id'] = service_id
     service['create_time'] = getTime()
     service['update_time'] = getTime()
     service['delete_flag'] = '1'
     service_collection = getCollection(
         collectionName=self.__collectionName)
     service_collection.insert(service)
     return service
Exemplo n.º 3
0
 def insert(self, party):
     party['party_id'] = getTimeStamp()
     party['create_time'] = getTime()
     party['update_time'] = getTime()
     party['party_status'] = '1'
     party['party_attend_num'] = 0
     party['payment_flag'] = '0'
     party_collection = getCollection(collectionName=self.__collectionName)
     party_collection.insert(party)
     return party['party_id']
Exemplo n.º 4
0
 def insert(self, attendee):
     attendee['attend_id'] = getTimeStamp()
     attendee['create_time'] = getTime()
     attendee['update_time'] = getTime()
     attendee['attend_status'] = '1'
     attendee['payment_flag'] = '0'
     attendee_collection = getCollection(
         collectionName=self.__collectionName)
     attendee_collection.insert(attendee)
     return attendee['attend_id']
Exemplo n.º 5
0
 def insert(self, engineer):
     engineer_id = getTimeStamp()
     engineer['engineer_id'] = engineer_id
     engineer['create_time'] = getTime()
     engineer['update_time'] = getTime()
     engineer['flag'] = '1'
     engineer['openId'] = ''
     engineer['nickname'] = ''
     engineer_collection = getCollection(
         collectionName=self.__collectionName)
     engineer_collection.insert(engineer)
     return engineer_id
Exemplo n.º 6
0
 def insert(self, wxsyslicense):
     wxsyslicense['license_num'] = getTimeStamp()
     if wxsyslicense['license_start_date'] == '':
         wxsyslicense['license_start_date'] = getToday()
     wxsyslicense['license_end_date'] = addDays(
         wxsyslicense['license_start_date'],
         int(wxsyslicense['license_period']) + 1)
     wxsyslicense['focal_openId'] = ''
     wxsyslicense['create_time'] = getTime()
     wxsyslicense['update_time'] = getTime()
     wxsyslicense_collection = getCollection(
         collectionName=self.__collectionName)
     wxsyslicense_collection.insert(wxsyslicense)
     return wxsyslicense['license_num']
Exemplo n.º 7
0
 def insert(self, issue):
     issue_id = getTimeStamp()
     issue['issue_id'] = issue_id
     issue['create_time'] = getTime()
     issue['update_time'] = getTime()
     issue['issue_status'] = '1'
     issue['logs'] = [{
         'openId': issue['request_openId'],
         'nickname': issue['nickname'],
         'description': '发起申请',
         'create_time': getTime()
     }]
     issue_collection = getCollection(collectionName=self.__collectionName)
     issue_collection.insert(issue)
     return issue_id