Commit 88bd5236 authored by n22's avatar n22

仓库接口

parent a44683ad
...@@ -137,7 +137,7 @@ static NSString * const ICRHTTPInterface[] = { ...@@ -137,7 +137,7 @@ static NSString * const ICRHTTPInterface[] = {
[XFFHttp_ResultChart] = @"survey/resultchart", [XFFHttp_ResultChart] = @"survey/resultchart",
[XFFHttp_GetResults] = @"survey/get_results", [XFFHttp_GetResults] = @"survey/get_results",
//供应商 //供应商
[XFFHttp_GetVendor] = @"mdata/vendor/download", [XFFHttp_GetVendor] = @"data/vendor/download",
//仓库 //仓库
[XFFHttp_GetWarehouse] = @"data/warehouse/download", [XFFHttp_GetWarehouse] = @"data/warehouse/download",
...@@ -1648,10 +1648,10 @@ acceptTypeJson:YES ...@@ -1648,10 +1648,10 @@ acceptTypeJson:YES
fail( error ); fail( error );
} }
}; };
NSString *dateStr = @"2015-05-04";
NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_GetVendor] stringByAppendingFormat:@"?startDate=%@&pageNumber=%@&pageSize=%@", [[NSDate date] httpParameterString],@(page_number),@(page_size)]; NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_GetVendor] stringByAppendingFormat:@"?startDate=%@&pageNumber=%@&pageSize=%@", dateStr,@(page_number),@(page_size)];
NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[self POST:encodeUrlStr [self GET:encodeUrlStr
parameters:NULL parameters:NULL
needToken:NO needToken:NO
acceptTypeJson:YES acceptTypeJson:YES
...@@ -1694,10 +1694,10 @@ acceptTypeJson:YES ...@@ -1694,10 +1694,10 @@ acceptTypeJson:YES
fail( error ); fail( error );
} }
}; };
NSString *dateStr = @"2015-05-04";
NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_GetVendor] stringByAppendingFormat:@"?startDate=%@&pageNumber=%@&pageSize=%@", [[NSDate date] httpParameterString],@(page_number),@(page_size)]; NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_GetWarehouse] stringByAppendingFormat:@"?startDate=%@&pageNumber=%@&pageSize=%@", dateStr,@(page_number),@(page_size)];
NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[self POST:encodeUrlStr [self GET:encodeUrlStr
parameters:NULL parameters:NULL
needToken:NO needToken:NO
acceptTypeJson:YES acceptTypeJson:YES
......
...@@ -32,10 +32,6 @@ ...@@ -32,10 +32,6 @@
- (void)initData{ - (void)initData{
self.dataArr = [NSMutableArray array]; self.dataArr = [NSMutableArray array];
self.indexArr = [NSMutableArray array]; self.indexArr = [NSMutableArray array];
Vendor *v = [[Vendor alloc]init];
v.name = @"dddd";
v.code = @"1111";
[self.dataArr addObject:v];
[self fetchVendorList]; [self fetchVendorList];
__weak typeof(self)weakSelf = self; __weak typeof(self)weakSelf = self;
......
...@@ -9,5 +9,11 @@ ...@@ -9,5 +9,11 @@
#import "Warehouse.h" #import "Warehouse.h"
@implementation Warehouse @implementation Warehouse
+ (NSDictionary *)specialKeysAndReplaceKeys {
return @{ @"wID" : [[self class] PrimaryKey], };
}
+ (NSString *)PrimaryKey {
return @"uuid";
}
@end @end
...@@ -69,6 +69,7 @@ typedef enum : NSUInteger { ...@@ -69,6 +69,7 @@ typedef enum : NSUInteger {
[self createTableView]; [self createTableView];
} }
- (void)initData{ - (void)initData{
_dataArr = [NSMutableArray array]; _dataArr = [NSMutableArray array];
self.users = [NSMutableArray array]; self.users = [NSMutableArray array];
[_dataArr addObject:@"标题"]; [_dataArr addObject:@"标题"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment