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
75daa685
Commit
75daa685
authored
Sep 16, 2022
by
马超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
值班管理
parent
bcf13e3c
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
925 additions
and
68 deletions
+925
-68
web/jsp/zbgl/pbgl/edit-t.jsp
web/jsp/zbgl/pbgl/edit-t.jsp
+2
-2
web/jsp/zbglBgs/holiday/action.jsp
web/jsp/zbglBgs/holiday/action.jsp
+149
-0
web/jsp/zbglBgs/holiday/editUser-t.jsp
web/jsp/zbglBgs/holiday/editUser-t.jsp
+132
-0
web/jsp/zbglBgs/holiday/list-t.jsp
web/jsp/zbglBgs/holiday/list-t.jsp
+75
-0
web/jsp/zbglBgs/holiday/right_user_list.jsp
web/jsp/zbglBgs/holiday/right_user_list.jsp
+134
-0
web/jsp/zbglBgs/pbgl/action.jsp
web/jsp/zbglBgs/pbgl/action.jsp
+79
-41
web/jsp/zbglBgs/pbgl/action0916.jsp
web/jsp/zbglBgs/pbgl/action0916.jsp
+308
-0
web/jsp/zbglBgs/pbgl/edit-t.jsp
web/jsp/zbglBgs/pbgl/edit-t.jsp
+2
-10
web/jsp/zbglBgs/pbgl/list_ajax.jsp
web/jsp/zbglBgs/pbgl/list_ajax.jsp
+3
-0
web/jsp/zbglBgs/pbmx/action.jsp
web/jsp/zbglBgs/pbmx/action.jsp
+3
-3
web/jsp/zbglBgs/usergl/action.jsp
web/jsp/zbglBgs/usergl/action.jsp
+3
-0
web/jsp/zbglBgs/usergl/right_user_list.jsp
web/jsp/zbglBgs/usergl/right_user_list.jsp
+4
-2
web/jsp/zbglBgs/zbjs/action.jsp
web/jsp/zbglBgs/zbjs/action.jsp
+10
-0
web/jsp/zbglBgs/zbjs/right_list.jsp
web/jsp/zbglBgs/zbjs/right_list.jsp
+17
-9
web/jsp/zbglBgs/zbjs/selectUser-t.jsp
web/jsp/zbglBgs/zbjs/selectUser-t.jsp
+4
-1
No files found.
web/jsp/zbgl/pbgl/edit-t.jsp
View file @
75daa685
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<span
class=
"c-red"
>
*
</span>
开始时间
:
<span
class=
"c-red"
>
*
</span>
开始时间
:
</label>
</label>
<div
class=
"formControls col-xs-8 col-sm-10"
>
<div
class=
"formControls col-xs-8 col-sm-10"
>
<input
type=
"text"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"b_time"
id=
"b_time"
value=
""
>
<input
type=
"text"
autocomplete=
"off"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"b_time"
id=
"b_time"
value=
""
>
</div>
</div>
</div>
</div>
<div
class=
"row cl"
>
<div
class=
"row cl"
>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<span
class=
"c-red"
>
*
</span>
结束时间
:
<span
class=
"c-red"
>
*
</span>
结束时间
:
</label>
</label>
<div
class=
"formControls col-xs-8 col-sm-10"
>
<div
class=
"formControls col-xs-8 col-sm-10"
>
<input
type=
"text"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"e_time"
id=
"e_time"
value=
""
>
<input
type=
"text"
autocomplete=
"off"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"e_time"
id=
"e_time"
value=
""
>
</div>
</div>
</div>
</div>
<div
class=
"row cl"
>
<div
class=
"row cl"
>
...
...
web/jsp/zbglBgs/holiday/action.jsp
0 → 100644
View file @
75daa685
<%@ 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"
%>
<%@ page
import=
"com.censoft.db.Logger"
%>
<%@ page
import=
"java.text.DateFormat"
%>
<%@ page
import=
"java.text.SimpleDateFormat"
%>
<%@ page
import=
"java.text.ParseException"
%>
<%!
public
static
List
<
String
>
getDays
(
String
startTime
,
String
endTime
)
{
// 返回的日期集合
List
<
String
>
days
=
new
ArrayList
<
String
>
();
DateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
try
{
Date
start
=
dateFormat
.
parse
(
startTime
);
Date
end
=
dateFormat
.
parse
(
endTime
);
Calendar
tempStart
=
Calendar
.
getInstance
();
tempStart
.
setTime
(
start
);
Calendar
tempEnd
=
Calendar
.
getInstance
();
tempEnd
.
setTime
(
end
);
tempEnd
.
add
(
Calendar
.
DATE
,
+
1
);
// 日期加1(包含结束)
while
(
tempStart
.
before
(
tempEnd
))
{
days
.
add
(
dateFormat
.
format
(
tempStart
.
getTime
()));
tempStart
.
add
(
Calendar
.
DAY_OF_YEAR
,
1
);
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
days
;
}
public
static
String
getBeforeDay
(
String
specifiedDay
)
{
Calendar
c
=
Calendar
.
getInstance
();
Date
date
=
null
;
try
{
date
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
parse
(
specifiedDay
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
c
.
setTime
(
date
);
int
day
=
c
.
get
(
Calendar
.
DATE
);
c
.
set
(
Calendar
.
DATE
,
day
-
1
);
String
dayBefore
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
c
.
getTime
());
return
dayBefore
;
}
%>
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
Enumeration
enu
=
request
.
getParameterNames
();
String
action
=
pub
.
trimNull
(
request
.
getParameter
(
"action"
));
String
action_msg
=
""
;
String
id
=
pub
.
trimNull
(
request
.
getParameter
(
"id"
));
String
h_id
=
pub
.
trimNull
(
request
.
getParameter
(
"h_id"
));
if
(
""
.
equals
(
h_id
)){
h_id
=
UUID
.
randomUUID
().
toString
().
trim
().
replaceAll
(
"-"
,
""
);
}
String
name
=
pub
.
trimNull
(
request
.
getParameter
(
"name"
));
String
b_time
=
pub
.
trimNull
(
request
.
getParameter
(
"b_time"
));
String
e_time
=
pub
.
trimNull
(
request
.
getParameter
(
"e_time"
));
List
<
String
>
list
=
null
;
if
(!
""
.
equals
(
b_time
)&&!
""
.
equals
(
e_time
)){
list
=
getDays
(
b_time
,
e_time
);
//获取两个时间点之间的日期
}
String
add_user
=
pub
.
trimNull
((
String
)
session
.
getAttribute
(
"session_login_id"
));
if
(
""
.
equals
(
add_user
))
{
System
.
out
.
println
(
"当前没有用户信息"
);
}
String
add_time
=
pub
.
getCurrentServerTime
();
StringBuffer
sql_add
=
new
StringBuffer
(
"insert into zb_holiday (h_id,name,day,add_user,add_time) values (?,?,?,?,?)"
);
StringBuffer
sql_update
=
new
StringBuffer
(
"update zb_holiday set update_user=?,update_time=?,name=?,day=? where id=?"
);
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
conn
.
setAutoCommit
(
false
);
boolean
is_oper
=
false
;
if
(
"add"
.
equals
(
action
)){
action_msg
=
"新增"
;
if
(
list
!=
null
){
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
is_oper
=
cf
.
executeUpdate
(
conn
,
sql_add
.
toString
(),
new
Object
[]{
h_id
,
name
,
list
.
get
(
i
),
add_user
,
add_time
});
if
(!
is_oper
)
{
conn
.
rollback
();
System
.
out
.
println
(
"新增节假日表出错了"
+
cf
.
getMsg
());
return
;
}
}
}
}
else
if
(
"delete"
.
equals
(
action
)){
action_msg
=
"删除"
;
is_oper
=
cf
.
executeUpdate
(
conn
,
"delete from zb_holiday where h_id=?"
,
new
Object
[]{
id
});
if
(!
is_oper
)
{
conn
.
rollback
();
System
.
out
.
println
(
"删除节假日表出错了"
+
cf
.
getMsg
());
return
;
}
}
else
{
action_msg
=
"修改"
;
is_oper
=
cf
.
executeUpdate
(
conn
,
"delete from zb_holiday where h_id=?"
,
new
Object
[]{
id
});
if
(!
is_oper
)
{
conn
.
rollback
();
System
.
out
.
println
(
"删除节假日表出错了"
+
cf
.
getMsg
());
return
;
}
if
(
list
!=
null
){
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
is_oper
=
cf
.
executeUpdate
(
conn
,
sql_add
.
toString
(),
new
Object
[]{
h_id
,
name
,
list
.
get
(
i
),
add_user
,
add_time
});
if
(!
is_oper
)
{
conn
.
rollback
();
System
.
out
.
println
(
"新增节假日表出错了"
+
cf
.
getMsg
());
return
;
}
}
}
}
if
(!
is_oper
)
{
conn
.
rollback
();
System
.
out
.
println
(
"操作出错了"
+
cf
.
getMsg
());
return
;
}
Logger
.
log
(
conn
,
"节假日管理"
,
action_msg
,
add_user
,
""
,
request
);
conn
.
commit
();
if
(!
is_oper
)
{
conn
.
rollback
();
out
.
println
(
cf
.
getMsg
());
}
else
{
out
.
println
(
"success,"
+
id
);
}
}
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/holiday/editUser-t.jsp
0 → 100644
View file @
75daa685
<%@ page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%>
<%@ page
import=
"com.censoft.common.base.Pub"
%>
<%@ page
import=
"com.censoft.common.db.ConnectionFactory"
%>
<%@ page
import=
"java.sql.Connection"
%>
<%@ page
import=
"java.util.Hashtable"
%>
<%@ page
import=
"java.util.Vector"
%>
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
Vector
v_list
=
null
;
Vector
v_roles
=
null
;
String
action
=
pub
.
trimNull
(
request
.
getParameter
(
"action"
));
String
id
=
pub
.
trimNull
(
request
.
getParameter
(
"id"
));
Hashtable
ht
=
new
Hashtable
();
StringBuffer
sql
=
new
StringBuffer
();
String
add_user
=
pub
.
trimNull
((
String
)
session
.
getAttribute
(
"session_login_id"
));
if
(
""
.
equals
(
add_user
))
{
System
.
out
.
println
(
"当前没有用户信息"
);
}
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
if
(
"update"
.
equals
(
action
)){
sql
.
append
(
"select h_id,name,min(day) as b_time,max(day) as e_time from zb_holiday where h_id=?"
);
v_list
=
cf
.
doQuery
(
conn
,
sql
.
toString
(),
null
,
new
Object
[]{
id
});
}
if
(
v_list
!=
null
&&
v_list
.
size
()
>
0
)
{
ht
=
(
Hashtable
)
v_list
.
get
(
0
);
}
}
catch
(
Exception
e
)
{
out
.
println
(
"查询用户信息异常"
+
e
);
return
;
}
finally
{
if
(
conn
!=
null
)
{
try
{
conn
.
close
();
}
catch
(
Exception
e
)
{
}
}
}
%>
<style>
.input-three
{
width
:
22%
}
.input-two
{
width
:
32%
}
.col-sm-2
{
width
:
34%
;
}
.col-sm-3
{
width
:
34%
;
}
.input-text
{
}
.btn-red
{
background-color
:
red
;
border
:
red
}
.btn-green
{
background-color
:
green
;
border
:
green
}
</style>
<div
class=
""
>
<form
class=
"form form-horizontal"
id=
"form-admin-add"
>
<input
type=
"hidden"
value=
"
<%=
action
%>
"
name=
"action"
id=
"action"
>
<input
type=
"hidden"
value=
"
<%=
id
%>
"
name=
"id"
id=
"id"
>
<div
class=
"cl pd-5 bk-gray divOverflow"
style=
"overflow:hidden;margin-bottom: 20px;"
>
<div
class=
"row cl"
>
<label
class=
"form-label col-xs-4 col-sm-2"
>
假日名称:
</label>
<div
class=
"formControls col-xs-8 col-sm-3"
>
<input
type=
"text"
name=
"name"
id=
"name"
value=
"
<%=
pub
.
trimNull
((
String
)
ht
.
get
(
"name"
))
%>
"
class=
"input-text "
>
</div>
</div>
<div
class=
"row cl"
>
<label
class=
"form-label col-xs-4 col-sm-2"
>
<span
class=
"c-red"
>
*
</span>
开始时间
:
</label>
<div
class=
"formControls col-xs-8 col-sm-4"
>
<input
type=
"text"
autocomplete=
"off"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"b_time"
id=
"b_time"
value=
"
<%=
pub
.
trimNull
((
String
)
ht
.
get
(
"b_time"
))
%>
"
>
</div>
</div>
<div
class=
"row cl"
>
<label
class=
"form-label col-xs-4 col-sm-2"
>
<span
class=
"c-red"
>
*
</span>
结束时间
:
</label>
<div
class=
"formControls col-xs-8 col-sm-4"
>
<input
type=
"text"
autocomplete=
"off"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"e_time"
id=
"e_time"
value=
"
<%=
pub
.
trimNull
((
String
)
ht
.
get
(
"e_time"
))
%>
"
>
</div>
</div>
</div>
</form>
</div>
<div
class=
"cl mb-10 bk-gray "
style=
"height: 50px;"
>
<div
class=
"col-sm-3 pd-10"
style=
"width:100%;text-align: center;"
>
<input
class=
"btn btn-primary radius btn-green"
type=
"button"
onclick=
"javascript:saveForm();"
value=
" 保存 "
>
</div>
</div>
<script
src=
"
<%=
request
.
getContextPath
()
%>
/js/Convert_Pinyin.js"
></script>
<script>
function
viewDeptOrUserInfo
(
title
,
url
,
w
,
h
)
{
location
.
href
=
url
;
}
function
saveForm
()
{
if
(
$
(
"
#user_name
"
).
val
()
==
''
){
layer
.
alert
(
"
用户名称不能为空
"
,{
icon
:
5
,
title
:
"
提示
"
});
return
false
;
}
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
./action.jsp
"
,
data
:
$
(
'
#form-admin-add
'
).
serialize
(),
success
:
function
(
msg
)
{
if
(
msg
.
indexOf
(
"
success
"
)
>=
0
)
{
var
user_id
=
msg
.
substring
(
msg
.
indexOf
(
"
,
"
)
+
1
,
msg
.
length
);
layer
.
msg
(
'
操作成功!
'
,
{
icon
:
1
,
time
:
1000
},
function
()
{
parent
.
searchModel
();
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
parent
.
layer
.
close
(
index
);
});
}
else
{
layer
.
msg
(
'
操作失败
'
,
{
icon
:
5
,
time
:
2000
//2秒关闭(如果不配置,默认是3秒)
},
function
()
{
});
}
}
});
}
</script>
\ No newline at end of file
web/jsp/zbglBgs/holiday/list-t.jsp
0 → 100644
View file @
75daa685
<%@ 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
();
%>
<link
rel=
"stylesheet"
href=
"
<%=
request
.
getContextPath
()
%>
/css/pagination.css"
>
<script
type=
"text/javascript"
src=
"
<%=
request
.
getContextPath
()
%>
/js/jquery.pagination.js"
></script>
<link
rel=
"stylesheet"
href=
"
<%=
request
.
getContextPath
()
%>
/js/zTree/v3/css/zTreeStyle/zTreeStyle.css"
type=
"text/css"
>
<nav
class=
"breadcrumb"
style=
"background-color: #fff;"
>
<div
style=
"width:200px;margin: 0 auto;"
><i
class=
"Hui-iconfont"
>

