| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- //
- // OrderSalesApproveListModel.m
- // IBOSS
- //
- // Created by 关宏厚 on 2019/4/13.
- // Copyright © 2019 elongtian. All rights reserved.
- //
- #import "OrderSalesApproveListModel.h"
- @implementation OrderSalesApproveListModel
- + (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
-
- return @{
- @"invoiceId":@"InvoiceID",
- @"invoiceNo":@"InvoiceNo",
- @"businessType":@"SalesFunctionTypeName",
- @"organizationName":@"OrganizationName",
- @"invoiceStatusName":@"InvoiceStatusName",
- @"createUser":@"CreateUser",
- @"auditReason":@"AuditReason",
- @"auditResult":@"Result",
- @"customerName":@"CustomerName",
- @"goodsAmount":@"GoodsAmount",
- @"feeAmount":@"FeeAmount",
- @"discount":@"Discount",
- @"createTime":@"CreateTime"
-
- };
- }
- /*!
- * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法
- * NSDate *time dic[@"t"]是double类型的的秒数
- */
- /// Dic -> model
- - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
- double goodsAmountValue= [[dic objectForKey:@"GoodsAmount"]doubleValue];
- _goodsAmount=[NSString stringWithFormat:@"%.2f",goodsAmountValue];
- double feesAmountValue=[[dic objectForKey:@"FeeAmount"]doubleValue];
- _feeAmount=[NSString stringWithFormat:@"%.2f",feesAmountValue];
- double discountValue=[[dic objectForKey:@"Discount"]doubleValue];
- _discount=[NSString stringWithFormat:@"%.2f",discountValue];
- return YES;
- }
- @end
|