Commit 94a33638 by Java-刘铮

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

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