| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- //
- // ManufactureDetailModel.m
- // IBOSS
- //
- // Created by 关宏厚 on 2018/11/19.
- // Copyright © 2018 elongtian. All rights reserved.
- //
- #import "ManufactureDetailModel.h"
- @implementation ManufactureDetailModel
- - (void)parseDic:(NSDictionary *)dic
- {
- if(dic!=nil){
- _onlyCode=[dic objectForKey:@"AfterOnlyCode"];
- _decimalPlaces=[[dic objectForKey:@"DecimalPlaces"]intValue];
- _priceDecimal=[[dic objectForKey:@"PriceDecimal"]intValue];
- _weightDecimal=[[dic objectForKey:@"WeightDecimal"]intValue];
- NSString *priceDecimalPlaces = [NSString stringWithFormat:@"%@%d%@",@"%.",_priceDecimal,@"f"];
-
- NSString *weightDecimalPlaces = [NSString stringWithFormat:@"%@%d%@",@"%.",_weightDecimal,@"f"];
-
- NSString *decimalPlacesStr = [NSString stringWithFormat:@"%@%d%@",@"%.",_decimalPlaces,@"f"];
-
- _code=[dic objectForKey:@"AfterCode"];
- _brandName=[dic objectForKey:@"AfterBrandName"];
- _kindName=[dic objectForKey:@"AfterKindName"];
- _varietyName=[dic objectForKey:@"AfterVarietyName"];
- _seriesName=[dic objectForKey:@"AfterSeriesName"];
- _unitName=[dic objectForKey:@"AfterUnitName"];
- int packageValue=[[dic objectForKey:@"AfterPackage"]intValue];
- _package=[NSString stringWithFormat:@"%d",packageValue];
- double weightValue=[[dic objectForKey:@"AfterWeight"]doubleValue];
- _weight=[NSString stringWithFormat:weightDecimalPlaces,weightValue];
- _gradeName=[dic objectForKey:@"AfterGradeName"];
- _specification=[dic objectForKey:@"AfterSpecification"];
- _colorNumber=[dic objectForKey:@"AfterColorNumber"];
- _warehouseName=[dic objectForKey:@"AfterWarehouseName"];
- _positionNumber=[dic objectForKey:@"AfterPositionNumber"];
- double acreageValue=[[dic objectForKey:@"AfterAcreage"]doubleValue];
- _acreage=[NSString stringWithFormat:@"%.6f",acreageValue];
- double volumeValue=[[dic objectForKey:@"AfterVolume"]doubleValue];
- _volume=[NSString stringWithFormat:@"%.6f",volumeValue];
- double estimateQuantityValue=[[dic objectForKey:@"EstimateAfterQuantity"]doubleValue];
- _estimateQuantity=[NSString stringWithFormat:decimalPlacesStr,estimateQuantityValue];
- double factQuantityValue=[[dic objectForKey:@"FactAfterQuantity"]doubleValue];
- _factQuantity=[NSString stringWithFormat:decimalPlacesStr,factQuantityValue];
-
- _manufactureItem=[dic objectForKey:@"ManufactureItemName"];
-
- double manufactureQuantityValue=[[dic objectForKey:@"ManufactureQuantity"]doubleValue];
- _manufactureQuantity=[NSString stringWithFormat:decimalPlacesStr,manufactureQuantityValue];
- double manufactureSumValue=[[dic objectForKey:@"ManufactureSum"]doubleValue];
- _manufactureSum=[NSString stringWithFormat:priceDecimalPlaces,manufactureSumValue];
- double sellingSumValue=[[dic objectForKey:@"SellingSum"]doubleValue];
- _sellingSum=[NSString stringWithFormat:priceDecimalPlaces,sellingSumValue];
- _goodsName=[dic objectForKey:@"AfterGoodsName"];
- _expandAttribute=[dic objectForKey:@"AfterExpandAttribute"];
- _expandAttribute2=[dic objectForKey:@"AfterExpandAttribute2"];
- _remarks=[dic objectForKey:@"AfterRemarks"];
- }
- }
- @end
|