Commit 94a33638 by Java-刘铮

新增关闭按钮管理员可以修改以处理状态的处理结论并把状态改为已关闭 刘铮

parent ddc2f410
...@@ -16,6 +16,7 @@ import java.util.List; ...@@ -16,6 +16,7 @@ import java.util.List;
/** /**
* 举报DAO接口 * 举报DAO接口
*
* @author lixy * @author lixy
* @version 2017-09-06 * @version 2017-09-06
*/ */
...@@ -23,6 +24,7 @@ import java.util.List; ...@@ -23,6 +24,7 @@ import java.util.List;
public interface ReportDao extends CrudDao<ReportEntity> { public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 查询用户角色 * 查询用户角色
*
* @param user * @param user
* @return * @return
*/ */
...@@ -30,6 +32,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -30,6 +32,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 查询附件 * 查询附件
*
* @param reportAttachmentEntity * @param reportAttachmentEntity
* @return * @return
*/ */
...@@ -37,6 +40,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -37,6 +40,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 新增举报 * 新增举报
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
...@@ -44,6 +48,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -44,6 +48,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 新增附件 * 新增附件
*
* @param reportAttachmentEntity * @param reportAttachmentEntity
* @return * @return
*/ */
...@@ -51,6 +56,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -51,6 +56,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 举报信息补充 * 举报信息补充
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
...@@ -58,6 +64,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -58,6 +64,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 更新举报状态 * 更新举报状态
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
...@@ -65,6 +72,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -65,6 +72,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 查询用户 * 查询用户
*
* @param user * @param user
* @return * @return
*/ */
...@@ -72,24 +80,28 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -72,24 +80,28 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 查询公司列表 * 查询公司列表
*
* @return * @return
*/ */
public List<Office> getCompanyList(); public List<Office> getCompanyList();
/** /**
* 查询部门列表 * 查询部门列表
*
* @return * @return
*/ */
public List<Office> getOfficeList(Office office); public List<Office> getOfficeList(Office office);
/** /**
* 查询职位列表 * 查询职位列表
*
* @return * @return
*/ */
public List<Position> getPositionList(); public List<Position> getPositionList();
/** /**
* 根据reportId查询消息表中是否已存在该条记录 * 根据reportId查询消息表中是否已存在该条记录
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
...@@ -97,6 +109,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -97,6 +109,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 新增消息 * 新增消息
*
* @param reportNotice * @param reportNotice
* @return * @return
*/ */
...@@ -104,6 +117,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -104,6 +117,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 更新消息表 * 更新消息表
*
* @param reportNotice * @param reportNotice
* @return * @return
*/ */
...@@ -111,6 +125,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -111,6 +125,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 新增消息 * 新增消息
*
* @param reportExchangeHistory * @param reportExchangeHistory
* @return * @return
*/ */
...@@ -118,6 +133,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -118,6 +133,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 查询管理员ID * 查询管理员ID
*
* @return * @return
*/ */
public List<String> findAdmin(Office office); public List<String> findAdmin(Office office);
...@@ -149,6 +165,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -149,6 +165,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 工作转交 查询举报记录 * 工作转交 查询举报记录
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
...@@ -156,6 +173,7 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -156,6 +173,7 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 工作转交 更改转交人 * 工作转交 更改转交人
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
...@@ -163,13 +181,23 @@ public interface ReportDao extends CrudDao<ReportEntity> { ...@@ -163,13 +181,23 @@ public interface ReportDao extends CrudDao<ReportEntity> {
/** /**
* 查询移交后人员 * 查询移交后人员
*
* @return * @return
*/ */
public String findExchangeUser(String id); public String findExchangeUser(String id);
/** /**
* 记录发邮件 * 记录发邮件
*
* @return * @return
*/ */
public int updateIsSendEmail(String reportId); public int updateIsSendEmail(String reportId);
/**
* 更新处理结论
*
* @param reportEntity
* @return
*/
public int updateConclusion(ReportEntity reportEntity);
} }
...@@ -48,6 +48,19 @@ public class ReportEntity extends DataEntity<ReportEntity> { ...@@ -48,6 +48,19 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private String transferName; //移交给 private String transferName; //移交给
private String dealPerson; private String dealPerson;
private String lStatus; //关闭修改状态
public String getlStatus() {
return lStatus;
}
public void setlStatus(String lStatus) {
this.lStatus = lStatus;
}
public String getOaname() { public String getOaname() {
return oaname; return oaname;
......
...@@ -34,6 +34,7 @@ import java.util.List; ...@@ -34,6 +34,7 @@ import java.util.List;
/** /**
* 举报Service * 举报Service
*
* @author lixy * @author lixy
* @version 2017-09-06 * @version 2017-09-06
*/ */
...@@ -51,6 +52,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -51,6 +52,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 查询附件 * 查询附件
*
* @param reportAttachmentEntity * @param reportAttachmentEntity
* @return * @return
*/ */
...@@ -60,6 +62,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -60,6 +62,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 查询用户角色 * 查询用户角色
*
* @param user * @param user
* @return * @return
*/ */
...@@ -69,10 +72,11 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -69,10 +72,11 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 新增举报 * 新增举报
*
* @param reportEntity * @param reportEntity
*/ */
@Transactional(readOnly = false) @Transactional(readOnly = false)
public void saveReport(ReportEntity reportEntity,HttpServletRequest request) { public void saveReport(ReportEntity reportEntity, HttpServletRequest request) {
//保存举报信息 //保存举报信息
reportEntity.preInsert(); reportEntity.preInsert();
//保存填写人信息 //保存填写人信息
...@@ -88,7 +92,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -88,7 +92,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportEntity.setExchangeAfterUser(reportEntity.getCreateBy().getId()); reportEntity.setExchangeAfterUser(reportEntity.getCreateBy().getId());
} }
String ip = user.getLoginIp(); String ip = user.getLoginIp();
int port =request.getRemotePort();//返回发出请求的客户机的端口号。 int port = request.getRemotePort();//返回发出请求的客户机的端口号。
// logger.info("port:"+port); // logger.info("port:"+port);
// ip = "183.129.142.154"; // ip = "183.129.142.154";
String url = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=" + ip; String url = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=" + ip;
...@@ -103,7 +107,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -103,7 +107,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (StringUtils.isNotBlank(reportEntity.getReportAttachment())) { if (StringUtils.isNotBlank(reportEntity.getReportAttachment())) {
String[] reportAttachmentList = new String[]{reportEntity.getReportAttachment()}; String[] reportAttachmentList = new String[]{reportEntity.getReportAttachment()};
if (reportEntity.getReportAttachment().contains("|")){ if (reportEntity.getReportAttachment().contains("|")) {
reportAttachmentList = reportEntity.getReportAttachment().split("\\|"); reportAttachmentList = reportEntity.getReportAttachment().split("\\|");
} }
for (String path : reportAttachmentList) { for (String path : reportAttachmentList) {
...@@ -117,7 +121,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -117,7 +121,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (StringUtils.isNotBlank(fileName)) { if (StringUtils.isNotBlank(fileName)) {
reportAttachmentEntity.setAttachmentName(fileName); reportAttachmentEntity.setAttachmentName(fileName);
} }
int index = path.lastIndexOf("/")+1; int index = path.lastIndexOf("/") + 1;
path = path.substring(0, index) + fileName; path = path.substring(0, index) + fileName;
reportAttachmentEntity.setAttachmentPath(path); reportAttachmentEntity.setAttachmentPath(path);
File file = new File(reportAttachmentEntity.getAttachmentPath()); File file = new File(reportAttachmentEntity.getAttachmentPath());
...@@ -131,14 +135,15 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -131,14 +135,15 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 举报补充 * 举报补充
*
* @param reportEntity * @param reportEntity
*/ */
@Transactional(readOnly = false) @Transactional(readOnly = false)
public void saveTrack(ReportEntity reportEntity,String transferUser) { public void saveTrack(ReportEntity reportEntity, String transferUser) {
//保存举报补充信息 //保存举报补充信息
reportEntity.preUpdate(); reportEntity.preUpdate();
User user = UserUtils.getUser(); User user = UserUtils.getUser();
if (StringUtils.isNotBlank(transferUser)){ if (StringUtils.isNotBlank(transferUser)) {
reportEntity.setExchangeType("1"); reportEntity.setExchangeType("1");
reportEntity.setExchangeAfterUser(transferUser); reportEntity.setExchangeAfterUser(transferUser);
} }
...@@ -146,7 +151,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -146,7 +151,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (StringUtils.isNotBlank(reportEntity.getSupplementAttachment())) { if (StringUtils.isNotBlank(reportEntity.getSupplementAttachment())) {
String[] supplementAttachmentList = new String[]{reportEntity.getSupplementAttachment()}; String[] supplementAttachmentList = new String[]{reportEntity.getSupplementAttachment()};
if (reportEntity.getSupplementAttachment().contains("|")){ if (reportEntity.getSupplementAttachment().contains("|")) {
supplementAttachmentList = reportEntity.getSupplementAttachment().split("\\|"); supplementAttachmentList = reportEntity.getSupplementAttachment().split("\\|");
} }
for (String path : supplementAttachmentList) { for (String path : supplementAttachmentList) {
...@@ -160,7 +165,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -160,7 +165,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (StringUtils.isNotBlank(fileName)) { if (StringUtils.isNotBlank(fileName)) {
reportAttachmentEntity.setAttachmentName(fileName); reportAttachmentEntity.setAttachmentName(fileName);
} }
int index = path.lastIndexOf("/")+1; int index = path.lastIndexOf("/") + 1;
path = path.substring(0, index) + fileName; path = path.substring(0, index) + fileName;
reportAttachmentEntity.setAttachmentPath(path); reportAttachmentEntity.setAttachmentPath(path);
File file = new File(reportAttachmentEntity.getAttachmentPath()); File file = new File(reportAttachmentEntity.getAttachmentPath());
...@@ -173,7 +178,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -173,7 +178,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (StringUtils.isNotBlank(reportEntity.getDealAttachment())) { if (StringUtils.isNotBlank(reportEntity.getDealAttachment())) {
String[] dealAttachmentList = new String[]{reportEntity.getDealAttachment()}; String[] dealAttachmentList = new String[]{reportEntity.getDealAttachment()};
if (reportEntity.getDealAttachment().contains("|")){ if (reportEntity.getDealAttachment().contains("|")) {
dealAttachmentList = reportEntity.getDealAttachment().split("\\|"); dealAttachmentList = reportEntity.getDealAttachment().split("\\|");
} }
for (String path : dealAttachmentList) { for (String path : dealAttachmentList) {
...@@ -187,7 +192,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -187,7 +192,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (StringUtils.isNotBlank(fileName)) { if (StringUtils.isNotBlank(fileName)) {
reportAttachmentEntity.setAttachmentName(fileName); reportAttachmentEntity.setAttachmentName(fileName);
} }
int index = path.lastIndexOf("/")+1; int index = path.lastIndexOf("/") + 1;
path = path.substring(0, index) + fileName; path = path.substring(0, index) + fileName;
reportAttachmentEntity.setAttachmentPath(path); reportAttachmentEntity.setAttachmentPath(path);
File file = new File(reportAttachmentEntity.getAttachmentPath()); File file = new File(reportAttachmentEntity.getAttachmentPath());
...@@ -200,8 +205,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -200,8 +205,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportDao.updateReportStatus(reportEntity); reportDao.updateReportStatus(reportEntity);
} }
public String getFilename(String path){ public String getFilename(String path) {
int beginIndex = path.lastIndexOf("/")+1; int beginIndex = path.lastIndexOf("/") + 1;
int endIndex = path.lastIndexOf("."); int endIndex = path.lastIndexOf(".");
String fileNameUrlCode = path.substring(beginIndex, endIndex); String fileNameUrlCode = path.substring(beginIndex, endIndex);
String prefixName = path.substring(endIndex, path.length()); String prefixName = path.substring(endIndex, path.length());
...@@ -217,10 +222,11 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -217,10 +222,11 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 查询用户 * 查询用户
*
* @param user * @param user
* @return * @return
*/ */
public Page<User> findUserPage(Page<User> page,User user){ public Page<User> findUserPage(Page<User> page, User user) {
page.setFuncParam("1");//标记为用户分页 page.setFuncParam("1");//标记为用户分页
user.setPage(page); user.setPage(page);
page.setList(reportDao.findUser(user)); page.setList(reportDao.findUser(user));
...@@ -229,44 +235,48 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -229,44 +235,48 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 查询公司列表 * 查询公司列表
*
* @return * @return
*/ */
public List<Office> getCompanyList(){ public List<Office> getCompanyList() {
return reportDao.getCompanyList(); return reportDao.getCompanyList();
} }
/** /**
* 查询部门列表 * 查询部门列表
*
* @return * @return
*/ */
public List<Office> getOfficeList(Office office){ public List<Office> getOfficeList(Office office) {
return reportDao.getOfficeList(office); return reportDao.getOfficeList(office);
} }
/** /**
* 查询职位列表 * 查询职位列表
*
* @return * @return
*/ */
public List<Position> getPositionList(){ public List<Position> getPositionList() {
return reportDao.getPositionList(); return reportDao.getPositionList();
} }
/** /**
* 管理员移交后发送消息 * 管理员移交后发送消息
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
@Transactional(readOnly = false) @Transactional(readOnly = false)
public int addNotice(ReportEntity reportEntity,String flag,String ifDone){ public int addNotice(ReportEntity reportEntity, String flag, String ifDone) {
User user = UserUtils.getUser(); User user = UserUtils.getUser();
Date date = new Date(); Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
ReportNotice reportNotice = reportDao.findReportNotice(reportEntity); ReportNotice reportNotice = reportDao.findReportNotice(reportEntity);
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日");
String dateStr = sdf1.format(date); String dateStr = sdf1.format(date);
if (reportNotice != null){ if (reportNotice != null) {
//消息表中已存在该条举报的移交信息,更新该记录 //消息表中已存在该条举报的移交信息,更新该记录
if (StringUtils.isNotBlank(user.getId())){ if (StringUtils.isNotBlank(user.getId())) {
reportNotice.setUpdateBy(user.getId()); reportNotice.setUpdateBy(user.getId());
} }
reportNotice.setUpdateDate(date); reportNotice.setUpdateDate(date);
...@@ -275,22 +285,23 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -275,22 +285,23 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportNotice.setSendFromId(user.getId()); reportNotice.setSendFromId(user.getId());
reportNotice.setSendToId(reportEntity.getExchangeAfterUser()); reportNotice.setSendToId(reportEntity.getExchangeAfterUser());
reportNotice.setStatus("0"); reportNotice.setStatus("0");
if (flag.equals("answer")){ if (flag.equals("answer")) {
//当前只有杨杨是系统管理员,处理后消息发给杨杨,以后如果新增了系统管理员需修改 //当前只有杨杨是系统管理员,处理后消息发给杨杨,以后如果新增了系统管理员需修改
//findAdmin()方法获取所有系统管理员 //findAdmin()方法获取所有系统管理员
// reportNotice.setSendToId("8434980248282724540228"); // reportNotice.setSendToId("8434980248282724540228");
reportNotice.setSendToId("1"); reportNotice.setSendToId("1");
reportNotice.setTitle("“"+reportEntity.getSupplementTitle()+"”已由"+user.getName()+"于"+dateStr+"处理完成"); reportNotice.setTitle("“" + reportEntity.getSupplementTitle() + "”已由" + user.getName() + "于" + dateStr + "处理完成");
}if (flag.equals("meanWhile")){ }
reportNotice.setTitle("“"+reportEntity.getSupplementTitle()+"”已由"+user.getName()+"于"+dateStr+"处理完成"); if (flag.equals("meanWhile")) {
reportNotice.setTitle("“" + reportEntity.getSupplementTitle() + "”已由" + user.getName() + "于" + dateStr + "处理完成");
//没点完成,title为请处理 //没点完成,title为请处理
if (reportEntity.getDealResult().equals("3") && StringUtils.isBlank(ifDone)){ if (reportEntity.getDealResult().equals("3") && StringUtils.isBlank(ifDone)) {
reportNotice.setTitle("请处理-“"+reportEntity.getSupplementTitle()+"”"); reportNotice.setTitle("请处理-“" + reportEntity.getSupplementTitle() + "”");
} }
} }
reportDao.updateReportNotice(reportNotice); reportDao.updateReportNotice(reportNotice);
return 1; return 1;
}else{ } else {
//消息表中不存在该条举报的信息,新增记录 //消息表中不存在该条举报的信息,新增记录
reportNotice = new ReportNotice(); reportNotice = new ReportNotice();
reportNotice.setId(IdGen.uuid()); reportNotice.setId(IdGen.uuid());
...@@ -303,22 +314,22 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -303,22 +314,22 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportNotice.setStatus("0"); reportNotice.setStatus("0");
reportNotice.setCreateBy(user.getId()); reportNotice.setCreateBy(user.getId());
reportNotice.setUpdateBy(user.getId()); reportNotice.setUpdateBy(user.getId());
if (flag.equals("answer")){ if (flag.equals("answer")) {
return 0; return 0;
}else if (flag.equals("meanWhile")){ } else if (flag.equals("meanWhile")) {
reportNotice.setSendToId(reportEntity.getExchangeAfterUser()); reportNotice.setSendToId(reportEntity.getExchangeAfterUser());
reportNotice.setTitle("“"+reportEntity.getSupplementTitle()+"”已由"+user.getName()+"于"+dateStr+"处理完成"); reportNotice.setTitle("“" + reportEntity.getSupplementTitle() + "”已由" + user.getName() + "于" + dateStr + "处理完成");
//没点完成,title为请处理 //没点完成,title为请处理
if (reportEntity.getDealResult().equals("3") && StringUtils.isBlank(ifDone)){ if (reportEntity.getDealResult().equals("3") && StringUtils.isBlank(ifDone)) {
reportNotice.setTitle("请处理-“"+reportEntity.getSupplementTitle()+"”"); reportNotice.setTitle("请处理-“" + reportEntity.getSupplementTitle() + "”");
} }
}else{ } else {
//管理员转交或移交,消息标题为“请处理xxx” //管理员转交或移交,消息标题为“请处理xxx”
String title = reportEntity.getSupplementTitle(); String title = reportEntity.getSupplementTitle();
if (StringUtils.isBlank(reportEntity.getSupplementTitle())){ if (StringUtils.isBlank(reportEntity.getSupplementTitle())) {
title = reportEntity.getReportProject(); title = reportEntity.getReportProject();
} }
reportNotice.setTitle("请处理-“"+title+"”"); reportNotice.setTitle("请处理-“" + title + "”");
reportNotice.setSendToId(reportEntity.getExchangeAfterUser()); reportNotice.setSendToId(reportEntity.getExchangeAfterUser());
} }
reportDao.addReportNotice(reportNotice); reportDao.addReportNotice(reportNotice);
...@@ -328,11 +339,12 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -328,11 +339,12 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 新增移交/转交记录 * 新增移交/转交记录
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
@Transactional(readOnly = false) @Transactional(readOnly = false)
public void addRecord(ReportEntity reportEntity,String exchangeType){ public void addRecord(ReportEntity reportEntity, String exchangeType) {
ReportExchangeHistory reportExchangeHistory = new ReportExchangeHistory(); ReportExchangeHistory reportExchangeHistory = new ReportExchangeHistory();
reportExchangeHistory.setId(IdGen.uuid()); reportExchangeHistory.setId(IdGen.uuid());
reportExchangeHistory.setReportId(reportEntity.getId()); reportExchangeHistory.setReportId(reportEntity.getId());
...@@ -347,13 +359,14 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -347,13 +359,14 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 查询举报列表 * 查询举报列表
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
public List<ReportEntity> getReportList(ReportEntity reportEntity){ public List<ReportEntity> getReportList(ReportEntity reportEntity) {
List<ReportEntity> reportList = dao.findList(reportEntity); List<ReportEntity> reportList = dao.findList(reportEntity);
for (ReportEntity report : reportList) { for (ReportEntity report : reportList) {
String typeStr=""; String typeStr = "";
if (StringUtils.isNoneBlank(report.getSupplementType())) { if (StringUtils.isNoneBlank(report.getSupplementType())) {
String[] types = report.getSupplementType().split(","); String[] types = report.getSupplementType().split(",");
for (String value : types) { for (String value : types) {
...@@ -396,7 +409,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -396,7 +409,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
} else if (reportStatus.equals("2")) { } else if (reportStatus.equals("2")) {
reportStatus = "已处理"; reportStatus = "已处理";
} }
}else{ } else {
reportStatus = ""; reportStatus = "";
} }
report.setReportStatus(reportStatus); report.setReportStatus(reportStatus);
...@@ -411,55 +424,55 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -411,55 +424,55 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
} else if (dealResult.equals("4")) { } else if (dealResult.equals("4")) {
dealResult = "举报属实"; dealResult = "举报属实";
} }
}else{ } else {
dealResult = "--"; dealResult = "--";
} }
report.setDealResult(dealResult); report.setDealResult(dealResult);
String supplementArea = report.getSupplementArea(); String supplementArea = report.getSupplementArea();
if (StringUtils.isNotBlank(supplementArea)){ if (StringUtils.isNotBlank(supplementArea)) {
if (supplementArea.equals("North China")){ if (supplementArea.equals("North China")) {
supplementArea = "华北区域公司"; supplementArea = "华北区域公司";
}else if (supplementArea.equals("BeiJing")){ } else if (supplementArea.equals("BeiJing")) {
supplementArea = "北京区域公司"; supplementArea = "北京区域公司";
}else if (supplementArea.equals("ShangHai")){ } else if (supplementArea.equals("ShangHai")) {
supplementArea = "上海区域公司"; supplementArea = "上海区域公司";
}else if (supplementArea.equals("SouthWest")){ } else if (supplementArea.equals("SouthWest")) {
supplementArea = "西南区域公司"; supplementArea = "西南区域公司";
}else if (supplementArea.equals("SouthEast")){ } else if (supplementArea.equals("SouthEast")) {
supplementArea = "东南区域公司"; supplementArea = "东南区域公司";
}else if (supplementArea.equals("Central China")){ } else if (supplementArea.equals("Central China")) {
supplementArea = "华中区域公司"; supplementArea = "华中区域公司";
}else if (supplementArea.equals("GuangShen")){ } else if (supplementArea.equals("GuangShen")) {
supplementArea = "广深区域公司"; supplementArea = "广深区域公司";
}else if (supplementArea.equals("Hainan")){ } else if (supplementArea.equals("Hainan")) {
supplementArea = "海南区域公司"; supplementArea = "海南区域公司";
}else if (supplementArea.equals("Group")){ } else if (supplementArea.equals("Group")) {
supplementArea = "集团本部"; supplementArea = "集团本部";
} }
}else{ } else {
supplementArea = "--"; supplementArea = "--";
} }
report.setSupplementArea(supplementArea); report.setSupplementArea(supplementArea);
report.setSupplementInformant(report.getSupplementInformant() == null?"--":report.getSupplementInformant()); report.setSupplementInformant(report.getSupplementInformant() == null ? "--" : report.getSupplementInformant());
report.setDealPersonName(report.getDealPersonName() == null?"--":report.getDealPersonName()); report.setDealPersonName(report.getDealPersonName() == null ? "--" : report.getDealPersonName());
User user = UserUtils.getUser(); User user = UserUtils.getUser();
if (this.checkRole(user)){ if (this.checkRole(user)) {
if (StringUtils.isBlank(report.getTransferName()) || StringUtils.isBlank(report.getExchangeType())){ if (StringUtils.isBlank(report.getTransferName()) || StringUtils.isBlank(report.getExchangeType())) {
report.setTransferName("--"); report.setTransferName("--");
}else if (StringUtils.isNotBlank(report.getTransferName()) && StringUtils.isNotBlank(report.getExchangeType())){ } else if (StringUtils.isNotBlank(report.getTransferName()) && StringUtils.isNotBlank(report.getExchangeType())) {
report.setTransferName(report.getTransferName()); report.setTransferName(report.getTransferName());
} }
}else{ } else {
report.setTransferName(""); report.setTransferName("");
} }
report.setReportIp(report.getReportIp() == null?"--":report.getReportIp()); report.setReportIp(report.getReportIp() == null ? "--" : report.getReportIp());
report.setIpCity(report.getIpCity() == null?"--":report.getIpCity()); report.setIpCity(report.getIpCity() == null ? "--" : report.getIpCity());
String isSendEmail = report.getIsSendEmail(); String isSendEmail = report.getIsSendEmail();
if (StringUtils.isNotBlank(isSendEmail)){ if (StringUtils.isNotBlank(isSendEmail)) {
if (isSendEmail.equals("1")){ if (isSendEmail.equals("1")) {
isSendEmail = "是"; isSendEmail = "是";
} }
}else { } else {
isSendEmail = "否"; isSendEmail = "否";
} }
report.setIsSendEmail(isSendEmail); report.setIsSendEmail(isSendEmail);
...@@ -469,10 +482,11 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -469,10 +482,11 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 查询举报列表 * 查询举报列表
*
* @param reportEntity * @param reportEntity
* @return * @return
*/ */
public Page<ReportEntity> getChooseReportPage(Page<ReportEntity> page,ReportEntity reportEntity){ public Page<ReportEntity> getChooseReportPage(Page<ReportEntity> page, ReportEntity reportEntity) {
reportEntity.setPage(page); reportEntity.setPage(page);
page.setList(reportDao.getChooseReportList(reportEntity)); page.setList(reportDao.getChooseReportList(reportEntity));
return page; return page;
...@@ -480,6 +494,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -480,6 +494,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
/** /**
* 转交举报 * 转交举报
*
* @param reportIds * @param reportIds
* @param userId * @param userId
* @return * @return
...@@ -487,20 +502,21 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -487,20 +502,21 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
@Transactional(readOnly = false) @Transactional(readOnly = false)
public void deliverReport(String[] reportIds, String userId) { public void deliverReport(String[] reportIds, String userId) {
User user = UserUtils.getUser(); User user = UserUtils.getUser();
for (String reportId : reportIds){ for (String reportId : reportIds) {
ReportEntity reportEntity = dao.get(reportId); ReportEntity reportEntity = dao.get(reportId);
reportEntity.setExchangeAfterUser(userId); reportEntity.setExchangeAfterUser(userId);
reportEntity.setExchangeType("2"); reportEntity.setExchangeType("2");
reportEntity.setUpdateBy(user); reportEntity.setUpdateBy(user);
reportEntity.setUpdateDate(new Date()); reportEntity.setUpdateDate(new Date());
reportDao.updateExchangeUser(reportEntity); reportDao.updateExchangeUser(reportEntity);
this.addNotice(reportEntity,"deliver",null); this.addNotice(reportEntity, "deliver", null);
this.addRecord(reportEntity,"2"); this.addRecord(reportEntity, "2");
} }
} }
/** /**
* 判断当前用户是否为管理员 * 判断当前用户是否为管理员
*
* @param user * @param user
* @return * @return
*/ */
...@@ -509,9 +525,9 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -509,9 +525,9 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
Role roleEntity = new Role(); Role roleEntity = new Role();
roleEntity.setUser(user); roleEntity.setUser(user);
List<Role> roleList = roleDao.findList(roleEntity); List<Role> roleList = roleDao.findList(roleEntity);
if (roleList != null && roleList.size() != 0){ if (roleList != null && roleList.size() != 0) {
for (Role role : roleList){ for (Role role : roleList) {
if (role.getName().equals("系统管理员")){ if (role.getName().equals("系统管理员")) {
isAdmin = true; isAdmin = true;
break; break;
} }
...@@ -520,12 +536,13 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -520,12 +536,13 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
return isAdmin; return isAdmin;
} }
public String findExchangeUser(String id){ public String findExchangeUser(String id) {
return reportDao.findExchangeUser(id); return reportDao.findExchangeUser(id);
} }
/** /**
* 记录发邮件 * 记录发邮件
*
* @param reportId * @param reportId
* @return * @return
*/ */
...@@ -533,4 +550,10 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -533,4 +550,10 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
public int updateIsSendEmail(String reportId) { public int updateIsSendEmail(String reportId) {
return reportDao.updateIsSendEmail(reportId); return reportDao.updateIsSendEmail(reportId);
} }
@Transactional(readOnly = false)
public int updateConclusion(ReportEntity reportEntity) {
return reportDao.updateConclusion(reportEntity);
}
} }
...@@ -31,6 +31,7 @@ import java.util.List; ...@@ -31,6 +31,7 @@ import java.util.List;
/** /**
* 举报Controller * 举报Controller
*
* @author lixy * @author lixy
* @version 2017-09-06 * @version 2017-09-06
*/ */
...@@ -63,20 +64,20 @@ public class ReportController extends BaseController { ...@@ -63,20 +64,20 @@ public class ReportController extends BaseController {
*/ */
@RequiresPermissions("report:view") @RequiresPermissions("report:view")
@RequestMapping(value = {"list", ""}) @RequestMapping(value = {"list", ""})
public String list(ReportEntity reportEntity, String flag,HttpServletRequest request, HttpServletResponse response, Model model) { public String list(ReportEntity reportEntity, String flag, HttpServletRequest request, HttpServletResponse response, Model model) {
//判断登录人的角色 //判断登录人的角色
User user = UserUtils.getUser(); User user = UserUtils.getUser();
if (!reportService.checkRole(user)){ if (!reportService.checkRole(user)) {
reportEntity.setExchangeAfterUser(user.getId()); reportEntity.setExchangeAfterUser(user.getId());
} }
//判断标签状态 flag为空,跳转到核查中举报列表 flag为0,跳转到未处理举报列表 flag为1,跳转到举报列表 //判断标签状态 flag为空,跳转到核查中举报列表 flag为0,跳转到未处理举报列表 flag为1,跳转到举报列表
if (StringUtils.isNotBlank(flag)){ if (StringUtils.isNotBlank(flag)) {
if (flag.equals("0")){ if (flag.equals("0")) {
if (StringUtils.isBlank(reportEntity.getReportStatus())) { if (StringUtils.isBlank(reportEntity.getReportStatus())) {
reportEntity.setReportStatus("0"); reportEntity.setReportStatus("0");
} }
} }
}else{ } else {
if (StringUtils.isBlank(reportEntity.getReportStatus())) { if (StringUtils.isBlank(reportEntity.getReportStatus())) {
reportEntity.setReportStatus("1"); reportEntity.setReportStatus("1");
} }
...@@ -84,8 +85,8 @@ public class ReportController extends BaseController { ...@@ -84,8 +85,8 @@ public class ReportController extends BaseController {
Page<ReportEntity> page = reportService.findPage(new Page<ReportEntity>(request, response), reportEntity); Page<ReportEntity> page = reportService.findPage(new Page<ReportEntity>(request, response), reportEntity);
List<ReportEntity> reportlist = page.getList(); List<ReportEntity> reportlist = page.getList();
for (ReportEntity report : reportlist){ for (ReportEntity report : reportlist) {
String typeStr=""; String typeStr = "";
if (StringUtils.isNoneBlank(report.getSupplementType())) { if (StringUtils.isNoneBlank(report.getSupplementType())) {
String[] types = report.getSupplementType().split(","); String[] types = report.getSupplementType().split(",");
for (String value : types) { for (String value : types) {
...@@ -111,12 +112,12 @@ public class ReportController extends BaseController { ...@@ -111,12 +112,12 @@ public class ReportController extends BaseController {
value = "商业管理"; value = "商业管理";
} else if (value.equals("11")) { } else if (value.equals("11")) {
value = "研发"; value = "研发";
} else if(value.equals("12")) { } else if (value.equals("12")) {
value ="投资开发"; value = "投资开发";
} }
typeStr =typeStr+value+","; typeStr = typeStr + value + ",";
} }
report.setSupplementType(typeStr.substring(0,typeStr.length()-1)); report.setSupplementType(typeStr.substring(0, typeStr.length() - 1));
} }
} }
page.setList(reportlist); page.setList(reportlist);
...@@ -153,8 +154,8 @@ public class ReportController extends BaseController { ...@@ -153,8 +154,8 @@ public class ReportController extends BaseController {
if (!beanValidator(model, reportEntity)) { if (!beanValidator(model, reportEntity)) {
return form(reportEntity, model); return form(reportEntity, model);
} }
reportService.saveReport(reportEntity,request); reportService.saveReport(reportEntity, request);
addMessage(redirectAttributes, "添加举报"+ reportEntity.getReportProject() + "'成功"); addMessage(redirectAttributes, "添加举报" + reportEntity.getReportProject() + "'成功");
return "redirect:" + adminPath + "/report/list/?repage&flag=0"; return "redirect:" + adminPath + "/report/list/?repage&flag=0";
} }
...@@ -167,12 +168,16 @@ public class ReportController extends BaseController { ...@@ -167,12 +168,16 @@ public class ReportController extends BaseController {
*/ */
@RequestMapping(value = "view") @RequestMapping(value = "view")
public String view(ReportEntity reportEntity, Model model, RedirectAttributes redirectAttributes) { public String view(ReportEntity reportEntity, Model model, RedirectAttributes redirectAttributes) {
//判断登录人的角色
User useradmin = UserUtils.getUser();
boolean isAdmin = reportService.checkRole(useradmin);
//获取举报提交文件列表 //获取举报提交文件列表
ReportAttachmentEntity reportAttachment = new ReportAttachmentEntity(); ReportAttachmentEntity reportAttachment = new ReportAttachmentEntity();
reportAttachment.setReportId(reportEntity.getId()); reportAttachment.setReportId(reportEntity.getId());
reportAttachment.setAttachmentType("0"); reportAttachment.setAttachmentType("0");
if (StringUtils.isNoneBlank(reportEntity.getSupplementType())) { if (StringUtils.isNoneBlank(reportEntity.getSupplementType())) {
String supplementType=""; String supplementType = "";
String[] supplementTypes = {"营销", "工程", "成本", "招采", "人力", "物业", "投诉", "行政", "财务", "商业管理", "研发", "投资开发"}; String[] supplementTypes = {"营销", "工程", "成本", "招采", "人力", "物业", "投诉", "行政", "财务", "商业管理", "研发", "投资开发"};
String typeNumber[] = reportEntity.getSupplementType().split(","); String typeNumber[] = reportEntity.getSupplementType().split(",");
for (int i = 0; i < typeNumber.length; i++) { for (int i = 0; i < typeNumber.length; i++) {
...@@ -182,11 +187,11 @@ public class ReportController extends BaseController { ...@@ -182,11 +187,11 @@ public class ReportController extends BaseController {
reportEntity.setSupplementType(supplementType); reportEntity.setSupplementType(supplementType);
} }
String isSendEmail = reportEntity.getIsSendEmail(); String isSendEmail = reportEntity.getIsSendEmail();
if (StringUtils.isNotBlank(isSendEmail)){ if (StringUtils.isNotBlank(isSendEmail)) {
if (isSendEmail.equals("1")){ if (isSendEmail.equals("1")) {
isSendEmail = "是"; isSendEmail = "是";
} }
}else { } else {
isSendEmail = "否"; isSendEmail = "否";
} }
reportEntity.setIsSendEmail(isSendEmail); reportEntity.setIsSendEmail(isSendEmail);
...@@ -205,7 +210,7 @@ public class ReportController extends BaseController { ...@@ -205,7 +210,7 @@ public class ReportController extends BaseController {
User user = UserUtils.getUser(); User user = UserUtils.getUser();
Integer count = noticeService.getMessageCount(user.getId()); Integer count = noticeService.getMessageCount(user.getId());
String result = ""; String result = "";
if (count != 0){ if (count != 0) {
result = count.toString(); result = count.toString();
} }
model.addAttribute("report", reportEntity); model.addAttribute("report", reportEntity);
...@@ -213,6 +218,7 @@ public class ReportController extends BaseController { ...@@ -213,6 +218,7 @@ public class ReportController extends BaseController {
model.addAttribute("supplementAttachmentList", supplementAttachmentList); model.addAttribute("supplementAttachmentList", supplementAttachmentList);
model.addAttribute("dealAttachmentList", dealAttachmentList); model.addAttribute("dealAttachmentList", dealAttachmentList);
model.addAttribute("result", result); model.addAttribute("result", result);
model.addAttribute("isAdmin", isAdmin);
return "modules/report/reportDetail"; return "modules/report/reportDetail";
} }
...@@ -224,7 +230,7 @@ public class ReportController extends BaseController { ...@@ -224,7 +230,7 @@ public class ReportController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = "track") @RequestMapping(value = "track")
public String track(ReportEntity reportEntity,HttpServletRequest request, HttpServletResponse response, Model model) { public String track(ReportEntity reportEntity, HttpServletRequest request, HttpServletResponse response, Model model) {
//判断登录人的角色 //判断登录人的角色
User user = UserUtils.getUser(); User user = UserUtils.getUser();
boolean isAdmin = reportService.checkRole(user); boolean isAdmin = reportService.checkRole(user);
...@@ -260,15 +266,15 @@ public class ReportController extends BaseController { ...@@ -260,15 +266,15 @@ public class ReportController extends BaseController {
supplementTypeStr = supplementTypeStr.substring(0, supplementTypeStr.length() - 1); supplementTypeStr = supplementTypeStr.substring(0, supplementTypeStr.length() - 1);
} }
reportEntity.setDealPerson(reportEntity.getDealPersonName()); reportEntity.setDealPerson(reportEntity.getDealPersonName());
if (StringUtils.isBlank(reportEntity.getDealPersonName())){ if (StringUtils.isBlank(reportEntity.getDealPersonName())) {
reportEntity.setDealPerson(user.getName()); reportEntity.setDealPerson(user.getName());
} }
String isSendEmail = reportEntity.getIsSendEmail(); String isSendEmail = reportEntity.getIsSendEmail();
if (StringUtils.isNotBlank(isSendEmail)){ if (StringUtils.isNotBlank(isSendEmail)) {
if (isSendEmail.equals("1")){ if (isSendEmail.equals("1")) {
isSendEmail = "是"; isSendEmail = "是";
} }
}else { } else {
isSendEmail = "否"; isSendEmail = "否";
} }
reportEntity.setIsSendEmail(isSendEmail); reportEntity.setIsSendEmail(isSendEmail);
...@@ -295,7 +301,7 @@ public class ReportController extends BaseController { ...@@ -295,7 +301,7 @@ public class ReportController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = "addTrack") @RequestMapping(value = "addTrack")
public String addTrack(ReportEntity reportEntity,HttpServletRequest request, Model model, RedirectAttributes redirectAttributes) { public String addTrack(ReportEntity reportEntity, HttpServletRequest request, Model model, RedirectAttributes redirectAttributes) {
String ifDone = request.getParameter("ifDone"); // 是否完成 String ifDone = request.getParameter("ifDone"); // 是否完成
String transferUser = request.getParameter("exchangeAfterUser"); //选择移交人员 String transferUser = request.getParameter("exchangeAfterUser"); //选择移交人员
if (!beanValidator(model, reportEntity)) { if (!beanValidator(model, reportEntity)) {
...@@ -303,41 +309,41 @@ public class ReportController extends BaseController { ...@@ -303,41 +309,41 @@ public class ReportController extends BaseController {
} }
//更新举报状态 //更新举报状态
reportEntity.setReportStatus("1"); reportEntity.setReportStatus("1");
if (reportEntity.getDealResult().equals("1") || reportEntity.getDealResult().equals("2")){ if (reportEntity.getDealResult().equals("1") || reportEntity.getDealResult().equals("2")) {
reportEntity.setReportStatus("2"); reportEntity.setReportStatus("2");
} }
if (reportEntity.getDealResult().equals("3")){ if (reportEntity.getDealResult().equals("3")) {
reportEntity.setReportStatus("1"); reportEntity.setReportStatus("1");
} }
if ("ifDone".equals(ifDone)) { if ("ifDone".equals(ifDone)) {
reportEntity.setReportStatus("2"); reportEntity.setReportStatus("2");
} }
if (StringUtils.isBlank(reportEntity.getExchangeAfterUser())){ if (StringUtils.isBlank(reportEntity.getExchangeAfterUser())) {
String exchangeAfterUser = reportService.findExchangeUser(reportEntity.getId()); String exchangeAfterUser = reportService.findExchangeUser(reportEntity.getId());
reportEntity.setExchangeAfterUser(exchangeAfterUser); reportEntity.setExchangeAfterUser(exchangeAfterUser);
} }
if (reportEntity.getDealResult().equals("1") || reportEntity.getDealResult().equals("2") || reportEntity.getDealResult().equals("4") if (reportEntity.getDealResult().equals("1") || reportEntity.getDealResult().equals("2") || reportEntity.getDealResult().equals("4")
|| (reportEntity.getDealResult().equals("3") && StringUtils.isNotBlank(ifDone))) { || (reportEntity.getDealResult().equals("3") && StringUtils.isNotBlank(ifDone))) {
if (StringUtils.isBlank(reportEntity.getDealPersonName())){ if (StringUtils.isBlank(reportEntity.getDealPersonName())) {
reportEntity.setDealPersonName(reportEntity.getDealPerson()); reportEntity.setDealPersonName(reportEntity.getDealPerson());
} }
} }
reportService.saveTrack(reportEntity,transferUser); reportService.saveTrack(reportEntity, transferUser);
if (StringUtils.isNotBlank(transferUser) && StringUtils.isBlank(reportEntity.getDealResult())){ if (StringUtils.isNotBlank(transferUser) && StringUtils.isBlank(reportEntity.getDealResult())) {
//管理员移交给他人处理 //管理员移交给他人处理
reportService.addNotice(reportEntity,"transfer",ifDone); reportService.addNotice(reportEntity, "transfer", ifDone);
reportService.addRecord(reportEntity,"1"); reportService.addRecord(reportEntity, "1");
}else if (StringUtils.isNotBlank(reportEntity.getDealResult()) && StringUtils.isBlank(transferUser)){ } else if (StringUtils.isNotBlank(reportEntity.getDealResult()) && StringUtils.isBlank(transferUser)) {
//自行处理 //自行处理
if (!(reportEntity.getDealResult().equals("3") && StringUtils.isBlank(ifDone))) { if (!(reportEntity.getDealResult().equals("3") && StringUtils.isBlank(ifDone))) {
reportService.addNotice(reportEntity, "answer", ifDone); reportService.addNotice(reportEntity, "answer", ifDone);
} }
}else if (StringUtils.isNotBlank(transferUser) && StringUtils.isNotBlank(reportEntity.getDealResult())){ } else if (StringUtils.isNotBlank(transferUser) && StringUtils.isNotBlank(reportEntity.getDealResult())) {
//管理员进行处理,同时移交给他人 //管理员进行处理,同时移交给他人
reportService.addNotice(reportEntity,"meanWhile",ifDone); reportService.addNotice(reportEntity, "meanWhile", ifDone);
} }
addMessage(redirectAttributes, "补充举报"+ reportEntity.getSupplementTitle() + "'成功"); addMessage(redirectAttributes, "补充举报" + reportEntity.getSupplementTitle() + "'成功");
return "redirect:" + adminPath + "/report/list/?repage&flag=0"; return "redirect:" + adminPath + "/report/list/?repage&flag=0";
} }
...@@ -350,7 +356,7 @@ public class ReportController extends BaseController { ...@@ -350,7 +356,7 @@ public class ReportController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = "viewTransfer") @RequestMapping(value = "viewTransfer")
public void viewTransfer(User user,String flag,HttpServletRequest request, HttpServletResponse response, Model model) throws IOException { public void viewTransfer(User user, String flag, HttpServletRequest request, HttpServletResponse response, Model model) throws IOException {
Page<User> page = reportService.findUserPage(new Page<User>(request, response), user); Page<User> page = reportService.findUserPage(new Page<User>(request, response), user);
StringBuffer html = new StringBuffer(); StringBuffer html = new StringBuffer();
html.append("<table id='contentTable' class='table table-striped table-bordered table-condensed'>"); html.append("<table id='contentTable' class='table table-striped table-bordered table-condensed'>");
...@@ -365,7 +371,7 @@ public class ReportController extends BaseController { ...@@ -365,7 +371,7 @@ public class ReportController extends BaseController {
html.append(" <th>所属公司</th>"); html.append(" <th>所属公司</th>");
html.append(" <th>所属部门</th>"); html.append(" <th>所属部门</th>");
html.append(" <th>职位</th>"); html.append(" <th>职位</th>");
}else if (flag.equals("2")){//转交 } else if (flag.equals("2")) {//转交
html.append(" <th>选择</th>"); html.append(" <th>选择</th>");
html.append(" <th>ID</th>"); html.append(" <th>ID</th>");
html.append(" <th>用户名</th>"); html.append(" <th>用户名</th>");
...@@ -377,9 +383,9 @@ public class ReportController extends BaseController { ...@@ -377,9 +383,9 @@ public class ReportController extends BaseController {
html.append(" </tr>"); html.append(" </tr>");
html.append(" </thead>"); html.append(" </thead>");
html.append(" <tbody>"); html.append(" <tbody>");
if (page.getList().size() > 0){ if (page.getList().size() > 0) {
int i = 1; int i = 1;
for (User userEntity : page.getList()){ for (User userEntity : page.getList()) {
html.append(" <tr>"); html.append(" <tr>");
if (flag.equals("1")) { if (flag.equals("1")) {
html.append(" <td><input type='radio' value='" + userEntity.getId() + "' onclick='chooseRen(this);'></td>"); html.append(" <td><input type='radio' value='" + userEntity.getId() + "' onclick='chooseRen(this);'></td>");
...@@ -389,12 +395,12 @@ public class ReportController extends BaseController { ...@@ -389,12 +395,12 @@ public class ReportController extends BaseController {
html.append(" <td>" + (userEntity.getMobile() == null ? "" : userEntity.getMobile()) + "</td>"); html.append(" <td>" + (userEntity.getMobile() == null ? "" : userEntity.getMobile()) + "</td>");
html.append(" <td>" + (userEntity.getCompany() == null ? "" : userEntity.getCompany().getName()) + "</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.getOffice() == null ? "" : userEntity.getOffice().getName()) + "</td>");
if (userEntity.getPosition() != null){ if (userEntity.getPosition() != null) {
html.append(" <td>" + (userEntity.getPosition().getName() == null ? "" : userEntity.getPosition().getName()) + "</td>"); html.append(" <td>" + (userEntity.getPosition().getName() == null ? "" : userEntity.getPosition().getName()) + "</td>");
}else { } else {
html.append(" <td></td>"); html.append(" <td></td>");
} }
}else if (flag.equals("2")){ } else if (flag.equals("2")) {
html.append(" <td><input type='radio' value='" + userEntity.getId() + "' onclick='chooseRen(this);'></td>"); html.append(" <td><input type='radio' value='" + userEntity.getId() + "' onclick='chooseRen(this);'></td>");
html.append(" <td>" + i + "</td>"); html.append(" <td>" + i + "</td>");
html.append(" <td>" + (userEntity.getLoginName() == null ? "" : userEntity.getLoginName()) + "</td>"); html.append(" <td>" + (userEntity.getLoginName() == null ? "" : userEntity.getLoginName()) + "</td>");
...@@ -410,11 +416,11 @@ public class ReportController extends BaseController { ...@@ -410,11 +416,11 @@ public class ReportController extends BaseController {
html.append(" </tbody>"); html.append(" </tbody>");
html.append("</table>"); html.append("</table>");
html.append("<span id='chooseItem'></span>"); html.append("<span id='chooseItem'></span>");
if (page.getList().size() == 0){ if (page.getList().size() == 0) {
html.append(" <span style='color: #999999;margin: 20px 0 70px 20px;display: block;'>未查询到相关内容</span>"); html.append(" <span style='color: #999999;margin: 20px 0 70px 20px;display: block;'>未查询到相关内容</span>");
} }
if (page.getList().size() > 0){ if (page.getList().size() > 0) {
html.append(" <div class='pagination'>"+page+"</div>"); html.append(" <div class='pagination'>" + page + "</div>");
} }
PrintWriter out = response.getWriter(); PrintWriter out = response.getWriter();
response.setContentType("application/json;charset=utf-8"); response.setContentType("application/json;charset=utf-8");
...@@ -423,21 +429,21 @@ public class ReportController extends BaseController { ...@@ -423,21 +429,21 @@ public class ReportController extends BaseController {
} }
@RequestMapping(value = "export", method = RequestMethod.POST) @RequestMapping(value = "export", method = RequestMethod.POST)
public String export(ReportEntity reportEntity,String flag, HttpServletRequest request,HttpServletResponse response, RedirectAttributes redirectAttributes) { public String export(ReportEntity reportEntity, String flag, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
//判断登录人的角色 //判断登录人的角色
User user = UserUtils.getUser(); User user = UserUtils.getUser();
boolean isAdmin = reportService.checkRole(user); boolean isAdmin = reportService.checkRole(user);
if (!isAdmin){ if (!isAdmin) {
reportEntity.setExchangeAfterUser(user.getId()); reportEntity.setExchangeAfterUser(user.getId());
} }
//判断标签状态 flag为空,跳转到核查中举报列表 flag为0,跳转到未处理举报列表 flag为1,跳转到举报列表 //判断标签状态 flag为空,跳转到核查中举报列表 flag为0,跳转到未处理举报列表 flag为1,跳转到举报列表
if (StringUtils.isNotBlank(flag)){ if (StringUtils.isNotBlank(flag)) {
if (flag.equals("0")){ if (flag.equals("0")) {
if (StringUtils.isBlank(reportEntity.getReportStatus())) { if (StringUtils.isBlank(reportEntity.getReportStatus())) {
reportEntity.setReportStatus("0"); reportEntity.setReportStatus("0");
} }
} }
}else{ } else {
if (StringUtils.isBlank(reportEntity.getReportStatus())) { if (StringUtils.isBlank(reportEntity.getReportStatus())) {
reportEntity.setReportStatus("1"); reportEntity.setReportStatus("1");
} }
...@@ -445,12 +451,12 @@ public class ReportController extends BaseController { ...@@ -445,12 +451,12 @@ public class ReportController extends BaseController {
try { try {
String fileName = "举报列表" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx"; String fileName = "举报列表" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
List<ReportEntity> reportList = reportService.getReportList(reportEntity); List<ReportEntity> reportList = reportService.getReportList(reportEntity);
new ExportExcel("举报列表", ReportEntity.class, isAdmin).setDataList(reportList).write(request,response, fileName).dispose(); new ExportExcel("举报列表", ReportEntity.class, isAdmin).setDataList(reportList).write(request, response, fileName).dispose();
return null; return null;
} catch (Exception e) { } catch (Exception e) {
addMessage(redirectAttributes, "导出用户失败!失败信息:" + e.getMessage()); addMessage(redirectAttributes, "导出用户失败!失败信息:" + e.getMessage());
} }
return "redirect:" + adminPath + "/report/list/?repage&flag="+flag; return "redirect:" + adminPath + "/report/list/?repage&flag=" + flag;
} }
/** /**
...@@ -466,7 +472,7 @@ public class ReportController extends BaseController { ...@@ -466,7 +472,7 @@ public class ReportController extends BaseController {
public String deliverList(ReportEntity reportEntity, HttpServletRequest request, HttpServletResponse response, Model model) { public String deliverList(ReportEntity reportEntity, HttpServletRequest request, HttpServletResponse response, Model model) {
//判断登录人的角色 //判断登录人的角色
User user = UserUtils.getUser(); User user = UserUtils.getUser();
if (!reportService.checkRole(user)){ if (!reportService.checkRole(user)) {
reportEntity.setExchangeAfterUser(user.getId()); reportEntity.setExchangeAfterUser(user.getId());
} }
...@@ -474,8 +480,8 @@ public class ReportController extends BaseController { ...@@ -474,8 +480,8 @@ public class ReportController extends BaseController {
User userEntity = new User(); User userEntity = new User();
Page<User> userPage = reportService.findUserPage(new Page<User>(1, 20), userEntity); Page<User> userPage = reportService.findUserPage(new Page<User>(1, 20), userEntity);
List<ReportEntity> reportlist = page.getList(); List<ReportEntity> reportlist = page.getList();
for (ReportEntity report : reportlist){ for (ReportEntity report : reportlist) {
String typeStr=""; String typeStr = "";
if (StringUtils.isNoneBlank(report.getSupplementType())) { if (StringUtils.isNoneBlank(report.getSupplementType())) {
String[] types = report.getSupplementType().split(","); String[] types = report.getSupplementType().split(",");
for (String value : types) { for (String value : types) {
...@@ -501,12 +507,12 @@ public class ReportController extends BaseController { ...@@ -501,12 +507,12 @@ public class ReportController extends BaseController {
value = "商业管理"; value = "商业管理";
} else if (value.equals("11")) { } else if (value.equals("11")) {
value = "研发"; value = "研发";
} else if(value.equals("12")) { } else if (value.equals("12")) {
value ="投资开发"; value = "投资开发";
} }
typeStr =typeStr+value+","; typeStr = typeStr + value + ",";
} }
report.setSupplementType(typeStr.substring(0,typeStr.length()-1)); report.setSupplementType(typeStr.substring(0, typeStr.length() - 1));
} }
} }
page.setList(reportlist); page.setList(reportlist);
...@@ -527,8 +533,8 @@ public class ReportController extends BaseController { ...@@ -527,8 +533,8 @@ public class ReportController extends BaseController {
* @return * @return
*/ */
@RequestMapping(value = "deliver") @RequestMapping(value = "deliver")
public void deliver(String[] reportIds,String userId, HttpServletRequest request, HttpServletResponse response) throws IOException { public void deliver(String[] reportIds, String userId, HttpServletRequest request, HttpServletResponse response) throws IOException {
reportService.deliverReport(reportIds,userId); reportService.deliverReport(reportIds, userId);
String result = "1"; String result = "1";
PrintWriter out = response.getWriter(); PrintWriter out = response.getWriter();
response.setContentType("application/json;charset=utf-8"); response.setContentType("application/json;charset=utf-8");
...@@ -545,4 +551,17 @@ public class ReportController extends BaseController { ...@@ -545,4 +551,17 @@ public class ReportController extends BaseController {
out.close(); out.close();
} }
/**
* 管理员修改处理结论
*
* @return
*/
@RequestMapping(value = "conclusion")
public String closeConclusion(ReportEntity reportEntity) {
reportService.updateConclusion(reportEntity);
//return "modules/report/reportDetail";
return "redirect:" + adminPath + "/report/list/?repage&flag=0";
}
} }
...@@ -594,4 +594,11 @@ ...@@ -594,4 +594,11 @@
is_send_email = '1' is_send_email = '1'
WHERE id = #{reportId} WHERE id = #{reportId}
</update> </update>
<update id="updateConclusion">
UPDATE ct_bbtc_report SET
report_status= '3',
deal_result = #{lStatus}
WHERE id = #{id}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -163,6 +163,7 @@ ...@@ -163,6 +163,7 @@
<c:if test="${report.reportStatus eq '0'}">未处理</c:if> <c:if test="${report.reportStatus eq '0'}">未处理</c:if>
<c:if test="${report.reportStatus eq '1'}">跟踪中</c:if> <c:if test="${report.reportStatus eq '1'}">跟踪中</c:if>
<c:if test="${report.reportStatus eq '2'}">已处理</c:if> <c:if test="${report.reportStatus eq '2'}">已处理</c:if>
<c:if test="${report.reportStatus eq '3'}">已关闭</c:if>
</td> </td>
<td> <td>
<c:if test="${report.dealResult eq null}">--</c:if> <c:if test="${report.dealResult eq null}">--</c:if>
......
...@@ -8,74 +8,75 @@ ...@@ -8,74 +8,75 @@
$(document).ready(function () { $(document).ready(function () {
var count = "${result}"; var count = "${result}";
parent.refreshPromt(count); parent.refreshPromt(count);
$("input[type='text']").attr("disabled",true); $("input[type='text']").attr("disabled", true);
$("#btnTrack").click(function () { $("#btnTrack").click(function () {
window.location.href = "${ctx}/report/track?id=${report.id}"; window.location.href = "${ctx}/report/track?id=${report.id}";
}); });
var supplementArea = "${report.supplementArea}"; var supplementArea = "${report.supplementArea}";
if (supplementArea == "North China"){ if (supplementArea == "North China") {
supplementArea = "华北区域公司"; supplementArea = "华北区域公司";
}else if (supplementArea == "BeiJing"){ } else if (supplementArea == "BeiJing") {
supplementArea = "北京区域公司"; supplementArea = "北京区域公司";
}else if (supplementArea == "ShangHai"){ } else if (supplementArea == "ShangHai") {
supplementArea = "上海区域公司"; supplementArea = "上海区域公司";
}else if (supplementArea == "SouthWest"){ } else if (supplementArea == "SouthWest") {
supplementArea = "西南区域公司"; supplementArea = "西南区域公司";
}else if (supplementArea == "SouthEast"){ } else if (supplementArea == "SouthEast") {
supplementArea = "东南区域公司"; supplementArea = "东南区域公司";
}else if (supplementArea == "Central China"){ } else if (supplementArea == "Central China") {
supplementArea = "华中区域公司"; supplementArea = "华中区域公司";
}else if (supplementArea == "GuangShen"){ } else if (supplementArea == "GuangShen") {
supplementArea = "广深区域公司"; supplementArea = "广深区域公司";
}else if (supplementArea == "Hainan"){ } else if (supplementArea == "Hainan") {
supplementArea = "海南区域公司"; supplementArea = "海南区域公司";
}else if (supplementArea == "Group"){ } else if (supplementArea == "Group") {
supplementArea = "集团本部"; supplementArea = "集团本部";
} }
$("#supplementArea").val(supplementArea); $("#supplementArea").val(supplementArea);
var dealResult = "${report.dealResult}"; var dealResult = "${report.dealResult}";
if (dealResult == "1"){ if (dealResult == "1") {
dealResult = "移交客诉"; dealResult = "移交客诉";
}else if (dealResult == "2"){ } else if (dealResult == "2") {
dealResult = "举报无效"; dealResult = "举报无效";
}else if (dealResult == "3"){ } else if (dealResult == "3") {
dealResult = "举报受理"; dealResult = "举报受理";
} }
$("#dealResult").val(dealResult); $("#dealResult").val(dealResult);
}); });
var requestFlag = true; var requestFlag = true;
function openDownloadDialog(id){
if (requestFlag == true){ function openDownloadDialog(id) {
if (requestFlag == true) {
$.ajax({ $.ajax({
url: "${ctx}/report/toWord?id="+id, url: "${ctx}/report/toWord?id=" + id,
dataType: "text", dataType: "text",
traditional: true,//这里设置为true traditional: true,//这里设置为true
cache: false, cache: false,
beforeSend: function () { beforeSend: function () {
requestFlag = false; requestFlag = false;
}, },
success: function(url) { //登录成功后返回的数据 success: function (url) { //登录成功后返回的数据
window.open(url, "_blank"); window.open(url, "_blank");
}, },
error:function(){ error: function () {
alert("数据错误!"); alert("数据错误!");
}, },
complete: function () { complete: function () {
requestFlag = true; requestFlag = true;
} }
}); });
}else{ } else {
top.$.jBox.tip('正在加载,请稍等', 'warning'); top.$.jBox.tip('正在加载,请稍等', 'warning');
} }
} }
</script> </script>
<style type="text/css"> <style type="text/css">
.title{ .title {
font-size:16px; font-size: 16px;
font-weight:bold; font-weight: bold;
} }
</style> </style>
</head> </head>
...@@ -84,100 +85,103 @@ ...@@ -84,100 +85,103 @@
<li class="active"><a href="${ctx}/report/form">举报详情</a></li> <li class="active"><a href="${ctx}/report/form">举报详情</a></li>
</ul> </ul>
<br/> <br/>
<form:form id="inputForm" modelAttribute="report" action="${ctx}/report/track" method="post" class="form-horizontal"> <form:form id="inputForm" modelAttribute="report" action="${ctx}/report/conclusion" method="post" class="form-horizontal">
<sys:message content="${message}"/> <sys:message content="${message}"/>
<span class="title">举报内容</span> <form:hidden id="reportId" path="id"/>
<div class="control-group"> <span class="title">举报内容</span>
<div class="control-group">
<label class="control-label">被举报项目/部门:</label> <label class="control-label">被举报项目/部门:</label>
<div class="controls"> <div class="controls">
<form:input path="reportProject" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportProject" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">标题:</label> <label class="control-label">标题:</label>
<div class="controls"> <div class="controls">
<form:input path="supplementTitle" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="supplementTitle" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">被举报人:</label> <label class="control-label">被举报人:</label>
<div class="controls"> <div class="controls">
<form:input path="supplementInformant" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="supplementInformant" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">举报时间:</label> <label class="control-label">举报时间:</label>
<div class="controls"> <div class="controls">
<form:input path="reportTime" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportTime" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">所在城市:</label> <label class="control-label">所在城市:</label>
<div class="controls"> <div class="controls">
<form:input path="reportCity" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportCity" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">IP来源:</label> <label class="control-label">IP来源:</label>
<div class="controls"> <div class="controls">
<form:input path="reportIp" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportIp" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">IP所属城市:</label> <label class="control-label">IP所属城市:</label>
<div class="controls"> <div class="controls">
<form:input path="ipCity" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="ipCity" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">是否已发送邮件:</label> <label class="control-label">是否已发送邮件:</label>
<div class="controls"> <div class="controls">
<form:input path="isSendEmail" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="isSendEmail" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">内容:</label> <label class="control-label">内容:</label>
<div class="controls"> <div class="controls">
<form:textarea id="reportContent" htmlEscape="true" style="width:90%" path="reportContent" rows="6" maxlength="500" class="input-xxlarge" disabled="true"/> <form:textarea id="reportContent" htmlEscape="true" style="width:90%" path="reportContent" rows="6"
</div> maxlength="500" class="input-xxlarge" disabled="true"/>
</div> </div>
<div class="control-group"> </div>
<div class="control-group">
<label class="control-label">附件:</label> <label class="control-label">附件:</label>
<div class="controls"> <div class="controls">
<c:forEach items="${reportAttachmentList}" var="reportAttachment" varStatus="vs"> <c:forEach items="${reportAttachmentList}" var="reportAttachment" varStatus="vs">
${vs.count}.<a href="${reportAttachment.attachmentPath}" target="_blank">${reportAttachment.attachmentName}</a><br> ${vs.count}.<a href="${reportAttachment.attachmentPath}" target="_blank">${reportAttachment.attachmentName}</a><br>
</c:forEach> </c:forEach>
</div> </div>
</div> </div>
<span class="title">举报人信息</span> <span class="title">举报人信息</span>
<div class="control-group"> <div class="control-group">
<label class="control-label">姓名:</label> <label class="control-label">姓名:</label>
<div class="controls"> <div class="controls">
<form:input path="reportPersonName" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportPersonName" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">手机号:</label> <label class="control-label">手机号:</label>
<div class="controls"> <div class="controls">
<form:input path="reportPersonTel" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportPersonTel" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">Email:</label> <label class="control-label">Email:</label>
<div class="controls"> <div class="controls">
<form:input path="reportPersonEmail" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportPersonEmail" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">举报途径:</label> <label class="control-label">举报途径:</label>
<div class="controls"> <div class="controls">
<form:radiobuttons path="reportSource" items="${fns:getDictList('report_source')}" itemLabel="label" itemValue="value" <form:radiobuttons path="reportSource" items="${fns:getDictList('report_source')}" itemLabel="label"
itemValue="value"
htmlEscape="false" disabled="true" style="margin-right: -23px\9;"/> htmlEscape="false" disabled="true" style="margin-right: -23px\9;"/>
</div> </div>
</div> </div>
<c:if test="${report.reportStatus ne '0'}"> <c:if test="${report.reportStatus ne '0'}">
<span class="title">举报信息补充</span> <span class="title">举报信息补充</span>
<div class="control-group"> <div class="control-group">
<label class="control-label">业务类型:</label> <label class="control-label">业务类型:</label>
<div class="controls"> <div class="controls">
<%--<form:input id="supplementType" items="split(${report.supplementType},',')" path="supplementType"--%> <%--<form:input id="supplementType" items="split(${report.supplementType},',')" path="supplementType"--%>
...@@ -187,58 +191,69 @@ ...@@ -187,58 +191,69 @@
htmlEscape="false" maxlength="200" class="input-xlarge required"/> htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">被举报区域:</label> <label class="control-label">被举报区域:</label>
<div class="controls"> <div class="controls">
<form:input id="supplementArea" path="supplementArea" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input id="supplementArea" path="supplementArea" htmlEscape="false" maxlength="200"
class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">内容:</label> <label class="control-label">内容:</label>
<div class="controls"> <div class="controls">
<form:textarea id="reportContent" htmlEscape="true" style="width:90%" path="supplementContent" rows="6" maxlength="500" class="input-xxlarge" disabled="true"/> <form:textarea id="reportContent" htmlEscape="true" style="width:90%" path="supplementContent" rows="6"
</div> maxlength="500" class="input-xxlarge" disabled="true"/>
</div> </div>
<div class="control-group"> </div>
<div class="control-group">
<label class="control-label">附件:</label> <label class="control-label">附件:</label>
<div class="controls"> <div class="controls">
<c:forEach items="${supplementAttachmentList}" var="supplementAttachment" varStatus="vs"> <c:forEach items="${supplementAttachmentList}" var="supplementAttachment" varStatus="vs">
${vs.count}.<a href="${supplementAttachment.attachmentPath}" target="_blank">${supplementAttachment.attachmentName}</a><br> ${vs.count}.<a href="${supplementAttachment.attachmentPath}" target="_blank">${supplementAttachment.attachmentName}</a><br>
</c:forEach> </c:forEach>
</div> </div>
</div> </div>
</c:if> </c:if>
<c:if test="${report.dealResult ne null}"> <c:if test="${report.dealResult ne null}">
<span class="title">处理结果</span> <span class="title">处理结果</span>
<div class="control-group"> <div class="control-group">
<label class="control-label">处理人:</label> <label class="control-label">处理人:</label>
<div class="controls"> <div class="controls">
<form:input path="dealPersonName" value="${report.dealPersonName}" disabled="true" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="dealPersonName" value="${report.dealPersonName}" disabled="true" htmlEscape="false"
maxlength="200" class="input-xlarge required"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">处理成果文件:</label> <label class="control-label">处理成果文件:</label>
<div class="controls"> <div class="controls">
<c:forEach items="${dealAttachmentList}" var="dealAttachment" varStatus="vs"> <c:forEach items="${dealAttachmentList}" var="dealAttachment" varStatus="vs">
${vs.count}.<a href="${dealAttachment.attachmentPath}" target="_blank">${dealAttachment.attachmentName}</a><br> ${vs.count}.<a href="${dealAttachment.attachmentPath}" target="_blank">${dealAttachment.attachmentName}</a><br>
</c:forEach> </c:forEach>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">处理结论:</label> <label class="control-label">处理结论:</label>
<div class="controls"> <div class="controls">
<form:input id="dealResult" path="dealResult" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <c:if test="${isAdmin eq true && report.reportStatus eq '2'}"><form:select path="lStatus" class="input-small">
</div> <form:options items="${fns:getDictList('deal_result')}" itemLabel="label" itemValue="value"
</div> htmlEscape="false"/></form:select></c:if>
</c:if> <c:if test="${isAdmin eq false || report.reportStatus != '2'}"><form:input id="dealResult" path="dealResult" htmlEscape="false" maxlength="200" class="input-xlarge required"/></c:if>
<li class="btns"> </div>
</div>
</c:if>
<li class="btns">
<label style="width:auto;"> <label style="width:auto;">
<c:if test="${report.reportStatus != '2'}"><input id="btnTrack" class="btn btn-primary" type="button" value="跟踪"/>&nbsp;&nbsp;</c:if> <c:if test="${report.reportStatus != '2'}"><input id="btnTrack" class="btn btn-primary" type="button"
<input id="btnDocument" class="btn btn-primary" type="button" value="转为文档" onclick="openDownloadDialog('${report.id}')"/>&nbsp;&nbsp; value="跟踪"/>&nbsp;&nbsp;</c:if>
<input id="btnReturn" class="btn btn-primary" type="button" value="返回" onclick="history.go(-1)"/></label> <input id="btnDocument" class="btn btn-primary" type="button" value="转为文档"
</li> onclick="openDownloadDialog('${report.id}')"/>&nbsp;&nbsp;
<input id="btnReturn" class="btn btn-primary" type="button" value="返回" onclick="history.go(-1)"/>&nbsp;&nbsp;
<c:if test="${isAdmin eq true && report.reportStatus eq '2'}"><input id="btnClose" class="btn btn-primary"
type="submit" value="关闭"/></c:if>
</label>
</li>
</form:form> </form:form>
</body>
</html> </html>
</body>
\ No newline at end of file
<%@ page contentType="text/html;charset=UTF-8" %> <%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%> <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html> <html>
<head> <head>
<title>举报管理</title> <title>举报管理</title>
<meta name="decorator" content="default"/> <meta name="decorator" content="default"/>
<script type="text/javascript"> <script type="text/javascript">
var requestFlag = true; var requestFlag = true;
$(document).ready(function() { $(document).ready(function () {
$("#btnExport").click(function(){ $("#btnExport").click(function () {
top.$.jBox.confirm("确认要导出数据吗?","系统提示",function(v,h,f){ top.$.jBox.confirm("确认要导出数据吗?", "系统提示", function (v, h, f) {
if(v=="ok"){ if (v == "ok") {
$("#searchForm").attr("action","${ctx}/report/export"); $("#searchForm").attr("action", "${ctx}/report/export");
$("#searchForm").submit(); $("#searchForm").submit();
} }
},{buttonsFocus:1}); }, {buttonsFocus: 1});
top.$('.jbox-body .jbox-icon').css('top','55px'); top.$('.jbox-body .jbox-icon').css('top', '55px');
}); });
$("#btnSubmit").click(function () { $("#btnSubmit").click(function () {
$("#searchForm").attr("action", "${ctx}/report"); $("#searchForm").attr("action", "${ctx}/report");
...@@ -25,78 +25,91 @@ ...@@ -25,78 +25,91 @@
}); });
$("#btnReset").click(function () { $("#btnReset").click(function () {
var flag = $("#flag").val(); var flag = $("#flag").val();
window.location.href = "${ctx}/report/list?flag="+flag; window.location.href = "${ctx}/report/list?flag=" + flag;
}); });
//序号连续 //序号连续
var i = 1; var i = 1;
var pageNo = $("#pageNo").val(); var pageNo = $("#pageNo").val();
var pageSize = $("#pageSize").val(); var pageSize = $("#pageSize").val();
$(".reportList").each(function(){ $(".reportList").each(function () {
var num = (pageNo-1)*pageSize + i; var num = (pageNo - 1) * pageSize + i;
i += 1; i += 1;
$(this).children("td:first-child").html(num); $(this).children("td:first-child").html(num);
}); });
}); });
function page(n,s){
function page(n, s) {
$("#pageNo").val(n); $("#pageNo").val(n);
$("#pageSize").val(s); $("#pageSize").val(s);
$("#searchForm").attr("action", "${ctx}/report"); $("#searchForm").attr("action", "${ctx}/report");
$("#searchForm").submit(); $("#searchForm").submit();
return false; return false;
} }
function resetPageNo() { function resetPageNo() {
$("#pageNo").val(0); $("#pageNo").val(0);
} }
function openDownloadDialog(id){
if (requestFlag == true){ function openDownloadDialog(id) {
if (requestFlag == true) {
$.ajax({ $.ajax({
url: "${ctx}/report/toWord?id="+id, url: "${ctx}/report/toWord?id=" + id,
dataType: "text", dataType: "text",
traditional: true,//这里设置为true traditional: true,//这里设置为true
cache: false, cache: false,
beforeSend: function () { beforeSend: function () {
requestFlag = false; requestFlag = false;
}, },
success: function(url) { //登录成功后返回的数据 success: function (url) { //登录成功后返回的数据
window.open(url, "_blank"); window.open(url, "_blank");
}, },
error:function(){ error: function () {
alert("数据错误!"); alert("数据错误!");
}, },
complete: function () { complete: function () {
requestFlag = true; requestFlag = true;
} }
}); });
}else{ } else {
top.$.jBox.tip('正在加载,请稍等', 'warning'); top.$.jBox.tip('正在加载,请稍等', 'warning');
} }
} }
</script> </script>
</head> </head>
<body> <body>
<ul class="nav nav-tabs"> <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 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 '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 <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>--%> <%--<li style="float: right;"><input id="btnAdd" class="btn btn-primary" type="button" value="举报录入"/></li>--%>
</ul> </ul>
<form:form id="searchForm" modelAttribute="report" action="${ctx}/report/list" method="post" class="breadcrumb form-search"> <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="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/> <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<input id="flag" name="flag" type="hidden" value="${flag}"/> <input id="flag" name="flag" type="hidden" value="${flag}"/>
<ul class="ul-form"> <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="supplementTitle" htmlEscape="false"
<li><label>被举报项目/部门:</label><form:input onchange="resetPageNo();" path="reportProject" htmlEscape="false" maxlength="50" class="input-small" maxlength="50" class="input-small"/></li>
<li><label>被举报项目/部门:</label><form:input onchange="resetPageNo();" path="reportProject" htmlEscape="false"
maxlength="50" class="input-small"
style="position:relative;top:-12.5px"/></li> style="position:relative;top:-12.5px"/></li>
<li><label>举报时间:</label><input id="reportTimeFrom" name="reportTimeFrom" onchange="resetPageNo();" readonly="readonly" type="text" <li><label>举报时间:</label><input id="reportTimeFrom" name="reportTimeFrom" onchange="resetPageNo();"
maxlength="200" class="input-mini Wdate required" value="${report.reportTimeFrom}" readonly="readonly" type="text"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,maxDate:'#F{$dp.$D(\'reportTimeTo\')}'});" /></li> maxlength="200" class="input-mini Wdate required"
<li><label>至:</label><input id="reportTimeTo" name="reportTimeTo" onchange="resetPageNo();" readonly="readonly" type="text" 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}" maxlength="200" class="input-mini Wdate required" value="${report.reportTimeTo}"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'reportTimeFrom\')}'});" /></li> onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'reportTimeFrom\')}'});"/>
</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="reportPersonName" htmlEscape="false"
<li><label>举报人电话:</label><form:input onchange="resetPageNo();" path="reportPersonTel" htmlEscape="false" maxlength="50" class="input-small"/></li> 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"> <li><label>业务类型:</label><form:select onchange="resetPageNo();" path="supplementType" class="input-small">
<form:option value=" ">请选择</form:option> <form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('supplement_type')}" itemLabel="label" itemValue="value" <form:options items="${fns:getDictList('supplement_type')}" itemLabel="label" itemValue="value"
...@@ -105,7 +118,8 @@ ...@@ -105,7 +118,8 @@
<form:option value=" ">请选择</form:option> <form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('report_status')}" itemLabel="label" itemValue="value" <form:options items="${fns:getDictList('report_status')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li> htmlEscape="false"/></form:select></li>
<li><label>被举报人:</label><form:input onchange="resetPageNo();" path="supplementInformant" htmlEscape="false" maxlength="50" class="input-small"/></li> <li><label>被举报人:</label><form:input onchange="resetPageNo();" path="supplementInformant" htmlEscape="false"
maxlength="50" class="input-small"/></li>
<li><label>处理结论:</label><form:select onchange="resetPageNo();" path="dealResult" class="input-small"> <li><label>处理结论:</label><form:select onchange="resetPageNo();" path="dealResult" class="input-small">
<form:option value=" ">请选择</form:option> <form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('deal_result')}" itemLabel="label" itemValue="value" <form:options items="${fns:getDictList('deal_result')}" itemLabel="label" itemValue="value"
...@@ -116,15 +130,16 @@ ...@@ -116,15 +130,16 @@
htmlEscape="false"/></form:select></li> htmlEscape="false"/></form:select></li>
<li class="clearfix"></li> <li class="clearfix"></li>
<li class="btns"> <li class="btns">
<%--<label style="width:auto;">--%>&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="筛选"/>&nbsp;&nbsp; <%--<label style="width:auto;">--%>&nbsp;&nbsp;&nbsp;<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="btnReset" class="btn btn-primary" type="button" value="重置"/>&nbsp;&nbsp;
<input id="btnExport" class="btn btn-primary" type="button" value="导出"/></label> <input id="btnExport" class="btn btn-primary" type="button" value="导出"/></label>
</li> </li>
<li class="clearfix"></li> <li class="clearfix"></li>
</ul> </ul>
</form:form> </form:form>
<sys:message content="${message}"/> <sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed"> <table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
...@@ -192,6 +207,7 @@ ...@@ -192,6 +207,7 @@
<c:if test="${report.reportStatus eq '0'}">未处理</c:if> <c:if test="${report.reportStatus eq '0'}">未处理</c:if>
<c:if test="${report.reportStatus eq '1'}">跟踪中</c:if> <c:if test="${report.reportStatus eq '1'}">跟踪中</c:if>
<c:if test="${report.reportStatus eq '2'}">已处理</c:if> <c:if test="${report.reportStatus eq '2'}">已处理</c:if>
<c:if test="${report.reportStatus eq '3'}">已关闭</c:if>
<%--<c:if test="${report.reportStatus eq '3'}">受理中</c:if>--%> <%--<c:if test="${report.reportStatus eq '3'}">受理中</c:if>--%>
</td> </td>
<td> <td>
...@@ -218,19 +234,20 @@ ...@@ -218,19 +234,20 @@
</td> </td>
<td> <td>
<a href="${ctx}/report/view?id=${report.id}">查看</a> <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> <c:if test="${report.reportStatus ne '2'}"><a
href="${ctx}/report/track?id=${report.id}">跟踪</a></c:if>
<a href="#" onclick="openDownloadDialog('${report.id}')">转为文档</a> <a href="#" onclick="openDownloadDialog('${report.id}')">转为文档</a>
</td> </td>
</tr> </tr>
</c:forEach> </c:forEach>
</c:if> </c:if>
</tbody> </tbody>
</table> </table>
<c:if test="${page.list.size()=='0'}"> <c:if test="${page.list.size()=='0'}">
<span style="color: #999999;margin: 20px 0 70px 20px;display: block;">未查询到相关内容</span> <span style="color: #999999;margin: 20px 0 70px 20px;display: block;">未查询到相关内容</span>
</c:if> </c:if>
<c:if test="${page.list.size()>0}"> <c:if test="${page.list.size()>0}">
<div class="pagination">${page}</div> <div class="pagination">${page}</div>
</c:if> </c:if>
</body> </body>
</html> </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