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
d46885d2
Commit
d46885d2
authored
9 years ago
by
陈俊俊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DEV_20150805_001' of
http://121.42.32.57/root/xffruit
into DEV_20150805_001
parents
c7441546
11b01a25
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
72 additions
and
25 deletions
+72
-25
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+2
-2
Info.plist
XFFruit/Info.plist
+2
-2
ICRAppMacro.h
XFFruit/Macro/ICRAppMacro.h
+3
-3
IBTCommon.h
XFFruit/Utilities/IBTUIKit/IBTCommon.h
+3
-0
IBTCommon.m
XFFruit/Utilities/IBTUIKit/IBTCommon.m
+24
-1
ReportDetailViewController.m
...ntrollers/Report/Controllers/ReportDetailViewController.m
+14
-4
ReportViewController.m
...ViewControllers/Report/Controllers/ReportViewController.m
+22
-13
SearchReportViewController.m
...ntrollers/Report/Controllers/SearchReportViewController.m
+2
-0
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
d46885d2
...
...
@@ -3437,7 +3437,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.xffruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
5747a061-d994-4f1f-8eac-4b028fb34d89
"
;
PROVISIONING_PROFILE
=
"
3a32e5a9-395f-425a-b1b0-c221be8d15d8
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
name
=
Debug
;
...
...
@@ -3462,7 +3462,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.xffruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
5747a061-d994-4f1f-8eac-4b028fb34d89
"
;
PROVISIONING_PROFILE
=
"
3a32e5a9-395f-425a-b1b0-c221be8d15d8
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
name
=
Release
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Info.plist
View file @
d46885d2
...
...
@@ -15,11 +15,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.
1.0
<
/string
>
<
string
>
1.
2.1
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.
1.0
<
/string
>
<
string
>
1.
2.1
<
/string
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Macro/ICRAppMacro.h
View file @
d46885d2
...
...
@@ -26,13 +26,13 @@
//#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"
//********现场正式环境*********
// #define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest"
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest"
#define HTTP_REST_REPORT_BASE_URL @"http://122.224.171.126:7380"
// HTTP
//#define HTTP_REST_API_BASE_URL @"http://115.28.191.44:8080/IPatrol/rest"
//10月23 122.224.171.126:7280
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTCommon.h
View file @
d46885d2
...
...
@@ -35,6 +35,8 @@
+
(
NSDate
*
)
convertToDateFrom
:(
NSString
*
)
dateString
;
+
(
NSString
*
)
stringFromDate
:(
NSDate
*
)
aDate
;
+
(
NSString
*
)
stringFromDateWithFormat
:(
NSDate
*
)
aDate
format
:(
NSString
*
)
format
;
+
(
NSDate
*
)
dateFromStringWithFormat
:(
NSString
*
)
aStr
format
:(
NSString
*
)
format
;
+
(
NSString
*
)
dictionaryToJson
:(
id
)
dic
;
+
(
NSString
*
)
checkString
:(
NSString
*
)
str
;
+
(
NSString
*
)
checkNull
:
(
id
)
data
;
...
...
@@ -48,6 +50,7 @@
+
(
UIButton
*
)
buttonWithTitle
:(
NSString
*
)
title
Image
:(
UIImage
*
)
image
frame
:(
CGRect
)
frame
fontSize
:(
float
)
fontSize
fontColor
:(
UIColor
*
)
color
;
+
(
UIButton
*
)
buttonWithImage
:(
UIImage
*
)
image
frame
:(
CGRect
)
frame
;
+
(
NSString
*
)
getWeekFromDate
;
+
(
NSString
*
)
getWeekFromDateWithDate
:
(
NSDate
*
)
date
;
+
(
NSInteger
)
getWeeks
:(
NSInteger
)
year
;
+
(
NSString
*
)
weekdayStringFromDate
:(
NSDate
*
)
inputDate
;
+
(
NSString
*
)
countNumAndChangeformat
:(
NSString
*
)
num
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTCommon.m
View file @
d46885d2
...
...
@@ -192,7 +192,12 @@
NSString
*
dateString
=
[
formatter
stringFromDate
:
aDate
];
return
dateString
;
}
+
(
NSDate
*
)
dateFromStringWithFormat
:
(
NSString
*
)
aStr
format
:
(
NSString
*
)
format
{
NSDateFormatter
*
formatter
=
[[
NSDateFormatter
alloc
]
init
];
[
formatter
setDateFormat
:
format
];
NSDate
*
date
=
[
formatter
dateFromString
:
aStr
];
return
date
;
}
+
(
NSString
*
)
dictionaryToJson
:
(
id
)
dic
{
...
...
@@ -332,6 +337,24 @@
return
yearWeek
;
}
+
(
NSString
*
)
getWeekFromDateWithDate
:
(
NSDate
*
)
date
{
NSString
*
yearWeek
=
@""
;
NSCalendar
*
greCalendar
=
[[
NSCalendar
alloc
]
initWithCalendarIdentifier
:
NSGregorianCalendar
];
NSDateComponents
*
dateComponents
=
[
greCalendar
components
:
NSYearCalendarUnit
|
NSMonthCalendarUnit
|
NSDayCalendarUnit
|
NSHourCalendarUnit
|
NSMinuteCalendarUnit
|
NSSecondCalendarUnit
|
NSWeekCalendarUnit
|
NSWeekdayCalendarUnit
|
NSWeekOfMonthCalendarUnit
|
NSWeekOfYearCalendarUnit
fromDate
:
date
];
NSString
*
yearStr
=
[
IBTCommon
stringFromDateWithFormat
:
date
format
:
@"yyyy-MM-dd"
];
NSString
*
year
=
[
yearStr
substringToIndex
:
4
];
NSString
*
month
=
[
yearStr
substringWithRange
:
NSMakeRange
(
5
,
2
)];
if
(
dateComponents
.
weekOfYear
==
1
&&
[
month
isEqualToString
:
@"12"
])
{
yearWeek
=
[
NSString
stringWithFormat
:
@"%ld-%ld"
,
[
year
integerValue
]
+
1
,(
long
)
dateComponents
.
weekOfYear
];
}
else
{
yearWeek
=
[
NSString
stringWithFormat
:
@"%ld-%ld"
,
(
long
)[
year
integerValue
]
,(
long
)
dateComponents
.
weekOfYear
];
}
return
yearWeek
;
}
+
(
NSInteger
)
getWeeks
:
(
NSInteger
)
year
{
NSInteger
weeks
=
0
;
NSString
*
dateStr
=
[
NSString
stringWithFormat
:
@"%ld-12-31 00:00:00"
,(
long
)
year
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Controllers/ReportDetailViewController.m
View file @
d46885d2
...
...
@@ -141,17 +141,27 @@
}
#pragma mark- 请求webView
-
(
void
)
loadWebViewFromServer
{
ICRUserUtil
*
userU
=
[
ICRUserUtil
sharedInstance
];
#warning 测试
NSString
*
passgerUrl
=
[
NSString
stringWithFormat
:
@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@"
,
HTTP_REST_
API_BASE_URL
,
PassengerWebUrl
,[
ICRUserUtil
sharedInstance
].
orgId
,
self
.
dayType
,
self
.
scopeTy
pe
,
self
.
compass
.
orgUuid
];
NSString
*
passgerUrl
=
[
NSString
stringWithFormat
:
@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@"
,
HTTP_REST_
REPORT_BASE_URL
,
PassengerWebUrl
,
userU
.
orgId
,
self
.
dayType
,
self
.
compass
.
dataSco
pe
,
self
.
compass
.
orgUuid
];
[
self
.
rpassgerWebView
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
passgerUrl
]]];
NSString
*
priceUrl
=
[
NSString
stringWithFormat
:
@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@"
,
HTTP_REST_API_BASE_URL
,
PriceWebUrl
,[
ICRUserUtil
sharedInstance
].
orgId
,
self
.
dayType
,
self
.
scopeType
,
self
.
compass
.
orgUuid
];
// NSString *priceUrl = [NSString stringWithFormat:@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@",HTTP_REST_REPORT_BASE_URL,PriceWebUrl,[ICRUserUtil sharedInstance].orgId,self.dayType,self.scopeType,self.compass.orgUuid];
// [self.rpriceWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:priceUrl]]];
//
// NSString *grossUrl = [NSString stringWithFormat:@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@",HTTP_REST_REPORT_BASE_URL,GrossWebUrl,[ICRUserUtil sharedInstance].orgId,self.dayType,self.scopeType,self.compass.orgUuid];
// [self.rgrossWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:grossUrl]]];
//
// NSString *saleUrl = [NSString stringWithFormat:@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@",HTTP_REST_REPORT_BASE_URL,SaleWebUrl,[ICRUserUtil sharedInstance].orgId,self.dayType,self.scopeType,self.compass.orgUuid];
// [self.rwebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:saleUrl]]];
NSString
*
priceUrl
=
[
NSString
stringWithFormat
:
@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@"
,
HTTP_REST_REPORT_BASE_URL
,
PriceWebUrl
,
userU
.
orgId
,
self
.
dayType
,
self
.
compass
.
dataScope
,
self
.
compass
.
orgUuid
];
[
self
.
rpriceWebView
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
priceUrl
]]];
NSString
*
grossUrl
=
[
NSString
stringWithFormat
:
@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@"
,
HTTP_REST_
API_BASE_URL
,
GrossWebUrl
,[
ICRUserUtil
sharedInstance
].
orgId
,
self
.
dayType
,
self
.
scopeTy
pe
,
self
.
compass
.
orgUuid
];
NSString
*
grossUrl
=
[
NSString
stringWithFormat
:
@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@"
,
HTTP_REST_
REPORT_BASE_URL
,
GrossWebUrl
,[
ICRUserUtil
sharedInstance
].
orgId
,
self
.
dayType
,
self
.
compass
.
dataSco
pe
,
self
.
compass
.
orgUuid
];
[
self
.
rgrossWebView
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
grossUrl
]]];
NSString
*
saleUrl
=
[
NSString
stringWithFormat
:
@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@"
,
HTTP_REST_
API_BASE_URL
,
SaleWebUrl
,[
ICRUserUtil
sharedInstance
].
orgId
,
self
.
dayType
,
self
.
scopeTy
pe
,
self
.
compass
.
orgUuid
];
NSString
*
saleUrl
=
[
NSString
stringWithFormat
:
@"%@/%@?enterprise=%@&dateScopeType=%@&dateScope=%@&orgUuid=%@"
,
HTTP_REST_
REPORT_BASE_URL
,
SaleWebUrl
,[
ICRUserUtil
sharedInstance
].
orgId
,
self
.
dayType
,
self
.
compass
.
dataSco
pe
,
self
.
compass
.
orgUuid
];
[
self
.
rwebView
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
saleUrl
]]];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Controllers/ReportViewController.m
View file @
d46885d2
...
...
@@ -44,7 +44,8 @@
@property
(
nonatomic
,
assign
)
NSInteger
storeCount
;
@property
(
nonatomic
,
strong
)
NSIndexPath
*
currentIndex
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
selectArr
;
@property
(
nonatomic
,
assign
)
BOOL
isSegOne
;
@end
...
...
@@ -67,7 +68,6 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
isSegOne
=
NO
;
//布局
#if 1
self
.
dataArr
=
[
NSMutableArray
array
];
...
...
@@ -122,13 +122,13 @@
};
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
NSString
*
strDate
;
if
(
self
.
scopeType
)
{
strDate
=
_scopeType
;
}
else
{
strDate
=
[[
NSDate
date
]
localYMDString
];
NSDate
*
date
;
if
(
!
_selectDay
)
{
self
.
selectDay
=
[[
NSDate
date
]
localYMDString
];
}
[[
ICRHTTPController
sharedController
]
getWeekbydayWithStringDate
:
strDate
success
:
succ
failure
:
fail
];
date
=
[
IBTCommon
dateFromStringWithFormat
:
_selectDay
format
:
@"yyyy-MM-dd"
];
[[
ICRHTTPController
sharedController
]
getWeekbydayWithStringDate
:[
date
localYMDString
]
success
:
succ
failure
:
fail
];
}
#pragma mark - 获取上部数据
...
...
@@ -352,30 +352,39 @@
#pragma mark - segViewDelegate
-
(
void
)
customSegOneClick
:
(
NSString
*
)
title
{
NSDate
*
date
;
if
(
!
_selectDay
)
{
self
.
selectDay
=
[[
NSDate
date
]
localYMDString
];
//
}
date
=
[
IBTCommon
dateFromStringWithFormat
:
_selectDay
format
:
@"yyyy-MM-dd"
];
// NSString *strDate = [_selectDay substringToIndex:_selectDay.length - 3];
//日周年切换
NSString
*
dayType
=
@""
;
if
([
title
isEqualToString
:
SaleWeek
])
{
dayType
=
@"week"
;
self
.
dayType
=
dayType
;
self
.
orgScope
=
nil
;
[
self
getWeekbydayFromServer
];
// self.scopeType = [IBTCommon getWeekFromDate]
;
return
;
}
if
([
title
isEqualToString
:
SaleDay
])
{
dayType
=
@"day"
;
self
.
scopeType
=
[
IBTCommon
stringFromDateWithFormat
:[
NSDate
date
]
format
:
@"yyyy-MM-dd"
];
self
.
scopeType
=
_selectDay
;
//
[IBTCommon stringFromDateWithFormat:[NSDate date] format:@"yyyy-MM-dd"];
// }else if ([title isEqualToString:SaleWeek]) {
// dayType = @"week";
// self.scopeType = [IBTCommon getWeekFromDate];
// self.scopeType = [IBTCommon getWeekFromDate
WithDate:date
];
}
else
if
([
title
isEqualToString
:
SaleMonth
])
{
dayType
=
@"month"
;
self
.
scopeType
=
[
IBTCommon
stringFromDateWithFormat
:[
NSDate
date
]
format
:
@"yyyy-MM"
];
// date = [IBTCommon dateFromStringWithFormat:strDate format:@"yyyy-MM" ];
self
.
scopeType
=
[
IBTCommon
stringFromDateWithFormat
:
date
format
:
@"yyyy-MM"
];
}
else
{
return
;
}
CLog
(
@"-------%@"
,
self
.
scopeType
);
self
.
dayType
=
dayType
;
self
.
orgScope
=
nil
;
self
.
isSegOne
=
YES
;
[
self
getDataFromServer
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Controllers/SearchReportViewController.m
View file @
d46885d2
...
...
@@ -205,6 +205,8 @@
com
.
orgUuid
=
orgs
.
uuid
;
com
.
orgName
=
orgs
.
name
;
com
.
orgCode
=
orgs
.
code
;
com
.
dataScope
=
[[
NSDate
date
]
localYMDString
];
com
.
dataScopeType
=
@"day"
;
rvc
.
compass
=
com
;
[
self
PushViewController
:
rvc
animated
:
YES
];
}
...
...
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