| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //
- // OtherInStorageGoodsSearchListModel.m
- // IBOSSmini
- //
- // Created by guan hong hou on 2018/4/25.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "OtherInStorageGoodsSearchListModel.h"
- @implementation OtherInStorageGoodsSearchListModel
- -(void)parseDic:(NSDictionary *)dic{
- if(dic!=nil){
- _inventoryId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"InventoryID"]integerValue]];
- _codeId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"CodeID"]integerValue]];
- //_positionNumberName=[dic objectForKey:@"PositionNumber"];
- _onlyCode=[dic objectForKey:@"OnlyCode"];
- _specification=[dic objectForKey:@"Specification"];
- _colorNumber=[dic objectForKey:@"ColorNumber"];
- _brandId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"BrandID"]integerValue]];
- _brandName=[dic objectForKey:@"BrandName"];
- // _gradeId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"GradeID"]integerValue]];
- // _gradeName=[dic objectForKey:@"GradeName"];
- _kindId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"KindID"]integerValue]];
- _kindName=[dic objectForKey:@"KindName"];
- _varietyId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"VarietyID"]integerValue]];
- _varietyName=[dic objectForKey:@"VarietyName"];
- _seriesId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"SeriesID"]integerValue]];
- _seriesName=[dic objectForKey:@"SeriesName"];
- _unitId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"UnitID"]integerValue]];
- _unitName=[dic objectForKey:@"UnitName"];
- _package=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"Package"]integerValue]];
- _weight=[NSString stringWithFormat:@"%.6f",[[dic objectForKey:@"Weight"]doubleValue]];
- _volume=[NSString stringWithFormat:@"%.6f",[[dic objectForKey:@"Volume"]doubleValue]];
- _acreage=[NSString stringWithFormat:@"%.6f",[[dic objectForKey:@"Acreage"]doubleValue]];
- _decimalPlaces=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"DecimalPlaces"]integerValue]];
- _circulateType=[[dic objectForKey:@"CirculateType"]integerValue];
- //_warehouseId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"WarehouseID"]integerValue]];
- // _warehouseCode=[dic objectForKey:@"WarehouseCode"];
- // _warehouseName=[dic objectForKey:@"WarehouseName"];
- _remarks=[dic objectForKey:@"Remarks"];
- _goodsName=[dic objectForKey:@"GoodsName"];
- _code=[dic objectForKey:@"Code"];
- _enterPrice=@"0.00";
- _enterQuantity=@"0.00";
- _canSalesQuantity=[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"CanSaleQuantity"]doubleValue]];
-
- if(_canSalesQuantity != nil && ![_canSalesQuantity isEqualToString:@""]){
-
- if(_package != nil && ![_package isEqualToString:@""]){
- _box = [NSString stringWithFormat:@"%ld",(long)ceil([_canSalesQuantity doubleValue]/[_package doubleValue])];
- _piece = [NSString stringWithFormat:@"%ld",(long)ceil([_canSalesQuantity intValue]%[_package intValue])];
-
- }else{
- _box=@"0";
- _piece=@"0";
- }
- }
- else{
- _box=@"0";
- _piece=@"0";
- }
-
-
- _inventoryQuantity=[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"InventoryQuantity"]doubleValue]];
- _goodsRemarks=[dic objectForKey:@"GoodsRemarks"];
- _expandAtrribute=[dic objectForKey:@"ExpandAttribute"];
- _expandAtrribute2=[dic objectForKey:@"ExpandAttribute2"];
-
- }
-
- }
- @end
|