| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // RequirementNoReceiptModel.m
- // IBOSSHSH
- //
- // Created by ssl on 2018/1/12.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "DispatchNoReceiptModel.h"
- #import "DateFormat.h"
- @implementation DispatchNoReceiptModel
- #pragma mark - 私有函数
- /*!
- * 1.该方法是 `字典里的属性Key` 和 `要转化为模型里的属性名` 不一样 而重写的
- * 前:模型的属性 后:字典里的属性
- */
- + (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
-
- return @{
- @"arrangementId":@"ArrangementID",
- @"arrangementNo":@"ArrangementNo",
- @"customerId":@"CustomerID",
- @"customerCode":@"CustomerCode",
- @"customerName":@"CustomerName",
- @"contacts":@"Contacts",
- @"telephone":@"TelePhone",
- @"deliveryDate":@"DeliveryDate",
- @"deliveryAddress":@"DeliveryAddress",
- @"collectDetailId":@"CollectDetailID",
- @"truckName":@"TruckNumber",
- @"receivables":@"Receivables",
- @"deliveryReceiptFlag":@"DeliveryReceiptFlag",
- @"installReceiptFlag":@"InstallationReceiptFlag",
- @"acreage":@"Acreage",
- @"remainingReceivables":@"LAmount",
- @"receiptAmount":@"ReceiptAmount",
- @"requirementType":@"RequirementType",
- @"organizationId":@"OrganizationID",
- @"organizationCode":@"OrganizationCode",
- @"installDate":@"InstallationDate",
- @"serviceStaffName":@"StaffNames"
-
-
- };
- }
- /*!
- * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法
- * NSDate *time dic[@"t"]是double类型的的秒数
- * Dic -> model
- */
- - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
- _deliveryDate = [dic objectForKey:@"DeliveryDate"];
- _deliveryDate=[DateFormat dateFormatSplit:_deliveryDate];
-
- _installDate = [dic objectForKey:@"InstallationDate"];
- _installDate=[DateFormat dateFormatSplit:_installDate];
- return YES;
- }
- @end
|