| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- //
- // DeliveryRequirementListDetailModel.m
- // IBOSSHSH
- //
- // Created by ssl on 2018/1/16.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "DispatchRequirementListDetailModel.h"
- @implementation DispatchRequirementListDetailModel
- /*!
- * 1.该方法是 `字典里的属性Key` 和 `要转化为模型里的属性名` 不一样 而重写的
- * 前:模型的属性 后:字典里的属性
- */
- + (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
-
- return @{@"detailID":@"DetailID",
- @"receiptID":@"ReceiptID",
- @"deliveryID":@"DeliveryID",
- @"deliveryNo":@"DeliveryNo",
- @"sourceFrom":@"SourceFrom",
- @"sourceFromName":@"SourceFromName",
- @"invoiceID":@"InvoiceID",
- @"invoiceNo":@"InvoiceNo",
- @"invoiceDetailID":@"InvoiceDetailID",
- @"deliveryDetailID":@"DeliveryDetailID",
- @"deliveryQuantity":@"DeliveryQuantity",
- @"outQuantity":@"OutQuantity",
- @"deliveryReceiptQuantity":@"DeliveryReceiptQuantity",
- @"deliveryReceiptFlag":@"DeliveryReceiptFlag",
- @"deliveryReceiptType":@"DeliveryReceiptType",
- @"deliveryReceiptTypeName":@"DeliveryReceiptTypeName",
- @"installationQuantity":@"InstallationQuantity",
- @"installationReceiptQuantity":@"InstallationReceiptQuantity",
- @"installationReceiptFlag":@"InstallationReceiptFlag",
- @"installationReceiptType":@"InstallationReceiptType",
- @"recoverQuantity":@"RecoverQuantity",
- @"returnQuantity":@"ReturnQuantity",
- @"accountID":@"AccountID",
- @"valueFlag":@"ValueFlag",
- @"codeID":@"CodeID",
- @"code":@"Code",
- @"onlyCode":@"OnlyCode",
- @"brandID":@"BrandID",
- @"brandName":@"BrandName",
- @"kindID":@"KindID",
- @"kindName":@"KindName",
- @"varietyID":@"VarietyID",
- @"varietyName":@"VarietyName",
- @"seriesID":@"SeriesID",
- @"seriesName":@"SeriesName",
- @"unitID":@"UnitID",
- @"unitName":@"UnitName",
- @"decimalPlaces":@"DecimalPlaces",
- @"package":@"Package",
- @"weight":@"Weight",
- @"acreage":@"Acreage",
- @"gradeID":@"GradeID",
- @"gradeName":@"GradeName",
- @"specification":@"Specification" ,
- @"colorNumber":@"ColorNumber",
- @"warehouseID":@"WarehouseID",
- @"warehouseName":@"WarehouseName",
- @"positionNumber":@"PositionNumber",
- @"detailDeliveryReceiptTypeName":@"DetailDeliveryReceiptTpeName",@"detailInstallationReceiptTypeName":@"DetailInstallationReceiptTyeName",
-
- @"customerName":@"CustomerName",
- @"contacts":@"Contacts",
- @"telephone":@"Telephone",
- @"deliveryAddress":@"DeliveryAddress",
- @"goodsName":@"GoodsName",
- @"circulateType":@"CirculateType",
- @"specification":@"Specification",
- @"requirementTypeName":@"RequirementTypeName"
-
-
- };
- }
- /*!
- * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法
- * NSDate *time dic[@"t"]是double类型的的秒数
- */
- - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
- int decimalPlaces = [[dic objectForKey:@"DecimalPlaces"] intValue];
- NSString *str = [NSString stringWithFormat:@"%@%d%@",@"%.",decimalPlaces,@"f"];
-
-
-
-
- return YES;
- }
- /**
- model -> Dic
- @param dic <#dic description#>
- @return <#return value description#>
- */
- - (BOOL)modelCustomTransformToDictionary:(NSMutableDictionary *)dic {
- //dic[@"t"] = @([self.time timeIntervalSince1970] * 1000).description;
- return YES;
- }
- @end
|