</i>
节假日列表
</div>
<a
class=
"btn btn-success radius r"
style=
"line-height:1.6em;margin-top:3px"
href=
"javascript:void(0);"
onclick=
"window.location.reload();"
title=
"刷新"
><i
class=
"Hui-iconfont"
>

</i></a></nav>
<div
class=
"page-container"
>
<div
>
<div
class=
"search-form"
style=
"padding-top: 0px;"
>
<form
action=
"right_user_list.jsp"
method=
"post"
id=
"data_form_search"
name=
"data_form_search"
>
<input
type=
"hidden"
name=
"page_number"
id=
"page_number"
value=
"1"
/>
<input
type=
"hidden"
name=
"page_size"
id=
"page_size"
value=
"10"
/>
</form>
<div
id=
"datalist"
>
</div>
</div>
</div>
</div>
<div
style=
"position: absolute;z-index: 999;width:1000px;height:600px;left:300px;display:none;"
id=
"groupUser"
>
</div>
<script
type=
"text/javascript"
>
searchModel
();
function
searchModel
()
{
$
.
ajax
({
type
:
"
post
"
,
url
:
"
right_user_list.jsp
"
,
data
:
$
(
'
#data_form_search
'
).
serialize
(),
success
:
function
(
msg
)
{
$
(
"
#datalist
"
).
html
(
msg
);
}
});
}
$
(
document
).
keyup
(
function
(
event
)
{
if
(
event
.
keyCode
==
13
)
{
searchModel
();
}
});
function
chongzhi
()
{
$
(
"
#page_size
"
).
val
(
"
10
"
);
data_form_search
.
reset
();
searchModel
();
}
</script>
<script
type=
"text/javascript"
>
function
addUser
()
{
var
url
=
'
./editUser-t.jsp?action=add
'
;
viewDeptOrUserInfo
(
'
人员信息
'
,
url
,
'
1000
'
,
'
500
'
);
}
function
viewDeptOrUserInfo
(
title
,
url
,
w
,
h
)
{
var
abc
=
layer
.
open
({
title
:
title
,
type
:
2
,
content
:
url
,
area
:
[
w
+
'
px
'
,
h
+
'
px
'
],
maxmin
:
true
});
//layer.full(abc);
}
</script>
\ No newline at end of file
web/jsp/zbglBgs/holiday/right_user_list.jsp
0 → 100644
View file @
75daa685
<%@ 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"
%>
<%!
public
static
String
getDays
(
ConnectionFactory
cf
,
Connection
conn
,
String
h_id
){
Vector
list
=
cf
.
doQuery
(
conn
,
"select id,day from zb_holiday where h_id=? order by id asc"
,
null
,
new
Object
[]{
h_id
});
String
day_list
=
""
;
if
(
list
!=
null
&&
list
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
Hashtable
ht
=
(
Hashtable
)
list
.
get
(
i
);
String
day
=
(
String
)
ht
.
get
(
"day"
);
day_list
=
day_list
+
day
+
"
</
br
>"
;
}
}
return
day_list
;
}
%>
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
Vector
v_list
=
null
;
String
login_id
=
(
String
)
session
.
getAttribute
(
"session_login_id"
);
if
(
""
.
equals
(
login_id
))
{
System
.
out
.
println
(
"当前没有用户信息"
);
}
String
page_number
=
pub
.
trimNull
(
request
.
getParameter
(
"page_number"
));
if
(
""
.
equals
(
page_number
))
page_number
=
"1"
;
String
page_size
=
pub
.
trimNull
(
request
.
getParameter
(
"page_size"
));
if
(
""
.
equals
(
page_size
))
page_size
=
"10"
;
StringBuffer
sql
=
new
StringBuffer
();
List
list
=
new
ArrayList
();
sql
.
append
(
"select h_id,name from zb_holiday group by name,h_id order by id asc "
);
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
v_list
=
cf
.
doPageQueryWithCount
(
conn
,
sql
.
toString
(),
page_number
,
page_size
,
null
,
list
.
toArray
());
if
(
v_list
==
null
)
{
out
.
println
(
"查询用户出错"
);
return
;
}
Hashtable
ht_row
=
(
Hashtable
)
v_list
.
get
(
0
);
String
rowCnt
=
pub
.
trimNull
((
String
)
ht_row
.
get
(
"ROWCOUNT"
));
String
pageCnt
=
pub
.
trimNull
((
String
)
ht_row
.
get
(
"PAGECOUNT"
));
%>
<div
>
<a
class=
"btn btn-primary "
onclick=
"addUser();"
>
新建
</a>
</div>
<table
class=
"table table-border table-bordered table-hover table-bg table-sort"
>
<thead>
<tr
class=
"text-c"
>
<th
width=
"30"
>
序号
</th>
<th
width=
"100"
>
假日名称
</th>
<th
width=
"120"
>
日期
</th>
<th
width=
"140"
>
操作
</th>
</tr>
</thead>
<tbody>
<%
if
(
v_list
!=
null
&&
v_list
.
size
()
>
0
)
{
for
(
int
i
=
1
;
i
<
v_list
.
size
();
i
++)
{
Hashtable
ht
=
(
Hashtable
)
v_list
.
get
(
i
);
String
h_id
=
pub
.
trimNull
((
String
)
ht
.
get
(
"h_id"
));
String
name
=
pub
.
trimNull
((
String
)
ht
.
get
(
"name"
));
String
getDay
=
getDays
(
cf
,
conn
,
h_id
);
String
day
=
pub
.
trimNull
((
String
)
ht
.
get
(
"day"
));
String
edit_url
=
"./editUser-t.jsp?action=update&id="
+
h_id
;
%>
<tr
<%
if
(
i
%
2
==
0
){
%>
id=
"tr_doub"
<%
}
else
{
%>
id=
"tr_single"
<%
}
%>
class=
"text-c"
>
<td><%=
i
%>
</td>
<td><%=
name
%>
</td>
<td><%=
getDay
%>
</td>
<td>
<a
onclick=
"viewDeptOrUserInfo('假日信息','
<%=
edit_url
%>
','1000','500');"
style=
"padding:4px 0px;font-size:12px;"
>
编辑
</a>
<a
onclick=
"deleteUser('
<%=
h_id
%>
');"
style=
"padding:4px 0px;font-size:12px;"
>
删除
</a>
</td>
</tr>
<%
}
}
%>
</tbody>
</table>
<jsp:include
page=
"/common/page_ajax.jsp"
>
<jsp:param
name=
"page_number"
value=
"<%=page_number%>"
/>
<jsp:param
name=
"rowCnt"
value=
"<%=rowCnt%>"
/>
<jsp:param
name=
"page_size"
value=
"<%=page_size%>"
/>
</jsp:include>
<script
type=
"text/javascript"
>
function
deleteUser
(
id
){
layer
.
confirm
(
'
确认要删除吗?
'
,
function
(
index
)
{
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
./action.jsp?id=
"
+
id
+
"
&action=delete
"
,
success
:
function
(
msg
)
{
if
(
msg
.
indexOf
(
"
success
"
)
>=
0
)
{
layer
.
msg
(
'
操作成功!
'
,
{
icon
:
1
,
time
:
1000
},
function
()
{
searchModel
();
});
}
else
{
layer
.
msg
(
'
操作失败
'
,
{
icon
:
5
,
time
:
2000
//2秒关闭(如果不配置,默认是3秒)
},
function
()
{
// console.log("********************8")
});
}
}
});
})
}
</script>
<%
}
catch
(
Exception
e
)
{
out
.
println
(
"查询用户信息异常"
+
e
);
return
;
}
finally
{
if
(
conn
!=
null
)
{
try
{
conn
.
close
();
}
catch
(
Exception
e
)
{
}
}
}
%>
\ No newline at end of file
web/jsp/zbglBgs/pbgl/action.jsp
View file @
75daa685
...
@@ -45,7 +45,6 @@
...
@@ -45,7 +45,6 @@
}
}
}
}
sql
.
append
(
") "
);
sql
.
append
(
") "
);
System
.
out
.
println
(
"=="
+
sql
.
toString
()+
zb_type
);
Vector
userList
=
cf
.
doQuery
(
conn
,
sql
.
toString
(),
null
,
list
.
toArray
());
Vector
userList
=
cf
.
doQuery
(
conn
,
sql
.
toString
(),
null
,
list
.
toArray
());
if
(
userList
!=
null
&&
userList
.
size
()
>
0
){
if
(
userList
!=
null
&&
userList
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
userList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
userList
.
size
();
i
++)
{
...
@@ -121,6 +120,60 @@
...
@@ -121,6 +120,60 @@
}
}
return
getUserOrder
(
cf
,
conn
,
zb_user
);
return
getUserOrder
(
cf
,
conn
,
zb_user
);
}
}
public
static
boolean
getHoliday
(
ConnectionFactory
cf
,
Connection
conn
,
String
date
)
{
boolean
b
=
false
;
Vector
userList
=
cf
.
doQuery
(
conn
,
"select id from zb_holiday where day=? "
,
null
,
new
Object
[]{
date
});
if
(
userList
!=
null
&&
userList
.
size
()
>
0
)
{
b
=
true
;
}
return
b
;
}
public
static
int
getManyHDay
(
ConnectionFactory
cf
,
Connection
conn
,
List
<
String
>
list
)
{
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
"select id from zb_holiday where day in("
);
if
(
list
!=
null
&&
list
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
if
(
i
==
list
.
size
()-
1
){
sql
.
append
(
"'"
+
list
.
get
(
i
)+
"'"
);
}
else
{
sql
.
append
(
"'"
+
list
.
get
(
i
)
+
"',"
);
}
}
}
sql
.
append
(
")"
);
Vector
userList
=
cf
.
doQuery
(
conn
,
sql
.
toString
(),
null
,
new
Object
[]{});
if
(
userList
==
null
){
return
0
;
}
else
{
return
userList
.
size
();
}
}
public
static
List
<
String
>
getManyHDay1
(
ConnectionFactory
cf
,
Connection
conn
,
List
<
String
>
list
)
{
List
<
String
>
new_list
=
list
;
String
h_days
=
""
;
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
"select day from zb_holiday "
);
Vector
userList
=
cf
.
doQuery
(
conn
,
sql
.
toString
(),
null
,
new
Object
[]{});
if
(
userList
!=
null
&&
userList
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
userList
.
size
();
i
++){
Hashtable
ht
=
(
Hashtable
)
userList
.
get
(
i
);
h_days
=
h_days
+(
String
)
ht
.
get
(
"day"
)+
","
;
}
}
if
(
new_list
!=
null
&&
new_list
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
new_list
.
size
();
i
++){
if
(
h_days
.
indexOf
(
new_list
.
get
(
i
))
>
=
0
){
new_list
.
remove
(
i
);
}
}
}
return
new_list
;
}
%>
%>
<%
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
ConnectionFactory
cf
=
new
ConnectionFactory
();
...
@@ -163,6 +216,8 @@
...
@@ -163,6 +216,8 @@
StringBuffer
sql_add
=
new
StringBuffer
(
"insert into zb_zdpb_bgs (b_time,e_time,mx_id,add_time,add_user) values (?,?,?,?,?)"
);
StringBuffer
sql_add
=
new
StringBuffer
(
"insert into zb_zdpb_bgs (b_time,e_time,mx_id,add_time,add_user) values (?,?,?,?,?)"
);
try
{
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
//int totalDays=getManyHDay(cf,conn,list);
//selectDay=selectDay-totalDays;
List
list_add
=
new
ArrayList
();
List
list_add
=
new
ArrayList
();
list_add
.
add
(
b_time
);
list_add
.
add
(
b_time
);
list_add
.
add
(
e_time
);
list_add
.
add
(
e_time
);
...
@@ -182,59 +237,42 @@
...
@@ -182,59 +237,42 @@
int
index
=
0
;
int
index
=
0
;
StringBuffer
sql1
=
new
StringBuffer
(
"insert into zb_user_gl_bgs (year,zb_type,zb_user,order_num,add_user,add_time) values (?,?,?,?,?,?)"
);
StringBuffer
sql1
=
new
StringBuffer
(
"insert into zb_user_gl_bgs (year,zb_type,zb_user,order_num,add_user,add_time) values (?,?,?,?,?,?)"
);
Vector
zb_type_list
=
cf
.
doQuery
(
conn
,
"select * from zb_type_bgs where mx_id=? order by order_num asc"
,
null
,
new
Object
[]{
mxId
});
Vector
zb_type_list
=
cf
.
doQuery
(
conn
,
"select * from zb_type_bgs where mx_id=? order by order_num asc"
,
null
,
new
Object
[]{
mxId
});
if
(
selectDay
/
mxDay
>
0
){
//所选天数比模型天数多
for
(
int
a
=
0
;
a
<
selectDay
/
mxDay
;
a
++){
//按照模型天数轮回
if
(
zb_type_list
!=
null
&&
zb_type_list
.
size
()
>
0
)
{
if
(
zb_type_list
!=
null
&&
zb_type_list
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
zb_type_list
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
zb_type_list
.
size
();
i
++)
{
Hashtable
ht
=
(
Hashtable
)
zb_type_list
.
get
(
i
);
Hashtable
ht
=
(
Hashtable
)
zb_type_list
.
get
(
i
);
String
ren_num
=
pub
.
trimNull
((
String
)
ht
.
get
(
"ren_num"
));
String
ren_num
=
pub
.
trimNull
((
String
)
ht
.
get
(
"ren_num"
));
String
zb_type
=
pub
.
trimNull
((
String
)
ht
.
get
(
"zb_type"
));
String
zb_type
=
pub
.
trimNull
((
String
)
ht
.
get
(
"zb_type"
));
int
startIndex
=
0
;
int
startIndex
=
0
;
for
(
int
n
=
0
;
n
<
mxDay
;
n
++){
//按照模型天数,从开始日期逐天插入
int
n_id
=
0
;
index
=
a
*
mxDay
+
n
;
//日期坐标索引
for
(
int
n
=
0
;
n
<
list
.
size
();
n
++){
//按照模型天数,从开始日期逐天插入
if
(
n
==
mxDay
){
if
(
n
%
mxDay
==
n_id
){
index
=
0
;
startIndex
=
0
;
}
//根据开始人员序号索引和人数进行插入
userNames
=
getUserNames
(
cf
,
conn
,
startIndex
,
Integer
.
parseInt
(
ren_num
),
zb_type
);
if
(!
""
.
equals
(
userNames
)){
startIndex
=
Integer
.
parseInt
(
userNames
.
substring
(
0
,
userNames
.
indexOf
(
"_"
)));
userNames
=
userNames
.
substring
(
userNames
.
indexOf
(
"_"
)+
1
,
userNames
.
length
()-
1
);
}
}
boolean
is_holiday
=
getHoliday
(
cf
,
conn
,
list
.
get
(
n
));
if
(
is_holiday
){
is_oper
=
cf
.
executeUpdate
(
conn
,
sql1
.
toString
()
is_oper
=
cf
.
executeUpdate
(
conn
,
sql1
.
toString
()
,
new
Object
[]{
list
.
get
(
index
),
zb_type
,
userNames
,
index
+
1
,
add_user
,
add_time
});
,
new
Object
[]{
list
.
get
(
n
),
zb_type
,
""
,
n
+
1
,
add_user
,
add_time
});
if
(!
is_oper
)
{
if
(!
is_oper
)
{
System
.
out
.
println
(
"新增zb_user_gl表出错了"
+
cf
.
getMsg
());
System
.
out
.
println
(
"新增zb_user_gl表出错了"
+
cf
.
getMsg
());
conn
.
rollback
();
conn
.
rollback
();
return
;
return
;
}
}
n_id
++;
continue
;
}
}
}
//根据开始人员序号索引和人数进行插入
}
}
}
//剩余天数
if
(
selectDay
%
mxDay
>
0
)
{
for
(
int
i
=
0
;
i
<
zb_type_list
.
size
();
i
++)
{
Hashtable
ht
=
(
Hashtable
)
zb_type_list
.
get
(
i
);
String
ren_num
=
pub
.
trimNull
((
String
)
ht
.
get
(
"ren_num"
));
String
zb_type
=
pub
.
trimNull
((
String
)
ht
.
get
(
"zb_type"
));
index
=
selectDay
-(
selectDay
%
mxDay
);
int
startIndex
=
0
;
for
(
int
n
=
0
;
n
<
selectDay
%
mxDay
;
n
++){
userNames
=
getUserNames
(
cf
,
conn
,
startIndex
,
Integer
.
parseInt
(
ren_num
),
zb_type
);
userNames
=
getUserNames
(
cf
,
conn
,
startIndex
,
Integer
.
parseInt
(
ren_num
),
zb_type
);
if
(!
""
.
equals
(
userNames
)){
if
(!
""
.
equals
(
userNames
)){
startIndex
=
Integer
.
parseInt
(
userNames
.
substring
(
0
,
userNames
.
indexOf
(
"_"
)));
startIndex
=
Integer
.
parseInt
(
userNames
.
substring
(
0
,
userNames
.
indexOf
(
"_"
)));
userNames
=
userNames
.
substring
(
userNames
.
indexOf
(
"_"
)+
1
,
userNames
.
length
()-
1
);
userNames
=
userNames
.
substring
(
userNames
.
indexOf
(
"_"
)+
1
,
userNames
.
length
()-
1
);
}
}
is_oper
=
cf
.
executeUpdate
(
conn
,
sql1
.
toString
()
is_oper
=
cf
.
executeUpdate
(
conn
,
sql1
.
toString
()
,
new
Object
[]{
list
.
get
(
index
),
zb_type
,
userNames
,
index
+
1
,
add_user
,
add_time
});
,
new
Object
[]{
list
.
get
(
n
),
zb_type
,
userNames
,
n
+
1
,
add_user
,
add_time
});
if
(!
is_oper
)
{
if
(!
is_oper
)
{
System
.
out
.
println
(
"新增zb_user_gl
_bgs
表出错了"
+
cf
.
getMsg
());
System
.
out
.
println
(
"新增zb_user_gl表出错了"
+
cf
.
getMsg
());
conn
.
rollback
();
conn
.
rollback
();
return
;
return
;
}
}
index
++;
}
}
}
}
}
}
...
@@ -242,14 +280,14 @@
...
@@ -242,14 +280,14 @@
is_oper
=
cf
.
executeUpdate
(
conn
,
"delete from zb_zdpb_bgs where b_time=? and e_time=?"
is_oper
=
cf
.
executeUpdate
(
conn
,
"delete from zb_zdpb_bgs where b_time=? and e_time=?"
,
new
Object
[]{
b_time
,
e_time
});
,
new
Object
[]{
b_time
,
e_time
});
if
(!
is_oper
)
{
if
(!
is_oper
)
{
System
.
out
.
println
(
"删除zb_zdpb表出错了"
+
cf
.
getMsg
());
System
.
out
.
println
(
"删除zb_zdpb
_bgs
表出错了"
+
cf
.
getMsg
());
conn
.
rollback
();
conn
.
rollback
();
return
;
return
;
}
}
is_oper
=
cf
.
executeUpdate
(
conn
,
"
delete
from
zb_user_gl_bgs
where
year
>
=?
and
year
<=?
"
is_oper
=
cf
.
executeUpdate
(
conn
,
"
delete
from
zb_user_gl_bgs
where
year
>
=?
and
year
<=?
"
, new Object[]{b_time,e_time});
, new Object[]{b_time,e_time});
if (!is_oper) {
if (!is_oper) {
System.out.println("
删除
zb_user_gl
表出错了
" + cf.getMsg());
System.out.println("
删除
zb_user_gl
_bgs
表出错了
" + cf.getMsg());
conn.rollback();
conn.rollback();
return;
return;
}
}
...
...
web/jsp/zbglBgs/pbgl/action0916.jsp
0 → 100644
View file @
75daa685
This diff is collapsed.
Click to expand it.
web/jsp/zbglBgs/pbgl/edit-t.jsp
View file @
75daa685
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<span
class=
"c-red"
>
*
</span>
开始时间
:
<span
class=
"c-red"
>
*
</span>
开始时间
:
</label>
</label>
<div
class=
"formControls col-xs-8 col-sm-10"
>
<div
class=
"formControls col-xs-8 col-sm-10"
>
<input
type=
"text"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"b_time"
id=
"b_time"
value=
""
>
<input
type=
"text"
autocomplete=
"off"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"b_time"
id=
"b_time"
value=
""
>
</div>
</div>
</div>
</div>
<div
class=
"row cl"
>
<div
class=
"row cl"
>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<span
class=
"c-red"
>
*
</span>
结束时间
:
<span
class=
"c-red"
>
*
</span>
结束时间
:
</label>
</label>
<div
class=
"formControls col-xs-8 col-sm-10"
>
<div
class=
"formControls col-xs-8 col-sm-10"
>
<input
type=
"text"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"e_time"
id=
"e_time"
value=
""
>
<input
type=
"text"
autocomplete=
"off"
class=
"input-text Wdate"
onclick=
"WdatePicker({dateFmt:'yyyy-MM-dd'})"
name=
"e_time"
id=
"e_time"
value=
""
>
</div>
</div>
</div>
</div>
...
@@ -43,14 +43,6 @@
...
@@ -43,14 +43,6 @@
</script>
</script>
</div>
</div>
</div>
</div>
<div
class=
"row cl"
>
<label
class=
"form-label col-xs-4 col-sm-2"
>
</label>
<div
class=
"formControls col-xs-8 col-sm-10"
style=
"color: red;"
>
所选时间应为模型天数的整数倍
</div>
</div>
</div>
</div>
</form>
</form>
</div>
</div>
...
...
web/jsp/zbglBgs/pbgl/list_ajax.jsp
View file @
75daa685
...
@@ -52,6 +52,9 @@
...
@@ -52,6 +52,9 @@
result
=
result
+
zb_user
+
"
</
br
>
";
result
=
result
+
zb_user
+
"
</
br
>
";
}
}
}
}
if("".equals(result)){
result="
无
";
}
out.println(result);
out.println(result);
} catch (Exception e) {
} catch (Exception e) {
out.println("
查询异常"
+
e
);
out.println("
查询异常"
+
e
);
...
...
web/jsp/zbglBgs/pbmx/action.jsp
View file @
75daa685
...
@@ -182,10 +182,10 @@
...
@@ -182,10 +182,10 @@
int
startIndex
=
0
;
int
startIndex
=
0
;
if
(!
""
.
equals
(
zb_type_id
)){
if
(!
""
.
equals
(
zb_type_id
)){
zb_type_ids
=
zb_type_id
+
","
+
zb_type_ids
;
zb_type_ids
=
zb_type_id
+
","
+
zb_type_ids
;
is_oper
=
cf
.
executeUpdate
(
conn
,
"update zb_type set zb_type=?,b_time=?,e_time=?,ren_num=?,update_time=?,update_user=? where id=?"
is_oper
=
cf
.
executeUpdate
(
conn
,
"update zb_type
_bgs
set zb_type=?,b_time=?,e_time=?,ren_num=?,update_time=?,update_user=? where id=?"
,
new
Object
[]{
zb_type
,
b_time
,
e_time
,
ren_num
,
add_time
,
add_user
,
zb_type_id
});
,
new
Object
[]{
zb_type
,
b_time
,
e_time
,
ren_num
,
add_time
,
add_user
,
zb_type_id
});
if
(!
is_oper
)
{
if
(!
is_oper
)
{
System
.
out
.
println
(
"修改zb_type表出错了"
+
cf
.
getMsg
());
System
.
out
.
println
(
"修改zb_type
_bgs
表出错了"
+
cf
.
getMsg
());
conn
.
rollback
();
conn
.
rollback
();
return
;
return
;
}
}
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
}
}
}
}
if
(!
is_oper
)
{
if
(!
is_oper
)
{
System
.
out
.
println
(
"修改zb_type表出错了"
+
cf
.
getMsg
());
System
.
out
.
println
(
"修改zb_type
_bgs
表出错了"
+
cf
.
getMsg
());
conn
.
rollback
();
conn
.
rollback
();
return
;
return
;
}
}
...
...
web/jsp/zbglBgs/usergl/action.jsp
View file @
75daa685
...
@@ -37,6 +37,9 @@
...
@@ -37,6 +37,9 @@
if
(
"order_num"
.
equals
(
name
)&&
""
.
equals
(
re_value
)){
if
(
"order_num"
.
equals
(
name
)&&
""
.
equals
(
re_value
)){
re_value
=
"1"
;
re_value
=
"1"
;
}
}
if
(
"role_num"
.
equals
(
name
)&&
""
.
equals
(
re_value
)){
re_value
=
"1"
;
}
sql_add
.
append
(
name
+
","
);
sql_add
.
append
(
name
+
","
);
list_add
.
add
(
re_value
);
list_add
.
add
(
re_value
);
sql_update
.
append
(
" "
+
name
+
"=?,"
);
sql_update
.
append
(
" "
+
name
+
"=?,"
);
...
...
web/jsp/zbglBgs/usergl/right_user_list.jsp
View file @
75daa685
...
@@ -29,12 +29,14 @@
...
@@ -29,12 +29,14 @@
if
(
""
.
equals
(
page_size
))
page_size
=
"10"
;
if
(
""
.
equals
(
page_size
))
page_size
=
"10"
;
StringBuffer
sql
=
new
StringBuffer
();
StringBuffer
sql
=
new
StringBuffer
();
List
list
=
new
ArrayList
();
List
list
=
new
ArrayList
();
sql
.
append
(
"select * from zb_bgs_user order by order_num asc "
);
//sql.append("select * from zb_bgs_user order by order_num asc ");
sql
.
append
(
"select t2.id,t2.user_name,t2.tel,t2.gh,t2.order_num from zb_bgs_user t2 left join zb_role_user t1 on "
+
"t1.user_id=t2.id order by t1.role_id asc,t2.role_num asc "
);
try
{
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
v_list
=
cf
.
doPageQueryWithCount
(
conn
,
sql
.
toString
(),
page_number
,
page_size
,
null
,
list
.
toArray
());
v_list
=
cf
.
doPageQueryWithCount
(
conn
,
sql
.
toString
(),
page_number
,
page_size
,
null
,
list
.
toArray
());
if
(
v_list
==
null
)
{
if
(
v_list
==
null
)
{
out
.
println
(
"查询用户出错"
);
out
.
println
(
"查询用户出错"
+
cf
.
getMsg
()
);
return
;
return
;
}
}
...
...
web/jsp/zbglBgs/zbjs/action.jsp
View file @
75daa685
...
@@ -54,6 +54,8 @@
...
@@ -54,6 +54,8 @@
Connection
conn
=
null
;
Connection
conn
=
null
;
Enumeration
enu
=
request
.
getParameterNames
();
Enumeration
enu
=
request
.
getParameterNames
();
String
action
=
pub
.
trimNull
(
request
.
getParameter
(
"action"
));
String
action
=
pub
.
trimNull
(
request
.
getParameter
(
"action"
));
String
user_id
=
pub
.
trimNull
(
request
.
getParameter
(
"user_id"
));
String
role_num
=
pub
.
trimNull
(
request
.
getParameter
(
"role_num"
));
String
action_msg
=
""
;
String
action_msg
=
""
;
String
role_id
=
pub
.
trimNull
(
request
.
getParameter
(
"role_id"
));
String
role_id
=
pub
.
trimNull
(
request
.
getParameter
(
"role_id"
));
if
(
""
.
equals
(
role_id
)){
if
(
""
.
equals
(
role_id
)){
...
@@ -120,6 +122,14 @@
...
@@ -120,6 +122,14 @@
System
.
out
.
println
(
"新增zb_role_user表出错了"
+
cf
.
getMsg
());
System
.
out
.
println
(
"新增zb_role_user表出错了"
+
cf
.
getMsg
());
return
;
return
;
}
}
}
else
if
(
"optRoleNum"
.
equals
(
action
)){
action_msg
=
"设置角色内排序"
;
is_oper
=
cf
.
executeUpdate
(
conn
,
"update zb_bgs_user set role_num=? where id=?"
,
new
Object
[]{
role_num
,
user_id
});
if
(!
is_oper
)
{
conn
.
rollback
();
System
.
out
.
println
(
"修改zb_bgs_user表出错了"
+
cf
.
getMsg
());
return
;
}
}
else
{
}
else
{
action_msg
=
"修改"
;
action_msg
=
"修改"
;
is_oper
=
cf
.
executeUpdate
(
conn
,
"update zb_role set role_name=?,order_num=?,beizhu=? where id=?"
,
new
Object
[]{
role_name
,
order_num
,
beizhu
,
role_id
});
is_oper
=
cf
.
executeUpdate
(
conn
,
"update zb_role set role_name=?,order_num=?,beizhu=? where id=?"
,
new
Object
[]{
role_name
,
order_num
,
beizhu
,
role_id
});
...
...
web/jsp/zbglBgs/zbjs/right_list.jsp
View file @
75daa685
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
}
}
String
role_id
=
pub
.
trimNull
(
request
.
getParameter
(
"role_id"
));
String
role_id
=
pub
.
trimNull
(
request
.
getParameter
(
"role_id"
));
StringBuffer
sql
=
new
StringBuffer
();
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
"select t2.id,t2.user_name,t2.tel,t2.gh,t2.order_num from zb_role_user t1 join zb_bgs_user t2 on "
+
sql
.
append
(
"select t2.id,t2.user_name,t2.tel,t2.gh,t2.order_num
,t2.role_num
from zb_role_user t1 join zb_bgs_user t2 on "
+
"t1.user_id=t2.id where t1.role_id=? order by t2.order_num asc "
);
"t1.user_id=t2.id where t1.role_id=? order by t2.order_num asc "
);
try
{
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
...
@@ -36,10 +36,11 @@
...
@@ -36,10 +36,11 @@
<table
class=
"table table-border table-bordered table-hover table-bg table-sort"
>
<table
class=
"table table-border table-bordered table-hover table-bg table-sort"
>
<thead>
<thead>
<tr
class=
"text-c"
>
<tr
class=
"text-c"
>
<th
width=
"30"
>
序号
</th>
<th
width=
"100"
>
姓名
</th>
<th
width=
"100"
>
姓名
</th>
<th
width=
"50"
>
电话号码
</th>
<th
width=
"50"
>
电话号码
</th>
<th
width=
"120"
>
工号
</th>
<th
width=
"120"
>
工号
</th>
<th
width=
"120"
>
角色内排序
</th>
<th
width=
"50"
>
操作
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -47,20 +48,26 @@
...
@@ -47,20 +48,26 @@
if
(
v_list
!=
null
&&
v_list
.
size
()
>
0
)
{
if
(
v_list
!=
null
&&
v_list
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
v_list
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
v_list
.
size
();
i
++)
{
Hashtable
ht
=
(
Hashtable
)
v_list
.
get
(
i
);
Hashtable
ht
=
(
Hashtable
)
v_list
.
get
(
i
);
String
user_id
=
pub
.
trimNull
((
String
)
ht
.
get
(
"id"
));
String
user_name
=
pub
.
trimNull
((
String
)
ht
.
get
(
"user_name"
));
String
user_name
=
pub
.
trimNull
((
String
)
ht
.
get
(
"user_name"
));
String
tel
=
pub
.
trimNull
((
String
)
ht
.
get
(
"tel"
));
String
tel
=
pub
.
trimNull
((
String
)
ht
.
get
(
"tel"
));
String
gh
=
pub
.
trimNull
((
String
)
ht
.
get
(
"gh"
));
String
gh
=
pub
.
trimNull
((
String
)
ht
.
get
(
"gh"
));
String
order_num
=
pub
.
trimNull
((
String
)
ht
.
get
(
"order
_num"
));
String
role_num
=
pub
.
trimNull
((
String
)
ht
.
get
(
"role
_num"
));
%>
%>
<tr
<%
if
(
i
%
2
==
0
){
%>
id=
"tr_doub"
<%
}
else
{
%>
id=
"tr_single"
<%
}
%>
class=
"text-c"
>
<tr
<%
if
(
i
%
2
==
0
){
%>
id=
"tr_doub"
<%
}
else
{
%>
id=
"tr_single"
<%
}
%>
class=
"text-c"
>
<td><%=
i
+
1
%>
</td>
<td><%=
user_name
%>
<td><%=
user_name
%>
</td>
</td>
<td><%=
tel
%>
<td><%=
tel
%>
</td>
</td>
<td><%=
gh
%>
<td><%=
gh
%>
</td>
</td>
<td>
<input
type=
"text"
style=
"width:120px;"
class=
"input-text"
name=
"role_num_
<%=
i
+
1
%>
"
id=
"role_num_
<%=
i
+
1
%>
"
value=
"
<%=
role_num
%>
"
>
</td>
<td>
<a
onclick=
"optOrder('
<%=
user_id
%>
','
<%=
role_id
%>
','role_num_
<%=
i
+
1
%>
');"
style=
"padding:4px 0px;font-size:12px;"
>
设置排序
</a>
</td>
</tr>
</tr>
<%
<%
}
}
...
@@ -93,16 +100,17 @@
...
@@ -93,16 +100,17 @@
});
});
})
})
}
}
function
optOrder
(
opt
,
user_id
){
function
optOrder
(
user_id
,
role_id
,
inputId
){
var
roleNum
=
$
(
"
#
"
+
inputId
).
val
();
$
.
ajax
({
$
.
ajax
({
type
:
"
post
"
,
type
:
"
post
"
,
url
:
"
opt_order.jsp
"
,
url
:
"
action.jsp?action=optRoleNum&user_id=
"
+
user_id
+
"
&role_num=
"
+
roleNum
,
data
:{
"
user_id
"
:
user_id
,
"
opt
"
:
opt
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
indexOf
(
"
success
"
)
>=
0
)
{
if
(
data
.
indexOf
(
"
success
"
)
>=
0
)
{
layer
.
msg
(
'
操作成功!
'
,
{
icon
:
1
,
time
:
1000
},
layer
.
msg
(
'
操作成功!
'
,
{
icon
:
1
,
time
:
1000
},
function
()
{
function
()
{
searchModel
();
//searchModel();
parent
.
searchModel1
(
role_id
);
});
});
}
else
{
}
else
{
layer
.
msg
(
'
操作失败,
'
+
data
,
{
layer
.
msg
(
'
操作失败,
'
+
data
,
{
...
...
web/jsp/zbglBgs/zbjs/selectUser-t.jsp
View file @
75daa685
...
@@ -31,7 +31,10 @@
...
@@ -31,7 +31,10 @@
if
(
""
.
equals
(
page_size
))
page_size
=
"100"
;
if
(
""
.
equals
(
page_size
))
page_size
=
"100"
;
StringBuffer
sql
=
new
StringBuffer
();
StringBuffer
sql
=
new
StringBuffer
();
List
list
=
new
ArrayList
();
List
list
=
new
ArrayList
();
sql
.
append
(
"select * from zb_bgs_user order by id asc"
);
sql
.
append
(
"select * from zb_bgs_user where id not in( "
);
sql
.
append
(
"select user_id from zb_role_user where role_id!=?)"
);
sql
.
append
(
" order by id asc"
);
list
.
add
(
role_id
);
try
{
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
v_list
=
cf
.
doQuery
(
conn
,
sql
.
toString
(),
null
,
list
.
toArray
());
v_list
=
cf
.
doQuery
(
conn
,
sql
.
toString
(),
null
,
list
.
toArray
());
...
...
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