Commit 2c9621f9 authored by 曹云霄's avatar 曹云霄

修改项说明:修复油价显示问题、建仓申请切换接口增加时间控制

parent 07989fcf
......@@ -2592,6 +2592,7 @@
3506ECBD1BA00E3400897EBE = {
CreatedOnToolsVersion = 6.4;
DevelopmentTeam = W54V2VB863;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
......@@ -3123,8 +3124,9 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -3140,7 +3142,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomoe.total;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f96494cb-c220-43ce-8034-75e000c2193f";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "total/total-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = 1;
......@@ -3154,8 +3157,9 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -3171,7 +3175,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomoe.total;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f96494cb-c220-43ce-8034-75e000c2193f";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "total/total-Bridging-Header.h";
TARGETED_DEVICE_FAMILY = 1;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
......
......@@ -31,7 +31,7 @@
/**
* 配送区域数据源
*/
@property (nonatomic,strong) NSArray *distributionArray;
@property (nonatomic,strong) NSMutableArray *distributionArray;
/**
* 油品列表信息
......@@ -88,20 +88,28 @@
dispatch_queue_t queue = dispatch_queue_create("顺序执行", DISPATCH_QUEUE_SERIAL);
dispatch_group_t group = dispatch_group_create();
//任务1->获取配送区域
dispatch_group_async(group, queue, ^{
dispatch_suspend(queue);
[HttpRequestManager requestNetworkwithURL:[NSString stringWithFormat:@"%@%@",HTTP_REST_API_BASE_URL,DISTRIBUTION] withRequestType:ONE withParameter:nil withSuccess:^(id returnValue) {
if ([returnValue[@"success"] isEqualToNumber:@1]) {
weakSelf.distributionArray = returnValue[@"data"];
} else {
[IBTLoadingView showTextOnly:returnValue[@"message"]];
}
dispatch_resume(queue);
} withFailed:^(NSError *failed) {
dispatch_resume(queue);
[IBTLoadingView showTextOnly:failed.localizedDescription];
}];
});
if (![[ICRUserUtil sharedInstance].position isEqualToString:@"storer"]) {
dispatch_group_async(group, queue, ^{
dispatch_suspend(queue);
[HttpRequestManager requestNetworkwithURL:[NSString stringWithFormat:@"%@%@",HTTP_REST_API_BASE_URL,DISTRIBUTION] withRequestType:ONE withParameter:nil withSuccess:^(id returnValue) {
if ([returnValue[@"success"] isEqualToNumber:@1]) {
weakSelf.distributionArray = returnValue[@"data"];
} else {
[IBTLoadingView showTextOnly:returnValue[@"message"]];
}
dispatch_resume(queue);
} withFailed:^(NSError *failed) {
dispatch_resume(queue);
[IBTLoadingView showTextOnly:failed.localizedDescription];
}];
});
}else {
self.distributionArray = [NSMutableArray array];
for (NSDictionary *dict in [ICRUserUtil sharedInstance].storeArray) {
[self.distributionArray addObject:dict[@"deliveryArea"]];
}
}
//任务二->获得油品信息
dispatch_group_async(group, queue, ^{
[HttpRequestManager requestNetworkwithURL:[NSString stringWithFormat:@"%@%@",HTTP_REST_API_BASE_URL,OILTYPE] withRequestType:ONE withParameter:nil withSuccess:^(id returnValue) {
......@@ -146,8 +154,20 @@
QueryCondition *priceCategory = [[QueryCondition alloc]init];
priceCategory.operation = @"categoryEquals";
priceCategory.parameters = @[@"generalTradePrice"];
query.conditions = (NSArray<QueryCondition> *)@[condition,oilType,priceCategory];
[HttpRequestManager requestNetworkwithURL:[NSString stringWithFormat:@"%@%@",HTTP_REST_API_BASE_URL,OILPRICE] withRequestType:ZERO withParameter:[query toDictionary] withSuccess:^(id returnValue) {
TimeSelectTableViewCell *timeCell = [self.createWarehouseTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:0]];
//开始时间
QueryCondition *beginDate = [[QueryCondition alloc]init];
beginDate.operation = @"effectiveStartTimeLess";
beginDate.parameters = @[[NSString stringWithFormat:@"%@ 00:00:00",timeCell.beginTimeButton.currentTitle]];
//结束时间
QueryCondition *endDate = [[QueryCondition alloc]init];
endDate.operation = @"effectiveEndTimeMore";
endDate.parameters = @[[NSString stringWithFormat:@"%@ 23:59:59",timeCell.endTimeButton.currentTitle]];
query.conditions = (NSArray<QueryCondition> *)@[condition,oilType,priceCategory,beginDate,endDate];
NSLog(@"%@",[query toDictionary]);
[HttpRequestManager requestNetworkwithURL:[NSString stringWithFormat:@"%@%@",HTTP_REST_API_BASE_URL,DEPOTREQUEST] withRequestType:ZERO withParameter:[query toDictionary] withSuccess:^(id returnValue) {
if ([returnValue[@"success"] isEqualToNumber:@1]) {
weakSelf.oilPrice = [[QueryResult alloc]initWithDictionary:returnValue[@"data"] error:nil];
......
......@@ -38,4 +38,8 @@
*/
@property (weak, nonatomic) IBOutlet UIImageView *storeImageView;
@property (weak, nonatomic) IBOutlet UILabel *oilLabel;
@end
......@@ -34,9 +34,19 @@
NSArray *array = _datasResult.records;
[self.datasArray removeAllObjects];
for (NSDictionary *dict in array) {
[self.datasArray addObject:[[dict objectForKey:@"item"] objectForKey:@"name"]];
[self.datasArray addObject:[[dict objectForKey:@"guidancePrice"] stringValue]];
[self.datasArray addObject:[[dict objectForKey:@"salePrice"] stringValue]];
for (NSDictionary *dict2 in array) {
if ([dict[@"item"][@"name"] isEqualToString:dict2[@"item"][@"name"]]) {
if (([dict[@"category"] isEqualToString:@"salePrice"] && [dict2[@"category"] isEqualToString:@"generalTradePrice"]) || ([dict2[@"category"] isEqualToString:@"salePrice"] && [dict[@"category"] isEqualToString:@"generalTradePrice"])) {
NSString *name = [[dict objectForKey:@"item"] objectForKey:@"name"];
if ([self.datasArray containsObject:name]) {
break;
}
[self.datasArray addObject:name];
[self.datasArray addObject:[[dict objectForKey:@"guidancePrice"] stringValue]];
[self.datasArray addObject:[[dict2 objectForKey:@"salePrice"] stringValue]];break;
}
}
}
}
[self.priceDetailsCollectionView reloadData];
}
......@@ -65,7 +75,6 @@
}
#pragma mark -友好界面
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
{
......
......@@ -93,13 +93,14 @@
#pragma mark -确定
- (void)completeButtonClick:(UIBarButtonItem *)item
{
if (self.selectCellTitle) {
self.selectCellTitle(self.selectTitle?self.selectTitle:self.currentTitle,self.indexpathSelect.row);
if (self.selectTitle || self.currentTitle) {
if (self.selectCellTitle) {
self.selectCellTitle(self.selectTitle?self.selectTitle:self.currentTitle,self.indexpathSelect.row);
}
}
}
#pragma mark -友好界面
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
{
......
......@@ -83,16 +83,16 @@
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
//
//测试环境
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
//
//测试环境
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8080/total-server/rest"
//开发环境
//#define HTTP_LOCAL_BASE_URL @"http://139.196.195.30:8093"
//#define HTTP_REST_API_BASE_URL @"http://139.196.195.30:8093/total-server/rest"
#define HTTP_LOCAL_BASE_URL @"http://139.196.195.30:8093"
#define HTTP_REST_API_BASE_URL @"http://139.196.195.30:8093/total-server/rest"
#define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free"
......
......@@ -65,10 +65,14 @@
#define DISTRIBUTION @"/mdata/deliveryArea/query"
/**
* 油价
* 默认油价
*/
#define OILPRICE @"/fuelPrice/filterQuery"
/**
* 建仓申请有价
*/
#define DEPOTREQUEST @"/fuelPrice/depotQuery"
/**
* 行政区域
*/
......
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