Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
total
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
张杰
total
Commits
f93cb58c
Commit
f93cb58c
authored
Jan 06, 2017
by
曹云霄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.oschina.net/gomore/total
parents
07b3db99
c5a1e535
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1762 additions
and
1497 deletions
+1762
-1497
BusinessViewController.m
total/GTOApp/Business/BusinessViewController.m
+2
-7
GTOBusinessViewController.m
total/GTOApp/Business/Patrol/GTOBusinessViewController.m
+1
-1
GTOPatrolPlanListViewController.m
.../GTOApp/Business/Patrol/GTOPatrolPlanListViewController.m
+670
-617
GTOPatrolPlan.h
total/GTOApp/Business/Patrol/Models/GTOPatrolPlan.h
+1
-0
GTOPatrolPlan.m
total/GTOApp/Business/Patrol/Models/GTOPatrolPlan.m
+28
-0
GTOCategoryItemView.m
total/GTOApp/Business/Patrol/Views/GTOCategoryItemView.m
+1
-1
GTOPatrolPlanCellContentView.m
...OApp/Business/Patrol/Views/GTOPatrolPlanCellContentView.m
+8
-10
GTOPatrolPlanResultTopItem.m
...GTOApp/Business/Patrol/Views/GTOPatrolPlanResultTopItem.m
+1
-1
GTOPioneeringListViewController.m
...App/Business/Pioneering/GTOPioneeringListViewController.m
+2
-1
GTOQResultViewController.m
.../Business/Pioneering/Questions/GTOQResultViewController.m
+1
-1
GTOPioneeringAddressInfoView.m
.../Business/Pioneering/Views/GTOPioneeringAddressInfoView.m
+1
-1
GTOPioneeringListCellContent.m
.../Business/Pioneering/Views/GTOPioneeringListCellContent.m
+1
-1
GTOLicenceNewViewController.m
total/GTOApp/Business/Repair/GTOLicenceNewViewController.m
+6
-0
GTOLiceneResultViewController.m
total/GTOApp/Business/Repair/GTOLiceneResultViewController.m
+5
-6
GTORepairDetailViewController.m
...App/Business/Repair/Views/GTORepairDetailViewController.m
+995
-843
Contents.json
total/Images.xcassets/AppIcon.appiconset/Contents.json
+10
-0
Contents.json
total/Images.xcassets/no_data.imageset/Contents.json
+22
-0
no_data@2x.png
total/Images.xcassets/no_data.imageset/no_data@2x.png
+0
-0
no_data@3x.png
total/Images.xcassets/no_data.imageset/no_data@3x.png
+0
-0
GTOAppMacro.h
total/Macro/GTOAppMacro.h
+1
-1
ICRHTTPController.h
total/Managers/HttpManager/ICRHTTPController.h
+1
-1
ICRHTTPController.m
total/Managers/HttpManager/ICRHTTPController.m
+5
-5
No files found.
total/GTOApp/Business/BusinessViewController.m
View file @
f93cb58c
...
...
@@ -124,7 +124,7 @@
@"function_repairSee_icon"
,
@"function_licenceSee_icon"
,
nil
];
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"拓
店
"
@"拓
站
"
,
@"HSE巡检"
,
nil
];
NSDictionary
*
dict
=
@{
@"image"
:
[
imageArray
objectAtIndex
:
i
],
@"title"
:
[
titleArray
objectAtIndex
:
i
]};
[
_datasArray
[
3
]
addObject
:
dict
];
...
...
@@ -409,12 +409,7 @@
//根据个人查看权和本人查看权的范围确定是否有菜单权限
-
(
BOOL
)
permissionWithMaxNumber
:
(
NSString
*
)
maxNumber
{
ICRUserUtil
*
userU
=
[
ICRUserUtil
sharedInstance
];
for
(
NSString
*
strNumber
in
userU
.
f_permissions
){
if
([
strNumber
isEqualToString
:
maxNumber
])
{
return
YES
;
}
}
return
NO
;
return
[
userU
.
f_permissions
containsObject
:
maxNumber
];
}
...
...
total/GTOApp/Business/Patrol/GTOBusinessViewController.m
View file @
f93cb58c
...
...
@@ -436,7 +436,7 @@ typedef NS_ENUM (NSUInteger, ICRFunctionID) {
[
self
PushViewController
:
pVC
animated
:
YES
];
}
break
;
case
kFunctionPioneering
:
//拓
店
case
kFunctionPioneering
:
//拓
站
{
GTOPioneeringListViewController
*
pioneeringVC
=
[[
GTOPioneeringListViewController
alloc
]
init
];
[
self
PushViewController
:
pioneeringVC
animated
:
YES
];
...
...
total/GTOApp/Business/Patrol/GTOPatrolPlanListViewController.m
View file @
f93cb58c
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Patrol/Models/GTOPatrolPlan.h
View file @
f93cb58c
...
...
@@ -34,6 +34,7 @@ typedef NS_ENUM(NSUInteger, GTOPatrolPlanStatus) {
@property
(
copy
,
nonatomic
)
NSString
*
category
;
// 巡店类别
@property
(
assign
,
nonatomic
)
BOOL
recordLocation
;
//是否记录调整位置
@property
(
assign
,
nonatomic
)
GTOPatrolPlanStatus
state
;
// 状态 应该是后台的状态吧?????
@property
(
strong
,
nonatomic
)
UIColor
*
stateColor
;
@property
(
copy
,
nonatomic
)
NSString
*
remark
;
//说明
@property
(
copy
,
nonatomic
)
NSArray
*
questions
;
//问题列表
@property
(
copy
,
nonatomic
)
NSArray
*
inspectors
;
//巡店员列表
...
...
total/GTOApp/Business/Patrol/Models/GTOPatrolPlan.m
View file @
f93cb58c
...
...
@@ -18,6 +18,34 @@
+
(
NSString
*
)
PrimaryKey
{
return
@"uuid"
;
}
-
(
UIColor
*
)
stateColor
{
if
(
!
_stateColor
)
{
switch
(
self
.
state
)
{
case
kPatrolPlanStatusCreated
:
{
_stateColor
=
GTO_RED_COLOR
;
break
;
}
case
kPatrolPlanStatusCommited
:
{
_stateColor
=
[
UIColor
redColor
];
break
;
}
case
kPatrolPlanStatusProcessing
:
{
_stateColor
=
GTO_BLUE_TINT_COLOR
;
break
;
}
case
kPatrolPlanStatusFinished
:
{
_stateColor
=
[
UIColor
blackColor
];
break
;
}
case
kPatrolPlanStatusCanceld
:
{
_stateColor
=
GTO_GRAY_TINT_COLOR
;
break
;
}
}
}
return
_stateColor
;
}
#pragma mark - setter
//- (void)setQuestions:(NSArray *)questions {
...
...
total/GTOApp/Business/Patrol/Views/GTOCategoryItemView.m
View file @
f93cb58c
...
...
@@ -114,7 +114,7 @@
}
else
if
([
category
isEqualToString
:
@"辅助区"
])
{
imgV
.
image
=
[
UIImage
imageNamed
:
@"assist_area"
];
}
else
{
imgV
.
image
=
[
UIImage
imageNamed
:
@"
public
_area"
];
imgV
.
image
=
[
UIImage
imageNamed
:
@"
addOil
_area"
];
}
}
-
(
void
)
p_processWithFinishCategorysNumber
:
(
NSInteger
)
finishNumber
...
...
total/GTOApp/Business/Patrol/Views/GTOPatrolPlanCellContentView.m
View file @
f93cb58c
...
...
@@ -120,25 +120,23 @@
_d_processLength
=
patrolPlan
.
processLength
;
self
.
m_planNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
patrolPlan
.
name
];
self
.
m_planTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"计划时间: %@ ~ %@"
,
patrolPlan
.
beginDate
,
patrolPlan
.
endDate
];
//[NSString stringWithFormat:@"最后修改时间:%@ ",patrolPlan.lastModify_time];//
NSString
*
begin
=
[
patrolPlan
.
beginDate
substringToIndex
:
11
];
NSString
*
end
=
[
patrolPlan
.
endDate
substringToIndex
:
11
];
self
.
m_planTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"计划时间: %@ ~ %@"
,
begin
,
end
];
//[NSString stringWithFormat:@"最后修改时间:%@ ",patrolPlan.lastModify_time];//
self
.
m_processLabel
.
text
=
[
NSString
stringWithFormat
:
@"巡检总进度: "
];
self
.
m_planStateLabel
.
text
=
@"状态: "
;
NSString
*
stateStr
=
[
NSString
stringWithFormat
:
@"%ld"
,
patrolPlan
.
state
];
self
.
m_planStateValueLabel
.
text
=
[
GTOCommonTools
patrolStateChineseWithEnglish
:
stateStr
];
if
(
patrolPlan
.
state
==
kPatrolPlanStatusProcessing
)
{
self
.
m_planStateValueLabel
.
textColor
=
GTO_RED_COLOR
;
}
else
{
self
.
m_planStateValueLabel
.
textColor
=
GTO_GRAY_TINT_COLOR
;
}
self
.
m_planStateValueLabel
.
textColor
=
patrolPlan
.
stateColor
;
self
.
d_processLength
=
patrolPlan
.
processLength
;
//finishStores * 1.0 / totalStores;
int
percent
=
patrolPlan
.
processLength
*
100
;
self
.
m_processValueLabel
.
text
=
[
NSString
stringWithFormat
:
@"%d%%"
,
percent
];
self
.
m_processValueLabel
.
textColor
=
patrolPlan
.
stateColor
;
if
(
patrolPlan
.
finishedStoreNumber
==
patrolPlan
.
totalStoreNumber
)
{
self
.
m_processValueLabel
.
text
=
[
NSString
stringWithFormat
:
@"%d%%"
,
percent
];
self
.
m_processValueLabel
.
textColor
=
GTO_GRAY_TINT_COLOR
;
self
.
m_processFractionLabel
.
textColor
=
GTO_GRAY_TINT_COLOR
;
}
else
{
self
.
m_processValueLabel
.
text
=
[
NSString
stringWithFormat
:
@"%d%%"
,
percent
];
self
.
m_processValueLabel
.
textColor
=
GTO_BLUE_TINT_COLOR
;
self
.
m_processFractionLabel
.
textColor
=
GTO_BLUE_TINT_COLOR
;
}
...
...
total/GTOApp/Business/Patrol/Views/GTOPatrolPlanResultTopItem.m
View file @
f93cb58c
...
...
@@ -128,7 +128,7 @@
-
(
void
)
updateWithPioneering
:
(
GTOPioneering
*
)
pioneering
arrayDictDisplayResults
:
(
NSArray
*
)
arrDisplayResults
{
self
.
m_planTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"拓
店
人员:%@"
,
pioneering
.
pioneer_name
];
self
.
m_planTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"拓
站
人员:%@"
,
pioneering
.
pioneer_name
];
self
.
m_startTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"开始时间:%@"
,
pioneering
.
beginDate
];
self
.
m_processLabel
.
text
=
[
NSString
stringWithFormat
:
@"拓站总进度:"
];
...
...
total/GTOApp/Business/Pioneering/GTOPioneeringListViewController.m
View file @
f93cb58c
...
...
@@ -99,7 +99,8 @@ static NSString *cellID = @"pioneeringListCell";
{
BOOL
createPermission
=
[
GTOCommonTools
hasPermissionWithPermissionId
:
500503
];
if
(
createPermission
)
{
UIBarButtonItem
*
rightBarBtn
=
[[
UIBarButtonItem
alloc
]
initWithBarButtonSystemItem
:
UIBarButtonSystemItemAdd
target
:
self
action
:
@selector
(
addPioneeringClicked
)];
UIBarButtonItem
*
rightBarBtn
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"新增"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
addPioneeringClicked
)];
// UIBarButtonItem *rightBarBtn = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addPioneeringClicked)];
self
.
navigationItem
.
rightBarButtonItem
=
rightBarBtn
;
}
...
...
total/GTOApp/Business/Pioneering/Questions/GTOQResultViewController.m
View file @
f93cb58c
...
...
@@ -108,7 +108,7 @@ UIAlertViewDelegate>
}
-
(
void
)
updateAnsewer
{
ICRDatabaseFetchBlock
fetchBlk
=
^
FMResultSet
*
(
FMDatabase
*
db
)
{
NSString
*
sql
=
[
NSString
stringWithFormat
:
@"SELECT * FROM %@ WHERE %@ = ? ORDER BY %@"
,
[
GTOAnswer
TableName
],
@"pioneeringUuid"
,
@"questionUuid"
];
NSString
*
sql
=
[
NSString
stringWithFormat
:
@"SELECT * FROM %@ WHERE %@ = ? ORDER BY %@"
,
[
GTOAnswer
TableName
],
@"pioneeringUuid"
,
@"questionUuid"
];
//答案的排序按照问题的uuid来,(此事的排序关系到结果页中答案的显示,按道理应该是根据答题的顺序,是不是后台给的问题应该排序?????)
NSLog
(
@"%@"
,
sql
);
return
[
db
executeQuery
:
sql
,
_d_pioneering
.
uuid
];
...
...
total/GTOApp/Business/Pioneering/Views/GTOPioneeringAddressInfoView.m
View file @
f93cb58c
...
...
@@ -2,7 +2,7 @@
//
// GTOPatrolPlanResultTopItem.m
// total
// 拓
店
任务列表的cell的内容
// 拓
站
任务列表的cell的内容
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
...
...
total/GTOApp/Business/Pioneering/Views/GTOPioneeringListCellContent.m
View file @
f93cb58c
...
...
@@ -2,7 +2,7 @@
//
// GTOPatrolPlanResultTopItem.m
// total
// 拓
店
任务列表的cell的内容
// 拓
站
任务列表的cell的内容
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
...
...
total/GTOApp/Business/Repair/GTOLicenceNewViewController.m
View file @
f93cb58c
...
...
@@ -178,6 +178,12 @@ typedef NS_ENUM(NSUInteger, bottomTag) {
if
(
!
self
.
d_licence
)
{
self
.
d_licence
.
riskGrade
=
item
.
value
;
}
if
([
item
.
value
isEqualToString
:
@"高"
])
{
self
.
valideTimeItem
.
value
=
@"8"
;
}
else
{
self
.
valideTimeItem
.
value
=
@"72"
;
}
[
self
.
valideTimeItem
reloadRowWithAnimation
:
UITableViewRowAnimationNone
];
[
item
reloadRowWithAnimation
:
UITableViewRowAnimationNone
];
// same as [weakSelf.tableView reloadRowsAtIndexPaths:@[item.indexPath] withRowAnimation:UITableViewRowAnimationNone];
}];
...
...
total/GTOApp/Business/Repair/GTOLiceneResultViewController.m
View file @
f93cb58c
...
...
@@ -122,23 +122,22 @@ static NSString *headerProblemItemID = @"headerItem";
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
NSMutableArray
*
muArrDisplayRs
=
[
NSMutableArray
array
];
for
(
int
count
=
0
;
count
<
_
d_licence
.
arrDisplayResults
.
count
;
count
++
)
{
for
(
int
count
=
0
;
count
<
strongSelf
.
d_licence
.
arrDisplayResults
.
count
;
count
++
)
{
GTODisplayResult
*
displayR
=
[
GTODisplayResult
DBObject
];
[
displayR
praseFromJsonDict
:
_
d_licence
.
arrDisplayResults
[
count
]];
[
displayR
praseFromJsonDict
:
strongSelf
.
d_licence
.
arrDisplayResults
[
count
]];
NSMutableArray
*
muArrAnswers
=
[
NSMutableArray
array
];
for
(
GTOAnswer
*
answer
in
fetchedObjects
)
{
if
([
answer
.
category
isEqualToString
:
displayR
.
category
])
// displayR.answerNumber++;
[
muArrAnswers
addObject
:[
answer
dictForCommit
]];
}
displayR
.
arrAnswers
=
muArrAnswers
;
[
muArrDisplayRs
addObject
:[
displayR
dictForCommit
]];
}
_
d_licence
.
arrDisplayResults
=
muArrDisplayRs
;
[
_
d_licence
saveToDBWithHandleData
:
nil
strongSelf
.
d_licence
.
arrDisplayResults
=
muArrDisplayRs
;
[
strongSelf
.
d_licence
saveToDBWithHandleData
:
nil
complete
:
^
{
[
_
c_tableView
reloadData
];
[
strongSelf
.
c_tableView
reloadData
];
}
fail
:
nil
];
...
...
total/GTOApp/Business/Repair/Views/GTORepairDetailViewController.m
View file @
f93cb58c
This diff is collapsed.
Click to expand it.
total/Images.xcassets/AppIcon.appiconset/Contents.json
View file @
f93cb58c
{
"images"
:
[
{
"idiom"
:
"iphone"
,
"size"
:
"20x20"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"20x20"
,
"scale"
:
"3x"
},
{
"size"
:
"29x29"
,
"idiom"
:
"iphone"
,
...
...
total/Images.xcassets/no_data.imageset/Contents.json
0 → 100644
View file @
f93cb58c
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"no_data@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"no_data@3x.png"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
total/Images.xcassets/no_data.imageset/no_data@2x.png
0 → 100644
View file @
f93cb58c
13 KB
total/Images.xcassets/no_data.imageset/no_data@3x.png
0 → 100644
View file @
f93cb58c
35 KB
total/Macro/GTOAppMacro.h
View file @
f93cb58c
...
...
@@ -81,7 +81,7 @@
////正式环境
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:7080/total-server/rest"
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
//
//测试环境
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
...
...
total/Managers/HttpManager/ICRHTTPController.h
View file @
f93cb58c
...
...
@@ -146,7 +146,7 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
-
(
void
)
doSavePioneeringResultWithData
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//6.2提交拓
店
(写)
//6.2提交拓
站
(写)
-
(
void
)
doSubmitPioneeringResultWithData
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
...
...
total/Managers/HttpManager/ICRHTTPController.m
View file @
f93cb58c
...
...
@@ -84,9 +84,9 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
kGTOHTTP_LicenceApprove
,
kGTOHTTP_LicenceAskForApprove
,
kGTOHTTP_LicenceGetLogs
,
//6.1 保存拓
店
(写)
//6.1 保存拓
站
(写)
kGTOHTTP_PioneeringSaveResult
,
//6.2 提交拓
店
(写)
//6.2 提交拓
站
(写)
kGTOHTTP_PioneeringSubmitResult
,
//6.3 获取拓站列表(读)
kGTOHTTP_PioneeringQuery
,
...
...
@@ -175,9 +175,9 @@ static NSString * const ICRHTTPInterface[] = {
[
kGTOHTTP_LicenceAskForApprove
]
=
@"licence/askforapprove"
,
[
kGTOHTTP_LicenceGetLogs
]
=
@"licence/get_logs"
,
//6.1 保存拓
店
(写)
//6.1 保存拓
站
(写)
[
kGTOHTTP_PioneeringSaveResult
]
=
@"pioneering/save"
,
//6.2 提交拓
店
(写)
//6.2 提交拓
站
(写)
[
kGTOHTTP_PioneeringSubmitResult
]
=
@"pioneering/submit"
,
//6.3 获取拓站列表(读)
[
kGTOHTTP_PioneeringQuery
]
=
@"pioneering/query"
,
...
...
@@ -1107,7 +1107,7 @@ acceptTypeJson:YES
failure
:
failure
];
}
//6.2提交拓
店
(写)
//6.2提交拓
站
(写)
-
(
void
)
doSubmitPioneeringResultWithData
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
...
...
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