Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xlgl
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
马超
xlgl
Commits
c9889c49
Commit
c9889c49
authored
May 21, 2021
by
马超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
线路资源
parent
c50e7d79
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
679 additions
and
0 deletions
+679
-0
web/jsp/line/basic_info/action.jsp
web/jsp/line/basic_info/action.jsp
+90
-0
web/jsp/line/basic_info/add-t.jsp
web/jsp/line/basic_info/add-t.jsp
+125
-0
web/jsp/line/basic_info/list-t.jsp
web/jsp/line/basic_info/list-t.jsp
+109
-0
web/jsp/line/basic_info/list_ajax.jsp
web/jsp/line/basic_info/list_ajax.jsp
+102
-0
web/jsp/line/basic_info_data/action.jsp
web/jsp/line/basic_info_data/action.jsp
+94
-0
web/jsp/line/xlzygl/action.jsp
web/jsp/line/xlzygl/action.jsp
+159
-0
No files found.
web/jsp/line/basic_info/action.jsp
0 → 100644
View file @
c9889c49
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2020/9/11
Time: 12:54
To change this template use File | Settings | File Templates.
--%>
<%@ 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=
"com.censoft.db.Logger"
%>
<%@ page
import=
"java.sql.Connection"
%>
<%@ page
import=
"com.censoft.db.DBUtil"
%>
<%@ page
import=
"java.sql.SQLException"
%>
<%@ page
import=
"java.util.*"
%>
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
Vector
v_list
;
String
action
=
pub
.
trimNull
(
request
.
getParameter
(
"action"
));
String
info_name
=
pub
.
trimNull
(
request
.
getParameter
(
"info_name"
));
String
describes
=
pub
.
trimNull
(
request
.
getParameter
(
"describes"
));
String
type
=
pub
.
trimNull
(
request
.
getParameter
(
"info_type"
));
String
delete_id
=
pub
.
trimNull
(
request
.
getParameter
(
"delete_id"
));
String
update_id
=
pub
.
trimNull
(
request
.
getParameter
(
"update_id"
));
String
id
=
DBUtil
.
getUUID
();
String
add_user
=
(
String
)
session
.
getAttribute
(
"session_login_id"
);
String
add_time
=
pub
.
getCurrentServerTime
();
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
conn
.
setAutoCommit
(
false
);
if
(
"add"
.
equals
(
action
))
{
boolean
is_up
=
cf
.
executeUpdate
(
conn
,
"insert into basic_info (id,info_name,describes,info_type,add_time,add_user) values (?,?,?,?,?,?)"
,
new
Object
[]{
id
,
info_name
,
describes
,
type
,
add_time
,
add_user
});
if
(!
is_up
)
{
out
.
println
(
"基础信息新增报错"
+
cf
.
getMsg
());
conn
.
rollback
();
return
;
}
Logger
.
log
(
conn
,
"基础信息"
,
"添加"
,
id
,
""
,
request
);
out
.
println
(
"success"
);
conn
.
commit
();
conn
.
setAutoCommit
(
true
);
return
;
}
if
(
"update"
.
equals
(
action
))
{
boolean
is_up
=
cf
.
executeUpdate
(
conn
,
"update basic_info set info_name=?,describes=?,info_type=?,update_time=?,update_user=? where id=? "
,
new
Object
[]{
info_name
,
describes
,
type
,
add_time
,
add_user
,
update_id
});
if
(!
is_up
)
{
out
.
println
(
"基础信息修改报错"
+
cf
.
getMsg
());
conn
.
rollback
();
return
;
}
Logger
.
log
(
conn
,
"基础信息"
,
"修改"
,
id
,
""
,
request
);
out
.
println
(
"success"
);
conn
.
commit
();
conn
.
setAutoCommit
(
true
);
return
;
}
else
if
(
"delete"
.
equals
(
action
)){
boolean
is_up
=
cf
.
executeUpdate
(
conn
,
"delete from basic_info where id=?"
,
new
Object
[]{
delete_id
});
if
(!
is_up
)
{
out
.
println
(
"基础信息删除报错"
+
cf
.
getMsg
());
conn
.
rollback
();
return
;
}
Logger
.
log
(
conn
,
"基础信息"
,
"删除"
,
delete_id
,
""
,
request
);
out
.
println
(
"success"
);
conn
.
commit
();
conn
.
setAutoCommit
(
true
);
return
;
}
}
catch
(
Exception
e
)
{
try
{
if
(
conn
!=
null
){
conn
.
rollback
();
}
}
catch
(
SQLException
e1
)
{
e1
.
printStackTrace
();
}
return
;
}
finally
{
if
(
conn
!=
null
)
{
try
{
conn
.
close
();
}
catch
(
Exception
e
)
{
}
}
}
%>
web/jsp/line/basic_info/add-t.jsp
0 → 100644
View file @
c9889c49
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2020/9/11
Time: 12:54
To change this template use File | Settings | File Templates.
--%>
<%@ 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.sql.SQLException"
%>
<%@ page
import=
"java.util.*"
%>
<%
Connection
conn
=
null
;
Vector
v_list
;
Hashtable
ht
=
new
Hashtable
();
Pub
pub
=
new
Pub
();
ConnectionFactory
cf
=
new
ConnectionFactory
();
String
update_id
=
pub
.
trimNull
(
request
.
getParameter
(
"update_id"
));
String
action
=
"add"
;
if
(!
""
.
equals
(
update_id
)){
action
=
"update"
;
}
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
v_list
=
cf
.
doQuery
(
conn
,
"select id,info_name,describes,info_type from basic_info where id=? "
,
null
,
new
Object
[]{
update_id
});
if
(
v_list
==
null
)
{
out
.
println
(
"查询用户出错"
);
return
;
}
if
(
v_list
.
size
()
>
0
)
{
ht
=
(
Hashtable
)
v_list
.
get
(
0
);
}
}
catch
(
Exception
e
)
{
try
{
if
(
conn
!=
null
){
conn
.
rollback
();
}
}
catch
(
SQLException
e1
)
{
e1
.
printStackTrace
();
}
return
;
}
finally
{
if
(
conn
!=
null
)
{
try
{
conn
.
close
();
}
catch
(
Exception
e
)
{
}
}
}
%>
<article
class=
"page-container"
style=
"overflow: hidden;"
>
<form
class=
"form form-horizontal"
id=
"form-admin-add"
>
<input
type=
"hidden"
name=
"action"
value=
"
<%=
action
%>
"
>
<input
type=
"hidden"
name=
"update_id"
value=
"
<%=
update_id
%>
"
>
<div
class=
"row cl"
>
<label
class=
"form-label col-xs-2 col-sm-2"
>
信息名称:
</label>
<div
class=
"formControls col-xs-8 col-sm-9"
>
<input
type=
"text"
class=
"input-text"
name=
"info_name"
id=
"info_name"
value=
"
<%=
pub
.
trimNull
((
String
)
ht
.
get
(
"info_name"
))
%>
"
placeholder=
""
>
</div>
</div>
<div
class=
"row cl"
>
<label
class=
"form-label col-xs-2 col-sm-2"
>
信息英文标识:
</label>
<div
class=
"formControls col-xs-8 col-sm-9"
>
<input
type=
"text"
class=
"input-text"
name=
"info_type"
id=
"info_type"
value=
"
<%=
pub
.
trimNull
((
String
)
ht
.
get
(
"info_type"
))
%>
"
placeholder=
""
>
</div>
</div>
<div
class=
"row cl"
>
<label
class=
"form-label col-xs-2 col-sm-2"
>
备注:
</label>
<div
class=
"formControls col-xs-8 col-sm-9"
>
<textarea
type=
"text"
class=
"input-text"
name=
"describes"
id=
"describes"
style=
"height:120px;"
><%=
pub
.
trimNull
((
String
)
ht
.
get
(
"describes"
))
%></textarea>
</div>
</div>
<div
class=
"row cl"
>
<div
class=
"col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3"
>
<input
class=
"btn btn-primary radius"
type=
"button"
onclick=
"javascript:saveForm();"
value=
" 提交 "
>
</div>
</div>
</form>
</article>
<script>
function
saveForm
()
{
var
seg
=
$
(
"
#info_name
"
).
val
();
if
(
seg
===
""
){
layer
.
msg
(
'
输入的名称为空
'
,
{
icon
:
5
,
time
:
2000
//2秒关闭(如果不配置,默认是3秒)
},
function
()
{
});
return
false
;
}
saveSeg
();
}
function
saveSeg
(){
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
./action.jsp
"
,
data
:
$
(
'
#form-admin-add
'
).
serialize
(),
success
:
function
(
msg
)
{
if
(
msg
.
indexOf
(
"
success
"
)
>=
0
)
{
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/line/basic_info/list-t.jsp
0 → 100644
View file @
c9889c49
<%@ page
contentType=
"text/html;charset=UTF-8"
%>
<link
rel=
"stylesheet"
href=
"
<%=
request
.
getContextPath
()
%>
/js/zTree/v3/css/zTreeStyle/zTreeStyle.css"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"
<%=
request
.
getContextPath
()
%>
/css/pagination.css"
>
<div
class=
"page-container"
>
<div
class=
"content"
>
<div
class=
"search-form"
>
<form
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=
"dept_id"
id=
"dept_id"
value=
""
/>
<input
type=
"hidden"
name=
"page_size"
id=
"page_size"
value=
"10"
/>
<div
class=
"text-l"
>
<table
class=
"search-table "
style=
"margin-left: 10%;"
>
<tr
class=
""
>
<td
class=
"search-label"
>
信息名称:
</td>
<td
class=
"search-input"
style=
"width:400px;"
>
<input
type=
"text"
placeholder=
"输入信息名称"
class=
"input-text"
name=
"info_name"
id=
"info_name"
value=
""
placeholder=
""
style=
"width:40%;"
>
</td>
<td
colspan=
"2"
>
<a
class=
"btn btn-primary radius"
id=
"searchA"
onclick=
"searchUserModel();"
style=
"margin-left:19%;"
>
查询
</a>
<a
class=
"btn btn-info radius"
onclick=
"chongzhi();"
style=
"margin-left:5px;"
>
重置
</a>
</td>
</tr>
</table>
</div>
</form>
</div>
<div
style=
"height:10px;background-color: #d9e4f6"
>
</div>
<div
class=
"datalist "
id=
"datalist"
>
</div>
</div>
</div>
<script
type=
"text/javascript"
src=
"
<%=
request
.
getContextPath
()
%>
/js/jquery.pagination.js"
></script>
<script
type=
"text/javascript"
src=
"
<%=
request
.
getContextPath
()
%>
/js/zTree/v3/js/jquery.ztree.all-3.5.min.js"
></script>
<script
type=
"text/javascript"
>
function
searchModel
()
{
$
.
ajax
({
type
:
"
post
"
,
url
:
"
list_ajax.jsp
"
,
data
:
$
(
'
#data_form_search
'
).
serialize
(),
success
:
function
(
msg
)
{
//data_form_search.reset();
$
(
"
#datalist
"
).
html
(
msg
);
}
});
}
function
searchUserModel
()
{
$
(
"
#page_number
"
).
val
(
"
1
"
);
searchModel
();
}
$
(
function
(){
searchModel
();
});
function
chongzhi
(){
$
(
"
#page_size
"
).
val
(
"
10
"
);
data_form_search
.
reset
();
searchUserModel
();
}
/*用户-编辑*/
function
addRules
(
title
,
url
)
{
layer_show
(
title
,
url
,
"
800
"
,
"
500
"
);
}
function
updateById
(
id
){
layer_show
(
"
编辑
"
,
"
./add-t.jsp?update_id=
"
+
id
,
"
800
"
,
"
500
"
);
}
function
deleteById
(
id
)
{
layer
.
confirm
(
'
确认要删除吗?
'
,
function
(
index
)
{
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
./action.jsp
"
,
data
:
{
"
action
"
:
"
delete
"
,
"
delete_id
"
:
id
},
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
()
{
});
}
}
});
})
}
</script>
\ No newline at end of file
web/jsp/line/basic_info/list_ajax.jsp
0 → 100644
View file @
c9889c49
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2020/9/11
Time: 12:54
To change this template use File | Settings | File Templates.
--%>
<%@ 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=
"org.omg.CosCollection.IteratorInBetween"
%>
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
Vector
v_list
=
null
;
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"
;
String
info_name
=
pub
.
trimNull
(
request
.
getParameter
(
"info_name"
));
List
list_s
=
new
ArrayList
();
try
{
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
"select id,info_name,describes from basic_info where 1=1 "
);
if
(!
""
.
equals
(
info_name
)){
sb
.
append
(
" and info_name like ?"
);
list_s
.
add
(
"%
"+info_name+"
%
");
}
sb.append("
order
by
add_time
desc
");
conn = com.censoft.db.DBUtil.getConnection();
v_list = cf.doPageQueryWithCount(conn, sb.toString(), page_number, page_size, null, list_s.toArray());
if (v_list == null) {
out.println("
查询基础信息出错
" + cf.getMsg());
return;
}
} catch (Exception e) {
out.println("
查询基础信息异常
" + e);
return;
} finally {
if (conn != null) {
try {
conn.close();
} catch (Exception e) {
}
}
}
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
"));
String telSegmentUrl="
./
add
-
t
.
jsp
"
;
%>
<div>
<a
class=
"btn btn-primary radius"
onclick=
"addRules('新增信息','
<%=
telSegmentUrl
%>
');"
>
新增
</a>
</div>
<div
class=
"table-list"
>
<table
class=
"table table-hover table-bg"
>
<thead>
<tr
class=
"text-c"
>
<th
width=
"30px"
>
序号
</th>
<th
width=
"150px"
>
信息名称
</th>
<th
width=
"150px"
>
操作
</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
id
=
pub
.
trimNull
((
String
)
ht
.
get
(
"id"
));
String
info_name_view
=
pub
.
trimNull
((
String
)
ht
.
get
(
"info_name"
));
%>
<tr
<%
if
(
i
%
2
==
0
){
%>
id=
"tr_doub"
<%
}
else
{
%>
id=
"tr_single"
<%
}
%>
class=
"text-c"
>
<td><%=
i
%>
</td>
<td><%=
info_name_view
%>
</td>
<td>
<a
title=
"修改"
href=
"javascript:void(0);"
onclick=
"updateById('
<%=
id
%>
');"
class=
"ml-5"
>
<i
class=
"Hui-iconfont"
>
修改
</i>
</a>
<a
title=
"删除"
href=
"javascript:void(0);"
onclick=
"deleteById('
<%=
id
%>
');"
class=
"ml-5"
>
<i
class=
"Hui-iconfont"
>
删除
</i>
</a>
</td>
</tr>
<%
}
}
%>
</tbody>
</table>
</div>
<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>
\ No newline at end of file
web/jsp/line/basic_info_data/action.jsp
0 → 100644
View file @
c9889c49
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2020/9/11
Time: 12:54
To change this template use File | Settings | File Templates.
--%>
<%@ 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=
"com.censoft.db.Logger"
%>
<%@ page
import=
"java.sql.Connection"
%>
<%@ page
import=
"com.censoft.db.DBUtil"
%>
<%@ page
import=
"java.sql.SQLException"
%>
<%@ page
import=
"java.util.*"
%>
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
Vector
v_list
;
String
action
=
pub
.
trimNull
(
request
.
getParameter
(
"action"
));
String
info_name
=
pub
.
trimNull
(
request
.
getParameter
(
"info_name"
));
String
build_number
=
pub
.
trimNull
(
request
.
getParameter
(
"build_number"
));
String
bianhao
=
pub
.
trimNull
(
request
.
getParameter
(
"bianhao"
));
String
floor
=
pub
.
trimNull
(
request
.
getParameter
(
"floor"
));
String
room_number
=
pub
.
trimNull
(
request
.
getParameter
(
"room_number"
));
String
address
=
pub
.
trimNull
(
request
.
getParameter
(
"address"
));
String
delete_id
=
pub
.
trimNull
(
request
.
getParameter
(
"delete_id"
));
String
update_id
=
pub
.
trimNull
(
request
.
getParameter
(
"update_id"
));
String
id
=
DBUtil
.
getUUID
();
String
info_type
=
pub
.
trimNull
(
request
.
getParameter
(
"info_type"
));
String
add_user
=
(
String
)
session
.
getAttribute
(
"session_login_id"
);
String
add_time
=
pub
.
getCurrentServerTime
();
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
conn
.
setAutoCommit
(
false
);
if
(
"add"
.
equals
(
action
))
{
boolean
is_up
=
cf
.
executeUpdate
(
conn
,
"insert into basic_info_data (id,info_name,bianhao,floor,address,build_number,room_number,add_time,add_user,info_type) values (?,?,?,?,?,?,?,?,?,?)"
,
new
Object
[]{
id
,
info_name
,
bianhao
,
floor
,
address
,
build_number
,
room_number
,
add_time
,
add_user
,
info_type
});
if
(!
is_up
)
{
out
.
println
(
"基础信息数据新增报错"
+
cf
.
getMsg
());
conn
.
rollback
();
return
;
}
Logger
.
log
(
conn
,
"基础信息数据"
,
"添加"
,
id
,
""
,
request
);
out
.
println
(
"success"
);
conn
.
commit
();
conn
.
setAutoCommit
(
true
);
return
;
}
if
(
"update"
.
equals
(
action
))
{
boolean
is_up
=
cf
.
executeUpdate
(
conn
,
"update basic_info_data set info_name=?,bianhao=?,floor=?,address=?,build_number=?,room_number=?,update_time=?,update_user=? where id=? "
,
new
Object
[]{
info_name
,
bianhao
,
floor
,
address
,
build_number
,
room_number
,
add_time
,
add_user
,
update_id
});
if
(!
is_up
)
{
out
.
println
(
"基础信息数据"
+
cf
.
getMsg
());
conn
.
rollback
();
return
;
}
Logger
.
log
(
conn
,
"基础信息数据"
,
"修改"
,
id
,
""
,
request
);
out
.
println
(
"success"
);
conn
.
commit
();
conn
.
setAutoCommit
(
true
);
return
;
}
else
if
(
"delete"
.
equals
(
action
)){
boolean
is_up
=
cf
.
executeUpdate
(
conn
,
"delete from basic_info_data where id=?"
,
new
Object
[]{
delete_id
});
if
(!
is_up
)
{
out
.
println
(
"基础信息数据删除报错"
+
cf
.
getMsg
());
conn
.
rollback
();
return
;
}
Logger
.
log
(
conn
,
"基础信息数据"
,
"删除"
,
delete_id
,
""
,
request
);
out
.
println
(
"success"
);
conn
.
commit
();
conn
.
setAutoCommit
(
true
);
return
;
}
}
catch
(
Exception
e
)
{
try
{
if
(
conn
!=
null
){
conn
.
rollback
();
}
}
catch
(
SQLException
e1
)
{
e1
.
printStackTrace
();
}
return
;
}
finally
{
if
(
conn
!=
null
)
{
try
{
conn
.
close
();
}
catch
(
Exception
e
)
{
}
}
}
%>
web/jsp/line/xlzygl/action.jsp
0 → 100644
View file @
c9889c49
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2020/9/11
Time: 12:54
To change this template use File | Settings | File Templates.
--%>
<%@ 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=
"com.censoft.db.Logger"
%>
<%@ page
import=
"java.sql.Connection"
%>
<%@ page
import=
"com.censoft.db.DBUtil"
%>
<%@ page
import=
"java.sql.SQLException"
%>
<%@ page
import=
"java.util.*"
%>
<%
ConnectionFactory
cf
=
new
ConnectionFactory
();
Pub
pub
=
new
Pub
();
Connection
conn
=
null
;
Vector
v_list
;
String
action
=
pub
.
trimNull
(
request
.
getParameter
(
"action"
));
String
property
=
pub
.
trimNull
(
request
.
getParameter
(
"property"
));
String
xinghao
=
pub
.
trimNull
(
request
.
getParameter
(
"xinghao"
));
String
bianhao
=
pub
.
trimNull
(
request
.
getParameter
(
"bianhao"
));
String
changdu
=
pub
.
trimNull
(
request
.
getParameter
(
"changdu"
));
String
xin_number
=
pub
.
trimNull
(
request
.
getParameter
(
"xin_number"
));
String
use_xin_number
=
pub
.
trimNull
(
request
.
getParameter
(
"use_xin_number"
));
String
shengchanshang
=
pub
.
trimNull
(
request
.
getParameter
(
"shengchanshang"
));
String
end_time
=
pub
.
trimNull
(
request
.
getParameter
(
"end_time"
));
String
begin_jf
=
pub
.
trimNull
(
request
.
getParameter
(
"begin_jf"
));
String
begin_rdj
=
pub
.
trimNull
(
request
.
getParameter
(
"begin_rdj"
));
String
begin_port
=
pub
.
trimNull
(
request
.
getParameter
(
"begin_port"
));
String
end_jf
=
pub
.
trimNull
(
request
.
getParameter
(
"end_jf"
));
String
end_rdj
=
pub
.
trimNull
(
request
.
getParameter
(
"end_rdj"
));
String
end_port
=
pub
.
trimNull
(
request
.
getParameter
(
"end_port"
));
String
delete_id
=
pub
.
trimNull
(
request
.
getParameter
(
"delete_id"
));
String
update_id
=
pub
.
trimNull
(
request
.
getParameter
(
"update_id"
));
String
id
=
DBUtil
.
getUUID
();
String
info_type
=
pub
.
trimNull
(
request
.
getParameter
(
"info_type"
));
String
describes
=
pub
.
trimNull
(
request
.
getParameter
(
"describes"
));
String
gk_number
=
pub
.
trimNull
(
request
.
getParameter
(
"gk_number"
));
String
use_gk
=
pub
.
trimNull
(
request
.
getParameter
(
"use_gk"
));
String
dianwei
=
pub
.
trimNull
(
request
.
getParameter
(
"dianwei"
));
String
add_user
=
(
String
)
session
.
getAttribute
(
"session_login_id"
);
String
add_time
=
pub
.
getCurrentServerTime
();
StringBuffer
add_sql
=
new
StringBuffer
();
StringBuffer
update_sql
=
new
StringBuffer
();
add_sql
.
append
(
"insert into xlzy_info (id,property,bianhao,xinghao,changdu,xin_number,use_xin_number,"
);
add_sql
.
append
(
"shengchanshang,gk_number,use_gk,begin_jf,begin_rdj,begin_port,end_jf,end_rdj,end_port,"
);
add_sql
.
append
(
"dianwei,end_time,describes,add_user,add_time) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
);
update_sql
.
append
(
"update xlzy_info set property=?,bianhao=?,xinghao=?,changdu=?,xin_number=?,use_xin_number=?,"
);
update_sql
.
append
(
"shengchanshang=?,gk_number=?,use_gk=?,begin_jf=?,begin_rdj=?,begin_port=?,"
);
update_sql
.
append
(
"end_jf=?,end_rdj=?,end_port=?,dianwei=?,end_time=?,describes=?,update_user=?,"
);
update_sql
.
append
(
"update_time=? where id=?"
);
List
list_add
=
new
ArrayList
();
List
list_update
=
new
ArrayList
();
try
{
conn
=
com
.
censoft
.
db
.
DBUtil
.
getConnection
();
conn
.
setAutoCommit
(
false
);
if
(
"add"
.
equals
(
action
))
{
list_add
.
add
(
id
);
list_add
.
add
(
property
);
list_add
.
add
(
bianhao
);
list_add
.
add
(
xinghao
);
list_add
.
add
(
changdu
);
list_add
.
add
(
xin_number
);
list_add
.
add
(
use_xin_number
);
list_add
.
add
(
shengchanshang
);
list_add
.
add
(
gk_number
);
list_add
.
add
(
use_gk
);
list_add
.
add
(
begin_jf
);
list_add
.
add
(
begin_rdj
);
list_add
.
add
(
begin_port
);
list_add
.
add
(
end_jf
);
list_add
.
add
(
end_rdj
);
list_add
.
add
(
end_port
);
list_add
.
add
(
dianwei
);
list_add
.
add
(
end_time
);
list_add
.
add
(
describes
);
list_add
.
add
(
add_user
);
list_add
.
add
(
add_time
);
boolean
is_up
=
cf
.
executeUpdate
(
conn
,
add_sql
.
toString
()
,
list_add
.
toArray
());
if
(!
is_up
)
{
System
.
out
.
println
(
"数据新增报错"
+
cf
.
getMsg
());
conn
.
rollback
();
return
;
}
Logger
.
log
(
conn
,
"线路资源管理"
,
"添加"
,
id
,
""
,
request
);
out
.
println
(
"success"
);
conn
.
commit
();
conn
.
setAutoCommit
(
true
);
return
;
}
if
(
"update"
.
equals
(
action
))
{
list_update
.
add
(
property
);
list_update
.
add
(
bianhao
);
list_update
.
add
(
xinghao
);
list_update
.
add
(
changdu
);
list_update
.
add
(
xin_number
);
list_update
.
add
(
use_xin_number
);
list_update
.
add
(
shengchanshang
);
list_update
.
add
(
gk_number
);
list_update
.
add
(
use_gk
);
list_update
.
add
(
begin_jf
);
list_update
.
add
(
begin_rdj
);
list_update
.
add
(
begin_port
);
list_update
.
add
(
end_jf
);
list_update
.
add
(
end_rdj
);
list_update
.
add
(
end_port
);
list_update
.
add
(
dianwei
);
list_update
.
add
(
end_time
);
list_update
.
add
(
describes
);
list_update
.
add
(
add_user
);
list_update
.
add
(
add_time
);
list_update
.
add
(
update_id
);
boolean
is_up
=
cf
.
executeUpdate
(
conn
,
update_sql
.
toString
()
,
list_update
.
toArray
());
if
(!
is_up
)
{
out
.
println
(
"基础信息数据"
+
cf
.
getMsg
());
conn
.
rollback
();
return
;
}
Logger
.
log
(
conn
,
"线路资源管理"
,
"修改"
,
id
,
""
,
request
);
out
.
println
(
"success"
);
conn
.
commit
();
conn
.
setAutoCommit
(
true
);
return
;
}
else
if
(
"delete"
.
equals
(
action
)){
boolean
is_up
=
cf
.
executeUpdate
(
conn
,
"delete from xlzy_info where id=?"
,
new
Object
[]{
delete_id
});
if
(!
is_up
)
{
out
.
println
(
"数据删除报错"
+
cf
.
getMsg
());
conn
.
rollback
();
return
;
}
Logger
.
log
(
conn
,
"线路资源管理"
,
"删除"
,
delete_id
,
""
,
request
);
out
.
println
(
"success"
);
conn
.
commit
();
conn
.
setAutoCommit
(
true
);
return
;
}
}
catch
(
Exception
e
)
{
try
{
if
(
conn
!=
null
){
conn
.
rollback
();
}
}
catch
(
SQLException
e1
)
{
e1
.
printStackTrace
();
}
return
;
}
finally
{
if
(
conn
!=
null
)
{
try
{
conn
.
close
();
}
catch
(
Exception
e
)
{
}
}
}
%>
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