Commit 73bba6b9 authored by 陈俊俊's avatar 陈俊俊

新增接口添加行情调研

parent 708c7ada
......@@ -65,6 +65,7 @@
7217E9F31B72364300FE5C1D /* SurveyCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7217E9E11B72364300FE5C1D /* SurveyCell.m */; };
7217E9F41B72364300FE5C1D /* SurveyListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7217E9E31B72364300FE5C1D /* SurveyListCell.m */; };
7217E9F61B724A7600FE5C1D /* mask.png in Resources */ = {isa = PBXBuildFile; fileRef = 7217E9F51B724A7600FE5C1D /* mask.png */; };
72880C8D1B738973004DD99F /* SurveyPerson.m in Sources */ = {isa = PBXBuildFile; fileRef = 72880C8C1B738973004DD99F /* SurveyPerson.m */; };
871F9F047CDDAC523E4358DC /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 86D33EC280C440156ED1B976 /* libPods.a */; };
C10214CD1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; };
C10214CE1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; };
......@@ -429,6 +430,8 @@
7217E9E21B72364300FE5C1D /* SurveyListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SurveyListCell.h; sourceTree = "<group>"; };
7217E9E31B72364300FE5C1D /* SurveyListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SurveyListCell.m; sourceTree = "<group>"; };
7217E9F51B724A7600FE5C1D /* mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mask.png; sourceTree = "<group>"; };
72880C8B1B738973004DD99F /* SurveyPerson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SurveyPerson.h; sourceTree = "<group>"; };
72880C8C1B738973004DD99F /* SurveyPerson.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SurveyPerson.m; sourceTree = "<group>"; };
7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
86D33EC280C440156ED1B976 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
C10214CB1AD8FE200024637E /* ICRStoreDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRStoreDetailViewController.h; sourceTree = "<group>"; };
......@@ -785,6 +788,8 @@
7217E9CC1B72364300FE5C1D /* Survey.m */,
7217E9CD1B72364300FE5C1D /* SurveyResult.h */,
7217E9CE1B72364300FE5C1D /* SurveyResult.m */,
72880C8B1B738973004DD99F /* SurveyPerson.h */,
72880C8C1B738973004DD99F /* SurveyPerson.m */,
);
path = models;
sourceTree = "<group>";
......@@ -1921,6 +1926,7 @@
C123A8FB1B2561E1003C0C36 /* JTPopOverWindow.m in Sources */,
C142D2B41AC3A155000109A7 /* UIImage+Helper.m in Sources */,
C18AEA9E1AD2F48200A1DB7B /* ICRStore.m in Sources */,
72880C8D1B738973004DD99F /* SurveyPerson.m in Sources */,
C15295BB1B244C8E00DF60D1 /* ICRQScoreViewController.m in Sources */,
C123A9221B26ED85003C0C36 /* ICRQuestionManager.m in Sources */,
C15918801AC4362D0013B391 /* UIApplication+CheckFirstRun.m in Sources */,
......
......@@ -178,6 +178,13 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//添加行情调研单
- (void)saveSurveyWithAuthenticode:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
@end
......
......@@ -64,7 +64,10 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
kICRHTTP_VersionFetch,
//Person
kICRHTTP_PersonQuery
kICRHTTP_PersonQuery,
XFFHttp_SurveySave
};
static NSString * const ICRHTTPInterface[] = {
......@@ -111,6 +114,8 @@ static NSString * const ICRHTTPInterface[] = {
//Person
[kICRHTTP_PersonQuery] = @"user/download",
//行情调研
[XFFHttp_SurveySave] = @"survey/save"
};
static NSString * const ICRAttachmentTypeValue[] = {
......@@ -1274,4 +1279,33 @@ acceptTypeJson:YES
failure:failure];
}
- (void)saveSurveyWithAuthenticode:(id)data success:(void (^)(id))succ failure:(void (^)(id))fail
{
if (!data) {
if (fail) {
fail( [[self class] ErrorWithMsg:ERROR_PARAMETER code:0] );
}
return;
}
void (^success)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
CLog(@"%@", responseObject);
if (succ) {
succ( responseObject );
}
};
void (^failure)(AFHTTPRequestOperation *operation, NSError *error) = ^(AFHTTPRequestOperation *operation, NSError *error) {
CLog(@"%@", error);
if (fail) {
fail( error );
}
};
NSDictionary *dict = data;
NSString *urlStr = [[self class] UrlForPluginHTTPAction:XFFHttp_SurveySave];
[self POST:urlStr parameters:dict needToken:NO acceptTypeJson:YES success:success failure:failure];
}
@end
......@@ -12,6 +12,7 @@
#import "SurveyCell.h"
#import "HPGrowingTextView.h"
#import "StartTimeView.h"
#import "Survey.h"
#define LeftMargin 15
#define BtnHeight 44
#define TableHeight 46
......@@ -87,7 +88,26 @@ typedef enum : NSUInteger {
switch (btn.tag) {
case SaveTag:
{
Survey *survey = [[Survey alloc]init];
survey.uuid = @"";
survey.title = @"dddd";
survey.productcode = @"1111";
// survey.begindate = [NSDate date];
// survey.enddate = [NSDate date];
survey.note = @"ddddgdss";
//保存
void(^succ)(id) = ^(id data) {
NSLog(@"%@",data);
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView showTips:data];
};
NSDictionary *dict = @{@"authenticode":@"sssffff",@"userUuid":@"1123",@"action":@"save",@"survey":[survey dictForCommit]};
[[ICRHTTPController sharedController] saveSurveyWithAuthenticode:dict success:succ failure:fail];
}
break;
case CommitTag:
......
......@@ -6,9 +6,9 @@
// Copyright (c) 2015年 Xummer. All rights reserved.
// 行情调研
#import "IBTObject.h"
#import "IBTModel.h"
@interface Survey : IBTObject
@interface Survey : IBTModel
@property (nonatomic,strong)NSString *uuid;//唯一标识
@property (nonatomic,strong)NSString *billnumber;//调研单号
@property (nonatomic,strong)NSString *title;//标题
......
//
// SurveyPerson.h
// XFFruit
//
// Created by 陈俊俊 on 15/8/6.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTObject.h"
@interface SurveyPerson : IBTObject
@property (nonatomic,strong)NSString *uuid;//唯一标识
@property (nonatomic,strong)NSString *person;//用户id
@property (nonatomic,strong)NSString *personcode;//用户编码
@property (nonatomic,strong)NSString *personname;//用户名称
@property (nonatomic,assign)NSInteger *state;//状态
@end
//
// SurveyPerson.m
// XFFruit
//
// Created by 陈俊俊 on 15/8/6.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SurveyPerson.h"
@implementation SurveyPerson
@end
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