Commit f8dc5b81 by sunxin

2019-10-24

parent d7ae9433
...@@ -166,8 +166,10 @@ public class ReportController extends BaseController { ...@@ -166,8 +166,10 @@ public class ReportController extends BaseController {
String exchangeAfterUser = reportdao.selectExchangeAfterUser(report.getExchangeAfterUser()); String exchangeAfterUser = reportdao.selectExchangeAfterUser(report.getExchangeAfterUser());
report.setTransferName(exchangeAfterUser); report.setTransferName(exchangeAfterUser);
String isAdmin = reportService.checkRole(user);
if(report.getExchangeAfterUser()!= null){ if(report.getExchangeAfterUser()!= null){
/*如果设置了不显示 */ if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
/*如果是区域管理员 且设置了不显示 */
if(user.getId().equals(report.getExchangeAfterUser()) && "2".equals(report.getIfClue())){ if(user.getId().equals(report.getExchangeAfterUser()) && "2".equals(report.getIfClue())){
System.out.printf("隐藏信息============="); System.out.printf("隐藏信息=============");
report.setReportPersonName(null); report.setReportPersonName(null);
...@@ -180,6 +182,8 @@ public class ReportController extends BaseController { ...@@ -180,6 +182,8 @@ public class ReportController extends BaseController {
} }
}
/*for (ReportEntity report : reportlist) { /*for (ReportEntity report : reportlist) {
String departmentStr = ""; String departmentStr = "";
...@@ -358,8 +362,11 @@ public class ReportController extends BaseController { ...@@ -358,8 +362,11 @@ public class ReportController extends BaseController {
} }
report.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1)); report.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
} }
String isAdmin = reportService.checkRole(user);
if(report.getExchangeAfterUser()!= null){ if(report.getExchangeAfterUser()!= null){
/*如果设置了不显示 */ if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
/*如果是区域管理员 且设置了不显示 */
if(user.getId().equals(report.getExchangeAfterUser()) && "2".equals(report.getIfClue())){ if(user.getId().equals(report.getExchangeAfterUser()) && "2".equals(report.getIfClue())){
System.out.printf("隐藏信息============="); System.out.printf("隐藏信息=============");
report.setReportPersonName(null); report.setReportPersonName(null);
...@@ -372,6 +379,8 @@ public class ReportController extends BaseController { ...@@ -372,6 +379,8 @@ public class ReportController extends BaseController {
} }
}
page.setList(reportlist); page.setList(reportlist);
String isAdmin = reportService.checkRole(user); String isAdmin = reportService.checkRole(user);
model.addAttribute("page", page); model.addAttribute("page", page);
...@@ -560,7 +569,7 @@ public class ReportController extends BaseController { ...@@ -560,7 +569,7 @@ public class ReportController extends BaseController {
}else{ }else{
reportEntity1.setTransferGroup("--"); reportEntity1.setTransferGroup("--");
}*/ }*/
//String isAdmin = reportService.checkRole(useradmin);
if (isAdmin.equals("1") || isAdmin.equals("2")) { if (isAdmin.equals("1") || isAdmin.equals("2")) {
model.addAttribute("ifClue", true); model.addAttribute("ifClue", true);
} else { } else {
...@@ -943,7 +952,8 @@ public class ReportController extends BaseController { ...@@ -943,7 +952,8 @@ public class ReportController extends BaseController {
for (ReportEntity report002:reportList) { for (ReportEntity report002:reportList) {
if(report002.getExchangeAfterUser()!= null){ if(report002.getExchangeAfterUser()!= null){
/*如果设置了不显示 */ if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
/*如果是区域管理员 且设置了不显示 */
if(user.getId().equals(report002.getExchangeAfterUser()) && "2".equals(report002.getIfClue())){ if(user.getId().equals(report002.getExchangeAfterUser()) && "2".equals(report002.getIfClue())){
System.out.printf("隐藏信息============="); System.out.printf("隐藏信息=============");
report002.setReportPersonName(null); report002.setReportPersonName(null);
...@@ -955,6 +965,19 @@ public class ReportController extends BaseController { ...@@ -955,6 +965,19 @@ public class ReportController extends BaseController {
} }
} }
/* if(report002.getExchangeAfterUser()!= null){
*//*如果设置了不显示 *//*
if(user.getId().equals(report002.getExchangeAfterUser()) && "2".equals(report002.getIfClue())){
System.out.printf("隐藏信息=============");
report002.setReportPersonName(null);
report002.setReportPersonTel(null);
report002.setReportPersonEmail(null);
report002.setQq(null);
report002.setWeixin(null);
}
}*/
}
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;
......
...@@ -194,30 +194,49 @@ public class ReportToWordController { ...@@ -194,30 +194,49 @@ public class ReportToWordController {
XWPFTableRow reportPersonName = peopleInfoTable.getRow(0); XWPFTableRow reportPersonName = peopleInfoTable.getRow(0);
reportPersonName.getCell(0).setText("姓名:"); reportPersonName.getCell(0).setText("姓名:");
User user = UserUtils.getUser(); User user = UserUtils.getUser();
String isAdmin = reportService.checkRole(user);
/*如果移交后是本人 且不显示数据 则设置“”*/ /*如果移交后是本人 且不显示数据 则设置“”*/
if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
if(user.getId().equals(reportEntity.getExchangeAfterUser()) && "2".equals(reportEntity.getIfClue())){ if(user.getId().equals(reportEntity.getExchangeAfterUser()) && "2".equals(reportEntity.getIfClue())){
reportPersonName.addNewTableCell().setText( ""); reportPersonName.addNewTableCell().setText( "");
}else{ }else{
reportPersonName.addNewTableCell().setText(reportEntity.getReportPersonName() == null ? "" : reportEntity.getReportPersonName()); reportPersonName.addNewTableCell().setText(reportEntity.getReportPersonName() == null ? "" : reportEntity.getReportPersonName());
} }
}else{
//系统 辅助 管理都能看见
reportPersonName.addNewTableCell().setText(reportEntity.getReportPersonName() == null ? "" : reportEntity.getReportPersonName());
}
//表格第二行 //表格第二行
XWPFTableRow reportPersonTel = peopleInfoTable.createRow(); XWPFTableRow reportPersonTel = peopleInfoTable.createRow();
reportPersonTel.getCell(0).setText("手机号:"); reportPersonTel.getCell(0).setText("手机号:");
if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
if(user.getId().equals(reportEntity.getExchangeAfterUser()) && "2".equals(reportEntity.getIfClue())){ if(user.getId().equals(reportEntity.getExchangeAfterUser()) && "2".equals(reportEntity.getIfClue())){
reportPersonTel.getCell(1).setText(""); reportPersonTel.getCell(1).setText("");
}else{ }else{
reportPersonTel.getCell(1).setText(reportEntity.getReportPersonTel() == null ? "" : reportEntity.getReportPersonTel()); reportPersonTel.getCell(1).setText(reportEntity.getReportPersonTel() == null ? "" : reportEntity.getReportPersonTel());
} }
}else {
//系统 辅助管理
reportPersonTel.getCell(1).setText(reportEntity.getReportPersonTel() == null ? "" : reportEntity.getReportPersonTel());
}
//表格第三行 //表格第三行
XWPFTableRow reportPersonEmail = peopleInfoTable.createRow(); XWPFTableRow reportPersonEmail = peopleInfoTable.createRow();
reportPersonEmail.getCell(0).setText("Email:"); reportPersonEmail.getCell(0).setText("Email:");
if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
if(user.getId().equals(reportEntity.getExchangeAfterUser()) && "2".equals(reportEntity.getIfClue())){ if(user.getId().equals(reportEntity.getExchangeAfterUser()) && "2".equals(reportEntity.getIfClue())){
reportPersonEmail.getCell(1).setText(""); reportPersonEmail.getCell(1).setText("");
}else{ }else{
reportPersonEmail.getCell(1).setText(reportEntity.getReportPersonEmail() == null ? "" : reportEntity.getReportPersonEmail()); reportPersonEmail.getCell(1).setText(reportEntity.getReportPersonEmail() == null ? "" : reportEntity.getReportPersonEmail());
} }
}else {
//辅助 系统管理员
reportPersonEmail.getCell(1).setText(reportEntity.getReportPersonEmail() == null ? "" : reportEntity.getReportPersonEmail());
}
//表格第四行 //表格第四行
XWPFTableRow reportSource = peopleInfoTable.createRow(); XWPFTableRow reportSource = peopleInfoTable.createRow();
......
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