employee detail 取消door_range 字段
This commit is contained in:
parent
88db4fbcd4
commit
e7af79a51a
|
@ -151,15 +151,15 @@ class EmployeeSerializer(CustomModelSerializer):
|
||||||
|
|
||||||
|
|
||||||
class EmployeeDetailSerializer(EmployeeSerializer):
|
class EmployeeDetailSerializer(EmployeeSerializer):
|
||||||
door_range = serializers.SerializerMethodField()
|
# door_range = serializers.SerializerMethodField()
|
||||||
location = serializers.SerializerMethodField()
|
location = serializers.SerializerMethodField()
|
||||||
|
|
||||||
def get_door_range(self, obj):
|
# def get_door_range(self, obj):
|
||||||
third_info = obj.third_info
|
# third_info = obj.third_info
|
||||||
dh_face_card = third_info.get('dh_face_card', None)
|
# dh_face_card = third_info.get('dh_face_card', None)
|
||||||
if dh_face_card:
|
# if dh_face_card:
|
||||||
_, res = dhClient.request(**dhapis['card_detail'], params={'cardNumber': dh_face_card})
|
# _, res = dhClient.request(**dhapis['card_detail'], params={'cardNumber': dh_face_card})
|
||||||
return [res['startDate'], res['endDate']]
|
# return [res['startDate'], res['endDate']]
|
||||||
|
|
||||||
def get_location(self, obj):
|
def get_location(self, obj):
|
||||||
key_str = 'ep_{}'.format(obj.id)
|
key_str = 'ep_{}'.format(obj.id)
|
||||||
|
|
Loading…
Reference in New Issue