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
a3ae8261
Commit
a3ae8261
authored
Sep 17, 2022
by
马超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
值班
parent
c7b38356
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
51 deletions
+23
-51
web/jsp/zbglBgs/holiday/action.jsp
web/jsp/zbglBgs/holiday/action.jsp
+14
-0
web/jsp/zbglBgs/holiday/right_user_list.jsp
web/jsp/zbglBgs/holiday/right_user_list.jsp
+3
-3
web/jsp/zbglBgs/pbgl/action.jsp
web/jsp/zbglBgs/pbgl/action.jsp
+6
-48
No files found.
web/jsp/zbglBgs/holiday/action.jsp
View file @
a3ae8261
...
...
@@ -93,6 +93,13 @@
return
;
}
}
}
else
{
is_oper
=
cf
.
executeUpdate
(
conn
,
sql_add
.
toString
(),
new
Object
[]{
h_id
,
name
,
h_day
,
""
,
add_user
,
add_time
});
if
(!
is_oper
)
{
conn
.
rollback
();
System
.
out
.
println
(
"新增节假日表出错了"
+
cf
.
getMsg
());
return
;
}
}
}
else
if
(
"delete"
.
equals
(
action
)){
action_msg
=
"删除"
;
...
...
@@ -119,6 +126,13 @@
return
;
}
}
}
else
{
is_oper
=
cf
.
executeUpdate
(
conn
,
sql_add
.
toString
(),
new
Object
[]{
h_id
,
name
,
h_day
,
""
,
add_user
,
add_time
});
if
(!
is_oper
)
{
conn
.
rollback
();
System
.
out
.
println
(
"新增节假日表出错了"
+
cf
.
getMsg
());
return
;
}
}
}
if
(!
is_oper
)
{
...
...
web/jsp/zbglBgs/holiday/right_user_list.jsp
View file @
a3ae8261
...
...
@@ -32,7 +32,7 @@
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 h_day asc "
);
sql
.
append
(
"select h_id,name
,h_day
from zb_holiday group by name,h_id order by h_day asc "
);
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
v_list
=
cf
.
doPageQueryWithCount
(
conn
,
sql
.
toString
(),
page_number
,
page_size
,
null
,
list
.
toArray
());
...
...
@@ -66,7 +66,7 @@
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
day
=
pub
.
trimNull
((
String
)
ht
.
get
(
"
h_
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"
>
...
...
@@ -74,7 +74,7 @@
</td>
<td><%=
name
%>
</td>
<td><%=
getD
ay
%>
<td><%=
d
ay
%>
</td>
<td>
<a
onclick=
"viewDeptOrUserInfo('假日信息','
<%=
edit_url
%>
','1000','500');"
style=
"padding:4px 0px;font-size:12px;"
>
...
...
web/jsp/zbglBgs/pbgl/action.jsp
View file @
a3ae8261
...
...
@@ -129,51 +129,6 @@
}
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
();
...
...
@@ -245,9 +200,6 @@
int
startIndex
=
0
;
int
n_id
=
0
;
for
(
int
n
=
0
;
n
<
list
.
size
();
n
++){
//按照模型天数,从开始日期逐天插入
if
(
n
%
mxDay
==
n_id
){
startIndex
=
0
;
}
boolean
is_holiday
=
getHoliday
(
cf
,
conn
,
list
.
get
(
n
));
if
(
is_holiday
){
is_oper
=
cf
.
executeUpdate
(
conn
,
sql1
.
toString
()
...
...
@@ -260,6 +212,12 @@
n_id
++;
continue
;
}
if
(
n_id
>
=
mxDay
){
n_id
=
n_id
-
mxDay
;
}
if
(
n
%
mxDay
==
n_id
){
startIndex
=
0
;
}
//根据开始人员序号索引和人数进行插入
userNames
=
getUserNames
(
cf
,
conn
,
startIndex
,
Integer
.
parseInt
(
ren_num
),
zb_type
);
if
(!
""
.
equals
(
userNames
)){
...
...
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