| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // InventoryUnfreezeGoodsModel.m
- // IBOSS
- //
- // Created by 关宏厚 on 2020/5/22.
- // Copyright © 2020 elongtian. All rights reserved.
- //
- #import "InventoryUnfreezeGoodsModel.h"
- @implementation InventoryUnfreezeGoodsModel
- /*!
- * 1.该方法是 `字典里的属性Key` 和 `要转化为模型里的属性名` 不一样 而重写的
- * 前:模型的属性 后:字典里的属性
- */
- + (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
-
- return @{
- @"code":@"Code",
- @"onlyCode":@"OnlyCode",
- @"brandName":@"BrandName",
- @"kindName":@"KindName",
- @"varietyName":@"VarietyName",
- @"seriesName":@"SeriesName",
- @"unitName":@"UnitName",
- @"colorNumber":@"ColorNumber",
- @"package":@"Package",
- @"weight":@"Weight",
- @"volume":@"Volume",
- @"circulateType":@"CirculateType",
- @"circulateTypeName":@"GoodsCirculateTypeName",
- @"gradeName":@"GradeName",
- @"specification":@"Specification",
- @"freezeQuantity":@"FreezeQuantity",
- @"unfreezeQuantity":@"UnFreezeQuantity",
- @"allUnfreezeQuantity":@"ALLUnFreezeQuantity",
- @"decimalPlaces":@"DecimalPlaces",
- @"acreage":@"Acreage",
- @"expandAttribute":@"ExpandAttribute",
- @"expandAttribute2":@"ExpandAttribute2",
- @"remarks":@"Remarks"
-
-
- };
- }
- /*!
- * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法
- * NSDate *time dic[@"t"]是double类型的的秒数
- */
- /// Dic -> model
- - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
- double volumeValue= [[dic objectForKey:@"Volume"]doubleValue];
- _volume=[NSString stringWithFormat:@"%.6f",volumeValue];
- return YES;
- }
- @end
|