Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5portal
Overview
Overview
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
管理员
jfV5portal
Commits
55fc0dab
Commit
55fc0dab
authored
Sep 17, 2018
by
罗绍泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志功能更新
parent
091450a7
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
556 additions
and
493 deletions
+556
-493
icon.css
...tent/gaowj/ria/jquery/jquery-easyui-1.4.1/themes/icon.css
+4
-0
logModule.js
WebContent/jwapp/pages/log/js/logModule.js
+7
-1
logTab.js
WebContent/jwapp/pages/log/js/logTab.js
+35
-141
replyTab.js
WebContent/jwapp/pages/log/js/replyTab.js
+98
-128
logTab.jsp
WebContent/jwapp/pages/log/logTab.jsp
+1
-0
logTabDetail.jsp
WebContent/jwapp/pages/log/logTabDetail.jsp
+7
-8
replyTab.jsp
WebContent/jwapp/pages/log/replyTab.jsp
+19
-11
replyTabDetail.jsp
WebContent/jwapp/pages/log/replyTabDetail.jsp
+0
-44
LogBusiness.java
src_jwapp/com/jw/app/business/LogBusiness.java
+18
-12
LogBusinessImpl.java
src_jwapp/com/jw/app/business/log/LogBusinessImpl.java
+109
-34
logDAO.java
src_jwapp/com/jw/app/business/log/logDAO.java
+7
-3
logDAO.xml
src_jwapp/com/jw/app/business/log/logDAO.xml
+166
-32
actAction.java
src_jwapp/com/jw/app/log/action/actAction.java
+8
-31
dataAction.java
src_jwapp/com/jw/app/log/action/dataAction.java
+76
-43
viewAction.java
src_jwapp/com/jw/app/log/action/viewAction.java
+1
-5
No files found.
WebContent/gaowj/ria/jquery/jquery-easyui-1.4.1/themes/icon.css
View file @
55fc0dab
...
...
@@ -385,3 +385,6 @@
.icon-ext-49_27 {
background:url('
../../../../
images
/
icons
/(
49
,
27
).
png
') no-repeat left center;
}
.icon-ext-44_42 {
background:url('
../../../../
images
/
icons
/(
49
,
27
).
png
'
)
no-repeat
left
center
;
}
\ No newline at end of file
WebContent/jwapp/pages/log/js/logModule.js
View file @
55fc0dab
...
...
@@ -23,7 +23,13 @@ logModule.prototype.list = function(){};
//日志所有数据
logModule
.
prototype
.
listAll
=
function
(){};
//获取回复内容
logModule
.
prototype
.
listItem
=
function
(){};
logModule
.
prototype
.
listReply
=
function
(){};
//获取回复内容
logModule
.
prototype
.
listReplyAll
=
function
(){};
//获取回复内容
logModule
.
prototype
.
findPreviousLog
=
function
(){};
//获取回复内容
logModule
.
prototype
.
findNextLog
=
function
(){};
//创建一个数据操作对象,然后再后续使用
logModule
.
logActAction
=
new
logModule
(
"json"
).
delegate
(
"logAct"
);
...
...
WebContent/jwapp/pages/log/js/logTab.js
View file @
55fc0dab
...
...
@@ -43,11 +43,10 @@ var ls_ywlx = 'YBYW';
//定义grid列表
var
ls_title
=
"日志管理"
;
var
is_column
=
[
[
{
field
:
'LOG_TITLE'
,
title
:
'日志标题'
,
width
:
100
,
align
:
'center'
},
{
field
:
'LOG_CONTENT'
,
title
:
'日志内容'
,
width
:
300
,
align
:
'center'
},
{
field
:
'NEW_CREATE'
,
title
:
'创建人'
,
width
:
80
,
align
:
'center'
},
{
field
:
'LOG_TITLE'
,
title
:
'日志标题'
,
width
:
500
,
align
:
'center'
},
{
field
:
'NEW_CREATE'
,
title
:
'创建人'
,
width
:
100
,
align
:
'center'
},
{
field
:
'CREATE_TIME'
,
title
:
'创建时间'
,
width
:
150
,
align
:
'center'
},
{
field
:
'NEW_UPDATE'
,
title
:
'修改人'
,
width
:
8
0
,
align
:
'center'
},
{
field
:
'NEW_UPDATE'
,
title
:
'修改人'
,
width
:
10
0
,
align
:
'center'
},
{
field
:
'UPDATE_TIME'
,
title
:
'修改时间'
,
width
:
150
,
align
:
'center'
}
]
];
//列表加载完成回调
...
...
@@ -85,8 +84,8 @@ function formatMenu(value, data,index) {
function
getOptionMenu
(
data
,
index
){
var
returnData
=
"<span class=
\"
icon-edit
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span> <a href=
\"
javascript:void(0);
\"
onclick=
\"
editRow('"
+
index
+
"')
\"
>编辑</a> | <span class=
\"
icon-clear
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
deleteRow('"
+
index
+
"')
\"
>删除</a> | <span class=
\"
icon-
clear
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
reply
Row('"
+
index
+
"')
\"
>
回复
</a>"
;
+
index
+
"')
\"
>删除</a> | <span class=
\"
icon-
preview
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
view
Row('"
+
index
+
"')
\"
>
查看
</a>"
;
return
returnData
;
}
...
...
@@ -115,10 +114,21 @@ function addRow(){
}
//加载增加子页面成功后的回调
function
addUrlOnloadCallback
(
is_row
){
function
addUrlOnloadCallback
(
is_row
)
{
//初始化编辑器
UE
.
delEditor
(
'LOG_CONTENT'
);
var
ue
=
UE
.
getEditor
(
'LOG_CONTENT'
,
{});
ue
.
ready
(
function
()
{
//设置编辑器的内容
ue
.
setContent
(
""
);
});
}
//保存
function
insertData
(
is_entity
){
var
ue
=
UE
.
getEditor
(
'LOG_CONTENT'
);
is_entity
.
FIELD_LOG_CONTENT
=
ue
.
getContent
();
//处理相关
var
v_result
=
logModule
.
logActAction
.
insertLog
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
...
...
@@ -134,50 +144,28 @@ function editRow(index) {
}
//加载修改子页面成功后的回调
function
updateUrlOnloadCallback
(
is_row
){
function
updateUrlOnloadCallback
(
is_row
)
{
//初始化编辑器
if
(
is_row
.
LOG_CONTENT
==
null
||
is_row
.
LOG_CONTENT
==
''
||
is_row
.
LOG_CONTENT
==
undefined
)
is_row
.
LOG_CONTENT
=
''
;
UE
.
delEditor
(
'LOG_CONTENT'
);
var
ue
=
UE
.
getEditor
(
'LOG_CONTENT'
,
{});
ue
.
ready
(
function
()
{
//设置编辑器的内容
ue
.
setContent
(
is_row
.
LOG_CONTENT
);
});
}
//保存
function
updateData
(
is_entity
){
var
ue
=
UE
.
getEditor
(
'LOG_CONTENT'
);
is_entity
.
FIELD_LOG_CONTENT
=
ue
.
getContent
();
//处理相关
var
v_result
=
logModule
.
logActAction
.
updateLog
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
}
//回复弹出框格式
function
openreplyRow
(
editUrl
,
is_row
,
is_title
,
is_max
,
is_width
,
is_height
,
is_left
,
is_top
){
$
(
'#detail'
).
dialog
(
{
title
:
is_title
,
iconCls
:
$
.
getJwWindowPic
(),
width
:
ls_width
*
is_width
,
height
:
ls_height
*
is_height
,
closed
:
false
,
cache
:
false
,
maximizable
:
is_max
,
left
:
is_left
,
top
:
is_top
,
href
:
editUrl
,
queryParams
:
get_FIELD
(
is_row
),
modal
:
true
,
buttons
:
[
{
text
:
'关闭'
,
iconCls
:
'icon-back'
,
handler
:
function
()
{
closeBox
(
'detail'
);
}
}
],
onLoad
:
function
editUrlOnload
(){
if
(
is_row
.
OPETYPE
==
'reply'
){
replyUrlOnloadCallback
(
is_row
);
}
else
{
updateUrlOnloadCallback
(
is_row
);
}
}
});
}
/**
* 序号:
* 功能:回复
...
...
@@ -188,52 +176,18 @@ function openreplyRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
//加载回复子页面
function
replyRow
(
index
)
{
function
viewRow
(
index
)
{
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
is_row
[
0
].
OPETYPE
=
'reply'
;
openreplyRow
(
"logView_replyTabDetail"
,
is_row
[
0
],
"回复"
,
true
,
0.65
,
0.95
,
0
,
0
);
}
//加载回复子页面成功后的回调
function
replyUrlOnloadCallback
(
is_row
){
var
reply_column
=
[
[
{
field
:
'REPLY_NAME'
,
width
:
100
,
align
:
'center'
},
{
field
:
'REPLY_CONTENT'
,
width
:
300
,
align
:
'center'
},
{
field
:
'opt'
,
width
:
150
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
){
var
deleteBtn
=
'<a style="cursor:pointer" onclick="javascript:deleteItemRow('
+
index
+
')">删除</a>'
return
'<div class=
\'
optBtns
\'
>'
+
deleteBtn
+
'</div>'
;
}
}
]
];
var
logUuid
=
is_row
.
UUID
;
var
reply_query
=
{
FIELD_LOG_ID
:
logUuid
}
datagridReply
(
"logItemInputForm"
,
gaowj
.
WEB_APP_NAME
+
"/logData_listItem"
,
reply_query
,
reply_column
);
//加载日志回复页面
openViewIframRow1
(
"replyDetail"
,
"logView_replyTab?FIELD_UUID="
+
is_row
[
0
].
UUID
,
is_row
[
0
],
"查看"
,
true
,
0.65
,
0.95
,
160
,
0
);
}
//回复保存
function
replySaveRow
(){
if
(
$
(
"input[name=FIELD_USER_REPLY_CONTENT]"
).
val
()
==
''
){
$
.
messager
.
alert
(
'提示'
,
'请在回复框输入内容'
)
}
else
{
var
items
=
{
FIELD_LOG_ID
:
$
(
"input[name=FIELD_UUID]"
).
val
(),
FIELD_REPLY_CONTENT
:
$
(
"input[name=FIELD_USER_REPLY_CONTENT]"
).
val
()}
var
v_result
=
logModule
.
logActAction
.
insertReply
(
items
);
if
(
v_result
.
NAME
==
'999'
){
$
(
'#logItemInputForm'
).
datagrid
(
'reload'
);
$
(
'#USER_REPLY_CONTENT'
).
textbox
(
"setValue"
,
""
);
}
}
//openViewIframRow1关闭后的回调
function
closeCallback1
(
is_entity
)
{
}
/**
* 序号:
* 功能:单个删除
...
...
@@ -300,37 +254,6 @@ function deleteBatchRow(){
/**
* 序号:
* 功能:回复删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function
deleteItemRow
(
index
){
$
(
'#logItemInputForm'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#logItemInputForm'
).
datagrid
(
'getSelections'
);
$
(
'#logItemInputForm'
).
datagrid
(
'clearSelections'
);
var
code
=
is_row
[
0
].
UUID
;
if
(
code
==
''
||
code
==
null
){
return
}
else
{
$
.
messager
.
confirm
(
'提示'
,
'确定删除?'
,
function
(
r
)
{
if
(
r
)
{
var
v_query
=
{};
v_query
.
FIELD_CODE
=
code
;
var
v_result
=
logModule
.
logActAction
.
deleteReply
(
v_query
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
$
(
'#logItemInputForm'
).
datagrid
(
'reload'
);
}
});
}
}
/****/
/**
* 序号:
* 功能:刷新
* 参数:
* 说明:
...
...
@@ -360,31 +283,3 @@ function searchRow(){
$
(
'#list'
).
datagrid
(
'load'
,
v_query
);
}
/****/
\ No newline at end of file
/**
* 回复
* 2016-12-01
* 高伟杰
**/
function
datagridReply
(
is_view
,
is_url
,
is_query
,
is_column
){
$
(
'#'
+
is_view
).
datagrid
({
iconCls
:
$
.
getJwWindowPic
(),
url
:
is_url
,
queryParams
:
is_query
,
//查询参数
singleSelect
:
false
,
//是否多选
fitColumns
:
false
,
//是否撑满
autoRowHeight
:
false
,
//设定高度
rowStyler
:
function
(
index
,
row
){
return
rowstyler
(
index
,
row
);},
pagination
:
true
,
//分页显示
pageSize
:
rows
,
//显示行数
pageList
:
listPageSize
,
//条数选择
striped
:
true
,
//是否隔行显示
remoteSort
:
false
,
//是否从服务器排序
columns
:
is_column
,
onLoadSuccess
:
function
()
{
}
});
}
WebContent/jwapp/pages/log/js/replyTab.js
View file @
55fc0dab
...
...
@@ -24,7 +24,7 @@ function resetQueryData(){
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var
ls_module_id
=
'
2
'
;
var
ls_module_id
=
'
1
'
;
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var
ls_ywlx
=
'YBYW'
;
/****/
...
...
@@ -41,119 +41,83 @@ var ls_ywlx = 'YBYW';
* 备注:需更改
**/
//定义grid列表
var
ls_title
=
"
日志
管理"
;
var
ls_title
=
"
回复
管理"
;
var
is_column
=
[
[
{
field
:
'LOG_TITLE'
,
title
:
'日志标题'
,
width
:
100
,
align
:
'center'
},
{
field
:
'LOG_CONTENT'
,
title
:
'日志内容'
,
width
:
300
,
align
:
'center'
},
{
field
:
'OPT'
,
title
:
'操作'
,
width
:
300
,
align
:
'center'
,
formatter
:
function
(
index
){
var
replyBtn
=
'<a style="cursor:pointer" onclick="javascript:replyRow('
+
index
+
')">回复</a>'
return
'<div class="optBtn">'
+
replyBtn
+
'</div>'
}
}
]
];
//列表加载完成回调
function
reportrollback
(){
{
field
:
'REPLY_CONTENT'
,
title
:
'内容'
,
width
:
350
,
align
:
'center'
},
{
field
:
'REPLY_USER_NAME'
,
title
:
'回复人'
,
width
:
100
,
align
:
'center'
},
{
field
:
'REPLY_TIME'
,
title
:
'回复时间'
,
width
:
150
,
align
:
'center'
},
]
];
//列表加载完成回调
function
dataOnLoadSuccess
(){
}
//设置颜色和每行高度
function
rowstyler
(
index
,
row
){
}
//展示列表
reportgrid
(
"list"
,
ls_title
,
gaowj
.
WEB_APP_NAME
+
"/logData_list"
,
queryData
,
is_column
,
60
,
80
);
//回复弹出框格式
function
openreplyRow
(
editUrl
,
is_row
,
is_title
,
is_max
,
is_width
,
is_height
,
is_left
,
is_top
){
$
(
'#detail'
).
dialog
(
{
title
:
is_title
,
iconCls
:
$
.
getJwWindowPic
(),
width
:
ls_width
*
is_width
,
height
:
ls_height
*
is_height
,
closed
:
false
,
cache
:
false
,
maximizable
:
is_max
,
left
:
is_left
,
top
:
is_top
,
href
:
editUrl
,
queryParams
:
get_FIELD
(
is_row
),
modal
:
true
,
buttons
:
[
{
text
:
'关闭'
,
iconCls
:
'icon-back'
,
handler
:
function
()
{
closeBox
(
'detail'
);
}
}
],
onLoad
:
function
editUrlOnload
(){
if
(
is_row
.
OPETYPE
==
'reply'
){
replyUrlOnloadCallback
(
is_row
);
}
else
{
updateUrlOnloadCallback
(
is_row
);
}
}
});
}
queryData
.
FIELD_LOG_ID
=
$
(
"#LOG_ID"
).
val
();
datagrid
(
"list"
,
ls_title
,
gaowj
.
WEB_APP_NAME
+
"/logData_listReply"
,
queryData
,
is_column
,
60
,
80
);
/****/
/**
* 序号:
* 功能:
回复
* 序号:
4
* 功能:
设置主页面操作列菜单
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:
杰夫兄弟智慧科技有限公司
* 单位:
宁波金网
* 备注:需更改
**/
//加载回复子页面
function
replyRow
(
index
)
{
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
is_row
[
0
].
OPETYPE
=
'reply'
;
openreplyRow
(
"logView_replyTabDetail"
,
is_row
[
0
],
"回复"
,
true
,
0.65
,
0.95
,
0
,
0
);
//操用列显示更多(一般情况下无需更改)
function
formatMenu
(
value
,
data
,
index
)
{
var
returnData
=
""
;
return
returnData
+
"<span class=
\"
icon-ext-moremenu
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span>"
+
"<span data-p1="
+
index
+
" class=
\"
easyui-tooltip
\"
style=
\"
color:blue;cursor:pointer;
\"
>更多</span>"
;
}
//加载回复子页面成功后的回调
function
replyUrlOnloadCallback
(
is_row
){
var
reply_column
=
[
[
{
field
:
'REPLY_NAME'
,
width
:
100
,
align
:
'center'
},
{
field
:
'REPLY_CONTENT'
,
width
:
300
,
align
:
'center'
},
{
field
:
'opt'
,
width
:
150
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
){
var
deleteBtn
=
'<a style="cursor:pointer" onclick="javascript:deleteItemRow('
+
index
+
')">删除</a>'
var
Btn
=
''
return
'<div class=
\'
optBtns
\'
>'
+
(
row
.
CODE
==
gaowj
.
SEESION_CODE
?
deleteBtn
:
Btn
)
+
'</div>'
;
//上浮横向菜单集里的具体菜单项(需更改)
var
is_tc
=
0
;
function
getOptionMenu
(
data
,
index
){
var
returnData
=
""
;
is_tc
=
1
;
returnData
=
"<span class=
\"
icon-clear
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
deleteRow('"
+
index
+
"')
\"
>删除</a>"
;
return
returnData
;
}
}
}
]
];
function
OnLoadSuccess
(){}
var
logUuid
=
is_row
.
UUID
;
var
reply_query
=
{
FIELD_LOG_ID
:
logUuid
}
datagridReply
(
"logItemInputForm"
,
gaowj
.
WEB_APP_NAME
+
"/logData_listItem"
,
reply_query
,
reply_column
);
//返回菜单集的菜单个数(需更改)
function
getOptionMenuCount
(){
var
is_menu_count
=
is_tc
;
return
is_menu_count
;
}
//回复保存
function
replySaveRow
(){
if
(
$
(
"input[name=FIELD_USER_REPLY_CONTENT]"
).
val
()
==
''
){
$
.
messager
.
alert
(
'提示'
,
'请在回复框输入内容'
)
}
else
{
var
items
=
{
FIELD_LOG_ID
:
$
(
"input[name=FIELD_UUID]"
).
val
(),
FIELD_REPLY_CONTENT
:
$
(
"input[name=FIELD_USER_REPLY_CONTENT]"
).
val
()}
var
v_result
=
logModule
.
logActAction
.
insertReply
(
items
);
if
(
v_result
.
NAME
==
'999'
){
$
(
'#logItemInputForm'
).
datagrid
(
'reload'
);
$
(
'#USER_REPLY_CONTENT'
).
textbox
(
"setValue"
,
""
);
}
/****/
/**
* 序号:5
* 功能:新增
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//保存
function
addRow
(){
var
is_entity
=
$
(
"#inputForm"
).
getFormVal
();
//处理相关
var
v_result
=
logModule
.
logActAction
.
insertReply
(
is_entity
);
if
(
v_result
!=
null
&&
v_result
!=
undefined
)
{
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
}
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#REPLY_CONTENT'
).
val
(
''
);
//return v_result;
}
/**
...
...
@@ -168,7 +132,7 @@ function replySaveRow(){
**/
function
refreshRow
(){
$
(
'#list'
).
datagrid
(
'load'
,{});
$
(
"#log
Tab
_searchForm"
)[
0
].
reset
();
$
(
"#log
Reply
_searchForm"
)[
0
].
reset
();
}
/****/
...
...
@@ -183,65 +147,71 @@ function refreshRow(){
* 备注:需更改
**/
function
searchRow
(){
var
v_query
=
$
(
"#log
Tab
_searchForm"
).
getFormVal
();
var
v_query
=
$
(
"#log
Reply
_searchForm"
).
getFormVal
();
$
(
'#list'
).
datagrid
(
'load'
,
v_query
);
renderDATAFORM
(
v_query
,
$
(
"#logReply_searchForm"
));
}
/****/
/**
* 序号:
* 功能:
回复
删除
* 序号:
6
* 功能:
单个
删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:
杰夫兄弟智慧科技有限公司
* 单位:
宁波金网
* 备注:需更改
**/
function
deleteItemRow
(
index
){
$
(
'#logItemInputForm'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#logItemInputForm'
).
datagrid
(
'getSelections'
);
$
(
'#logItemInputForm'
).
datagrid
(
'clearSelections'
);
function
deleteRow
(
index
){
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
var
code
=
is_row
[
0
].
UUID
;
var
thiscode
=
is_row
[
0
].
CODE
;
if
(
code
==
''
||
code
==
null
){
return
}
else
{
$
.
messager
.
confirm
(
'提示'
,
'确定删除?'
,
function
(
r
)
{
if
(
r
)
{
var
v_query
=
{};
v_query
.
FIELD_CODE
=
code
;
v_query
.
FIELD_THISCODE
=
thiscode
;
var
v_result
=
logModule
.
logActAction
.
deleteReply
(
v_query
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
$
(
'#logItemInputForm
'
).
datagrid
(
'reload'
);
$
(
'#list
'
).
datagrid
(
'reload'
);
}
});
}
}
/****/
/**
* 回复
* 2016-12-01
* 高伟杰
**/
function
datagridReply
(
is_view
,
is_url
,
is_query
,
is_column
){
$
(
'#'
+
is_view
).
datagrid
({
iconCls
:
$
.
getJwWindowPic
(),
url
:
is_url
,
queryParams
:
is_query
,
//查询参数
singleSelect
:
false
,
//是否多选
fitColumns
:
false
,
//是否撑满
autoRowHeight
:
false
,
//设定高度
rowStyler
:
function
(
index
,
row
){
return
rowstyler
(
index
,
row
);},
pagination
:
true
,
//分页显示
pageSize
:
rows
,
//显示行数
pageList
:
listPageSize
,
//条数选择
striped
:
true
,
//是否隔行显示
remoteSort
:
false
,
//是否从服务器排序
columns
:
is_column
,
onLoadSuccess
:
function
()
{
* 序号:7
* 功能:批量删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function
deleteBatchRow
(){
var
code
=
""
;
var
rows
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
){
code
=
code
+
rows
[
i
].
UUID
+
","
;
}
if
(
rows
==
null
||
rows
==
""
){
$
.
messager
.
alert
(
'提示'
,
"请选择需删除的记录!"
,
'info'
);
return
;
}
if
(
code
.
length
>
0
){
code
=
code
.
substring
(
0
,
code
.
length
-
1
);
}
$
.
messager
.
confirm
(
'提示'
,
'确定删除?'
,
function
(
r
)
{
if
(
r
)
{
var
v_query
=
{};
v_query
.
FIELD_CODE
=
code
;
var
v_result
=
logModule
.
logActAction
.
deleteReply
(
v_query
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
$
(
'#list'
).
datagrid
(
'reload'
);
}
});
}
/****/
WebContent/jwapp/pages/log/logTab.jsp
View file @
55fc0dab
...
...
@@ -16,6 +16,7 @@
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="replyDetail" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/log/js/logModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/log/js/logTab.js" charset="utf-8"></script>
WebContent/jwapp/pages/log/logTabDetail.jsp
View file @
55fc0dab
<%@page contentType="text/html; charset=UTF-8"%>
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}"/>
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}"
/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" />
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}"
/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>日志标题:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="LOG_TITLE" name="FIELD_LOG_TITLE" style="width:600px" required=true value="${is_row.LOG_TITLE}"
/>
<input class="easyui-textbox" id="LOG_TITLE" name="FIELD_LOG_TITLE" style="width:600px" required=true value="${is_row.LOG_TITLE}"
/>
</td>
</tr>
<tr>
<td class="tableStyleLable" valign="top" style="height:210px">
<span>日志内容:</span>
</td>
<td id="LOG_CONENT_RE
">
<input class="easyui-textbox" id="LOG_CONTENT" name="FIELD_LOG_CONTENT" style="width:600px;height:200px;border-width:5px" required=true multiline=true value="${is_row.LOG_CONTENT}"/
>
<td style="width: 85%
">
<script id="LOG_CONTENT" type="text/plain" style="width:625px;height:300px;float:left;"></script
>
</td>
</tr>
</table>
</table>
</form>
WebContent/jwapp/pages/log/replyTab.jsp
View file @
55fc0dab
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="replyTab">
<div style="overflow:auto;height:100%;">
<div id="logReplyTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%;height:75%;"></table>
<form id="inputForm" style="clear:both;">
<div>
<input type="hidden" id="LOG_ID" name="FIELD_LOG_ID" value="${is_row.UUID}">
<textarea name="FIELD_REPLY_CONTENT" id="REPLY_CONTENT" style="width:100%;height:100px;"></textarea>
<input type="button" value="回复" onclick="javascript:addRow()">
</div>
</form>
<div id="tb">
<form id="logReply_searchForm" style="float:left">
<input type="hidden" name="FIELD_LOG_ID" value="${is_row.UUID}">
内容: <input id="FIELD_REPLY_CONTENT" name="FIELD_REPLY_CONTENT" type="text" style="width: 200px" class="tableInput-easyui">
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除记录</a>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="replyTab_searchForm" style="float:left">
日志名称: <input class="easyui-textbox" id="FIELD_LOG_TITLE" name="FIELD_LOG_TITLE" style="width:200px"/>
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/log/js/logModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/log/js/replyTab.js" charset="utf-8"></script>
\ No newline at end of file
WebContent/jwapp/pages/log/replyTabDetail.jsp
deleted
100644 → 0
View file @
091450a7
<%@page contentType="text/html; charset=UTF-8"%>
<style type="text/css">
#inputForm {
position: relative;
}
.log_reply_list{
position:absolute;
bottom:7%;}
.tableStyle span,.log_item_one span{
border:none;
}
</style>
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}"/>
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}"/>
<input type="hidden" name="FIELD_CREATE_NAME" id="CREATE_NAME" value="${is_row.CREATE_NAME}"/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>日志标题:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="LOG_TITLE" name="FIELD_LOG_TITLE" readonly style="width:600px" value="${is_row.LOG_TITLE}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable" valign="top" style="height:210px">
<span>日志内容:</span>
</td>
<td id="LOG_CONTENT_RE">
<input class="easyui-textbox" id="LOG_CONTENT" readonly name="FIELD_LOG_CONTENT" style="width:600px;height:200px" multiline=true value="${is_row.LOG_CONTENT}"/>
</td>
</tr>
</table>
</form>
<form id="logItemInputForm">
</form>
<div class="log_reply_list" >
<input class="easyui-textbox" id="USER_REPLY_CONTENT" name="FIELD_USER_REPLY_CONTENT" required style="width:600px;" value="${is_row.USER_REPLY_CONTENT}"/>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:replySaveRow()" >回复</a>
</div>
\ No newline at end of file
src_jwapp/com/jw/app/business/LogBusiness.java
View file @
55fc0dab
...
...
@@ -52,51 +52,57 @@ public interface LogBusiness {
List
<
Map
<
String
,
Object
>>
list_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
/**
* 获取所有记录
数
* 获取所有记录
*
* @param entity
* @throws BusinessException
*/
int
listCount_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_reply
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
/**
*
获取所有记录
*
插入
*
* @param entity
* @throws BusinessException
*/
List
<
Map
<
String
,
Object
>>
list_reply
(
Map
<
String
,
Object
>
quer
y
)
throws
BusinessException
;
void
insert_reply
(
Map
<
String
,
Object
>
entit
y
)
throws
BusinessException
;
/**
*
获取所有记录数
*
删除记录
*
* @param entity
* @throws BusinessException
*/
int
listCount_reply
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
void
delete_reply
(
List
<
String
>
list
)
throws
BusinessException
;
/**
*
插入
*
分页获取记录
*
* @param entity
* @throws BusinessException
*/
void
insert_reply
(
Map
<
String
,
Object
>
entit
y
)
throws
BusinessException
;
Page
<
Map
<
String
,
Object
>>
list_reply
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
quer
y
)
throws
BusinessException
;
/**
* 删除记录
* 根据logId删除回复
* @param listKey
*/
void
delete_reply_by_logId
(
List
<
String
>
listKey
);
/**
* 获取上一篇记录
*
* @param entity
* @throws BusinessException
*/
void
delete_reply
(
List
<
String
>
list
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
find_previous_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
/**
*
分页获取
记录
*
获取下一篇
记录
*
* @param entity
* @throws BusinessException
*/
Page
<
Map
<
String
,
Object
>>
list_reply
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
find_next_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
}
src_jwapp/com/jw/app/business/log/LogBusinessImpl.java
View file @
55fc0dab
package
com
.
jw
.
app
.
business
.
log
;
import
java.io.IOException
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -10,15 +12,11 @@ import java.util.Set;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.ibatis.session.RowBounds
;
import
com.jw.app.business.LogBusiness
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.SessionUtil
;
import
com.gaowj.standard.utils.CacheKit
;
import
com.jw.app.business.LogBusiness
;
import
com.jw.app.business.utils.QueryParamUtil
;
public
class
LogBusinessImpl
implements
LogBusiness
{
...
...
@@ -34,13 +32,24 @@ public class LogBusinessImpl implements LogBusiness {
@Override
public
void
insert_log
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
if
(
entity
.
get
(
"UUID"
)
==
null
)
{
entity
.
put
(
"UUID"
,
java
.
util
.
UUID
.
randomUUID
().
toString
());
}
if
(
entity
.
get
(
"CREATE_NAME"
)
==
null
)
{
entity
.
put
(
"CREATE_NAME"
,
SessionUtil
.
getEmname
());
}
if
(
entity
.
get
(
"CREATE_ID"
)
==
null
)
{
entity
.
put
(
"CREATE_ID"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"CREATE_TIME"
)
==
null
)
{
entity
.
put
(
"CREATE_TIME"
,
new
Date
());
}
if
(
entity
.
get
(
"UPDATE_ID"
)
==
null
)
{
entity
.
put
(
"UPDATE_ID"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"UPDATE_TIME"
)
==
null
)
{
entity
.
put
(
"UPDATE_TIME"
,
new
Date
());
}
// 动态传值插入
List
<
String
>
infoListKey
=
new
ArrayList
<
String
>();
List
<
Object
>
infoList
=
new
ArrayList
<
Object
>();
...
...
@@ -61,8 +70,12 @@ public class LogBusinessImpl implements LogBusiness {
@Override
public
void
update_log
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
// 动态传值修改
entity
.
put
(
"UPDATE_ID"
,
SessionUtil
.
getCode
());
if
(
entity
.
get
(
"UPDATE_TIME"
)
==
null
)
{
entity
.
put
(
"UPDATE_TIME"
,
new
Date
());
}
if
(
entity
.
get
(
"UPDATE_ID"
)
==
null
)
{
entity
.
put
(
"UPDATE_ID"
,
SessionUtil
.
getCode
());
}
List
<
Map
<
String
,
Object
>>
updateList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
if
(
entity
.
keySet
()
!=
null
)
{
Set
<
String
>
key
=
entity
.
keySet
();
...
...
@@ -80,14 +93,11 @@ public class LogBusinessImpl implements LogBusiness {
//
logDAO
.
update_log
(
entity
);
}
}
@Override
public
void
delete_log
(
List
<
String
>
list
)
throws
BusinessException
{
logDAO
.
delete_log
(
list
);
logDAO
.
delete_byLogId
(
list
);
}
@Override
...
...
@@ -96,13 +106,15 @@ public class LogBusinessImpl implements LogBusiness {
// 计算起始记录
int
pageStart
=
(
pageNo
-
1
)
*
pageSize
;
// 获取列表
List
<
Map
<
String
,
Object
>>
items
=
logDAO
.
list_log
(
new
RowBounds
(
pageStart
,
pageSize
),
if
(
query
.
get
(
"CREATE_IDS"
)
!=
null
&&
!
""
.
equals
(
query
.
get
(
"CREATE_IDS"
)))
{
String
ids
=
query
.
get
(
"CREATE_IDS"
).
toString
();
query
.
put
(
"CREATE_IDS"
,
java
.
util
.
Arrays
.
asList
(
ids
.
split
(
","
)));
}
query
);
// 获取列表
List
<
Map
<
String
,
Object
>>
items
=
logDAO
.
list_log
(
new
RowBounds
(
pageStart
,
pageSize
),
query
);
// 获取列表个数
int
count
=
listCount_log
(
query
);
int
count
=
logDAO
.
list_count_log
(
query
);
// 创建分页对象
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<
Map
<
String
,
Object
>>();
page
.
setStart
(
pageStart
);
...
...
@@ -116,29 +128,27 @@ public class LogBusinessImpl implements LogBusiness {
@Override
public
List
<
Map
<
String
,
Object
>>
list_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
List
<
Map
<
String
,
Object
>>
list_data
=
null
;
if
(
list_data
==
null
||
list_data
.
size
()
==
0
)
{
list_data
=
logDAO
.
list_log
(
query
);
try
{
list_data
=
QueryParamUtil
.
ClobToString
(
logDAO
.
list_log
(
query
));
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
catch
(
SQLException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
list_data
;
}
@Override
public
int
listCount_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
return
logDAO
.
listCount_log
(
query
);
}
@Override
public
Page
<
Map
<
String
,
Object
>>
list_reply
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
// 计算起始记录
int
pageStart
=
(
pageNo
-
1
)
*
pageSize
;
// 获取列表
List
<
Map
<
String
,
Object
>>
items
=
logDAO
.
list_reply
(
new
RowBounds
(
pageStart
,
pageSize
),
query
);
List
<
Map
<
String
,
Object
>>
items
=
logDAO
.
list_reply
(
new
RowBounds
(
pageStart
,
pageSize
),
query
);
// 获取列表个数
int
count
=
l
istC
ount_reply
(
query
);
int
count
=
l
ogDAO
.
list_c
ount_reply
(
query
);
// 创建分页对象
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<
Map
<
String
,
Object
>>();
...
...
@@ -152,24 +162,45 @@ public class LogBusinessImpl implements LogBusiness {
@Override
public
List
<
Map
<
String
,
Object
>>
list_reply
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
return
logDAO
.
list_reply
(
query
);
List
<
Map
<
String
,
Object
>>
list_data
=
null
;
try
{
list_data
=
QueryParamUtil
.
ClobToString
(
logDAO
.
list_reply
(
query
));
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
catch
(
SQLException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
@Override
public
int
listCount_reply
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
return
logDAO
.
listCount_reply
(
query
);
return
list_data
;
}
@Override
public
void
insert_reply
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
if
(
entity
.
get
(
"UUID"
)
==
null
)
{
entity
.
put
(
"UUID"
,
java
.
util
.
UUID
.
randomUUID
().
toString
());
entity
.
put
(
"CODE"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"REPLY_NAME"
)
==
null
)
{
entity
.
put
(
"REPLY_NAME"
,
SessionUtil
.
getEmname
());
}
if
(
entity
.
get
(
"REPLY_USER"
)
==
null
)
{
entity
.
put
(
"REPLY_USER"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"REPLY_TIME"
)
==
null
)
{
entity
.
put
(
"REPLY_TIME"
,
new
Date
());
}
if
(
entity
.
get
(
"CREATE_ID"
)
==
null
)
{
entity
.
put
(
"CREATE_ID"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"CREATE_TIME"
)
==
null
)
{
entity
.
put
(
"CREATE_TIME"
,
new
Date
());
}
if
(
entity
.
get
(
"UPDATE_ID"
)
==
null
)
{
entity
.
put
(
"UPDATE_ID"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"UPDATE_TIME"
)
==
null
)
{
entity
.
put
(
"UPDATE_TIME"
,
new
Date
());
}
List
<
String
>
itemListKey
=
new
ArrayList
<
String
>();
List
<
Object
>
itemList
=
new
ArrayList
<
Object
>();
if
(
entity
.
keySet
()
!=
null
)
{
...
...
@@ -191,4 +222,47 @@ public class LogBusinessImpl implements LogBusiness {
logDAO
.
delete_reply
(
list
);
}
@Override
public
void
delete_reply_by_logId
(
List
<
String
>
listKey
)
{
logDAO
.
delete_reply_by_logId
(
listKey
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
find_previous_log
(
Map
<
String
,
Object
>
query
)
{
List
<
Map
<
String
,
Object
>>
list_data
=
null
;
try
{
if
(
query
.
get
(
"CREATE_IDS"
)
!=
null
&&
!
""
.
equals
(
query
.
get
(
"CREATE_IDS"
)))
{
String
ids
=
query
.
get
(
"CREATE_IDS"
).
toString
();
query
.
put
(
"CREATE_IDS"
,
java
.
util
.
Arrays
.
asList
(
ids
.
split
(
","
)));
}
list_data
=
QueryParamUtil
.
ClobToString
(
logDAO
.
find_previous_log
(
query
));
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
catch
(
SQLException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
list_data
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
find_next_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
List
<
Map
<
String
,
Object
>>
list_data
=
null
;
try
{
if
(
query
.
get
(
"CREATE_IDS"
)
!=
null
&&
!
""
.
equals
(
query
.
get
(
"CREATE_IDS"
)))
{
String
ids
=
query
.
get
(
"CREATE_IDS"
).
toString
();
query
.
put
(
"CREATE_IDS"
,
java
.
util
.
Arrays
.
asList
(
ids
.
split
(
","
)));
}
list_data
=
QueryParamUtil
.
ClobToString
(
logDAO
.
find_next_log
(
query
));
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
catch
(
SQLException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
list_data
;
}
}
\ No newline at end of file
src_jwapp/com/jw/app/business/log/logDAO.java
View file @
55fc0dab
...
...
@@ -15,13 +15,13 @@ public interface logDAO {
void
delete_log
(
List
<
String
>
list
)
throws
BusinessException
;
void
delete_
byL
ogId
(
List
<
String
>
list
)
throws
BusinessException
;
void
delete_
reply_by_l
ogId
(
List
<
String
>
list
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_log
(
RowBounds
rowbounds
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
int
list
C
ount_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
int
list
_c
ount_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
void
insert_reply
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
...
...
@@ -31,6 +31,10 @@ public interface logDAO {
List
<
Map
<
String
,
Object
>>
list_reply
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
int
listCount_reply
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
int
list_count_reply
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
find_previous_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
find_next_log
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
}
src_jwapp/com/jw/app/business/log/logDAO.xml
View file @
55fc0dab
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jw.app.business.log.logDAO"
>
<sql
id=
"select_log_manage"
>
SELECT
manage.*, info1.real_name AS new_create,
info1.user_sex,post.COUNT,
info2.real_name AS new_update,
IFNULL(reply.reply_count, 0) AS REPLY_COUNT,
IFNULL(reply.reply_time, '暂无回复') AS LAST_REPLY_TIME
FROM log_manage manage
LEFT JOIN `uicm_user_info` info1 ON info1.user_id = manage.create_id
LEFT JOIN `uicm_user_info` info2 ON info2.user_id = manage.update_id
LEFT JOIN (
SELECT log_id,COUNT(*) AS reply_count,MAX(reply_time) AS reply_time
FROM log_reply
GROUP BY log_id
) reply ON manage.uuid = reply.log_id
LEFT JOIN (
SELECT create_id,COUNT(*) AS COUNT
FROM log_manage
GROUP BY create_id
) post ON post.create_id = manage.create_id
</sql>
<sql
id=
"WHERE"
>
<where>
<trim
prefixOverrides=
"and"
>
<if
test=
"UUID != null and UUID != ''"
>
and
f
.UUID = #{UUID}
and
manage
.UUID = #{UUID}
</if>
<if
test=
"LOG_TITLE != null and LOG_TITLE != ''"
>
and
f
.LOG_TITLE like concat('%',#{LOG_TITLE},'%')
and
manage
.LOG_TITLE like concat('%',#{LOG_TITLE},'%')
</if>
<if
test=
"LOG_CONTENT != null and LOG_CONTENT != ''"
>
and
f
.LOG_CONTENT like concat('%',#{LOG_CONTENT},'%')
and
manage
.LOG_CONTENT like concat('%',#{LOG_CONTENT},'%')
</if>
<if
test=
"CREATE_NAME != null and CREATE_NAME != ''"
>
and
f
.CREATE_NAME = #{CREATE_NAME}
and
manage
.CREATE_NAME = #{CREATE_NAME}
</if>
<if
test=
"CREATE_ID != null and CREATE_ID != ''"
>
and
f.CREATE_ID like concat('%',#{CREATE_ID},'%')
and
manage.CREATE_ID = #{CREATE_ID}
</if>
<if
test=
"CREATE_TIME != null and CREATE_TIME != ''"
>
and
f
.CREATE_TIME = #{CREATE_TIME}
and
manage
.CREATE_TIME = #{CREATE_TIME}
</if>
<if
test=
"UPDATE_ID != null and UPDATE_ID != ''"
>
and
f.UPDATE_ID like concat('%',#{UPDATE_ID},'%')
and
manage.UPDATE_ID = #{UPDATE_ID}
</if>
<if
test=
"UPDATE_TIME != null and UPDATE_TIME != ''"
>
and f.UPDATE_TIME = #{UPDATE_TIME}
and manage.UPDATE_TIME = #{UPDATE_TIME}
</if>
<if
test=
"CREATE_IDS != null and CREATE_IDS != ''"
>
and manage.CREATE_ID IN
<foreach
item=
"item"
index=
"index"
collection=
"CREATE_IDS"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"START_TIME != null and START_TIME != ''"
>
and manage.CREATE_TIME
<![CDATA[ >= ]]>
#{START_TIME}
</if>
<if
test=
"END_TIME != null and END_TIME != ''"
>
and manage.CREATE_TIME
<![CDATA[ <= ]]>
#{END_TIME}
</if>
</trim>
</where>
</sql>
<sql
id=
"where_log_reply"
>
<where>
<trim
prefixOverrides=
"AND |OR"
>
<if
test=
"REPLY_CONTENT != null and REPLY_CONTENT != ''"
>
and lr.REPLY_CONTENT like concat('%',#{REPLY_CONTENT},'%')
</if>
<if
test=
"UUID != null and UUID != ''"
>
and lr.UUID = #{UUID}
</if>
<if
test=
"LOG_ID != null and LOG_ID != ''"
>
and lr.LOG_ID = #{LOG_ID}
</if>
<if
test=
"CREATE_ID != null and CREATE_ID != ''"
>
and lr.CREATE_ID = #{CREATE_ID}
</if>
</trim>
</where>
</sql>
<sql
id=
"where_previous_log"
>
<where>
<trim
prefixOverrides=
"and"
>
<if
test=
"UUID != null and UUID != ''"
>
and manage.UUID
<![CDATA[ <> ]]>
#{UUID}
</if>
<if
test=
"CREATE_TIME != null and CREATE_TIME != ''"
>
and manage.CREATE_TIME
<![CDATA[ >= ]]>
#{CREATE_TIME}
</if>
<if
test=
"CREATE_IDS != null and CREATE_IDS != ''"
>
and manage.CREATE_ID IN
<foreach
item=
"item"
index=
"index"
collection=
"CREATE_IDS"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</trim>
</where>
</sql>
<sql
id=
"where_next_log"
>
<where>
<trim
prefixOverrides=
"and"
>
<if
test=
"UUID != null and UUID != ''"
>
and manage.UUID
<![CDATA[ <> ]]>
#{UUID}
</if>
<if
test=
"CREATE_TIME != null and CREATE_TIME != ''"
>
and manage.CREATE_TIME
<![CDATA[ <= ]]>
#{CREATE_TIME}
</if>
<if
test=
"CREATE_IDS != null and CREATE_IDS != ''"
>
and manage.CREATE_ID IN
<foreach
item=
"item"
index=
"index"
collection=
"CREATE_IDS"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</trim>
</where>
...
...
@@ -91,7 +179,7 @@
<![CDATA[ ) ]]>
</insert>
<delete
id=
"delete_
byL
ogId"
parameterType=
"list"
>
<delete
id=
"delete_
reply_by_l
ogId"
parameterType=
"list"
>
<![CDATA[
delete from LOG_REPLY where LOG_ID IN
]]>
...
...
@@ -112,38 +200,83 @@
</delete>
<select
id=
"list_log"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
SELECT
manage.*,
info1.real_name new_create,
info2.real_name new_update,
reply.*
FROM
log_manage manage
LEFT JOIN `uicm_user_info` info1 ON info1.user_id = manage.create_id
LEFT JOIN `uicm_user_info` info2 ON info2.user_id = manage.update_id
LEFT JOIN ( SELECT log_id, count( * ) reply_count FROM log_reply GROUP BY
log_id ) reply ON manage.uuid = reply.log_id
<include
refid=
"select_log_manage"
/>
<include
refid=
"WHERE"
></include>
order by CREATE_TIME DESC
order by
<choose>
<when
test=
"orderByClause != null"
>
${orderByClause}
</when>
<otherwise>
CREATE_TIME DESC
</otherwise>
</choose>
</select>
<select
id=
"listCount_log"
parameterType=
"map"
resultType=
"int"
>
SELECT count(*) FROM LOG_MANAGE f
<select
id=
"list_count_log"
parameterType=
"map"
resultType=
"int"
>
SELECT COUNT(*)
FROM log_manage manage
LEFT JOIN `uicm_user_info` info1 ON info1.user_id = manage.create_id
LEFT JOIN `uicm_user_info` info2 ON info2.user_id = manage.update_id
LEFT JOIN (
SELECT log_id,count(*) as reply_count
FROM log_reply
GROUP BY log_id
) reply ON manage.uuid = reply.log_id
<include
refid=
"WHERE"
></include>
</select>
<select
id=
"list_reply"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
select *
from LOG_REPLY
where LOG_ID=#{LOG_ID}
order by CREATE_TIME
SELECT
lr.*, lm.log_title,
lm.create_time AS LOG_TIME,
uu2.USER_ID AS LOG_USER_ID,
uu2.USER_NAME AS LOG_USER_NAME,
uu1.USER_NAME AS REPLY_USER_NAME,uu1.USER_SEX
FROM log_reply lr
LEFT JOIN log_manage lm ON lr.log_id = lm.uuid
LEFT JOIN uicm_user uu1 ON lr.reply_user = uu1.USER_ID
LEFT JOIN uicm_user uu2 ON lm.create_id = uu2.USER_ID
<include
refid=
"where_log_reply"
/>
order by lr.REPLY_TIME ASC
</select>
<select
id=
"listCount_reply"
parameterType=
"map"
resultType=
"int"
>
SELECT count(*) FROM LOG_REPLY
where LOG_ID=#{LOG_ID}
<select
id=
"list_count_reply"
parameterType=
"map"
resultType=
"int"
>
SELECT COUNT(*)
FROM log_reply lr
LEFT JOIN log_manage lm ON lr.log_id = lm.uuid
LEFT JOIN uicm_user uu1 ON lr.create_id = uu1.USER_ID
LEFT JOIN uicm_user uu2 ON lm.create_id = uu2.USER_ID
<include
refid=
"where_log_reply"
/>
</select>
<select
id=
"find_previous_log"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
<include
refid=
"select_log_manage"
/>
<include
refid=
"where_previous_log"
/>
order by
<choose>
<when
test=
"orderByClause != null"
>
${orderByClause}
</when>
<otherwise>
CREATE_TIME ASC
</otherwise>
</choose>
limit 0,1
</select>
<select
id=
"find_next_log"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
<include
refid=
"select_log_manage"
/>
<include
refid=
"where_next_log"
/>
order by
<choose>
<when
test=
"orderByClause != null"
>
${orderByClause}
</when>
<otherwise>
CREATE_TIME DESC
</otherwise>
</choose>
limit 0,1
</select>
</mapper>
\ No newline at end of file
src_jwapp/com/jw/app/log/action/actAction.java
View file @
55fc0dab
...
...
@@ -3,19 +3,16 @@ package com.jw.app.log.action;
import
java.util.List
;
import
java.util.Map
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
com.jw.app.business.LogBusiness
;
import
com.gaowj.business.SystemOpeBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.util.QueryParamUtil
;
import
com.gaowj.business.util.RequestUtils
;
import
com.gaowj.business.util.SessionUtil
;
import
com.gaowj.business.util.Status
;
import
com.gaowj.standard.utils.CacheKit
;
import
com.jw.app.business.LogBusiness
;
import
net.sf.json.JSONObject
;
public
class
actAction
extends
BasicAction
{
private
static
final
long
serialVersionUID
=
-
4469183762817854794L
;
...
...
@@ -36,18 +33,15 @@ public class actAction extends BasicAction {
* @throws BusinessException
*/
public
String
insertLog
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
jsonObject
=
new
JSONObject
();
try
{
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
// 去除不要更新的字段
entity
.
remove
(
"OPETYPE"
);
// 新增
business
.
insert_log
(
entity
);
// 操作日志
// sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
...
...
@@ -62,35 +56,26 @@ public class actAction extends BasicAction {
}
/**
* 插入
*
* 插入回复
* @param entity
* @throws BusinessException
*/
public
String
insertReply
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
jsonObject
=
new
JSONObject
();
try
{
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
// 去除不要更新的字段
entity
.
remove
(
"OPETYPE"
);
// 新增
business
.
insert_reply
(
entity
);
// 操作日志
// sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
sysbusiness
.
insert_logBusiness
(
"insertReply"
,
""
+
entity
,
"增加测试数据"
,
(
String
)
entity
.
get
(
"UUID"
),
(
String
)
entity
.
get
(
"CREATE_NAME"
),
"logdemo1"
);
Map
<
String
,
Object
>
result
=
Status
.
getStatusSuccessMessage
(
"保存成功"
);
result
.
put
(
"UUID"
,
entity
.
get
(
"UUID"
));
result
.
put
(
"REPLY_NAME"
,
entity
.
get
(
"REPLY_NAME"
));
result
.
put
(
"CODE"
,
entity
.
get
(
"CODE"
));
result
.
put
(
"REPLY_CONTENT"
,
entity
.
get
(
"REPLY_CONTENT"
));
jsonObject
.
putAll
(
result
);
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"保存成功"
));
}
catch
(
Exception
e
)
{
jsonObject
.
putAll
(
Status
.
getStatusErrorMessage
(
"保存失败"
));
e
.
printStackTrace
();
...
...
@@ -105,11 +90,9 @@ public class actAction extends BasicAction {
* @throws BusinessException
*/
public
String
updateLog
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
try
{
// 去除不要更新的字段
entity
.
remove
(
"OPETYPE"
);
// 修改
...
...
@@ -128,20 +111,19 @@ public class actAction extends BasicAction {
}
/**
*
在软删除基础上删除记录
*
删除日志
*
* @param entity
* @throws BusinessException
*/
public
String
deleteLog
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
String
deletekey
=
(
String
)
entity
.
get
(
"CODE"
);
List
<
String
>
ListKey
=
QueryParamUtil
.
StringToList
(
deletekey
);
try
{
business
.
delete_log
(
ListKey
);
business
.
delete_reply_by_logId
(
ListKey
);
// 操作日志
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
sysbusiness
.
insert_logBusiness
(
"deleteLog"
,
""
+
ListKey
,
"删除测试数据"
,
deletekey
,
"多个流水号"
,
"logdemo1"
);
...
...
@@ -154,27 +136,22 @@ public class actAction extends BasicAction {
}
/**
*
在软删除基础上删除记录
*
删除日志回复
*
* @param entity
* @throws BusinessException
*/
public
String
deleteReply
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
String
deletekey
=
(
String
)
entity
.
get
(
"CODE"
);
List
<
String
>
ListKey
=
QueryParamUtil
.
StringToList
(
deletekey
);
String
thiscode
=
(
String
)
entity
.
get
(
"THISCODE"
);
String
sessioncode
=
SessionUtil
.
getCode
();
try
{
if
(
thiscode
==
null
||
thiscode
.
equals
(
sessioncode
))
{
business
.
delete_reply
(
ListKey
);
// 操作日志
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
sysbusiness
.
insert_logBusiness
(
"deleteLog"
,
""
+
ListKey
,
"删除测试数据"
,
deletekey
,
"多个流水号"
,
"logdemo1"
);
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"删除成功"
));
}
}
catch
(
Exception
e
)
{
jsonObject
.
putAll
(
Status
.
getStatusErrorMessage
(
"删除失败"
));
e
.
printStackTrace
();
...
...
src_jwapp/com/jw/app/log/action/dataAction.java
View file @
55fc0dab
...
...
@@ -6,48 +6,49 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
net.sf.json.JSONObject
;
import
com.jw.app.business.LogBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.PropUtil
;
import
com.gaowj.business.util.QueryParamUtil
;
import
com.gaowj.business.util.RequestUtils
;
import
com.
gaowj.business.util.SessionUtil
;
import
com.gaowj.business.util.TestMd5
;
import
com.gaowj.standard.utils.CacheKi
t
;
import
com.
jw.app.business.LogBusiness
;
import
net.sf.json.JSONObjec
t
;
public
class
dataAction
extends
BasicAction
{
private
static
final
long
serialVersionUID
=
4416458722090020762L
;
/**
*
*/
private
static
final
long
serialVersionUID
=
130092601374320487L
;
private
JSONObject
jsonObject
=
new
JSONObject
();
private
int
rows
=
20
;
// 每页显示的记录数
private
int
page
=
1
;
// 当前第几页
public
JSONObject
getJsonObject
()
{
return
jsonObject
;
}
public
void
setJsonObject
(
JSONObject
jsonObject
)
{
this
.
jsonObject
=
jsonObject
;
}
public
int
getRows
()
{
rows
=
getPageSize
();
return
rows
;
}
public
void
setRows
(
int
rows
)
{
this
.
rows
=
rows
;
setPageSize
(
rows
);
this
.
rows
=
getPageSize
();
}
public
int
getPage
()
{
page
=
getPageNo
();
return
page
;
}
public
void
setPage
(
int
page
)
{
this
.
page
=
page
;
setPageNo
(
page
);
this
.
page
=
getPageNo
();
}
/**
...
...
@@ -91,34 +92,8 @@ public class dataAction extends BasicAction {
public
String
listAll
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
try
{
// 表示获取前台表单提交的所有"FIELD_"开始的键值数据,例如FIELD_NAME,FIELD_CODE....
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
// 把前端传进来的字符型时间数据例 如DATE_2018-09-09转换成DATE型的时间数据。
// 主要和前端is_entity.FIELD_CREATE_TIME =
// strToDateObj(is_entity.FIELD_CREATE_TIME)配对使用。
// 前端提交前strToDateObj方法会把时间处理成DATE_2018-09-09再提交
query
=
QueryParamUtil
.
StringToDate
(
query
);
// session工具
String
code
=
SessionUtil
.
getCode
();
// 当前用户ID
String
emid
=
SessionUtil
.
getEmid
();
// 当前用户帐号
String
emname
=
SessionUtil
.
getEmname
();
// 当前用户名称
String
emdepart
=
SessionUtil
.
getEmdepart
();
// 当前用户部门id
String
emdepartname
=
SessionUtil
.
getEmdepartname
();
// 当前用户部门名称
String
emsex
=
SessionUtil
.
getEmsex
();
// 当前用户性别
String
loginip
=
SessionUtil
.
getLoginip
();
// 当前用户登录IP
String
clientip
=
SessionUtil
.
getClientIp
();
// 获取客户端IP
String
quanxian
=
SessionUtil
.
getQuanxian
();
// 获取当前用户使用模块清单
String
sessionid
=
SessionUtil
.
getSessionid
();
// 获取当前用户sessionID
String
currenttimme
=
SessionUtil
.
getCurrenttime
();
// 当前用户本次登录时间
String
beforetime
=
SessionUtil
.
getBeforetime
();
// 当前用户上次登录时间
// 配置文件工具
// 表示获取src目录下quartz_service.properties文件中主键是login_main_url的值
String
tt
=
PropUtil
.
getValue
(
"login_main_url"
,
"quartz_service"
,
""
);
List
<
Map
<
String
,
Object
>>
listData
=
business
.
list_log
(
query
);
int
listDataCount
=
listData
.
size
();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -140,7 +115,7 @@ public class dataAction extends BasicAction {
return
"json"
;
}
public
String
list
Item
()
throws
BusinessException
{
public
String
list
Reply
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
try
{
...
...
@@ -156,9 +131,67 @@ public class dataAction extends BasicAction {
data
.
put
(
"total"
,
pageRows
.
getCount
());
jsonObject
=
new
JSONObject
();
jsonObject
.
putAll
(
data
);
// List<Map<String, Object>> listItems = business.list_reply(query);
// jsonObject = new JSONObject();
// jsonObject.put("listItems", listItems);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
"json"
;
}
public
String
listReplyAll
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
try
{
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
query
=
QueryParamUtil
.
StringToDate
(
query
);
List
<
Map
<
String
,
Object
>>
listData
=
business
.
list_reply
(
query
);
int
listDataCount
=
listData
.
size
();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
data
.
put
(
"rowSet"
,
QueryParamUtil
.
DateTimeToString
(
listData
));
data
.
put
(
"pageNo"
,
1
);
data
.
put
(
"pageSize"
,
listDataCount
);
data
.
put
(
"pageCount"
,
listDataCount
);
data
.
put
(
"rows"
,
data
.
get
(
"rowSet"
));
data
.
put
(
"total"
,
listDataCount
);
jsonObject
=
new
JSONObject
();
jsonObject
.
putAll
(
data
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
"json"
;
}
public
String
findPreviousLog
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
try
{
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
query
=
QueryParamUtil
.
StringToDate
(
query
);
List
<
Map
<
String
,
Object
>>
listData
=
business
.
find_previous_log
(
query
);
int
listDataCount
=
listData
.
size
();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
data
.
put
(
"data"
,
QueryParamUtil
.
DateTimeToString
(
listData
));
data
.
put
(
"total"
,
listDataCount
);
jsonObject
=
new
JSONObject
();
jsonObject
.
putAll
(
data
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
"json"
;
}
public
String
findNextLog
()
throws
BusinessException
{
LogBusiness
business
=
BusinessManager
.
getBusiness
(
LogBusiness
.
class
);
try
{
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
query
=
QueryParamUtil
.
StringToDate
(
query
);
List
<
Map
<
String
,
Object
>>
listData
=
business
.
find_next_log
(
query
);
int
listDataCount
=
listData
.
size
();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
data
.
put
(
"data"
,
QueryParamUtil
.
DateTimeToString
(
listData
));
data
.
put
(
"total"
,
listDataCount
);
jsonObject
=
new
JSONObject
();
jsonObject
.
putAll
(
data
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
...
...
src_jwapp/com/jw/app/log/action/viewAction.java
View file @
55fc0dab
...
...
@@ -19,13 +19,9 @@ public class viewAction extends BasicAction {
return
"logTabDetail"
;
}
public
String
replyTab
Detail
()
throws
BusinessException
{
public
String
replyTab
()
throws
BusinessException
{
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMapUtf8
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
request
.
setAttribute
(
"is_row"
,
query
);
return
"replyTabDetail"
;
}
public
String
replyTab
()
throws
BusinessException
{
return
"replyTab"
;
}
...
...
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