| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //
- // SalesOrderModel.m
- // IBOSSmini
- //
- // Created by guan hong hou on 2018/1/20.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "SalesOrderModel.h"
- #import "DateFormat.h"
- @implementation SalesOrderModel
- -(void)ParseDic:(NSDictionary *)dic
- {
- if(dic!=nil){
- _status = [[dic objectForKey:@"Status"]integerValue];
- _invoiceStatusName= [dic objectForKey:@"InvoiceStatusName"];
- _customerName=[dic objectForKey:@"CustomerName"];
- _contractNumber=[dic objectForKey:@"ContractNumber"];
- double toSalesAmountValue=[[dic objectForKey:@"ToSalesAmount"]doubleValue ];
- _toSalesAmount=[NSString stringWithFormat:@"%.4f",toSalesAmountValue];
- double markedPriceAmountValue=[[dic objectForKey:@"MarkedPriceAmount"]doubleValue];
- _markedPriceAmount=[NSString stringWithFormat:@"%.4f",markedPriceAmountValue];
- _otherContact=[dic objectForKey:@"OtherContact"];
- _intermediateCustomersName=[dic objectForKey:@"IntermediateCustomersName"];
- _customerCode=[dic objectForKey:@"CustomerCode"];
- double totalAmountValue= [[dic objectForKey:@"TotalAmount"]doubleValue];
- _totalAmount=[NSString stringWithFormat:@"%.4f",totalAmountValue];
- int orderIdValue= [[dic objectForKey:@"OrderID"]intValue];
- _orderId=[NSString stringWithFormat:@"%d",orderIdValue];
- _channelName=[dic objectForKey:@"ChannelName"];
- _deliveryFlag= [[dic objectForKey:@"DeliveryFlag"]boolValue];
- _installationFlag=[[dic objectForKey:@"InstallationFlag"]boolValue];
- _customerID = [[dic objectForKey:@"CustomerID"]stringValue];
- NSString *estimateDeliveryDateStr= [dic objectForKey:@"EstimateDeliveryDate"];
- _estimateDeliveryDate=[DateFormat dateFormatSplit:estimateDeliveryDateStr];
- _estimateInstallationDate=[DateFormat dateFormatSplit: [dic objectForKey:@"EstimateInstallationDate"]];
- _deliveryAreaName=[dic objectForKey:@"DeliveryAreaName"];
- _floorsName=[dic objectForKey:@"FloorsName"];
- _setReversedOrderNo=[dic objectForKey:@"setReversedOrderNo"];
- _createUser=[dic objectForKey:@"CreateUser"];
- _updateUser=[dic objectForKey:@"UpdateUser"];
- _createTime=[DateFormat dateFormatSplit:[dic objectForKey:@"CreateTime"]];
- _updateTime=[DateFormat dateFormatSplit:[dic objectForKey:@"UpdateTime"]];
- _remarks=[dic objectForKey:@"Remarks"];
- double weightValue= [[dic objectForKey:@"Weight"]doubleValue];
- _weight=[NSString stringWithFormat:@"%.6f",weightValue];;
- double totalVolumeValue=[[dic objectForKey:@"TotalVolume"]doubleValue];
- _totalVolume=[NSString stringWithFormat:@"%.6f",totalVolumeValue];
- _contacts=[dic objectForKey:@"Contacts"];
- _orderTypeName=[dic objectForKey:@"OrderTypeName"];
- _orderType=[[dic objectForKey:@"OrderType"]integerValue];
- _telephone=[dic objectForKey:@"Telephone"];
- _customerTypeName=[dic objectForKey:@"CustomerTypeName"];
- _orderNo=[dic objectForKey:@"OrderNo"];
- double orderEarnestSumValue=[[dic objectForKey:@"OrderEarnestSum"]doubleValue];
- _orderEarnestSum= [NSString stringWithFormat:@"%.4f",orderEarnestSumValue];
- _channelName=[dic objectForKey:@"ChannelName"];
- double goodsAmountValue=[[dic objectForKey:@"GoodsAmount"]doubleValue];
- _goodsAmount= [NSString stringWithFormat:@"%.2f",goodsAmountValue];
- double discountAmountValue=[[dic objectForKey:@"DiscountAmount"]doubleValue];
- _discountAmount=[NSString stringWithFormat:@"%.4f",discountAmountValue];
- double earnestAmountValue= [[dic objectForKey:@"EarnestAmount"]doubleValue];
- _earnestAmount=[NSString stringWithFormat:@"%.2f",earnestAmountValue];
- double totalEarnestAmountValue= [[dic objectForKey:@"TotalEarnestAmount"]doubleValue];
- _totalEarnestAmount= [NSString stringWithFormat:@"%.4f",totalEarnestAmountValue];
- double earnestRateValue= [[dic objectForKey:@"EarnestRate"]doubleValue];
- _earnestRate=[NSString stringWithFormat:@"%.2f%@",earnestRateValue,@"%"];
- double totalEarnestRateValue=[[dic objectForKey:@"TotalEarnestRate"]doubleValue];
- _totalEarnestRate=[NSString stringWithFormat:@"%.2f%@",totalEarnestRateValue,@"%"];
- double discountValue= [[dic objectForKey:@"Discount"]doubleValue];
- _discount=[NSString stringWithFormat:@"%.2f",discountValue];
- _goodsCount=[dic objectForKey:@"GoodsCount"];
- _organizationName=[dic objectForKey:@"OrganizationName"];
- _staffName=[dic objectForKey:@"StaffName"];
- _createUser=[dic objectForKey:@"CreateUser"];
- _accountDate=[DateFormat dateFormatSplit:[dic objectForKey:@"AccountDate"]];
- _address=[dic objectForKey:@"Address"];
- }
- }
-
- @end
|