| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- //
- // OrderDetailModel.m
- // IBOSS
- //
- // Created by 关宏厚 on 2018/11/19.
- // Copyright © 2018 elongtian. All rights reserved.
- //
- #import "OrderDetailModel.h"
- @implementation OrderDetailModel
- - (void)parseDic:(NSDictionary *)dic
- {
- if(dic!=nil){
- _salesDetailTypeName=[dic objectForKey:@"SalesDetailTypeName"];
- _priceDecimal=[[dic objectForKey:@"PriceDecimal"]intValue];
- _weightDecimal=[[dic objectForKey:@"WeightDecimal"]intValue];
- _decimalPlaces=[[dic objectForKey:@"DecimalPlaces"]intValue];
- NSString *priceDecimalPlaces = [NSString stringWithFormat:@"%@%d%@",@"%.",_priceDecimal,@"f"];
-
- NSString *weightDecimalPlaces = [NSString stringWithFormat:@"%@%d%@",@"%.",_weightDecimal,@"f"];
-
- NSString *decimalPlacesStr = [NSString stringWithFormat:@"%@%d%@",@"%.",_decimalPlaces,@"f"];
-
- _onlyCode=[dic objectForKey:@"OnlyCode"];
- _code=[dic objectForKey:@"Code"];
- _ceaseFlag=[[dic objectForKey:@"CeaseFlag"]intValue];;
- _brandName=[dic objectForKey:@"BrandName"];
- _kindName=[dic objectForKey:@"KindName"];
- _varietyName=[dic objectForKey:@"VarietyName"];
- _seriesName=[dic objectForKey:@"SeriesName"];
- _unitName=[dic objectForKey:@"UnitName"];
- _goodsCirculateTypeName=[dic objectForKey:@"GoodsCirculateTypeName"];
-
- _specification=[dic objectForKey:@"Specification"];
-
- _gradeName=[dic objectForKey:@"GradeName"];
-
- _goodsName=[dic objectForKey:@"GoodsName"];
-
- _colorNumber=[dic objectForKey:@"ColorNumber"];
- double orderQuantityValue= [[dic objectForKey:@"OrderQuantity"]doubleValue];
- _orderQuantity=[NSString stringWithFormat:decimalPlacesStr,orderQuantityValue];
- double m3Value= [[dic objectForKey:@"M3"]doubleValue];
- _M3=[NSString stringWithFormat:@"%.6f",m3Value];
-
- double factOrderQuantiyValue=[[dic objectForKey:@"FactOrderQuantity"]doubleValue];
-
- _factOrderQuantiy=[NSString stringWithFormat:decimalPlacesStr,factOrderQuantiyValue];
- double toSalesQuantityValue=[[dic objectForKey:@"ToSalesQuantity"]doubleValue];
- _toSalesQuantity=[NSString stringWithFormat:decimalPlacesStr,toSalesQuantityValue];
- double factOccupyQuantityValue=[[dic objectForKey:@"FactOccupyQuantity"]doubleValue];
-
- _factOccupyQuantity=[NSString stringWithFormat:decimalPlacesStr,factOccupyQuantityValue];
-
- double factToSalesQuantityValue=[[dic objectForKey:@"FactToSalesQuantity"]doubleValue];
-
- _factToSalesQuantity=[NSString stringWithFormat:decimalPlacesStr,factToSalesQuantityValue];
-
- double goodsAmountValue=[[dic objectForKey:@"GoodsAmount"]doubleValue];
- _goodsAmount=[NSString stringWithFormat:priceDecimalPlaces,goodsAmountValue];
-
- double factGoodsAmountValue=[[dic objectForKey:@"FactGoodsAmount"]doubleValue];
- _factGoodsAmount=[NSString stringWithFormat:priceDecimalPlaces,factGoodsAmountValue];
- _warehouseCode=[dic objectForKey:@"WarehouseCode"];
- _warehouseName=[dic objectForKey:@"WarehouseName"];
-
- _positionNumber=[dic objectForKey:@"PositionNumber"];
- double weightValue=[[dic objectForKey:@"Weight"]doubleValue];
- _weight=[NSString stringWithFormat:weightDecimalPlaces,weightValue];
-
- double volumeValue=[[dic objectForKey:@"Volume"]doubleValue];
- _volume=[NSString stringWithFormat:@"%.6f",volumeValue];
-
- _supplierName=[dic objectForKey:@"SupplierName"];
-
- double orderPriceValue=[[dic objectForKey:@"OrderPrice"]doubleValue];
- _orderPrice=[NSString stringWithFormat:priceDecimalPlaces,orderPriceValue];
-
- double markedPriceValue=[[dic objectForKey:@"MarkedPrice"]doubleValue];
- _markedPrice=[NSString stringWithFormat:priceDecimalPlaces,markedPriceValue];
- double discountValue=[[dic objectForKey:@"Discount"]doubleValue];
- _discount=[NSString stringWithFormat:@"%.2f",discountValue];
- double costPriceValue=[[dic objectForKey:@"CostPrice"]doubleValue];
- _costPrice=[NSString stringWithFormat:priceDecimalPlaces,costPriceValue];
- _usePositionName=[dic objectForKey:@"UsePositionName"];
- _existPromotionFlagDetail=[[dic objectForKey:@"ExistPromotionFlagDetail"]intValue];
- _manuFlag=[[dic objectForKey:@"ManuFlag"]intValue];
- _manufactureStatus=[[dic objectForKey:@"ManufactureStatus"]boolValue];
- _deliveryFlag=[[dic objectForKey:@"DeliveryFlag"]intValue];
- _installationFlag=[[dic objectForKey:@"InstallationFlag"]intValue];
- _expandAttribute=[dic objectForKey:@"ExpandAttribute"];
- _expandAttribute2=[dic objectForKey:@"ExpandAttribute2"];
- _codeRemarks=[dic objectForKey:@"CodeRemarks"];
- _remarks=[dic objectForKey:@"Remarks"];
- }
- }
- @end
|