Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zbgl
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
马超
zbgl
Commits
1ffb49b6
Commit
1ffb49b6
authored
Sep 21, 2022
by
马超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
值班管理
parent
c81eefd7
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
136 additions
and
8 deletions
+136
-8
web/jsp/zbgl/pbgl/getButtonRole.jsp
web/jsp/zbgl/pbgl/getButtonRole.jsp
+38
-0
web/jsp/zbgl/pbgl/list-t.jsp
web/jsp/zbgl/pbgl/list-t.jsp
+13
-1
web/jsp/zbgl/pbgl/viewUser-t.jsp
web/jsp/zbgl/pbgl/viewUser-t.jsp
+17
-0
web/jsp/zbgl/zbjj/list_ajax.jsp
web/jsp/zbgl/zbjj/list_ajax.jsp
+0
-1
web/jsp/zbglBgs/pbgl/getButtonRole.jsp
web/jsp/zbglBgs/pbgl/getButtonRole.jsp
+38
-0
web/jsp/zbglBgs/pbgl/list-t.jsp
web/jsp/zbglBgs/pbgl/list-t.jsp
+13
-6
web/jsp/zbglBgs/pbgl/viewUser-t.jsp
web/jsp/zbglBgs/pbgl/viewUser-t.jsp
+17
-0
No files found.
web/jsp/zbgl/pbgl/getButtonRole.jsp
0 → 100644
View file @
1ffb49b6
<%@ page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%>
<%@ page
import=
"java.sql.Connection"
%>
<%@ page
import=
"java.util.*"
%>
<%@ page
import=
"com.censoft.common.db.ConnectionFactory"
%>
<%@ page
import=
"com.censoft.common.base.Pub"
%>
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
String
add_user
=
pub
.
trimNull
((
String
)
session
.
getAttribute
(
"session_login_id"
));
if
(
""
.
equals
(
add_user
))
{
System
.
out
.
println
(
"当前没有用户信息"
);
}
String
result
=
"error"
;
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
String
sql
=
"select t1.login_id from t_book_user_role_rel t1 join t_book_role t2 "
+
"
on
t1
.
role_id
=
t2
.
id
where
t1
.
login_id
=?
and
t2
.
role_name
like
'%管理%'"
;
Vector
role_list
=
cf
.
doQuery
(
conn
,
sql
,
null
,
new
Object
[]{
add_user
});
if
(
role_list
!=
null
&&
role_list
.
size
()
>
0
){
result
=
"success"
;
}
out
.
println
(
result
);
}
catch
(
Exception
e
)
{
conn
.
rollback
();
System
.
out
.
println
(
"有异常"
+
e
);
return
;
}
finally
{
if
(
conn
!=
null
)
{
conn
.
setAutoCommit
(
true
);
try
{
conn
.
close
();
}
catch
(
Exception
e
)
{
}
}
}
%>
web/jsp/zbgl/pbgl/list-t.jsp
View file @
1ffb49b6
<%@ page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%>
<%@ page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%>
<link
rel=
"stylesheet"
href=
"
<%=
request
.
getContextPath
()
%>
/css/rili.css"
>
<link
rel=
"stylesheet"
href=
"
<%=
request
.
getContextPath
()
%>
/css/rili.css"
>
<div
style=
"margin-top: 10px;text-align: right;margin-right: 40px;"
>
<div
style=
"margin-top: 10px;text-align: right;margin-right: 40px;"
>
<a
class=
"btn btn-primary radius"
onclick=
"zdPb();"
>
<a
class=
"btn btn-primary radius"
onclick=
"zdPb();"
id=
"zdpb"
style=
"display: none"
>
自动排班
自动排班
</a>
</a>
<a
class=
"btn btn-primary radius"
onclick=
"viewUserWeek();"
>
<a
class=
"btn btn-primary radius"
onclick=
"viewUserWeek();"
>
...
@@ -228,4 +228,16 @@
...
@@ -228,4 +228,16 @@
});
});
//layer.full(abc);
//layer.full(abc);
}
}
getButtonRole
();
function
getButtonRole
()
{
$
.
ajax
({
type
:
"
post
"
,
url
:
"
getButtonRole.jsp
"
,
success
:
function
(
msg
)
{
if
(
msg
.
indexOf
(
"
success
"
)
>=
0
)
{
$
(
"
#zdpb
"
).
css
(
"
display
"
,
""
);
}
}
});
}
</script>
</script>
web/jsp/zbgl/pbgl/viewUser-t.jsp
View file @
1ffb49b6
...
@@ -41,12 +41,27 @@
...
@@ -41,12 +41,27 @@
}
}
return
tel
;
return
tel
;
}
}
public
static
boolean
getButtonRole
(
ConnectionFactory
cf
,
Connection
conn
,
String
user_name
)
{
boolean
b
=
false
;
String
sql
=
"select t1.login_id from t_book_user_role_rel t1 join t_book_role t2 "
+
"
on
t1
.
role_id
=
t2
.
id
where
t1
.
login_id
=?
and
t2
.
role_name
like
'%管理%'"
;
Vector
userList
=
cf
.
doQuery
(
conn
,
sql
,
null
,
new
Object
[]{
user_name
});
if
(
userList
!=
null
&&
userList
.
size
()
>
0
){
b
=
true
;
}
return
b
;
}
%>
%>
<%
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
Connection
conn
=
null
;
Vector
v_list
=
null
;
Vector
v_list
=
null
;
String
add_user
=
pub
.
trimNull
((
String
)
session
.
getAttribute
(
"session_login_id"
));
if
(
""
.
equals
(
add_user
))
{
System
.
out
.
println
(
"当前没有用户信息"
);
}
String
year
=
pub
.
trimNull
(
request
.
getParameter
(
"year"
));
String
year
=
pub
.
trimNull
(
request
.
getParameter
(
"year"
));
String
month
=
pub
.
trimNull
(
request
.
getParameter
(
"month"
));
String
month
=
pub
.
trimNull
(
request
.
getParameter
(
"month"
));
String
day
=
pub
.
trimNull
(
request
.
getParameter
(
"day"
));
String
day
=
pub
.
trimNull
(
request
.
getParameter
(
"day"
));
...
@@ -117,9 +132,11 @@
...
@@ -117,9 +132,11 @@
<%
<%
}
}
%>
%>
<%
if
(
getButtonRole
(
cf
,
conn
,
add_user
)){
%>
<span
onclick=
"editUser('
<%=
year
+
month
+
day
%>
','
<%=
zb_type
%>
');"
style=
"text-align:center;position:absolute; right:0; bottom:0;"
>
<span
onclick=
"editUser('
<%=
year
+
month
+
day
%>
','
<%=
zb_type
%>
');"
style=
"text-align:center;position:absolute; right:0; bottom:0;"
>
<img
src=
"../../images/edit.png"
width=
"20"
height=
"15"
/>
<img
src=
"../../images/edit.png"
width=
"20"
height=
"15"
/>
</span>
</span>
<%
}
%>
</div>
</div>
<%
<%
}
}
...
...
web/jsp/zbgl/zbjj/list_ajax.jsp
View file @
1ffb49b6
...
@@ -57,7 +57,6 @@
...
@@ -57,7 +57,6 @@
Hashtable ht_row = (Hashtable) v_list.get(0);
Hashtable ht_row = (Hashtable) v_list.get(0);
String rowCnt = pub.trimNull((String) ht_row.get("
ROWCOUNT
"
));
String rowCnt = pub.trimNull((String) ht_row.get("
ROWCOUNT
"
));
String telSegmentUrl="
./
list_add
-
t
.
jsp
"
;
%>
%>
<form
method=
"post"
id=
"form1"
name=
"form1"
action=
"export_query.jsp"
>
<form
method=
"post"
id=
"form1"
name=
"form1"
action=
"export_query.jsp"
>
<div
class=
"table-list"
style=
"height:450px;"
>
<div
class=
"table-list"
style=
"height:450px;"
>
...
...
web/jsp/zbglBgs/pbgl/getButtonRole.jsp
0 → 100644
View file @
1ffb49b6
<%@ page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%>
<%@ page
import=
"java.sql.Connection"
%>
<%@ page
import=
"java.util.*"
%>
<%@ page
import=
"com.censoft.common.db.ConnectionFactory"
%>
<%@ page
import=
"com.censoft.common.base.Pub"
%>
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
String
add_user
=
pub
.
trimNull
((
String
)
session
.
getAttribute
(
"session_login_id"
));
if
(
""
.
equals
(
add_user
))
{
System
.
out
.
println
(
"当前没有用户信息"
);
}
String
result
=
"error"
;
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
String
sql
=
"select t1.login_id from t_book_user_role_rel t1 join t_book_role t2 "
+
"
on
t1
.
role_id
=
t2
.
id
where
t1
.
login_id
=?
and
t2
.
role_name
like
'%管理%'"
;
Vector
role_list
=
cf
.
doQuery
(
conn
,
sql
,
null
,
new
Object
[]{
add_user
});
if
(
role_list
!=
null
&&
role_list
.
size
()
>
0
){
result
=
"success"
;
}
out
.
println
(
result
);
}
catch
(
Exception
e
)
{
conn
.
rollback
();
System
.
out
.
println
(
"有异常"
+
e
);
return
;
}
finally
{
if
(
conn
!=
null
)
{
conn
.
setAutoCommit
(
true
);
try
{
conn
.
close
();
}
catch
(
Exception
e
)
{
}
}
}
%>
web/jsp/zbglBgs/pbgl/list-t.jsp
View file @
1ffb49b6
...
@@ -9,13 +9,8 @@
...
@@ -9,13 +9,8 @@
height
:
600px
;
height
:
600px
;
}
}
</style>
</style>
<div
style=
"margin-top: 10px;display: none;"
>
<a
class=
"btn btn-primary radius"
onclick=
"operList();"
>
导出
</a>
</div>
<div
style=
"margin-top: 10px;text-align: right;margin-right: 40px;"
>
<div
style=
"margin-top: 10px;text-align: right;margin-right: 40px;"
>
<a
class=
"btn btn-primary radius"
onclick=
"zdPb();"
>
<a
class=
"btn btn-primary radius"
onclick=
"zdPb();"
id=
"zdpb"
style=
"display: none"
>
自动排班
自动排班
</a>
</a>
<a
class=
"btn btn-primary radius"
onclick=
"viewUserWeek();"
>
<a
class=
"btn btn-primary radius"
onclick=
"viewUserWeek();"
>
...
@@ -209,4 +204,16 @@
...
@@ -209,4 +204,16 @@
});
});
//layer.full(abc);
//layer.full(abc);
}
}
getButtonRole
();
function
getButtonRole
()
{
$
.
ajax
({
type
:
"
post
"
,
url
:
"
getButtonRole.jsp
"
,
success
:
function
(
msg
)
{
if
(
msg
.
indexOf
(
"
success
"
)
>=
0
)
{
$
(
"
#zdpb
"
).
css
(
"
display
"
,
""
);
}
}
});
}
</script>
</script>
web/jsp/zbglBgs/pbgl/viewUser-t.jsp
View file @
1ffb49b6
...
@@ -41,12 +41,27 @@
...
@@ -41,12 +41,27 @@
}
}
return
tel
;
return
tel
;
}
}
public
static
boolean
getButtonRole
(
ConnectionFactory
cf
,
Connection
conn
,
String
user_name
)
{
boolean
b
=
false
;
String
sql
=
"select t1.login_id from t_book_user_role_rel t1 join t_book_role t2 "
+
"
on
t1
.
role_id
=
t2
.
id
where
t1
.
login_id
=?
and
t2
.
role_name
like
'%管理%'"
;
Vector
userList
=
cf
.
doQuery
(
conn
,
sql
,
null
,
new
Object
[]{
user_name
});
if
(
userList
!=
null
&&
userList
.
size
()
>
0
){
b
=
true
;
}
return
b
;
}
%>
%>
<%
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
Connection
conn
=
null
;
Vector
v_list
=
null
;
Vector
v_list
=
null
;
String
add_user
=
pub
.
trimNull
((
String
)
session
.
getAttribute
(
"session_login_id"
));
if
(
""
.
equals
(
add_user
))
{
System
.
out
.
println
(
"当前没有用户信息"
);
}
String
year
=
pub
.
trimNull
(
request
.
getParameter
(
"year"
));
String
year
=
pub
.
trimNull
(
request
.
getParameter
(
"year"
));
String
month
=
pub
.
trimNull
(
request
.
getParameter
(
"month"
));
String
month
=
pub
.
trimNull
(
request
.
getParameter
(
"month"
));
String
day
=
pub
.
trimNull
(
request
.
getParameter
(
"day"
));
String
day
=
pub
.
trimNull
(
request
.
getParameter
(
"day"
));
...
@@ -117,9 +132,11 @@
...
@@ -117,9 +132,11 @@
<%
<%
}
}
%>
%>
<%
if
(
getButtonRole
(
cf
,
conn
,
add_user
)){
%>
<span
onclick=
"editUser('
<%=
year
+
month
+
day
%>
','
<%=
zb_type
%>
');"
style=
"text-align:center;position:absolute; right:0; bottom:0;"
>
<span
onclick=
"editUser('
<%=
year
+
month
+
day
%>
','
<%=
zb_type
%>
');"
style=
"text-align:center;position:absolute; right:0; bottom:0;"
>
<img
src=
"../../images/edit.png"
width=
"20"
height=
"15"
/>
<img
src=
"../../images/edit.png"
width=
"20"
height=
"15"
/>
</span>
</span>
<%
}
%>
</div>
</div>
<%
<%
}
}
...
...
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