Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
xffruit
Commits
816d96de
Commit
816d96de
authored
9 years ago
by
管鹏飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
行情调研增加备注字段 (在调研中的行情调研的创建者不存在的情况下,无法提交行情调研)Sandy
parent
7a5beac0
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
19 deletions
+65
-19
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+6
-1
UIImage+Helper.h
XFFruit/General/Categories/UIImage+Helper.h
+3
-0
UIImage+Helper.m
XFFruit/General/Categories/UIImage+Helper.m
+35
-0
ICRAppMacro.h
XFFruit/Macro/ICRAppMacro.h
+2
-2
HGPhWViewController.m
...ers/FeedBack/TakePhotos/HGPhotoWall/HGPhWViewController.m
+2
-2
WriteFeedbackViewController.h
...it/ViewControllers/FeedBack/WriteFeedbackViewController.h
+1
-2
WriteFeedbackViewController.m
...it/ViewControllers/FeedBack/WriteFeedbackViewController.m
+15
-12
SurveyResult.h
XFFruit/ViewControllers/Survey/models/SurveyResult.h
+1
-0
No files found.
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
816d96de
...
...
@@ -73,6 +73,7 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
XFFHttp_GetProduct
,
XFFHttp_GetUser
,
XFFHttp_SurveyFinish
,
//行情反馈图片
XFFHttp_ResultChart
,
XFFHttp_GetResults
,
...
...
@@ -138,6 +139,9 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
XFFHttp_QueryHomepage
,
XFFHttp_QueryLowerOrgs
,
//新增行情反馈
XFFHttp_SurveySaveResult
,
};
static
NSString
*
const
ICRHTTPInterface
[]
=
{
...
...
@@ -256,6 +260,7 @@ static NSString * const ICRHTTPInterface[] = {
[
XFFHttp_QueryHomepage
]
=
@"salesdata/query"
,
[
XFFHttp_QueryLowerOrgs
]
=
@"organization/queryLowerOrgs"
,
[
XFFHttp_SurveySaveResult
]
=
@"survey/save_result"
,
};
...
...
@@ -2058,7 +2063,7 @@ acceptTypeJson:YES
};
NSString
*
currentTime
=
[[
NSDate
date
]
httpParameterString
];
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_Survey
Finish
]
stringByAppendingFormat
:
@"/?survey_uuid=%@&time=%@&operId=%@&operName=%@"
,
surveyUuid
,
currentTime
,
userUtil
.
userId
,
userUtil
.
displayName
];
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_Survey
SaveResult
]
stringByAppendingFormat
:
@"/?survey_uuid=%@&time=%@&operId=%@&operName=%@"
,
surveyUuid
,
currentTime
,
userUtil
.
userId
,
userUtil
.
displayName
];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
POST
:
encodeUrlStr
parameters
:
dict
...
...
This diff is collapsed.
Click to expand it.
XFFruit/General/Categories/UIImage+Helper.h
View file @
816d96de
...
...
@@ -26,4 +26,7 @@
+
(
UIImage
*
)
imageWithColor
:(
UIColor
*
)
color
andSize
:(
CGSize
)
size
;
+
(
UIImage
*
)
imageWithColor
:(
UIColor
*
)
color
andRect
:(
CGRect
)
rect
;
-
(
UIImage
*
)
greyScaleImage
;
-
(
NSData
*
)
scaledToSpaceMaxSize
:(
NSInteger
)
kb
;
-
(
UIImage
*
)
scaledToSize
:(
CGSize
)
newSize
;
-
(
UIImage
*
)
scaledToWidth
:(
NSInteger
)
newWidth
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/General/Categories/UIImage+Helper.m
View file @
816d96de
...
...
@@ -183,4 +183,39 @@ typedef enum {
return
resultUIImage
;
}
-
(
NSData
*
)
scaledToSpaceMaxSize
:
(
NSInteger
)
kb
{
//压缩到100kb以内
CGFloat
compression
=
0
.
5
f
;
CGFloat
maxCompression
=
0
.
1
f
;
NSUInteger
maxlength
=
kb
*
100
;
NSData
*
imgData
=
UIImageJPEGRepresentation
(
self
,
compression
);
CLog
(
@"处理之前的大小--->%lukB"
,(
unsigned
long
)
imgData
.
length
/
1024
);
while
([
imgData
length
]
>
maxlength
&&
compression
>
maxCompression
)
{
compression
-=
0
.
1
;
imgData
=
UIImageJPEGRepresentation
(
self
,
compression
);
}
CLog
(
@"处理之后的大小--->%lukB"
,(
unsigned
long
)
imgData
.
length
/
1024
);
return
imgData
;
}
-
(
UIImage
*
)
scaledToSize
:
(
CGSize
)
newSize
{
UIGraphicsBeginImageContextWithOptions
(
newSize
,
YES
,
0
);
[
self
drawInRect
:
CGRectMake
(
0
,
0
,
newSize
.
width
,
newSize
.
height
)];
UIImage
*
scaledImage
=
UIGraphicsGetImageFromCurrentImageContext
();
UIGraphicsEndImageContext
();
return
scaledImage
;
}
-
(
UIImage
*
)
scaledToWidth
:
(
NSInteger
)
newWidth
{
CGSize
newSize
=
CGSizeMake
(
newWidth
,
newWidth
/
self
.
size
.
width
*
self
.
size
.
height
);
UIGraphicsBeginImageContextWithOptions
(
newSize
,
YES
,
0
);
[
self
drawInRect
:
CGRectMake
(
0
,
0
,
newSize
.
width
,
newSize
.
height
)];
UIImage
*
scaledImage
=
UIGraphicsGetImageFromCurrentImageContext
();
UIGraphicsEndImageContext
();
return
scaledImage
;
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/Macro/ICRAppMacro.h
View file @
816d96de
...
...
@@ -23,10 +23,10 @@
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
//********阿里云内部测试环境********
//
#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
//********现场测试环境********
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
//
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
//********现场正式环境*********
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/FeedBack/TakePhotos/HGPhotoWall/HGPhWViewController.m
View file @
816d96de
...
...
@@ -239,7 +239,7 @@ static HGPhWViewController *_instance = nil;
// [self.allImgsMuArr addObject:imgData];
[[
JavenImages
shareInstance
]
insertAImage
:
img
];
[[
JavenImages
shareInstance
]
insertAImage
:
[
img
scaledToWidth
:
600
]
];
[
self
scrollViewContentHeight
];
[
picker
DismissModalViewControllerAnimated
:
YES
];
}
...
...
@@ -268,7 +268,7 @@ static HGPhWViewController *_instance = nil;
CGImageRef
ref
=
[[
asset
defaultRepresentation
]
fullResolutionImage
];
UIImage
*
img
=
[[
UIImage
alloc
]
initWithCGImage
:
ref
];
[
self
.
imgesMuArr
addObject
:
img
];
//[UIImage imageNamed:@"AttachCamera"]
[
self
.
imgesMuArr
addObject
:
[
img
scaledToWidth
:
600
]
];
//[UIImage imageNamed:@"AttachCamera"]
}
[[
JavenImages
shareInstance
]
insertImages
:
_imgesMuArr
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/FeedBack/WriteFeedbackViewController.h
View file @
816d96de
...
...
@@ -9,8 +9,7 @@
//
#import "ICRBaseViewController.h"
@class
Survey
;
#import "Survey.h"
@interface
WriteFeedbackViewController
:
ICRBaseViewController
@property
(
nonatomic
,
strong
)
Survey
*
survey
;
@property
(
nonatomic
,
strong
)
NSString
*
surveyUuid
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/FeedBack/WriteFeedbackViewController.m
View file @
816d96de
...
...
@@ -42,7 +42,8 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
kfeedbackCellPlace
=
0
,
kfeedbackCellPrice
,
kfeedbackCellCapacity
,
kfeedbackCellQulity
kfeedbackCellQulity
,
kfeedbackCellRemark
};
@end
...
...
@@ -101,11 +102,12 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
self
.
surveyResult
=
[[
SurveyResult
alloc
]
init
];
self
.
surveyResult
.
unit
=
@"南汇8424西瓜调研情况"
;
self
.
surveyResult
.
place
=
@"150605000001"
;
self
.
surveyResult
.
price
=
@"
南汇842[100213]
"
;
self
.
surveyResult
.
price
=
@"
26
"
;
self
.
surveyResult
.
capacity
=
@"22222222222"
;
self
.
surveyResult
.
quality
=
@"费卡接口"
;
self
.
surveyResult
.
userName
=
@"张三"
;
self
.
surveyResult
.
feedbackTime
=
@"2015-04-05 12:04:06"
;
self
.
surveyResult
.
reMark
=
@"今天工作人员效率很高"
;
...
...
@@ -259,7 +261,7 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
tip
:
nil
autoCorrect
:
NO
focus
:
NO
text
:
nil
];
text
:
_surveyResult
.
reMark
];
[
cellInfo
addUserInfoValue
:
titleColor
forKey
:
CInfoTitleColorKey
];
cellInfo
.
fCellHeight
=
fCellHeight
;
[
secInfo
addCell
:
cellInfo
];
...
...
@@ -336,7 +338,7 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
// NSData *imgData = UIImagePNGRepresentation(img);
// [self savePhotoToDB:imgData];
[[
JavenImages
shareInstance
]
insertAImage
:
img
];
[[
JavenImages
shareInstance
]
insertAImage
:
[
img
scaledToWidth
:
600
]
];
[
self
pushToHGphVC
];
}
...
...
@@ -373,7 +375,7 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
CGImageRef
ref
=
[[
asset
defaultRepresentation
]
fullResolutionImage
];
UIImage
*
img
=
[[
UIImage
alloc
]
initWithCGImage
:
ref
];
[
self
.
imgesMuArr
addObject
:
img
];
//[UIImage imageNamed:@"AttachCamera"]
[
self
.
imgesMuArr
addObject
:
[
img
scaledToWidth
:
600
]
];
//[UIImage imageNamed:@"AttachCamera"]
}
[[
JavenImages
shareInstance
]
insertImages
:
self
.
imgesMuArr
];
...
...
@@ -420,7 +422,7 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
NSDictionary
*
paramDict
=
@{
@"result"
:
[
self
getSurveyResult
],
@"attachments"
:
[
self
getAttachmentArray
]};
[[
ICRHTTPController
sharedController
]
surveySaveResultWithDict
:
paramDict
surveyUuid
:
_
surveyU
uid
success
:^
(
id
succ
)
{
[[
ICRHTTPController
sharedController
]
surveySaveResultWithDict
:
paramDict
surveyUuid
:
_
aSurvey
.
u
uid
success
:^
(
id
succ
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
...
...
@@ -453,10 +455,9 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
}
else
{
for
(
int
count
=
0
;
count
<
[
JavenImages
shareInstance
].
imageArr
.
count
;
count
++
)
{
UIImage
*
image
=
[
JavenImages
shareInstance
].
imageArr
[
count
];
NSData
*
data
=
UIImageJPEGRepresentation
(
image
,
1
);
NSString
*
fileName
=
[[
NSString
alloc
]
initWithData
:
data
encoding
:
NSUTF8StringEncoding
];
NSMutableDictionary
*
phontoMuDict
=
[
NSMutableDictionary
dictionaryWithObjects
:@[
@""
,
data
]
forKeys
:@[
@"fileName"
,
@"content"
]];
NSData
*
data
=
[
image
scaledToSpaceMaxSize
:
100
];
NSString
*
enCodeImageStr
=
[
data
base64EncodedStringWithOptions
:
NSDataBase64Encoding64CharacterLineLength
];
NSMutableDictionary
*
phontoMuDict
=
[
NSMutableDictionary
dictionaryWithObjects
:@[
@""
,
enCodeImageStr
]
forKeys
:@[
@"fileName"
,
@"content"
]];
[
attachArr
addObject
:
phontoMuDict
];
}
...
...
@@ -468,14 +469,16 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
-
(
NSDictionary
*
)
getSurveyResult
{
ICRUserUtil
*
userU
=
[
ICRUserUtil
sharedInstance
];
NSString
*
priceStr
=
[
self
getTextFieldTextWithRow
:
kfeedbackCellPrice
];
NSDictionary
*
dict
=
@{
@"userUuid"
:
userU
.
userId
,
@"userCode"
:
userU
.
userCode
,
@"userName"
:
userU
.
userName
,
@"unit"
:
@""
,
@"price"
:
[
self
getTextFieldTextWithRow
:
kfeedbackCellPrice
]
,
@"price"
:
priceStr
,
@"place"
:
[
self
getTextFieldTextWithRow
:
kfeedbackCellPlace
],
@"capacity"
:
[
self
getTextFieldTextWithRow
:
kfeedbackCellCapacity
],
@"quality"
:
[
self
getTextFieldTextWithRow
:
kfeedbackCellQulity
]};
@"quality"
:
[
self
getTextFieldTextWithRow
:
kfeedbackCellQulity
],
@"remark"
:
[
self
getTextFieldTextWithRow
:
kfeedbackCellRemark
]};
return
dict
;
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/models/SurveyResult.h
View file @
816d96de
...
...
@@ -20,5 +20,6 @@
@property
(
nonatomic
,
strong
)
NSString
*
quality
;
//质量情况
@property
(
nonatomic
,
strong
)
NSString
*
feedbackTime
;
//反馈时间
@property
(
nonatomic
,
strong
)
NSArray
*
attachmnets
;
//附件列表
@property
(
nonatomic
,
strong
)
NSString
*
reMark
;
//备注
@property
(
nonatomic
,
strong
)
NSData
*
imageData
;
@end
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment