Commit 7af85d52 authored by admin's avatar admin

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

parent b0900098
......@@ -4,35 +4,13 @@
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "redstar/Classes/Module/Home/ViewController/HomeViewController.m"
timestampString = "475987960.281766"
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">
scope = "0"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
......
......@@ -10,13 +10,13 @@
#define Url_h
// 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.212:7580/"
// #define kRedStarURL @"http://219.235.234.212:7580/"
// 检查更新
#define kCheckUpdateURL @"redstar-server/rest/ipapk?type=ipa"
......
......@@ -15,7 +15,10 @@
_lookOnLine = lookOnLine;
self.titleLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.title];
//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)"]) {
self.startDate.text = [NSString stringWithFormat:@"发起时间:"];
......
......@@ -14,6 +14,8 @@
@property (nonatomic, copy) NSString *commentId;
@property (nonatomic, strong) NSArray *comments;
@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 *processNote;
@property (nonatomic, copy) NSString *reportTime;
......
......@@ -9,5 +9,15 @@
#import "LookOnLineModel.h"
@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
......@@ -114,6 +114,8 @@
};
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[http getStoreSportCheckListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"商场 resp === %@", response);
NSDictionary *dataDict = response[@"data"];
NSArray *recordsArray = dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
......
......@@ -41,8 +41,8 @@
self.shopnameLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.store_name];
self.overDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.endDate];
self.peopleLabel.text = @"王XX 集团X领导";
self.startDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.reportTime];
self.peopleLabel.text = [NSString stringWithFormat:@"发起人:%@", lookOnLine.create_operName];
self.startDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.create_time];
NSString *intro = [NSString stringWithFormat:@"%@", lookOnLine.content];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:intro];
......
......@@ -57,8 +57,10 @@
self.shopnameLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.store_name];
self.overDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.endDate];
self.peopleLabel.text = @"王XX 集团X领导";
self.startDateLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.reportTime];
self.peopleLabel.text = [NSString stringWithFormat:@"%@", lookOnLine.create_operName];
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];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:intro];
......
......@@ -367,6 +367,8 @@
if (alertView.tag == 9211232) {
if (buttonIndex == 1) {
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager.operationQueue cancelAllOperations];
[self.navigationController popViewControllerAnimated:YES];
}
}
......
......@@ -201,6 +201,9 @@
// 返回上一页面
- (void)doBack:(UIBarButtonItem *)sender
{
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager.operationQueue cancelAllOperations];
[self.navigationController popViewControllerAnimated:YES];
}
- (void)showPicture:(UIButton *)sender
......
......@@ -107,6 +107,13 @@
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];
alert.tag = 533292;
[alert show];
......@@ -115,6 +122,7 @@
// 返回上一页面
- (void)doBack:(UIBarButtonItem *)sender
{
[[AFHTTPSessionManager manager].operationQueue cancelAllOperations];
[self.navigationController popViewControllerAnimated:YES];
}
......@@ -357,7 +365,6 @@
// 删除图片
- (void)deletePicture:(UIButton *)button
{
NSLog(@"从imageName中删除了第%ld张图片",(button.tag - 5521));
NSString *imageName = [self.imageNameArray objectAtIndex:(button.tag - 5521)];
NSString *path0 = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",_taskModel.uuid]];
NSString *paths = [path0 stringByAppendingPathComponent:imageName];
......
......@@ -172,18 +172,18 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
[_sectionArray removeObject:@"口碑巡检"];
}
// if ([permissions containsObject:@"500701"] || [permissions containsObject:@"500702"]) {
// [self.titleArray addObject:@"在线抽查"];
//
// if ([permissions containsObject:@"500701"]) {
// [self requestLookOnLineList];
// } else if ([permissions containsObject:@"500702"]){
// [self requestSpotCheckList];
// }
//
// } else {
// [_sectionArray removeObject:@"在线抽查"];
// }
if ([permissions containsObject:@"500701"] || [permissions containsObject:@"500702"]) {
[self.titleArray addObject:@"在线抽查"];
if ([permissions containsObject:@"500701"]) {
[self requestLookOnLineList];
} else if ([permissions containsObject:@"500702"]){
[self requestSpotCheckList];
}
} else {
[_sectionArray removeObject:@"在线抽查"];
}
[self setupTableView];
......@@ -229,8 +229,8 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
[self refreshRankingList];
[self refreshQuestionList];
[self refreshPraiseList];
// [self refreshSpotCheckList];
// [self requestLookOnLineList];
[self refreshSpotCheckList];
[self requestLookOnLineList];
}
- (void)refreshPraiseList
......@@ -414,10 +414,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
_allLookOnLineList = [NSMutableArray arrayWithArray:tempArray];
[self.tableView.header endRefreshing];
[MBProgressHUD hideHUDForView:self.view animated:YES];
[self.tableView reloadData];
[MBProgressHUD hideHUDForView:self.view animated:YES];
}];
}
......@@ -640,7 +639,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
- (void)requestLookOnLineList
{
HttpClient *http = [[HttpClient alloc] initWithUrl:[NSString stringWithFormat:@"%@%@", kRedStarURL, kStoreSportcheckURL]];
// 相关参数
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"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