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
520c7985
Commit
520c7985
authored
Sep 06, 2015
by
freecui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改重复的功能按钮
parent
a64cbdf8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
53 deletions
+97
-53
GXFFunctionDB.m
XFFruit/Controllers/DataBaseController/GXFFunctionDB.m
+97
-53
No files found.
XFFruit/Controllers/DataBaseController/GXFFunctionDB.m
View file @
520c7985
...
...
@@ -255,45 +255,6 @@
[
muArr
removeObject
:
displayFunction
];
hasSeeOption1
=
NO
;
}
continue
;
}
}
return
muArr
;
}
//把显示重复功能的去掉
-
(
NSArray
*
)
siftDuplicationDisplayFunctionsButton
{
NSMutableArray
*
allDisplayFunctionsArr
=
[
NSMutableArray
arrayWithArray
:[
self
displayFunctionsHasPermission
]];
NSMutableArray
*
muArr
=
[
NSMutableArray
array
];
NSArray
*
hasPermission
=
[
self
p_functionsIdPermission
];
BOOL
hasSeeOption1
=
NO
;
BOOL
hasSeeOption3
=
NO
;
BOOL
hasSeeOption4
=
NO
;
BOOL
hasSeeOption5
=
NO
;
BOOL
hasSeeOption6
=
NO
;
BOOL
hasSeeOption7
=
NO
;
for
(
int
count
=
0
;
count
<
hasPermission
.
count
;
count
++
)
{
FMResultSet
*
rs
=
[
_dataBase
executeQuery
:
@"SELECT * FROM displayFunction WHERE functionId = ?"
,
hasPermission
[
count
]
];
while
([
rs
next
])
{
GXFDisplayFunction
*
displayFunction
=
[
self
p_resultSetDisplayFunction
:
rs
];
[
muArr
addObject
:
displayFunction
];
//"行情反馈",
if
(
displayFunction
.
functionId
==
500102
&&
hasSeeOption1
==
NO
)
{
hasSeeOption1
=
YES
;
}
if
(
displayFunction
.
functionId
==
500103
&&
hasSeeOption1
==
YES
)
{
[
muArr
removeObject
:
displayFunction
];
hasSeeOption1
=
NO
;
}
//"采购通知"
if
(
displayFunction
.
functionId
==
500302
&&
hasSeeOption3
==
NO
)
{
hasSeeOption3
=
YES
;
...
...
@@ -311,18 +272,6 @@
[
muArr
removeObject
:
displayFunction
];
hasSeeOption4
=
YES
;
}
// if (displayFunction.functionId == 500403 && hasSeeOption4 == NO) {
// //[muArr removeObject:displayFunction];
// hasSeeOption4 = YES;
// }
// if (displayFunction.functionId == 500403 && hasSeeOption4 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption4 = YES;
// }
// if (displayFunction.functionId == 500404 && hasSeeOption4 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption4 = YES;
// }
//"发运单"
if
(
displayFunction
.
functionId
==
500502
&&
hasSeeOption5
==
NO
)
{
...
...
@@ -350,12 +299,107 @@
hasSeeOption7
=
NO
;
}
continue
;
}
}
return
muArr
;
}
////把显示重复功能的去掉
//- (NSArray *)siftDuplicationDisplayFunctionsButton {
// NSMutableArray *allDisplayFunctionsArr = [NSMutableArray arrayWithArray:[self displayFunctionsHasPermission]];
// NSMutableArray *muArr = [NSMutableArray array];
//
// NSArray *hasPermission = [self p_functionsIdPermission];
// BOOL hasSeeOption1 = NO;
//
// BOOL hasSeeOption3 = NO;
// BOOL hasSeeOption4 = NO;
// BOOL hasSeeOption5 = NO;
// BOOL hasSeeOption6 = NO;
// BOOL hasSeeOption7 = NO;
//
// for (int count = 0; count < hasPermission.count; count ++) {
// FMResultSet *rs = [_dataBase executeQuery: @"SELECT * FROM displayFunction WHERE functionId = ?",hasPermission[count] ];
// while ([rs next]) {
// GXFDisplayFunction *displayFunction = [self p_resultSetDisplayFunction:rs];
//
// [muArr addObject:displayFunction];
// //"行情反馈",
// if (displayFunction.functionId == 500102 && hasSeeOption1 == NO) {
// hasSeeOption1 = YES;
// }
// if (displayFunction.functionId == 500103 && hasSeeOption1 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption1 = NO;
// }
//
// //"采购通知"
// if (displayFunction.functionId == 500302 && hasSeeOption3 == NO) {
// hasSeeOption3 = YES;
// }
// if (displayFunction.functionId == 500303 && hasSeeOption3 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption3 = NO;
// }
//
// //采购单???? 有三个:"全部查看权"、"本人查看权"、 "供应商查看权"
// if (displayFunction.functionId == 500402 && hasSeeOption4 == NO) {
// hasSeeOption4 = YES;
// }
// if (displayFunction.functionId == 500403 && hasSeeOption4 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption4 = YES;
// }
//// if (displayFunction.functionId == 500403 && hasSeeOption4 == NO) {
//// //[muArr removeObject:displayFunction];
//// hasSeeOption4 = YES;
//// }
//// if (displayFunction.functionId == 500403 && hasSeeOption4 == YES) {
//// [muArr removeObject:displayFunction];
//// hasSeeOption4 = YES;
//// }
//// if (displayFunction.functionId == 500404 && hasSeeOption4 == YES) {
//// [muArr removeObject:displayFunction];
//// hasSeeOption4 = YES;
//// }
//
// //"发运单"
// if (displayFunction.functionId == 500502 && hasSeeOption5 == NO) {
// hasSeeOption5 = YES;
// }
// if (displayFunction.functionId == 500503 && hasSeeOption5 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption5 = NO;
// }
//
// //"转运单"
// if (displayFunction.functionId == 500602 && hasSeeOption6 == NO) {
// hasSeeOption6 = YES;
// }
// if (displayFunction.functionId == 500603 && hasSeeOption6 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption6 = NO;
// }
// //"加工单"
// if (displayFunction.functionId == 500702 && hasSeeOption7 == NO) {
// hasSeeOption7 = YES;
// }
// if (displayFunction.functionId == 500703 && hasSeeOption7 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption7 = NO;
// }
//
// }
// }
//
// return muArr;
//
//}
//默认配置显示功能 初始配置为
-
(
NSArray
*
)
defaultdisplayFunctions
{
NSMutableArray
*
arr
=
[
NSMutableArray
arrayWithArray
:[
self
displayFunctionsHasPermission
]];
...
...
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