Commit 0e0b860b by Java-聂换换

Merge remote-tracking branch 'origin/develop' into develop-niehh

parents ac05b9c3 e6b35122
package com.ejweb.modules.report.dao;
import com.ejweb.core.persistence.CrudDao;
import com.ejweb.core.persistence.annotation.MyBatisDao;
import com.ejweb.modules.report.entity.ReportAttachmentEntity;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.sys.entity.User;
/**
* 举报DAO接口
* @author lixy
* @version 2017-09-06
*/
@MyBatisDao
public interface ReportDao extends CrudDao<ReportEntity> {
/**
* 查询用户角色
* @param user
* @return
*/
public String findRole(User user);
/**
* 新增举报
* @param reportEntity
* @return
*/
public int addReport(ReportEntity reportEntity);
/**
* 新增附件
* @param reportAttachmentEntity
* @return
*/
public int addReportAttachment(ReportAttachmentEntity reportAttachmentEntity);
}
package com.ejweb.modules.report.entity;
import com.ejweb.core.persistence.DataEntity;
/**
* 举报附件Entity
* @author lixy
* @version 2017-09-07
*/
public class ReportAttachmentEntity extends DataEntity<ReportAttachmentEntity>{
private static final long serialVersionUID = 1L;
private String reportId; //关联主键
private String attachmentName; //附件名称
private String attachmentPath; //附件路径
private int attachmentSize; //附件大小
private String attachmentType; //附件类型 0 举报提交 1 补充提交 2 处理成果文件
public String getReportId() {
return reportId;
}
public void setReportId(String reportId) {
this.reportId = reportId;
}
public String getAttachmentName() {
return attachmentName;
}
public void setAttachmentName(String attachmentName) {
this.attachmentName = attachmentName;
}
public String getAttachmentPath() {
return attachmentPath;
}
public void setAttachmentPath(String attachmentPath) {
this.attachmentPath = attachmentPath;
}
public int getAttachmentSize() {
return attachmentSize;
}
public void setAttachmentSize(int attachmentSize) {
this.attachmentSize = attachmentSize;
}
public String getAttachmentType() {
return attachmentType;
}
public void setAttachmentType(String attachmentType) {
this.attachmentType = attachmentType;
}
}
package com.ejweb.modules.report.entity;
import com.ejweb.core.persistence.DataEntity;
/**
* 举报Entity
* @author lixy
* @version 2017-09-06
*/
public class ReportEntity extends DataEntity<ReportEntity> {
private static final long serialVersionUID = 1L;
private String reportProject; //被举报项目
private String reportCity; //所在城市
private String reportTime; //举报时间
private String reportContent; //举报内容
private String reportPersonName; //举报人姓名
private String reportPersonTel; //举报人电话
private String reportPersonEmail; //举报人邮箱
private String reportSource; //举报途径 web:官网 oa:融创OA系统 supplier:供应商系统 wechat:微信公众号 sunacE:融E offline:线下扫码 tel:电话 email:邮件 visit:来访
private String reportStatus; //举报状态 0 未处理 1 处理中 2 已处理
private String supplementCompany; //被举报公司
private String supplementDepartment; //被举报部门
private String supplementInformant; //被举报人
private String supplementTitle; //标题
private String supplementType; //业务类型 1 营销 2 工程 3 成本 4 招采 5人力 6物业 7投诉
private String supplementArea; //被举报区域
private String supplementProject; //被举报项目
private String supplementContent; //
private String dealPersonName; //处理人
private String dealResult; //处理结论 1 投诉 2 举报无效 3 举报属实
private String exchangeBeforeUser; //移交/转交前用户
private String exchangeAfterUser; //移交/转交后用户(只记录最新的移交用户,此处不记录历史)
private String reportTimeFrom; //举报时间起
private String reportTimeTo; //举报时间止
private ReportAttachmentEntity reportAttachmentEntity;
public String getReportProject() {
return reportProject;
}
public void setReportProject(String reportProject) {
this.reportProject = reportProject;
}
public String getReportCity() {
return reportCity;
}
public void setReportCity(String reportCity) {
this.reportCity = reportCity;
}
public String getReportTime() {
return reportTime;
}
public void setReportTime(String reportTime) {
this.reportTime = reportTime;
}
public String getReportContent() {
return reportContent;
}
public void setReportContent(String reportContent) {
this.reportContent = reportContent;
}
public String getReportPersonName() {
return reportPersonName;
}
public void setReportPersonName(String reportPersonName) {
this.reportPersonName = reportPersonName;
}
public String getReportPersonTel() {
return reportPersonTel;
}
public void setReportPersonTel(String reportPersonTel) {
this.reportPersonTel = reportPersonTel;
}
public String getReportPersonEmail() {
return reportPersonEmail;
}
public void setReportPersonEmail(String reportPersonEmail) {
this.reportPersonEmail = reportPersonEmail;
}
public String getReportSource() {
return reportSource;
}
public void setReportSource(String reportSource) {
this.reportSource = reportSource;
}
public String getReportStatus() {
return reportStatus;
}
public void setReportStatus(String reportStatus) {
this.reportStatus = reportStatus;
}
public String getSupplementCompany() {
return supplementCompany;
}
public void setSupplementCompany(String supplementCompany) {
this.supplementCompany = supplementCompany;
}
public String getSupplementDepartment() {
return supplementDepartment;
}
public void setSupplementDepartment(String supplementDepartment) {
this.supplementDepartment = supplementDepartment;
}
public String getSupplementInformant() {
return supplementInformant;
}
public void setSupplementInformant(String supplementInformant) {
this.supplementInformant = supplementInformant;
}
public String getSupplementTitle() {
return supplementTitle;
}
public void setSupplementTitle(String supplementTitle) {
this.supplementTitle = supplementTitle;
}
public String getSupplementType() {
return supplementType;
}
public void setSupplementType(String supplementType) {
this.supplementType = supplementType;
}
public String getSupplementArea() {
return supplementArea;
}
public void setSupplementArea(String supplementArea) {
this.supplementArea = supplementArea;
}
public String getSupplementProject() {
return supplementProject;
}
public void setSupplementProject(String supplementProject) {
this.supplementProject = supplementProject;
}
public String getSupplementContent() {
return supplementContent;
}
public void setSupplementContent(String supplementContent) {
this.supplementContent = supplementContent;
}
public String getDealPersonName() {
return dealPersonName;
}
public void setDealPersonName(String dealPersonName) {
this.dealPersonName = dealPersonName;
}
public String getDealResult() {
return dealResult;
}
public void setDealResult(String dealResult) {
this.dealResult = dealResult;
}
public String getExchangeBeforeUser() {
return exchangeBeforeUser;
}
public void setExchangeBeforeUser(String exchangeBeforeUser) {
this.exchangeBeforeUser = exchangeBeforeUser;
}
public String getExchangeAfterUser() {
return exchangeAfterUser;
}
public void setExchangeAfterUser(String exchangeAfterUser) {
this.exchangeAfterUser = exchangeAfterUser;
}
public String getReportTimeFrom() {
return reportTimeFrom;
}
public void setReportTimeFrom(String reportTimeFrom) {
this.reportTimeFrom = reportTimeFrom;
}
public String getReportTimeTo() {
return reportTimeTo;
}
public void setReportTimeTo(String reportTimeTo) {
this.reportTimeTo = reportTimeTo;
}
public ReportAttachmentEntity getReportAttachmentEntity() {
return reportAttachmentEntity;
}
public void setReportAttachmentEntity(ReportAttachmentEntity reportAttachmentEntity) {
this.reportAttachmentEntity = reportAttachmentEntity;
}
}
package com.ejweb.modules.report.service;
import com.ejweb.core.service.CrudService;
import com.ejweb.core.utils.IdGen;
import com.ejweb.modules.report.dao.ReportDao;
import com.ejweb.modules.report.entity.ReportAttachmentEntity;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.sys.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.text.SimpleDateFormat;
/**
* 举报Service
* @author lixy
* @version 2017-09-06
*/
@Service
@Transactional(readOnly = true)
public class ReportService extends CrudService<ReportDao, ReportEntity> {
@Autowired
private ReportDao reportDao;
/**
* 查询用户角色
* @param user
* @return
*/
public String findRole(User user) {
return reportDao.findRole(user);
}
/**
* 新增举报
* @param reportEntity
*/
@Transactional(readOnly = false)
public void save(ReportEntity reportEntity) {
reportEntity.preInsert();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String reportTime = sdf.format(reportEntity.getCreateDate());
reportEntity.setReportTime(reportTime);
reportEntity.setReportStatus("0");
reportEntity.setExchangeBeforeUser(reportEntity.getCreateBy().getId());
reportEntity.setExchangeAfterUser(reportEntity.getCreateBy().getId());
dao.addReport(reportEntity);
ReportAttachmentEntity reportAttachmentEntity = reportEntity.getReportAttachmentEntity();
reportAttachmentEntity.setId(IdGen.uuid());
reportAttachmentEntity.setReportId(reportEntity.getId());
//获取文件名
int beginIndex = reportAttachmentEntity.getAttachmentPath().indexOf("%");
int endIndex = reportAttachmentEntity.getAttachmentPath().lastIndexOf(".");
String fileNameUrlCode = reportAttachmentEntity.getAttachmentPath().substring(beginIndex,endIndex);
String prefixName = reportAttachmentEntity.getAttachmentPath().substring(endIndex,reportAttachmentEntity.getAttachmentPath().length());
try {
String fileName = URLDecoder.decode(fileNameUrlCode,"UTF-8");
reportAttachmentEntity.setAttachmentName(fileName+prefixName);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
File file = new File(reportAttachmentEntity.getAttachmentPath());
long length = file.length();
reportAttachmentEntity.setAttachmentType("0");
reportDao.addReportAttachment(reportAttachmentEntity);
}
}
package com.ejweb.modules.report.web;
import com.ejweb.core.base.BaseController;
import com.ejweb.core.persistence.Page;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.service.ReportService;
import com.ejweb.modules.sys.entity.User;
import com.ejweb.modules.sys.utils.UserUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 举报Controller
* @author lixy
* @version 2017-09-06
*/
@Controller
@RequestMapping(value = "${adminPath}/report")
public class ReportController extends BaseController {
@Autowired
private ReportService reportService;
@ModelAttribute
public ReportEntity get(@RequestParam(required = false) String id) {
if (StringUtils.isNotBlank(id)) {
return reportService.get(id);
} else {
return new ReportEntity();
}
}
// 举报列表
@RequiresPermissions("report:view")
@RequestMapping(value = {"list", ""})
public String list(ReportEntity reportEntity, String flag,HttpServletRequest request, HttpServletResponse response, Model model) {
//判断登录人的角色
User user = UserUtils.getUser();
String roleName = reportService.findRole(user);
if (StringUtils.isNotBlank(roleName)){
if (!roleName.equals("系统管理员")){
reportEntity.setExchangeAfterUser(user.getId());
}
}
//判断标签状态 flag为空,跳转到核查中举报列表 flag为0,跳转到未处理举报列表 flag为1,跳转到举报列表
if (StringUtils.isNotBlank(flag)){
if (flag.equals("0")){
if (StringUtils.isBlank(reportEntity.getReportStatus())) {
reportEntity.setReportStatus("0");
}
}
}else{
if (StringUtils.isBlank(reportEntity.getReportStatus())) {
reportEntity.setReportStatus("1");
}
}
Page<ReportEntity> page = reportService.findPage(new Page<ReportEntity>(request, response), reportEntity);
model.addAttribute("page", page);
model.addAttribute("report", reportEntity);
model.addAttribute("flag", flag);
return "modules/report/reportList";
}
@RequestMapping(value = "/form")
public String form(ReportEntity reportEntity, Model model) {
model.addAttribute("reportEntity", reportEntity);
return "modules/report/reportForm";
}
@RequestMapping(value = "addReport")
public String addReport(ReportEntity reportEntity, Model model, RedirectAttributes redirectAttributes) {
if (!beanValidator(model, reportEntity)) {
return form(reportEntity, model);
}
reportService.save(reportEntity);
addMessage(redirectAttributes, "添加举报"+ reportEntity.getReportProject() + "'成功");
return "redirect:" + adminPath + "/report/list/?repage&flag=0";
}
@RequestMapping(value = "view")
public String view(ReportEntity reportEntity, Model model, RedirectAttributes redirectAttributes) {
model.addAttribute("reportEntity", reportEntity);
return "modules/report/reportDetail";
}
}
<?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.ejweb.modules.report.dao.ReportDao">
<sql id="reportColumns">
r.id AS "id",
r.report_project AS "reportProject",
r.report_city AS "reportCity",
r.report_time AS "reportTime",
r.report_content AS "reportContent",
r.report_person_name AS "reportPersonName",
r.report_person_tel AS "reportPersonTel",
r.report_person_email AS "reportPersonEmail",
r.report_source AS "reportSource",
r.report_status AS "reportStatus",
r.supplement_company AS "supplementCompany",
r.supplement_department AS "supplementDepartment",
r.supplement_informant AS "supplementInformant",
r.supplement_title AS "supplementTitle",
r.supplement_type AS "supplementType",
r.supplement_area AS "supplementArea",
r.supplement_project AS "supplementProject",
r.supplement_content AS "supplementContent",
r.deal_person_name AS "dealPersonName",
r.deal_result AS "dealResult",
r.exchange_before_user AS "exchangeBeforeUser",
r.exchange_after_user AS "exchangeAfterUser",
r.create_by AS "createBy",
r.create_date AS "createDate",
r.update_by AS "updateBy",
r.update_date AS "updateDate",
ra.attachment_name AS "reportAttachmentEntity.attachmentName",
ra.attachment_path AS "reportAttachmentEntity.attachmentPath",
ra.attachment_size AS "reportAttachmentEntity.attachmentSize",
ra.attachment_type AS "reportAttachmentEntity.attachmentType"
</sql>
<sql id="reportJoins">
LEFT JOIN report_attachment ra ON r.id = ra.report_id
</sql>
<select id="get" parameterType="ReportEntity" resultType="ReportEntity">
SELECT
<include refid="reportColumns"/>
FROM report r
<include refid="reportJoins"/>
WHERE r.id = #{id}
</select>
<select id="findList" parameterType="ReportEntity" resultType="ReportEntity">
SELECT
<include refid="reportColumns"/>
FROM report r
<include refid="reportJoins"/>
<where>
1 = 1
<if test="exchangeAfterUser != null and exchangeAfterUser != ''">
AND r.exchange_after_user = #{exchangeAfterUser}
</if>
<if test="reportStatus != null and reportStatus != ''">
AND r.report_status = #{reportStatus}
</if>
<if test="supplementTitle != null and supplementTitle != ''">
AND r.supplement_title LIKE
<if test="dbName == 'oracle'">'%'||#{supplementTitle}||'%'</if>
<if test="dbName == 'mssql'">'%'+#{supplementTitle}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{supplementTitle}, '%')</if>
</if>
<if test="reportProject != null and reportProject != ''">
AND r.report_project LIKE
<if test="dbName == 'oracle'">'%'||#{reportProject}||'%'</if>
<if test="dbName == 'mssql'">'%'+#{reportProject}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{reportProject}, '%')</if>
</if>
<if test="reportTimeFrom != null and reportTimeFrom != ''">
AND r.report_time &gt;= #{reportTimeFrom}
</if>
<if test="reportTimeTo != null and reportTimeTo != ''">
AND r.report_time &lt;= #{reportTimeFrom}
</if>
<if test="reportPersonName != null and reportPersonName != ''">
AND r.report_person_name LIKE
<if test="dbName == 'oracle'">'%'||#{reportPersonName}||'%'</if>
<if test="dbName == 'mssql'">'%'+#{reportPersonName}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{reportPersonName}, '%')</if>
</if>
<if test="reportPersonTel != null and reportPersonTel != ''">
AND r.report_person_tel LIKE
<if test="dbName == 'oracle'">'%'||#{reportPersonTel}||'%'</if>
<if test="dbName == 'mssql'">'%'+#{reportPersonTel}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{reportPersonTel}, '%')</if>
</if>
<if test="supplementType != null and supplementType != ''">
AND r.supplement_type = #{supplementType}
</if>
<if test="dealResult != null and dealResult != ''">
AND r.deal_result = #{dealResult}
</if>
</where>
ORDER BY r.update_date DESC
</select>
<select id="findAllList" parameterType="ReportEntity" resultType="ReportEntity">
SELECT
<include refid="reportColumns"/>
FROM report r
<include refid="reportJoins"/>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY r.update_date DESC
</otherwise>
</choose>
</select>
<select id="findRole" parameterType="User" resultType="String">
SELECT
sr.name AS "roleName"
FROM sys_role sr
LEFT JOIN sys_user2role sur ON sr.id = sur.role_id
LEFT JOIN sys_user su ON su.id = sur.user_id
WHERE su.id = #{id}
</select>
<insert id="addReport">
INSERT INTO report(
id,
report_project,
report_city,
report_time,
report_content,
report_person_name,
report_person_tel,
report_person_email,
report_source,
report_status,
exchange_before_user,
exchange_after_user,
create_by,
create_date,
update_by,
update_date
) VALUES (
#{id},
#{reportProject},
#{reportCity},
#{reportTime},
#{reportContent},
#{reportPersonName},
#{reportPersonTel},
#{reportPersonEmail},
#{reportSource},
#{reportStatus},
#{exchangeBeforeUser},
#{exchangeAfterUser},
#{createBy.id},
#{createDate},
#{updateBy.id},
#{updateDate}
)
</insert>
<insert id="addReportAttachment">
INSERT INTO report_attachment(
id,
report_id,
attachment_name,
attachment_path,
attachment_size,
attachment_type
) VALUES (
#{id},
#{reportId},
#{attachmentName},
#{attachmentPath},
#{attachmentSize},
#{attachmentType}
)
</insert>
<update id="update">
UPDATE sys_area SET
parent_id = #{parent.id},
parent_ids = #{parentIds},
code = #{code},
name = #{name},
sort = #{sort},
type = #{type},
update_by = #{updateBy.id},
update_date = #{updateDate},
remarks = #{remarks}
WHERE id = #{id}
</update>
<update id="updateParentIds">
UPDATE sys_area SET
parent_id = #{parent.id},
parent_ids = #{parentIds}
WHERE id = #{id}
</update>
<update id="delete">
UPDATE sys_area SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id} OR parent_ids LIKE
<if test="dbName == 'oracle'">'%,'||#{id}||',%'</if>
<if test="dbName == 'mssql'">'%,'+#{id}+',%'</if>
<if test="dbName == 'mysql'">CONCAT('%,', #{id}, ',%')</if>
</update>
</mapper>
\ No newline at end of file
<%@ 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">
var submitCount = 0;
$(document).ready(function () {
$("#inputForm").validate({
submitHandler: function (form) {
if ($("#nameFile").val().length == 0) {
$("#checkFile").show();
} else {
submitCount += 1;
if(submitCount == 1){
$("#checkFile").hide();
loading('正在提交,请稍等...');
form.submit();
}else{
return false;
}
}
},
errorContainer: "#messageBox",
errorPlacement: function (error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
});
</script>
<style type="text/css">
.title{
font-size:16px;
font-weight:bold;
}
</style>
</head>
<body>
<ul class="nav nav-tabs">
<li class="active"><a href="${ctx}/report/form">举报录入</a></li>
</ul>
<br/>
<form:form id="inputForm" modelAttribute="reportEntity" action="${ctx}/report/addReport" method="post" class="form-horizontal">
<sys:message content="${message}"/>
<span class="title">举报内容</span>
<div class="control-group">
<label class="control-label">被举报项目:</label>
<div class="controls">
<form:input path="reportProject" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">所在城市:</label>
<div class="controls">
<form:input path="reportCity" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">内容:</label>
<div class="controls">
<form:textarea id="reportContent" htmlEscape="true" path="reportContent" rows="4" maxlength="500" class="input-xxlarge"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label">附件:</label>
<div class="controls">
<form:hidden id="nameFile" path="reportAttachmentEntity.attachmentPath" htmlEscape="false"
maxlength="255" class="input-xlarge"/>
<sys:ckfinder input="nameFile" type="files" uploadPath="/file"
selectMultiple="false" maxWidth="100" maxHeight="100"/>
<label id="checkFile" class="error" style="display: none;">必填信息</label>
</div>
</div>
<span class="title">举报人信息</span>
<div class="control-group">
<label class="control-label">姓名:</label>
<div class="controls">
<form:input path="reportPersonName" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">手机号:</label>
<div class="controls">
<form:input path="reportPersonTel" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">Email:</label>
<div class="controls">
<form:input path="reportPersonEmail" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">举报途径:</label>
<div class="controls">
<form:radiobutton path="reportSource" value="tel" checked="true"/>电话&emsp;
<form:radiobutton path="reportSource" value="email"/>邮件&emsp;
<form:radiobutton path="reportSource" value="visit"/>来访
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="form-actions">
<input id="btnSubmit" class="btn btn-primary" type="submit" value="提交"/>&nbsp;
</div>
</form:form>
</body>
</html>
\ No newline at end of file
<%@ 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() {
$("#btnExport").click(function(){
top.$.jBox.confirm("确认要导出数据吗?","系统提示",function(v,h,f){
if(v=="ok"){
$("#searchForm").attr("action","${ctx}/cms/report/export");
$("#searchForm").submit();
}
},{buttonsFocus:1});
top.$('.jbox-body .jbox-icon').css('top','55px');
});
$("#btnSubmit").click(function () {
$("#searchForm").attr("action", "${ctx}/report/list");
$("#searchForm").submit();
});
$("#btnAdd").click(function () {
window.location.href = "${ctx}/report/form";
});
$("#btnReset").click(function () {
var flag = $("#flag").val();
window.location.href = "${ctx}/report/list?flag="+flag;
});
});
function page(n,s){
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action", "${ctx}/report");
$("#searchForm").submit();
return false;
}
function resetPageNo() {
$("#pageNo").val(0);
}
</script>
</head>
<body>
<ul class="nav nav-tabs">
<li <c:if test="${flag eq null or flag eq ''}">class="active"</c:if>><a href="${ctx}/report/list">核查中举报列表</a></li>
<li <c:if test="${flag eq '0'}">class="active"</c:if>><a href="${ctx}/report/list?flag=0">未处理举报列表</a></li>
<li <c:if test="${flag eq '1'}">class="active"</c:if>><a href="${ctx}/report/list?flag=1">举报列表</a></li>
<li style="float: right;"><input id="btnAdd" class="btn btn-primary" type="button" value="录入举报"/></li>
</ul>
<form:form id="searchForm" modelAttribute="report" action="${ctx}/report/list" 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}"/>
<input id="flag" name="flag" type="hidden" value="${flag}"/>
<ul class="ul-form">
<li><label>标题:</label><form:input onchange="resetPageNo();" path="supplementTitle" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li><label>被举报项目:</label><form:input onchange="resetPageNo();" path="reportProject" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li><label>举报时间:</label><input id="reportTimeFrom" name="reportTimeFrom" onchange="resetPageNo();" readonly="readonly" type="text"
maxlength="200" class="input-mini Wdate required" value="${report.reportTimeFrom}"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,maxDate:'#F{$dp.$D(\'reportTimeTo\')}'});" /></li>
<li><label>至:</label><input id="reportTimeTo" name="reportTimeTo" onchange="resetPageNo();" readonly="readonly" type="text"
maxlength="200" class="input-mini Wdate required" value="${report.reportTimeTo}"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'reportTimeFrom\')}'});" /></li>
<li class="clearfix"></li>
<li><label>举报人:</label><form:input onchange="resetPageNo();" path="reportPersonName" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li><label>举报人电话:</label><form:input onchange="resetPageNo();" path="reportPersonTel" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li><label>类型:</label><form:select onchange="resetPageNo();" path="supplementType" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('supplement_type')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>状态:</label><form:select onchange="resetPageNo();" path="reportStatus" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('report_status')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>处理结论:</label><form:select onchange="resetPageNo();" path="dealResult" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('deal_result')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li class="clearfix"></li>
<li class="btns">
<label style="width:auto;"><input id="btnSubmit" class="btn btn-primary" type="submit" value="筛选"/>&nbsp;&nbsp;
<input id="btnReset" class="btn btn-primary" type="button" value="重置"/>&nbsp;&nbsp;
<input id="btnExport" class="btn btn-primary" type="button" 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>ID</th>
<th>标题</th>
<th>业务类型</th>
<th>被举报项目</th>
<th>举报人</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="report" varStatus="vs">
<tr>
<td>${vs.count}</td>
<td>${report.supplementTitle}</td>
<td>
<c:if test="${report.supplementType eq '1'}">营销</c:if>
<c:if test="${report.supplementType eq '2'}">工程</c:if>
<c:if test="${report.supplementType eq '3'}">成本</c:if>
<c:if test="${report.supplementType eq '4'}">招采</c:if>
<c:if test="${report.supplementType eq '5'}">人力</c:if>
<c:if test="${report.supplementType eq '6'}">物业</c:if>
<c:if test="${report.supplementType eq '7'}">投诉</c:if>
</td>
<td>${report.reportProject}</td>
<td>${report.reportPersonName}</td>
<td>${report.reportPersonTel}</td>
<td>${report.reportTime}</td>
<td>
<c:if test="${report.reportStatus eq '0'}">未处理</c:if>
<c:if test="${report.reportStatus eq '1'}">核查中</c:if>
<c:if test="${report.reportStatus eq '2'}">已处理</c:if>
</td>
<td>
<c:if test="${report.dealResult eq null}">--</c:if>
<c:if test="${report.dealResult eq '1'}">投诉</c:if>
<c:if test="${report.dealResult eq '2'}">举报无效</c:if>
<c:if test="${report.dealResult eq '3'}">举报属实</c:if>
</td>
<td><c:if test="${report.dealResult eq null}">--</c:if>
<c:if test="${report.dealResult eq null}">${report.dealPersonName}</c:if>
</td>
<td>
<a href="${ctx}/report/view?id=${report.id}">查看</a>
<c:if test="${report.reportStatus ne '2'}"><a href="${ctx}/report/track?id=${report.id}">跟踪</a></c:if>
<a href="${ctx}/report/document?id=${report.id}">转为文档</a>
</td>
</tr>
</c:forEach>
</c:if>
</tbody>
</table>
<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>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment