OrderAuditListModel.m 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. //
  2. // OrderAuditListModel.m
  3. // IBOSS
  4. //
  5. // Created by 关宏厚 on 2018/11/13.
  6. // Copyright © 2018 elongtian. All rights reserved.
  7. //
  8. #import "OrderAuditListModel.h"
  9. #import "DateFormat.h"
  10. @implementation OrderAuditListModel
  11. - (void)parseDic:(NSDictionary *)dic{
  12. if(dic!=nil){
  13. _orderId=[[dic objectForKey:@"OrderID"]intValue];
  14. _priceDecimal=[[dic objectForKey:@"PriceDecimal"]intValue];
  15. _weightDecimal=[[dic objectForKey:@"WeightDecimal"]intValue];
  16. _checkFlag=[[dic objectForKey:@"CheckFlag"]boolValue];
  17. _orderNo= [dic objectForKey:@"OrderNo"];
  18. _orderStatus=[dic objectForKey:@"InvoiceStatusName"];
  19. _customerCode=[dic objectForKey:@"CustomerCode"];
  20. _orderType=[dic objectForKey:@"OrderTypeName"];
  21. _customerName=[dic objectForKey:@"CustomerName"];
  22. _telephone=[dic objectForKey:@"Telephone"];
  23. _organizationName=[dic objectForKey:@"OrganizationName"];
  24. _staffName=[dic objectForKey:@"StaffName"];
  25. _customerAddress=[dic objectForKey:@"Address"];
  26. NSString *priceDecimalPlaces = [NSString stringWithFormat:@"%@%d%@",@"%.",_priceDecimal,@"f"];
  27. NSString *weightDecimalPlaces = [NSString stringWithFormat:@"%@%d%@",@"%.",_weightDecimal,@"f"];
  28. double goodsAmountValue= [[dic objectForKey:@"GoodsAmount"]doubleValue];
  29. _goodsAmount=[NSString stringWithFormat:priceDecimalPlaces,goodsAmountValue];
  30. double totalAmountValue= [[dic objectForKey:@"TotalAmount"]doubleValue];
  31. _totalAmount=[NSString stringWithFormat:priceDecimalPlaces,totalAmountValue];
  32. double feesAmountValue=[[dic objectForKey:@"FeeAmount"]doubleValue];
  33. _feesAmount=[NSString stringWithFormat:priceDecimalPlaces,feesAmountValue];
  34. _contacts=[dic objectForKey:@"Contacts"];
  35. NSString *accountDateStr=[dic objectForKey:@"AccountDate"];
  36. _accountDate=[DateFormat dateFormatSplit:accountDateStr];
  37. double discountAmountValue=[[dic objectForKey:@"DiscountAmount"]doubleValue];
  38. _discountAmount=[NSString stringWithFormat:priceDecimalPlaces,discountAmountValue];
  39. double markedPriceAmountValue=[[dic objectForKey:@"MarkedPriceAmount"]doubleValue];
  40. _markedPriceAmount=[NSString stringWithFormat:priceDecimalPlaces,markedPriceAmountValue];
  41. double earnestAmountValue=[[dic objectForKey:@"EarnestAmount"]doubleValue];
  42. _earnestAmount=[NSString stringWithFormat:priceDecimalPlaces,earnestAmountValue];
  43. double giveMarkedPriceAmountValue=[[dic objectForKey:@"GiveMarkedPriceAmount"]doubleValue];
  44. _giveMarkedPriceAmount=[NSString stringWithFormat:priceDecimalPlaces,giveMarkedPriceAmountValue];
  45. double earnestRateValue=[[dic objectForKey:@"EarnestRate"]doubleValue];
  46. _earnestRate=[NSString stringWithFormat:priceDecimalPlaces,earnestRateValue];
  47. double totalEarnestAmountValue=[[dic objectForKey:@"TotalEarnestAmount"]doubleValue];
  48. _totalEarnestAmount=[NSString stringWithFormat:priceDecimalPlaces,totalEarnestAmountValue];
  49. double totalEarnestRateValue=[[dic objectForKey:@"TotalEarnestRate"]doubleValue];
  50. _totalEarnestRate=[NSString stringWithFormat:@"%.2f",totalEarnestRateValue];
  51. double orderEarnestSumValue=[[dic objectForKey:@"OrderEarnestSum"]doubleValue];
  52. _orderEarnestSum=[NSString stringWithFormat:priceDecimalPlaces,orderEarnestSumValue];
  53. double discountValue=[[dic objectForKey:@"Discount"]doubleValue];
  54. _discount=[NSString stringWithFormat:@"%.2f",discountValue];
  55. _accountCategoryName=[dic objectForKey:@"AccountCategoryName"];
  56. _otherContact=[dic objectForKey:@"OtherContact"];
  57. _customerTypeName=[dic objectForKey:@"CustomerTypeName"];
  58. _subSalesMan=[dic objectForKey:@"SubSalesMan"];
  59. _channelName=[dic objectForKey:@"ChannelName"];
  60. _contractNumber=[dic objectForKey:@"ContractNumber"];
  61. _otherInvoiceNo=[dic objectForKey:@"OtherInvoiceNo"];
  62. double totalVolumeValue= [[dic objectForKey:@"TotalVolume"]doubleValue];
  63. _totalVolume=[NSString stringWithFormat:@"%.6f",totalVolumeValue];
  64. _deliveryFlag=[[dic objectForKey:@"DeliveryFlag"]boolValue];
  65. _installationFlag=[[dic objectForKey:@"InstallationFlag"]boolValue];
  66. _existPromotionFlag=[[dic objectForKey:@"ExistPromotionFlag"]boolValue];
  67. NSString *estimateDeliveryDateStr=[dic objectForKey:@"EstimateDeliveryDate"];
  68. _estimateDeliveryDate= [DateFormat dateFormatSplit: estimateDeliveryDateStr];
  69. _decorationProcessName=[dic objectForKey:@"DecorationProcessName"];
  70. double weightValue=[[dic objectForKey:@"Weight"]doubleValue];
  71. _weight=[NSString stringWithFormat:weightDecimalPlaces,weightValue];;
  72. NSString *estimateInstallationDateStr=[dic objectForKey:@"EstimateInstallationDate"];
  73. _estimateInstallationDate =[DateFormat dateFormatSplit: estimateInstallationDateStr];
  74. _deliveryAreaName=[dic objectForKey:@"DeliveryAreaName"];
  75. _floorsName=[dic objectForKey:@"FloorsName"];
  76. int stepNoValue=[[dic objectForKey:@"StepNo"]intValue];
  77. _stepNo=[NSString stringWithFormat:@"%d",stepNoValue];;
  78. _reviewerName=[dic objectForKey:@"ReviewerName"];
  79. _auditReason=[dic objectForKey:@"AuditReason"];
  80. _documentaryOrderNo=[dic objectForKey:@"DocumentaryOrderNo"];
  81. _reversedOrderNo=[dic objectForKey:@"ReversedOrderNo"];
  82. _documentationClerk=[dic objectForKey:@"DocumentationClerk"];
  83. int attachmentCountValue=[[dic objectForKey:@"AttachmentCount"]intValue];
  84. _attachmentCount=[NSString stringWithFormat:@"%d",attachmentCountValue];;
  85. _createUser=[dic objectForKey:@"CreateUser"];
  86. _createTime=[dic objectForKey:@"CreateTime"];
  87. _updateUser=[dic objectForKey:@"UpdateUser"];
  88. _updateTime=[dic objectForKey:@"UpdateTime"];
  89. _remarks=[dic objectForKey:@"Remarks"];
  90. }
  91. }
  92. @end