| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // ProcurementApplyListModel.m
- // IBOSS
- //
- // Created by guan hong hou on 2018/7/23.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "ProcurementApplyListModel.h"
- @implementation ProcurementApplyListModel
- /*!
- * 1.该方法是 `字典里的属性Key` 和 `要转化为模型里的属性名` 不一样 而重写的
- * 前:模型的属性 后:字典里的属性
- */
- + (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
-
- return @{@"applyNo":@"ApplyNo",
- @"applyId":@"ApplyID",
- @"invoiceStatusName":@"InvoiceStatusName",
- @"orderNo":@"OrderNo",
- @"customerCode":@"CustomerCode",
- @"customerName":@"CustomerName",
- @"accountDate":@"AccountDate",
- @"arrivalDate":@"ArrivalDate",
- @"organizationName":@"OrganizationName",
- @"applicant":@"ApplicantName",
- @"applyTitle":@"ApplyTitle",
- @"contractNumber":@"ContractNumber",
- @"remarks":@"Remarks",
- @"reviewerName":@"ReviewerName",
- @"reversedApply":@"ReversedApply",
- @"createUser":@"CreateUser",
- @"createTime":@"CreateTime",
- @"updateUser":@"UpdateUser",
- @"updateTime":@"UpdateTime",
- @"districtName":@"DistrictName",
- @"sourceNo":@"SourceNo"
- };
- }
- /*!
- * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法
- * NSDate *time dic[@"t"]是double类型的的秒数
- */
- /// Dic -> model
- - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
- DateFormat *d = [[DateFormat alloc] init];
- self.accountDate = [d dateFormat:[dic objectForKey:@"AccountDate"]];
- self.arrivalDate=[d dateFormat:[dic objectForKey:@"ArrivalDate"]];
- return YES;
- }
- @end
|