OtherInStorageGoodsSearchListModel.m 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. //
  2. // OtherInStorageGoodsSearchListModel.m
  3. // IBOSSmini
  4. //
  5. // Created by guan hong hou on 2018/4/25.
  6. // Copyright © 2018年 elongtian. All rights reserved.
  7. //
  8. #import "OtherInStorageGoodsSearchListModel.h"
  9. @implementation OtherInStorageGoodsSearchListModel
  10. -(void)parseDic:(NSDictionary *)dic{
  11. if(dic!=nil){
  12. _inventoryId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"InventoryID"]integerValue]];
  13. _codeId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"CodeID"]integerValue]];
  14. //_positionNumberName=[dic objectForKey:@"PositionNumber"];
  15. _onlyCode=[dic objectForKey:@"OnlyCode"];
  16. _specification=[dic objectForKey:@"Specification"];
  17. _colorNumber=[dic objectForKey:@"ColorNumber"];
  18. _brandId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"BrandID"]integerValue]];
  19. _brandName=[dic objectForKey:@"BrandName"];
  20. // _gradeId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"GradeID"]integerValue]];
  21. // _gradeName=[dic objectForKey:@"GradeName"];
  22. _kindId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"KindID"]integerValue]];
  23. _kindName=[dic objectForKey:@"KindName"];
  24. _varietyId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"VarietyID"]integerValue]];
  25. _varietyName=[dic objectForKey:@"VarietyName"];
  26. _seriesId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"SeriesID"]integerValue]];
  27. _seriesName=[dic objectForKey:@"SeriesName"];
  28. _unitId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"UnitID"]integerValue]];
  29. _unitName=[dic objectForKey:@"UnitName"];
  30. _package=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"Package"]integerValue]];
  31. _weight=[NSString stringWithFormat:@"%.6f",[[dic objectForKey:@"Weight"]doubleValue]];
  32. _volume=[NSString stringWithFormat:@"%.6f",[[dic objectForKey:@"Volume"]doubleValue]];
  33. _acreage=[NSString stringWithFormat:@"%.6f",[[dic objectForKey:@"Acreage"]doubleValue]];
  34. _decimalPlaces=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"DecimalPlaces"]integerValue]];
  35. _circulateType=[[dic objectForKey:@"CirculateType"]integerValue];
  36. //_warehouseId=[NSString stringWithFormat:@"%d",[[dic objectForKey:@"WarehouseID"]integerValue]];
  37. // _warehouseCode=[dic objectForKey:@"WarehouseCode"];
  38. // _warehouseName=[dic objectForKey:@"WarehouseName"];
  39. _remarks=[dic objectForKey:@"Remarks"];
  40. _goodsName=[dic objectForKey:@"GoodsName"];
  41. _code=[dic objectForKey:@"Code"];
  42. _enterPrice=@"0.00";
  43. _enterQuantity=@"0.00";
  44. _canSalesQuantity=[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"CanSaleQuantity"]doubleValue]];
  45. if(_canSalesQuantity != nil && ![_canSalesQuantity isEqualToString:@""]){
  46. if(_package != nil && ![_package isEqualToString:@""]){
  47. _box = [NSString stringWithFormat:@"%ld",(long)ceil([_canSalesQuantity doubleValue]/[_package doubleValue])];
  48. _piece = [NSString stringWithFormat:@"%ld",(long)ceil([_canSalesQuantity intValue]%[_package intValue])];
  49. }else{
  50. _box=@"0";
  51. _piece=@"0";
  52. }
  53. }
  54. else{
  55. _box=@"0";
  56. _piece=@"0";
  57. }
  58. _inventoryQuantity=[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"InventoryQuantity"]doubleValue]];
  59. _goodsRemarks=[dic objectForKey:@"GoodsRemarks"];
  60. _expandAtrribute=[dic objectForKey:@"ExpandAttribute"];
  61. _expandAtrribute2=[dic objectForKey:@"ExpandAttribute2"];
  62. }
  63. }
  64. @end