Commit 7af85d52 authored by admin's avatar admin

修复 在线抽查 部分接口信息

parent b0900098
...@@ -4,35 +4,13 @@ ...@@ -4,35 +4,13 @@
version = "2.0"> version = "2.0">
<Breakpoints> <Breakpoints>
<BreakpointProxy <BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent <BreakpointContent
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "redstar/Classes/Module/Home/ViewController/HomeViewController.m" scope = "0"
timestampString = "475987960.281766" stopOnStyle = "0">
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "642"
endingLineNumber = "642"
landmarkName = "-requestLookOnLineList"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "redstar/Classes/Module/Home/ViewController/HomeViewController.m"
timestampString = "475987965.153886"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "605"
endingLineNumber = "605"
landmarkName = "-requestSpotCheckList"
landmarkType = "5">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
</Breakpoints> </Breakpoints>
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
#define Url_h #define Url_h
// url 测试环境 // url 测试环境
#define kRedStarURL @"http://218.244.151.129:7580/" #define kRedStarURL @"http://218.244.151.129:7580/"
// 正式环境 // 正式环境
// #define kRedStarURL @"http://219.235.234.225:7580/" // #define kRedStarURL @"http://219.235.234.225:7580/"
// 最新正式环境 // 最新正式环境
//#define kRedStarURL @"http://219.235.234.212:7580/" // #define kRedStarURL @"http://219.235.234.212:7580/"
// 检查更新 // 检查更新
#define kCheckUpdateURL @"redstar-server/rest/ipapk?type=ipa" #define kCheckUpdateURL @"redstar-server/rest/ipapk?type=ipa"
......
...@@ -15,7 +15,10 @@ ...@@ -15,7 +15,10 @@
_lookOnLine = lookOnLine; _lookOnLine = lookOnLine;
self.titleLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.title]; self.titleLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.title];
//self.peopleLabel.text = [NSString stringWithFormat:@"发起人:%@", lookOnLine.] //self.peopleLabel.text = [NSString stringWithFormat:@"发起人:%@", lookOnLine.]
self.peopleLabel.text = @"发起人:王XX 集团XX总"; self.peopleLabel.text = [NSString stringWithFormat:@"发起人:%@", lookOnLine.create_operName];
//self.startDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.create_time];
// self.peopleLabel.text = @"发起人:王XX 集团XX总";
if (lookOnLine.reportTime == nil || lookOnLine.reportTime == NULL || [lookOnLine.reportTime isEqual:[NSNull null]] || lookOnLine.reportTime == Nil || [lookOnLine.reportTime isEqualToString:@"(null)"]) { if (lookOnLine.reportTime == nil || lookOnLine.reportTime == NULL || [lookOnLine.reportTime isEqual:[NSNull null]] || lookOnLine.reportTime == Nil || [lookOnLine.reportTime isEqualToString:@"(null)"]) {
self.startDate.text = [NSString stringWithFormat:@"发起时间:"]; self.startDate.text = [NSString stringWithFormat:@"发起时间:"];
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
@property (nonatomic, copy) NSString *commentId; @property (nonatomic, copy) NSString *commentId;
@property (nonatomic, strong) NSArray *comments; @property (nonatomic, strong) NSArray *comments;
@property (nonatomic, copy) NSString *content; @property (nonatomic, copy) NSString *content;
@property (nonatomic, copy) NSString *create_operName;
@property (nonatomic, copy) NSString *create_time;
@property (nonatomic, copy) NSString *endDate; @property (nonatomic, copy) NSString *endDate;
@property (nonatomic, copy) NSString *processNote; @property (nonatomic, copy) NSString *processNote;
@property (nonatomic, copy) NSString *reportTime; @property (nonatomic, copy) NSString *reportTime;
......
...@@ -9,5 +9,15 @@ ...@@ -9,5 +9,15 @@
#import "LookOnLineModel.h" #import "LookOnLineModel.h"
@implementation LookOnLineModel @implementation LookOnLineModel
- (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues{
Class cls = self.class;
for (NSString *key in keyedValues.allKeys) {
NSString *varName = [NSString stringWithFormat:@"_%@", key];
const char *c_key = [varName cStringUsingEncoding:NSUTF8StringEncoding];
Ivar var = class_getInstanceVariable(cls, c_key);
if (var) {
[self setValue:[keyedValues objectForKey:key] forKey:key];
}
}
}
@end @end
...@@ -114,6 +114,8 @@ ...@@ -114,6 +114,8 @@
}; };
[MBProgressHUD showHUDAddedTo:self.view animated:YES]; [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) { [http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"商场 resp === %@", response);
NSDictionary *dataDict = response[@"data"]; NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"]; NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array]; NSMutableArray *tempArray = [NSMutableArray array];
......
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
self.shopnameLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.store_name]; self.shopnameLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.store_name];
self.overDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.endDate]; self.overDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.endDate];
self.peopleLabel.text = @"王XX 集团X领导"; self.peopleLabel.text = [NSString stringWithFormat:@"发起人:%@", lookOnLine.create_operName];
self.startDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.reportTime]; self.startDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.create_time];
NSString *intro = [NSString stringWithFormat:@"%@", lookOnLine.content]; NSString *intro = [NSString stringWithFormat:@"%@", lookOnLine.content];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:intro]; NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:intro];
......
...@@ -57,8 +57,10 @@ ...@@ -57,8 +57,10 @@
self.shopnameLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.store_name]; self.shopnameLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.store_name];
self.overDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.endDate]; self.overDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.endDate];
self.peopleLabel.text = @"王XX 集团X领导"; self.peopleLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.create_operName];
self.startDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.reportTime]; self.startDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.create_time];
// self.peopleLabel.text = @"王XX 集团X领导";
// self.startDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.reportTime];
NSString *intro = [NSString stringWithFormat:@"%@", lookOnLine.content]; NSString *intro = [NSString stringWithFormat:@"%@", lookOnLine.content];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:intro]; NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:intro];
......
...@@ -367,6 +367,8 @@ ...@@ -367,6 +367,8 @@
if (alertView.tag == 9211232) { if (alertView.tag == 9211232) {
if (buttonIndex == 1) { if (buttonIndex == 1) {
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager.operationQueue cancelAllOperations];
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} }
} }
......
...@@ -201,6 +201,9 @@ ...@@ -201,6 +201,9 @@
// 返回上一页面 // 返回上一页面
- (void)doBack:(UIBarButtonItem *)sender - (void)doBack:(UIBarButtonItem *)sender
{ {
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager.operationQueue cancelAllOperations];
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} }
- (void)showPicture:(UIButton *)sender - (void)showPicture:(UIButton *)sender
......
...@@ -107,6 +107,13 @@ ...@@ -107,6 +107,13 @@
return; return;
} }
if (self.footerView.contentTextView.text.length ==0 && _imageNameArray.count == 0) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"现场照片和处理说明不能都为空!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
[alert show];
return;
}
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:[NSString stringWithFormat:@"你确定要上传检查点的相关信息吗?"] delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:[NSString stringWithFormat:@"你确定要上传检查点的相关信息吗?"] delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
alert.tag = 533292; alert.tag = 533292;
[alert show]; [alert show];
...@@ -115,6 +122,7 @@ ...@@ -115,6 +122,7 @@
// 返回上一页面 // 返回上一页面
- (void)doBack:(UIBarButtonItem *)sender - (void)doBack:(UIBarButtonItem *)sender
{ {
[[AFHTTPSessionManager manager].operationQueue cancelAllOperations];
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} }
...@@ -357,7 +365,6 @@ ...@@ -357,7 +365,6 @@
// 删除图片 // 删除图片
- (void)deletePicture:(UIButton *)button - (void)deletePicture:(UIButton *)button
{ {
NSLog(@"从imageName中删除了第%ld张图片",(button.tag - 5521));
NSString *imageName = [self.imageNameArray objectAtIndex:(button.tag - 5521)]; NSString *imageName = [self.imageNameArray objectAtIndex:(button.tag - 5521)];
NSString *path0 = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",_taskModel.uuid]]; NSString *path0 = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",_taskModel.uuid]];
NSString *paths = [path0 stringByAppendingPathComponent:imageName]; NSString *paths = [path0 stringByAppendingPathComponent:imageName];
......
...@@ -172,18 +172,18 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2); ...@@ -172,18 +172,18 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
[_sectionArray removeObject:@"口碑巡检"]; [_sectionArray removeObject:@"口碑巡检"];
} }
// if ([permissions containsObject:@"500701"] || [permissions containsObject:@"500702"]) { if ([permissions containsObject:@"500701"] || [permissions containsObject:@"500702"]) {
// [self.titleArray addObject:@"在线抽查"]; [self.titleArray addObject:@"在线抽查"];
//
// if ([permissions containsObject:@"500701"]) { if ([permissions containsObject:@"500701"]) {
// [self requestLookOnLineList]; [self requestLookOnLineList];
// } else if ([permissions containsObject:@"500702"]){ } else if ([permissions containsObject:@"500702"]){
// [self requestSpotCheckList]; [self requestSpotCheckList];
// } }
//
// } else { } else {
// [_sectionArray removeObject:@"在线抽查"]; [_sectionArray removeObject:@"在线抽查"];
// } }
[self setupTableView]; [self setupTableView];
...@@ -229,8 +229,8 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2); ...@@ -229,8 +229,8 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
[self refreshRankingList]; [self refreshRankingList];
[self refreshQuestionList]; [self refreshQuestionList];
[self refreshPraiseList]; [self refreshPraiseList];
// [self refreshSpotCheckList]; [self refreshSpotCheckList];
// [self requestLookOnLineList]; [self requestLookOnLineList];
} }
- (void)refreshPraiseList - (void)refreshPraiseList
...@@ -414,10 +414,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2); ...@@ -414,10 +414,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
_allLookOnLineList = [NSMutableArray arrayWithArray:tempArray]; _allLookOnLineList = [NSMutableArray arrayWithArray:tempArray];
[self.tableView.header endRefreshing]; [self.tableView.header endRefreshing];
[MBProgressHUD hideHUDForView:self.view animated:YES];
[self.tableView reloadData]; [self.tableView reloadData];
[MBProgressHUD hideHUDForView:self.view animated:YES];
}]; }];
} }
...@@ -640,7 +639,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2); ...@@ -640,7 +639,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
- (void)requestLookOnLineList - (void)requestLookOnLineList
{ {
HttpClient *http = [[HttpClient alloc] initWithUrl:[NSString stringWithFormat:@"%@%@", kRedStarURL, kStoreSportcheckURL]]; HttpClient *http = [[HttpClient alloc] initWithUrl:[NSString stringWithFormat:@"%@%@", kRedStarURL, kStoreSportcheckURL]];
// 相关参数
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"]; NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
NSDictionary *parameters = @{@"userUuid":user_uuid, NSDictionary *parameters = @{@"userUuid":user_uuid,
......
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