forked from liuchaogenius/DianjiaApp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
553 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// JHLSMode.h | ||
// YHB_Prj | ||
// | ||
// Created by Johnny's on 15/9/12. | ||
// Copyright (c) 2015年 striveliu. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface JHLSMode : NSObject | ||
@property (nonatomic, strong) NSString *strAdd_date; | ||
|
||
@property (nonatomic, strong) NSString *strId; | ||
|
||
@property (nonatomic, strong) NSString *strProduct_code; | ||
|
||
@property (nonatomic, strong) NSString *strProduct_id; | ||
|
||
@property (nonatomic, strong) NSString *strProduct_name; | ||
|
||
@property (nonatomic, strong) NSString *strSale_price; | ||
|
||
@property (nonatomic, strong) NSString *strShelf_dys; | ||
|
||
@property (nonatomic, strong) NSString *strStay_qty; | ||
|
||
@property (nonatomic, strong) NSString *strStock_num; | ||
|
||
@property (nonatomic, strong) NSString *strStock_price; | ||
|
||
@property (nonatomic, strong) NSString *strStock_qty; | ||
|
||
@property (nonatomic, strong) NSString *strSup_id; | ||
|
||
@property (nonatomic, strong) NSString *strSup_name; | ||
- (void)unPacketData:(NSDictionary *)aDataDict; | ||
@end | ||
|
||
@interface JHLSList : NSObject | ||
@property (nonatomic, strong) NSMutableArray *productList; | ||
- (void)unPacketData:(NSDictionary *)aDataDict; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// | ||
// JHLSMode.m | ||
// YHB_Prj | ||
// | ||
// Created by Johnny's on 15/9/12. | ||
// Copyright (c) 2015年 striveliu. All rights reserved. | ||
// | ||
|
||
#import "JHLSMode.h" | ||
|
||
@implementation JHLSMode | ||
- (void)unPacketData:(NSDictionary *)aDataDict | ||
{ | ||
|
||
AssignMentID(self.strAdd_date, [aDataDict objectForKey:@"add_date"]); | ||
|
||
AssignMentID(self.strId, [aDataDict objectForKey:@"id"]); | ||
BaseIntToNSString(self.strId); | ||
|
||
AssignMentID(self.strProduct_code, [aDataDict objectForKey:@"product_code"]); | ||
|
||
AssignMentID(self.strProduct_id, [aDataDict objectForKey:@"product_id"]); | ||
BaseIntToNSString(self.strProduct_id); | ||
|
||
AssignMentID(self.strProduct_name, [aDataDict objectForKey:@"product_name"]); | ||
|
||
AssignMentID(self.strSale_price, [aDataDict objectForKey:@"sale_price"]); | ||
BaseIntToNSString(self.strSale_price); | ||
|
||
AssignMentID(self.strShelf_dys, [aDataDict objectForKey:@"shelf_dys"]); | ||
BaseIntToNSString(self.strShelf_dys); | ||
|
||
AssignMentID(self.strStay_qty, [aDataDict objectForKey:@"stay_qty"]); | ||
BaseLongLongToNSString(self.strStay_qty); | ||
|
||
AssignMentID(self.strStock_num, [aDataDict objectForKey:@"stock_num"]); | ||
BaseIntToNSString(self.strStock_num); | ||
|
||
AssignMentID(self.strStock_price, [aDataDict objectForKey:@"stock_price"]); | ||
|
||
AssignMentID(self.strStock_qty, [aDataDict objectForKey:@"stock_qty"]); | ||
BaseIntToNSString(self.strStock_qty); | ||
|
||
AssignMentID(self.strSup_id, [aDataDict objectForKey:@"sup_id"]); | ||
BaseFloadToNSString(self.strSup_id); | ||
|
||
AssignMentID(self.strSup_name, [aDataDict objectForKey:@"sup_name"]); | ||
} | ||
@end | ||
|
||
@implementation JHLSList | ||
|
||
- (instancetype)init | ||
{ | ||
if(self = [super init]){ | ||
self.productList = [NSMutableArray arrayWithCapacity:0]; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)unPacketData:(NSDictionary *)aDataDict | ||
{ | ||
NSArray *arry = [aDataDict objectForKey:@"rows"]; | ||
if(arry && arry.count > 0) | ||
{ | ||
for(NSDictionary *dict in arry) | ||
{ | ||
JHLSMode *mode = [[JHLSMode alloc] init]; | ||
[mode unPacketData:dict]; | ||
[self.productList addObject:mode]; | ||
} | ||
} | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.