| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- //
- // WorkFlowInfoModel.m
- // IBOSS
- //
- // Created by iHope on 14-7-9.
- // Copyright (c) 2014年 elongtian. All rights reserved.
- //
- #import "ShopCartItemModel.h"
- @implementation ShopCartItemModel
- -(void)parseDic:(NSDictionary *)dic
- {
- if(dic!=nil){
- int decimalPlaces = [[dic objectForKey:@"DecimalPlaces"] intValue];
- NSString *str = [NSString stringWithFormat:@"%@%d%@",@"%.",decimalPlaces,@"f"];
- int cartIdValue= [[dic objectForKey:@"CartID"]intValue];
- _cartId= [NSString stringWithFormat:@"%d",cartIdValue];
- NSInteger inventoryIdValue= [[dic objectForKey:@"InventoryID"]integerValue];
- _inventoryId= [NSString stringWithFormat:@"%ld",(long)inventoryIdValue];
- double salesQuantityValue= [[dic objectForKey:@"SalesQuantity"]doubleValue];
- _salesQuantity= [NSString stringWithFormat:str,salesQuantityValue];
- double salesPriceValue= [[dic objectForKey:@"SalesPrice"]doubleValue];
- _salesPrice=[NSString stringWithFormat:@"%lf",salesPriceValue];
- double markedPriceValue= [[dic objectForKey:@"MarkedPrice"]doubleValue];
- _markedPrice=[NSString stringWithFormat:@"%lf",markedPriceValue];
-
- _remarks=[dic objectForKey:@"Remarks"]==nil?@"":[dic objectForKey:@"Remarks"];
- _specification=[dic objectForKey:@"Specification"];
- double acreageValue= [[dic objectForKey:@"Acreage"]doubleValue];
- _acreage=[NSString stringWithFormat:@"%lf",acreageValue];
- double volumeValue=[[dic objectForKey:@"Volume"]doubleValue];
- _volume=[NSString stringWithFormat:@"%lf",volumeValue];
- int codeIdValue= [[dic objectForKey:@"CodeID"]intValue];
- _codeId=[NSString stringWithFormat:@"%d",codeIdValue];
- _code=[dic objectForKey:@"Code"];
- _onlyCode=[dic objectForKey:@"OnlyCode"];
- int gradeIdValue= [[dic objectForKey:@"GradeID"]intValue];
- _gradeId=[NSString stringWithFormat:@"%d",gradeIdValue];
- _colorNumber=[dic objectForKey:@"ColorNumber"];
- int warehouseIdValue= [[dic objectForKey:@"WarehouseID"]intValue];
- _warehouseId=[NSString stringWithFormat:@"%d",warehouseIdValue];
- _positionNumber=[dic objectForKey:@"PositionNumber"];
- _warehouseName=[dic objectForKey:@"WarehouseName"];
- double balanceQuantityValue= [[dic objectForKey:@"BalanceQuantity"]doubleValue];
- _balanceQuantity = [NSString stringWithFormat:str,balanceQuantityValue];
-
- _brandId=[dic objectForKey:@"BrandID"];
- _brandName=[dic objectForKey:@"BrandName"];
- _kindId=[dic objectForKey:@"KindID"];
- _kindName=[dic objectForKey:@"KindName"];
- _varietyId=[dic objectForKey:@"VarietyID"];
- _varietyName=[dic objectForKey:@"VarietyName"];
- _seriesId=[dic objectForKey:@"SeriesID"];
- _seriesName=[dic objectForKey:@"SeriesName"];
- _unitId=[dic objectForKey:@"UnitID"];
- _unitName=[dic objectForKey:@"UnitName"];
- _gradeName=[dic objectForKey:@"GradeName"];
- _package=[dic objectForKey:@"Package"];
- _weight=[dic objectForKey:@"Weight"];
- _decimalPlaces=[[dic objectForKey:@"DecimalPlaces"]integerValue];
- _circulateType=[[dic objectForKey:@"CirculateType" ]integerValue];
- _isChecked=YES;
- }
-
- }
- @end
|