Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac_report
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
java-sunac-report
sunac_report
Commits
9831dc18
Commit
9831dc18
authored
Sep 18, 2017
by
Java-李昕颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
举报移交
parent
ad8e3800
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
149 deletions
+72
-149
ReportService.java
src/main/java/com/ejweb/modules/report/service/ReportService.java
+9
-7
ReportController.java
src/main/java/com/ejweb/modules/report/web/ReportController.java
+62
-26
ReportDao.xml
src/main/resources/mappings/modules/report/ReportDao.xml
+1
-6
reportTrack.jsp
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
+0
-0
reportTransfer.jsp
src/main/webapp/WEB-INF/views/modules/report/reportTransfer.jsp
+0
-110
No files found.
src/main/java/com/ejweb/modules/report/service/ReportService.java
View file @
9831dc18
...
...
@@ -214,13 +214,15 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
}
/**
* 移交
举报
* @param
user
Id
* @param
id
* 移交
后发送消息
* @param
report
Id
* @param
supplementTitle
* @return
*/
@Transactional
(
readOnly
=
false
)
public
int
modifyExchangeAfterUser
(
String
userId
,
String
id
){
return
reportDao
.
modifyExchangeAfterUser
(
userId
,
id
);
}
// @Transactional(readOnly = false)
// public int addNotice(String reportId,String supplementTitle){
//
// if ()
// return reportDao.modifyExchangeAfterUser(userId,id);
// }
}
src/main/java/com/ejweb/modules/report/web/ReportController.java
View file @
9831dc18
package
com
.
ejweb
.
modules
.
report
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.ejweb.core.base.BaseController
;
import
com.ejweb.core.persistence.Page
;
import
com.ejweb.core.utils.StringUtils
;
...
...
@@ -20,6 +21,8 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.List
;
/**
...
...
@@ -144,16 +147,28 @@ public class ReportController extends BaseController {
* @return
*/
@RequestMapping
(
value
=
"track"
)
public
String
track
(
ReportEntity
reportEntity
,
Model
model
)
{
public
String
track
(
ReportEntity
reportEntity
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
{
User
user
=
UserUtils
.
getUser
();
String
roleName
=
reportService
.
findRole
(
user
);
String
transferFlag
=
"0"
;
if
(
roleName
.
equals
(
"系统管理员"
)){
transferFlag
=
"1"
;
}
List
<
Office
>
companyList
=
reportService
.
getCompanyList
();
List
<
Office
>
officeList
=
reportService
.
getOfficeList
();
List
<
User
>
positionList
=
reportService
.
getPositionList
();
Page
<
User
>
page
=
reportService
.
findUserPage
(
new
Page
<
User
>(
request
,
response
),
user
);
User
userEntity
=
new
User
();
Page
<
User
>
userPage
=
reportService
.
findUserPage
(
new
Page
<
User
>(
request
,
response
),
userEntity
);
model
.
addAttribute
(
"page"
,
page
);
model
.
addAttribute
(
"user"
,
userEntity
);
model
.
addAttribute
(
"currentUser"
,
user
.
getName
());
model
.
addAttribute
(
"transferFlag"
,
transferFlag
);
model
.
addAttribute
(
"report"
,
reportEntity
);
model
.
addAttribute
(
"companyList"
,
companyList
);
model
.
addAttribute
(
"officeList"
,
officeList
);
model
.
addAttribute
(
"positionList"
,
positionList
);
model
.
addAttribute
(
"userPage"
,
userPage
);
return
"modules/report/reportTrack"
;
}
...
...
@@ -178,37 +193,58 @@ public class ReportController extends BaseController {
* 移交列表
*
* @param user
* @param model
* @param request
* @param response
* @return
*/
@RequestMapping
(
value
=
"viewTransfer"
)
public
String
viewTransfer
(
ReportEntity
reportEntity
,
User
user
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
{
public
void
viewTransfer
(
User
user
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
throws
IOException
{
Page
<
User
>
page
=
reportService
.
findUserPage
(
new
Page
<
User
>(
request
,
response
),
user
);
List
<
Office
>
companyList
=
reportService
.
getCompanyList
();
List
<
Office
>
officeList
=
reportService
.
getOfficeList
();
List
<
User
>
positionList
=
reportService
.
getPositionList
();
model
.
addAttribute
(
"page"
,
page
);
model
.
addAttribute
(
"companyList"
,
companyList
);
model
.
addAttribute
(
"officeList"
,
officeList
);
model
.
addAttribute
(
"positionList"
,
positionList
);
model
.
addAttribute
(
"User"
,
user
);
model
.
addAttribute
(
"report"
,
reportEntity
);
return
"modules/report/reportTransfer"
;
}
StringBuffer
html
=
new
StringBuffer
();
html
.
append
(
"<table id='contentTable' class='table table-striped table-bordered table-condensed'>"
);
html
.
append
(
" <thead>"
);
html
.
append
(
" <tr>"
);
html
.
append
(
" <th>选择</th>"
);
html
.
append
(
" <th>ID</th>"
);
html
.
append
(
" <th>员工号</th>"
);
html
.
append
(
" <th>姓名</th>"
);
html
.
append
(
" <th>手机号</th>"
);
html
.
append
(
" <th>所属公司</th>"
);
html
.
append
(
" <th>所属部门</th>"
);
html
.
append
(
" <th>职位</th>"
);
html
.
append
(
" </tr>"
);
html
.
append
(
" </thead>"
);
html
.
append
(
" <tbody>"
);
if
(
page
.
getList
().
size
()
>
0
){
int
i
=
1
;
for
(
User
userEntity
:
page
.
getList
()){
html
.
append
(
" <tr>"
);
html
.
append
(
" <td><input type='radio' value='"
+
userEntity
.
getId
()+
"' onclick='chooseRen(this);'></td>"
);
html
.
append
(
" <td>"
+
i
+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getNo
()==
null
?
""
:
userEntity
.
getNo
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getName
()==
null
?
""
:
userEntity
.
getName
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getMobile
()==
null
?
""
:
userEntity
.
getMobile
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getCompany
()==
null
?
""
:
userEntity
.
getCompany
().
getName
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getOffice
()==
null
?
""
:
userEntity
.
getOffice
().
getName
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getPositionName
()==
null
?
""
:
userEntity
.
getPositionName
())+
"</td>"
);
html
.
append
(
" </tr>"
);
i
++;
}
}
html
.
append
(
" </tbody>"
);
html
.
append
(
"</table>"
);
html
.
append
(
"<span id='chooseItem'></span>"
);
if
(
page
.
getList
().
size
()
==
0
){
html
.
append
(
" <span style='color: #999999;margin: 20px 0 70px 20px;display: block;'>未查询到相关内容</span>"
);
}
if
(
page
.
getList
().
size
()
>
0
){
html
.
append
(
" <div class='pagination'>"
+
page
+
"</div>"
);
}
PrintWriter
out
=
response
.
getWriter
();
response
.
setContentType
(
"application/json;charset=utf-8"
);
out
.
write
(
html
.
toString
());
out
.
close
();
/**
* 移交操作
*
* @param userId
* @param model
* @return
*/
@RequestMapping
(
value
=
"transfer"
)
public
String
transfer
(
ReportEntity
reportEntity
,
String
userId
,
Model
model
,
RedirectAttributes
redirectAttributes
)
{
reportService
.
modifyExchangeAfterUser
(
userId
,
reportEntity
.
getId
());
addMessage
(
redirectAttributes
,
"移交举报"
+
reportEntity
.
getReportProject
()
+
"'成功"
);
return
"redirect:"
+
adminPath
+
"/report/list/?repage&flag=0"
;
}
}
src/main/resources/mappings/modules/report/ReportDao.xml
View file @
9831dc18
...
...
@@ -194,6 +194,7 @@
supplement_project = #{supplementProject},
supplement_content = #{supplementContent},
deal_person_name = #{dealPersonName},
exchange_after_user = #{exchangeAfterUser},
deal_result = #{dealResult},
update_by = #{updateBy.id},
update_date = #{updateDate}
...
...
@@ -276,12 +277,6 @@
FROM sys_position
</select>
<update
id=
"modifyExchangeAfterUser"
parameterType=
"HashMap"
>
UPDATE report SET
exchange_after_user = #{0}
WHERE id = #{1}
</update>
<select
id=
"getReportStatus"
parameterType=
"com.ejweb.modules.workbench.Bean.WorkbenchBean"
resultType=
"java.util.HashMap"
>
select report_status,COUNT(report_status)
FROM report
...
...
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
View file @
9831dc18
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/modules/report/reportTransfer.jsp
deleted
100644 → 0
View file @
ad8e3800
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/WEB-INF/views/include/taglib.jsp"
%
>
<html>
<head>
<title>
举报管理
</title>
<meta
name=
"decorator"
content=
"default"
/>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
"#btnConfirm"
).
click
(
function
()
{
var
userId
=
$
(
'input:radio:checked'
).
val
();
var
id
=
"${report.id}"
;
window
.
location
.
href
=
"${ctx}/report/transfer?id="
+
id
+
"&userId="
+
userId
;
});
$
(
"input:radio"
).
click
(
function
()
{
$
(
"input:radio"
).
attr
(
"checked"
,
false
);
$
(
"#chooseItem"
).
empty
();
$
(
this
).
attr
(
"checked"
,
true
);
$
(
"#chooseItem"
).
html
(
"已选择 "
+
$
(
"input:radio:checked"
).
parent
().
next
().
next
().
next
().
html
()
+
"<span onclick='remove();'><font size='5'> ×</font></span>"
);
});
});
function
remove
(){
$
(
"input:radio"
).
attr
(
"checked"
,
false
);
$
(
"#chooseItem"
).
empty
();
}
function
page
(
n
,
s
){
$
(
"#pageNo"
).
val
(
n
);
$
(
"#pageSize"
).
val
(
s
);
$
(
"#searchForm"
).
attr
(
"action"
,
"${ctx}/report/viewTransfer"
);
$
(
"#searchForm"
).
submit
();
return
false
;
}
function
resetPageNo
()
{
$
(
"#pageNo"
).
val
(
0
);
}
</script>
</head>
<body>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"${ctx}/report/viewTransfer"
>
选择移交人员
</a></li>
</ul>
<form:form
id=
"searchForm"
modelAttribute=
"user"
action=
"${ctx}/report/viewTransfer?id=${report.id}"
method=
"post"
class=
"breadcrumb form-search"
>
<input
id=
"pageNo"
name=
"pageNo"
type=
"hidden"
value=
"${page.pageNo}"
/>
<input
id=
"pageSize"
name=
"pageSize"
type=
"hidden"
value=
"${page.pageSize}"
/>
<ul
class=
"ul-form"
>
<li><label>
员工号:
</label><form:input
onchange=
"resetPageNo();"
path=
"no"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-small"
/></li>
<li><label>
姓名:
</label><form:input
onchange=
"resetPageNo();"
path=
"name"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-small"
/></li>
<li><label>
手机号:
</label><form:input
onchange=
"resetPageNo();"
path=
"mobile"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-small"
/></li>
<li><label>
公司:
</label><form:select
onchange=
"resetPageNo();"
path=
"company.id"
class=
"input-small "
>
<form:option
value=
" "
>
请选择
</form:option>
<form:options
items=
"${companyList}"
itemLabel=
"name"
itemValue=
"id"
htmlEscape=
"false"
/>
</form:select></li>
<li
class=
"clearfix"
></li>
<li><label>
部门:
</label><form:select
onchange=
"resetPageNo();"
path=
"office.id"
class=
"input-small"
>
<form:option
value=
" "
>
请选择
</form:option>
<form:options
items=
"${officeList}"
itemLabel=
"name"
itemValue=
"id"
htmlEscape=
"false"
/></form:select></li>
<li><label>
职位:
</label><form:select
onchange=
"resetPageNo();"
path=
"positionName"
class=
"input-small"
>
<form:option
value=
" "
>
请选择
</form:option>
<form:options
items=
"${positionList}"
itemLabel=
"positionName"
itemValue=
"positionName"
htmlEscape=
"false"
/></form:select></li>
<li
class=
"btns"
>
<label
style=
"width:auto;"
><input
id=
"btnSubmit"
class=
"btn btn-primary"
type=
"submit"
value=
"筛选"
/>
</label>
</li>
<li
class=
"clearfix"
></li>
</ul>
</form:form>
<sys:message
content=
"${message}"
/>
<table
id=
"contentTable"
class=
"table table-striped table-bordered table-condensed"
>
<thead>
<tr>
<th>
选择
</th>
<th>
ID
</th>
<th>
员工号
</th>
<th>
姓名
</th>
<th>
手机号
</th>
<th>
所属公司
</th>
<th>
所属部门
</th>
<th>
职位
</th>
</tr>
</thead>
<tbody>
<c:if
test=
"${page.list.size()>0}"
>
<c:forEach
items=
"${page.list}"
var=
"user"
varStatus=
"vs"
>
<tr>
<td><input
type=
"radio"
value=
"${user.id}"
></td>
<td>
${vs.count}
</td>
<td>
${user.no}
</td>
<td>
${user.name}
</td>
<td>
${user.mobile}
</td>
<td>
${user.company.name}
</td>
<td>
${user.office.name}
</td>
<td>
${user.positionName}
</td>
</tr>
</c:forEach>
</c:if>
</tbody>
</table>
<span
id=
"chooseItem"
></span>
<c:if
test=
"${page.list.size()=='0'}"
>
<span
style=
"color: #999999;margin: 20px 0 70px 20px;display: block;"
>
未查询到相关内容
</span>
</c:if>
<c:if
test=
"${page.list.size()>0}"
>
<div
class=
"pagination"
>
${page}
</div>
</c:if>
<li
class=
"btns"
>
<label
style=
"width:auto;"
><input
id=
"btnConfirm"
class=
"btn btn-primary"
type=
"button"
value=
"确定"
/>
<input
id=
"btnClose"
class=
"btn btn-primary"
type=
"button"
value=
"关闭"
onclick=
"javascript:window.close();"
/></label>
</li>
</body>
</html>
\ No newline at end of file
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