Commit 3d0064d7 by Java-李昕颖

各种改

parent 6fee7c24
...@@ -2,6 +2,7 @@ package com.ejweb.modules.front.report.bean; ...@@ -2,6 +2,7 @@ package com.ejweb.modules.front.report.bean;
import com.ejweb.core.base.BaseBean; import com.ejweb.core.base.BaseBean;
import java.sql.Timestamp;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -33,9 +34,9 @@ public class FrontReportBean extends BaseBean{ ...@@ -33,9 +34,9 @@ public class FrontReportBean extends BaseBean{
private String exchangeBeforeUser; //varchar(255) DEFAULT NULL COMMENT '移交/转交前用户id', private String exchangeBeforeUser; //varchar(255) DEFAULT NULL COMMENT '移交/转交前用户id',
private String exchangeAfterUser; //varchar(255) DEFAULT NULL COMMENT '移交/转交后用户id(只记录最新的移交用户,此处不记录历史)', private String exchangeAfterUser; //varchar(255) DEFAULT NULL COMMENT '移交/转交后用户id(只记录最新的移交用户,此处不记录历史)',
private String createBy; //创建人 private String createBy; //创建人
private Date createDate; //创建时间 private Timestamp createDate; //创建时间
private String updateBy; //更新人\ private String updateBy; //更新人\
private Date updateDate; //更新时间 private Timestamp updateDate; //更新时间
private List<String> ids; private List<String> ids;
private String code;// 验证码返回的code private String code;// 验证码返回的code
...@@ -251,11 +252,11 @@ public class FrontReportBean extends BaseBean{ ...@@ -251,11 +252,11 @@ public class FrontReportBean extends BaseBean{
this.createBy = createBy; this.createBy = createBy;
} }
public Date getCreateDate() { public Timestamp getCreateDate() {
return createDate; return createDate;
} }
public void setCreateDate(Date createDate) { public void setCreateDate(Timestamp createDate) {
this.createDate = createDate; this.createDate = createDate;
} }
...@@ -267,11 +268,11 @@ public class FrontReportBean extends BaseBean{ ...@@ -267,11 +268,11 @@ public class FrontReportBean extends BaseBean{
this.updateBy = updateBy; this.updateBy = updateBy;
} }
public Date getUpdateDate() { public Timestamp getUpdateDate() {
return updateDate; return updateDate;
} }
public void setUpdateDate(Date updateDate) { public void setUpdateDate(Timestamp updateDate) {
this.updateDate = updateDate; this.updateDate = updateDate;
} }
......
...@@ -7,22 +7,17 @@ import com.ejweb.core.service.CrudService; ...@@ -7,22 +7,17 @@ import com.ejweb.core.service.CrudService;
import com.ejweb.core.utils.DateUtils; import com.ejweb.core.utils.DateUtils;
import com.ejweb.core.utils.IdWorker; import com.ejweb.core.utils.IdWorker;
import com.ejweb.modules.front.report.bean.FrontReportBean; import com.ejweb.modules.front.report.bean.FrontReportBean;
import com.ejweb.modules.front.report.bean.ReportAttachmentBean;
import com.ejweb.modules.front.report.dao.FrontReportDao; import com.ejweb.modules.front.report.dao.FrontReportDao;
import com.ejweb.modules.front.report.entity.FrontReportEntity; import com.ejweb.modules.front.report.entity.FrontReportEntity;
import com.ejweb.modules.front.upload.util.ReportAttachmentUtils; import com.ejweb.modules.front.upload.util.ReportAttachmentUtils;
import com.ejweb.modules.reportAttachment.dao.ReportAttachmentMapper;
import com.ejweb.modules.reportAttachment.entity.ReportAttachment;
import com.ejweb.modules.sys.entity.User; import com.ejweb.modules.sys.entity.User;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.sql.Timestamp;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
/** /**
* Created by lenovo on 2017/9/8. * Created by lenovo on 2017/9/8.
*/ */
...@@ -30,12 +25,12 @@ import java.util.List; ...@@ -30,12 +25,12 @@ import java.util.List;
@Service @Service
@Transactional(readOnly = true) @Transactional(readOnly = true)
public class FrontReportService extends CrudService<FrontReportDao,FrontReportEntity>{ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEntity>{
// 添加举报信息 // 添加举报信息
@Transactional(readOnly = false) @Transactional(readOnly = false)
public ResponseBean addReport(FrontReportBean bean){ public ResponseBean addReport(FrontReportBean bean){
ResponseBean responseBean = new ResponseBean(); ResponseBean responseBean = new ResponseBean();
bean.setId(IdWorker.getNextId("R")); String reportId = IdWorker.getNextId("R");
bean.setId(reportId);
Date date = new Date(); Date date = new Date();
bean.setReportTime(DateUtils.formatDate(date,"yyyy-MM-dd HH:mm:ss")); bean.setReportTime(DateUtils.formatDate(date,"yyyy-MM-dd HH:mm:ss"));
...@@ -48,17 +43,23 @@ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEn ...@@ -48,17 +43,23 @@ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEn
} }
bean.setCreateBy(user.getId()); bean.setCreateBy(user.getId());
bean.setUpdateBy(user.getId()); bean.setUpdateBy(user.getId());
bean.setCreateDate(date); Timestamp d = new Timestamp(System.currentTimeMillis());
bean.setUpdateDate(date); bean.setCreateDate(d);
bean.setUpdateDate(d);
// //
// bean.setExchangeBeforeUser(""); // bean.setExchangeBeforeUser("");
// 添加举报信息表 // 添加举报信息表
int row = dao.insertReport(bean); int row = 0;
try {
row = dao.insertReport(bean);
}catch (Exception e){
row = dao.insertReport(bean);
}
if(row == 1){ // 添加成功 if(row == 1){ // 添加成功
List<String> attachmentIds = bean.getIds(); List<String> attachmentIds = bean.getIds();
if(attachmentIds != null && attachmentIds.size() > 0){ // 添加举报附件 if(attachmentIds != null && attachmentIds.size() > 0){ // 添加举报附件
for(String attachmentId:attachmentIds){ for(String attachmentId:attachmentIds){
ReportAttachmentUtils.addReportId(attachmentId,bean.getId()); ReportAttachmentUtils.addReportId(attachmentId,reportId);
} }
} }
......
...@@ -17,7 +17,9 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,7 +17,9 @@ import org.springframework.web.bind.annotation.RestController;
import java.io.IOException; import java.io.IOException;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by zhangzn on 2017/09/13. * Created by zhangzn on 2017/09/13.
...@@ -41,18 +43,28 @@ public class SsoController extends BaseController { ...@@ -41,18 +43,28 @@ public class SsoController extends BaseController {
LtpaTokenManager.loadConfig(URLDecoder.decode(URLDecoder.decode(filePath))); LtpaTokenManager.loadConfig(URLDecoder.decode(URLDecoder.decode(filePath)));
token = URLDecoder.decode(token); token = URLDecoder.decode(token);
token = URLDecoder.decode(token); token = URLDecoder.decode(token);
token = URLDecoder.decode(token);
String username = ""; String username = "";
if (LtpaTokenManager.isValid(token)) {//验证Token是否合法有效 boolean result = LtpaTokenManager.isValid(token);
if (result) {//验证Token是否合法有效
logger.debug(".................合法token:\t\t" + token); logger.debug(".................合法token:\t\t" + token);
LtpaToken ltpaToken = new LtpaToken(token); LtpaToken ltpaToken = new LtpaToken(token);
username = ltpaToken.getUsername(); username = ltpaToken.getUsername();
response.setStatus(ErrorCode.STATUS_CODE_2000);
response.setMessage("解析用户名正常");
}else {
response.setStatus(ErrorCode.STATUS_CODE_4105);
response.setMessage("token已过期");
} }
response.setStatus(ErrorCode.STATUS_CODE_2000); Map<String,String> map = new HashMap<String,String>();
response.setMessage("解析用户名正常");
if (ssoService.checkSso(username) == 1) { if (ssoService.checkSso(username) == 1) {
response.setData(GConstants.YES); map.put("token",token);
map.put("result",GConstants.YES);
response.setData(map);
} else { } else {
response.setData(GConstants.NO); map.put("token",token);
map.put("result",GConstants.NO);
response.setData(map);
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("解析用户名出错:\n" + e.getMessage()); logger.error("解析用户名出错:\n" + e.getMessage());
......
...@@ -303,6 +303,23 @@ public class ReportController extends BaseController { ...@@ -303,6 +303,23 @@ 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();
if (!reportService.checkRole(user)){
reportEntity.setExchangeAfterUser(user.getId());
}
//判断标签状态 flag为空,跳转到核查中举报列表 flag为0,跳转到未处理举报列表 flag为1,跳转到举报列表
if (StringUtils.isNotBlank(flag)){
if (flag.equals("0")){
if (StringUtils.isBlank(reportEntity.getReportStatus())) {
reportEntity.setReportStatus("0");
}
}
}else{
if (StringUtils.isBlank(reportEntity.getReportStatus())) {
reportEntity.setReportStatus("1");
}
}
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);
......
...@@ -167,129 +167,184 @@ public class ReportToPdfController extends BaseController { ...@@ -167,129 +167,184 @@ public class ReportToPdfController extends BaseController {
reportSource1.setBorderWidth(0); reportSource1.setBorderWidth(0);
table1.addCell(reportSource1); table1.addCell(reportSource1);
document.add(table2); document.add(table2);
if (!reportEntity.getReportStatus().equals("0")) {
Paragraph pt3 = new Paragraph("举报信息补充",title); Paragraph pt3 = new Paragraph("举报信息补充", title);
pt3.setAlignment(0);//设置文字居中 0靠左 1,居中 2,靠右 pt3.setAlignment(0);//设置文字居中 0靠左 1,居中 2,靠右
document.add(pt3); document.add(pt3);
Paragraph blankRow3 = new Paragraph(18f, " ", textfont); Paragraph blankRow3 = new Paragraph(18f, " ", textfont);
document.add(blankRow3); document.add(blankRow3);
PdfPTable table3 = new PdfPTable(2); PdfPTable table3 = new PdfPTable(2);
table3.setTotalWidth(new float[] { 5, 10}); //设置表头列宽 table3.setTotalWidth(new float[]{5, 10}); //设置表头列宽
PdfPCell supplementTitle = new PdfPCell(new Paragraph("标题:",textfont)); PdfPCell supplementTitle = new PdfPCell(new Paragraph("标题:", textfont));
supplementTitle.setBorderWidth(0); supplementTitle.setBorderWidth(0);
table3.addCell(supplementTitle); table3.addCell(supplementTitle);
PdfPCell supplementTitle1 = new PdfPCell(new Paragraph(reportEntity.getSupplementTitle()==null?"":reportEntity.getSupplementTitle(),textfont)); PdfPCell supplementTitle1 = new PdfPCell(new Paragraph(reportEntity.getSupplementTitle() == null ? "" : reportEntity.getSupplementTitle(), textfont));
supplementTitle1.setBorderWidth(0); supplementTitle1.setBorderWidth(0);
table3.addCell(supplementTitle1); table3.addCell(supplementTitle1);
PdfPCell supplementCompany = new PdfPCell(new Paragraph("被举报公司:",textfont)); PdfPCell supplementCompany = new PdfPCell(new Paragraph("被举报公司:", textfont));
supplementCompany.setBorderWidth(0); supplementCompany.setBorderWidth(0);
table3.addCell(supplementCompany); table3.addCell(supplementCompany);
PdfPCell supplementCompany1 = new PdfPCell(new Paragraph(reportEntity.getSupplementCompany()==null?"":reportEntity.getSupplementCompany(),textfont)); PdfPCell supplementCompany1 = new PdfPCell(new Paragraph(reportEntity.getSupplementCompany() == null ? "" : reportEntity.getSupplementCompany(), textfont));
supplementCompany1.setBorderWidth(0); supplementCompany1.setBorderWidth(0);
table3.addCell(supplementCompany1); table3.addCell(supplementCompany1);
PdfPCell supplementDepartment = new PdfPCell(new Paragraph("被举报部门:",textfont)); PdfPCell supplementDepartment = new PdfPCell(new Paragraph("被举报部门:", textfont));
supplementDepartment.setBorderWidth(0); supplementDepartment.setBorderWidth(0);
table3.addCell(supplementDepartment); table3.addCell(supplementDepartment);
PdfPCell supplementDepartment1 = new PdfPCell(new Paragraph(reportEntity.getSupplementDepartment()==null?"":reportEntity.getSupplementDepartment(),textfont)); PdfPCell supplementDepartment1 = new PdfPCell(new Paragraph(reportEntity.getSupplementDepartment() == null ? "" : reportEntity.getSupplementDepartment(), textfont));
supplementDepartment1.setBorderWidth(0); supplementDepartment1.setBorderWidth(0);
table3.addCell(supplementDepartment1); table3.addCell(supplementDepartment1);
PdfPCell supplementInformant = new PdfPCell(new Paragraph("被举报人:",textfont)); PdfPCell supplementInformant = new PdfPCell(new Paragraph("被举报人:", textfont));
supplementInformant.setBorderWidth(0); supplementInformant.setBorderWidth(0);
table3.addCell(supplementInformant); table3.addCell(supplementInformant);
PdfPCell supplementInformant1 = new PdfPCell(new Paragraph(reportEntity.getSupplementInformant()==null?"":reportEntity.getSupplementInformant(),textfont)); PdfPCell supplementInformant1 = new PdfPCell(new Paragraph(reportEntity.getSupplementInformant() == null ? "" : reportEntity.getSupplementInformant(), textfont));
supplementInformant1.setBorderWidth(0); supplementInformant1.setBorderWidth(0);
table3.addCell(supplementInformant1); table3.addCell(supplementInformant1);
PdfPCell supplementType = new PdfPCell(new Paragraph("业务类型:",textfont)); PdfPCell supplementType = new PdfPCell(new Paragraph("业务类型:", textfont));
supplementType.setBorderWidth(0); supplementType.setBorderWidth(0);
table3.addCell(supplementType); table3.addCell(supplementType);
String supplement_type = reportEntity.getSupplementType(); String supplement_type = reportEntity.getSupplementType();
if (StringUtils.isNotBlank(supplement_type)){ if (StringUtils.isNotBlank(supplement_type)) {
if (supplement_type.equals("1")){ if (supplement_type.equals("1")) {
supplement_type = "营销"; supplement_type = "营销";
}else if (supplement_type.equals("2")){ } else if (supplement_type.equals("2")) {
supplement_type = "工程"; supplement_type = "工程";
}else if (supplement_type.equals("3")){ } else if (supplement_type.equals("3")) {
supplement_type = "成本"; supplement_type = "成本";
}else if (supplement_type.equals("4")){ } else if (supplement_type.equals("4")) {
supplement_type = "招采"; supplement_type = "招采";
}else if (supplement_type.equals("5")){ } else if (supplement_type.equals("5")) {
supplement_type = "人力"; supplement_type = "人力";
}else if (supplement_type.equals("6")){ } else if (supplement_type.equals("6")) {
supplement_type = "物业"; supplement_type = "物业";
}else if (supplement_type.equals("7")){ } else if (supplement_type.equals("7")) {
supplement_type = "投诉"; supplement_type = "投诉";
}
} else {
supplement_type = "";
} }
}else { PdfPCell supplementType1 = new PdfPCell(new Paragraph(supplement_type, textfont));
supplement_type = ""; supplementType1.setBorderWidth(0);
} table3.addCell(supplementType1);
PdfPCell supplementType1 = new PdfPCell(new Paragraph(supplement_type,textfont)); PdfPCell supplementArea = new PdfPCell(new Paragraph("被举报区域:", textfont));
supplementType1.setBorderWidth(0); supplementArea.setBorderWidth(0);
table3.addCell(supplementType1); table3.addCell(supplementArea);
PdfPCell supplementArea = new PdfPCell(new Paragraph("被举报区域:",textfont)); String supplement_area = reportEntity.getSupplementArea();
supplementArea.setBorderWidth(0); if (StringUtils.isNotBlank(supplement_area)) {
table3.addCell(supplementArea); if (supplement_area.equals("North China")) {
String supplement_area = reportEntity.getSupplementArea(); supplement_area = "华北区域公司";
if (StringUtils.isNotBlank(supplement_area)){ } else if (supplement_area.equals("BeiJing")) {
if (supplement_area.equals("North China")){ supplement_area = "北京区域公司";
supplement_area = "华北区域公司"; } else if (supplement_area.equals("ShangHai")) {
}else if (supplement_area.equals("BeiJing")){ supplement_area = "上海区域公司";
supplement_area = "北京区域公司"; } else if (supplement_area.equals("SouthWest")) {
}else if (supplement_area.equals("ShangHai")){ supplement_area = "西南区域公司";
supplement_area = "上海区域公司"; } else if (supplement_area.equals("SouthEast")) {
}else if (supplement_area.equals("SouthWest")){ supplement_area = "东南区域公司";
supplement_area = "西南区域公司"; } else if (supplement_area.equals("Central China")) {
}else if (supplement_area.equals("SouthEast")){ supplement_area = "华中区域公司";
supplement_area = "东南区域公司"; } else if (supplement_area.equals("GuangShen")) {
}else if (supplement_area.equals("Central China")){ supplement_area = "广深区域公司";
supplement_area = "华中区域公司"; } else if (supplement_area.equals("Hainan")) {
}else if (supplement_area.equals("GuangShen")){ supplement_area = "海南区域公司";
supplement_area = "广深区域公司"; } else if (supplement_area.equals("Group")) {
}else if (supplement_area.equals("Hainan")){ supplement_area = "集团本部";
supplement_area = "海南区域公司"; }
}else if (supplement_area.equals("Group")){ } else {
supplement_area = "集团本部"; supplement_area = "";
} }
}else { PdfPCell supplementArea1 = new PdfPCell(new Paragraph(supplement_area, textfont));
supplement_area = ""; supplementArea1.setBorderWidth(0);
} table3.addCell(supplementArea1);
PdfPCell supplementArea1 = new PdfPCell(new Paragraph(supplement_area,textfont)); PdfPCell supplementProject = new PdfPCell(new Paragraph("被举报项目:", textfont));
supplementArea1.setBorderWidth(0); supplementProject.setBorderWidth(0);
table3.addCell(supplementArea1); table3.addCell(supplementProject);
PdfPCell supplementProject = new PdfPCell(new Paragraph("被举报项目:",textfont)); PdfPCell supplementProject1 = new PdfPCell(new Paragraph(reportEntity.getSupplementProject() == null ? "" : reportEntity.getSupplementProject(), textfont));
supplementProject.setBorderWidth(0); supplementProject1.setBorderWidth(0);
table3.addCell(supplementProject); table3.addCell(supplementProject1);
PdfPCell supplementProject1 = new PdfPCell(new Paragraph(reportEntity.getSupplementProject()==null?"":reportEntity.getSupplementProject(),textfont)); PdfPCell supplementContent = new PdfPCell(new Paragraph("内容:", textfont));
supplementProject1.setBorderWidth(0); supplementContent.setBorderWidth(0);
table3.addCell(supplementProject1); table3.addCell(supplementContent);
PdfPCell supplementContent = new PdfPCell(new Paragraph("内容:",textfont)); PdfPCell supplementContent1 = new PdfPCell(new Paragraph(reportEntity.getSupplementContent() == null ? "" : reportEntity.getSupplementContent(), textfont));
supplementContent.setBorderWidth(0); supplementContent1.setBorderWidth(0);
table3.addCell(supplementContent); table3.addCell(supplementContent1);
PdfPCell supplementContent1 = new PdfPCell(new Paragraph(reportEntity.getSupplementContent()==null?"":reportEntity.getSupplementContent(),textfont)); PdfPCell supplementAttachment = new PdfPCell(new Paragraph("附件:", textfont));
supplementContent1.setBorderWidth(0); supplementAttachment.setBorderWidth(0);
table3.addCell(supplementContent1); table3.addCell(supplementAttachment);
PdfPCell supplementAttachment = new PdfPCell(new Paragraph("附件:",textfont));
supplementAttachment.setBorderWidth(0);
table3.addCell(supplementAttachment);
//获取附件列表 //获取附件列表
ReportAttachmentEntity reportAttachmentBean1 = new ReportAttachmentEntity(); ReportAttachmentEntity reportAttachmentBean1 = new ReportAttachmentEntity();
reportAttachmentBean1.setReportId(reportEntity.getId()); reportAttachmentBean1.setReportId(reportEntity.getId());
reportAttachmentBean1.setAttachmentType("1"); reportAttachmentBean1.setAttachmentType("1");
List<ReportAttachmentEntity> list1 = reportService.getAttachmentInfo(reportAttachmentBean1); List<ReportAttachmentEntity> list1 = reportService.getAttachmentInfo(reportAttachmentBean1);
Paragraph paragraphPath2 = new Paragraph(); Paragraph paragraphPath2 = new Paragraph();
if (list1 != null && list1.size() != 0) { if (list1 != null && list1.size() != 0) {
for (ReportAttachmentEntity reportAttachmentEntity : list1) { for (ReportAttachmentEntity reportAttachmentEntity : list1) {
Chunk chunk = new Chunk(reportAttachmentEntity.getAttachmentName(),urlfont); Chunk chunk = new Chunk(reportAttachmentEntity.getAttachmentName(), urlfont);
paragraphPath2.add(chunk); paragraphPath2.add(chunk);
paragraphPath2.add(Chunk.NEWLINE); paragraphPath2.add(Chunk.NEWLINE);
}
} }
PdfPCell supplementAttachment1 = new PdfPCell(paragraphPath2);
supplementAttachment1.setBorderWidth(0);
table3.addCell(supplementAttachment1);
document.add(table3);
} }
PdfPCell supplementAttachment1 = new PdfPCell(paragraphPath2); if (reportEntity.getReportStatus().equals("2")) {
supplementAttachment1.setBorderWidth(0); Paragraph pt3 = new Paragraph("处理结果", title);
table3.addCell(supplementAttachment1); pt3.setAlignment(0);//设置文字居中 0靠左 1,居中 2,靠右
document.add(table3); document.add(pt3);
Paragraph blankRow3 = new Paragraph(18f, " ", textfont);
document.add(blankRow3);
PdfPTable table4 = new PdfPTable(2);
table4.setTotalWidth(new float[]{5, 10}); //设置表头列宽
PdfPCell dealPersonName = new PdfPCell(new Paragraph("处理人:", textfont));
dealPersonName.setBorderWidth(0);
table4.addCell(dealPersonName);
PdfPCell dealPersonName1 = new PdfPCell(new Paragraph(reportEntity.getDealPersonName() == null ? "" : reportEntity.getDealPersonName(), textfont));
dealPersonName1.setBorderWidth(0);
table4.addCell(dealPersonName1);
PdfPCell dealAttachment = new PdfPCell(new Paragraph("处理成果文件:", textfont));
dealAttachment.setBorderWidth(0);
table4.addCell(dealAttachment);
//获取附件列表
ReportAttachmentEntity reportAttachmentBean2 = new ReportAttachmentEntity();
reportAttachmentBean2.setReportId(reportEntity.getId());
reportAttachmentBean2.setAttachmentType("2");
List<ReportAttachmentEntity> list2 = reportService.getAttachmentInfo(reportAttachmentBean2);
Paragraph paragraphPath2 = new Paragraph();
if (list2 != null && list2.size() != 0) {
for (ReportAttachmentEntity reportAttachmentEntity : list2) {
Chunk chunk = new Chunk(reportAttachmentEntity.getAttachmentName(), urlfont);
paragraphPath2.add(chunk);
paragraphPath2.add(Chunk.NEWLINE);
}
}
PdfPCell dealAttachment1 = new PdfPCell(paragraphPath2);
dealAttachment1.setBorderWidth(0);
table4.addCell(dealAttachment1);
PdfPCell dealResult = new PdfPCell(new Paragraph("处理结论:", textfont));
dealResult.setBorderWidth(0);
table4.addCell(dealResult);
String deal_result = reportEntity.getDealResult();
if (StringUtils.isNotBlank(deal_result)) {
if (deal_result.equals("1")) {
deal_result = "投诉";
} else if (deal_result.equals("2")) {
deal_result = "举报无效";
} else if (deal_result.equals("3")) {
deal_result = "举报属实";
}
} else {
deal_result = "";
}
PdfPCell dealResult1 = new PdfPCell(new Paragraph(deal_result, textfont));
dealResult1.setBorderWidth(0);
table4.addCell(dealResult1);
document.add(table4);
}
document.close(); document.close();
PrintWriter out = response.getWriter(); PrintWriter out = response.getWriter();
response.setContentType("application/json;charset=utf-8"); response.setContentType("application/json;charset=utf-8");
......
...@@ -39,6 +39,7 @@ public class WorkbenchBean { ...@@ -39,6 +39,7 @@ public class WorkbenchBean {
private int email = 0; private int email = 0;
private int sunacE = 0; private int sunacE = 0;
private int phone = 0; private int phone = 0;
private int visit = 0;
//举报类型 //举报类型
private int sale = 0; private int sale = 0;
...@@ -196,6 +197,14 @@ public class WorkbenchBean { ...@@ -196,6 +197,14 @@ public class WorkbenchBean {
this.phone = phone; this.phone = phone;
} }
public int getVisit() {
return visit;
}
public void setVisit(int visit) {
this.visit = visit;
}
public int getSale() { public int getSale() {
return sale; return sale;
} }
......
...@@ -117,7 +117,7 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> { ...@@ -117,7 +117,7 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> {
}else if("wechat".equals(String.valueOf(total.get("REPORT_SOURCE")))){ }else if("wechat".equals(String.valueOf(total.get("REPORT_SOURCE")))){
//微信公众号 //微信公众号
workbench.setWeChat(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)")))); workbench.setWeChat(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
}else if("sunacE:".equals(String.valueOf(total.get("REPORT_SOURCE")))){ }else if("sunacE".equals(String.valueOf(total.get("REPORT_SOURCE")))){
//融E //融E
workbench.setSunacE(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)")))); workbench.setSunacE(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
}else if("offline".equals(String.valueOf(total.get("REPORT_SOURCE")))){ }else if("offline".equals(String.valueOf(total.get("REPORT_SOURCE")))){
...@@ -126,14 +126,17 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> { ...@@ -126,14 +126,17 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> {
}else if("tel".equals(String.valueOf(total.get("REPORT_SOURCE")))){ }else if("tel".equals(String.valueOf(total.get("REPORT_SOURCE")))){
//电话 //电话
workbench.setPhone(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)")))); workbench.setPhone(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
}else if("email:".equals((String) total.get("REPORT_SOURCE"))){ }else if("email".equals((String) total.get("REPORT_SOURCE"))){
//邮件 //邮件
workbench.setEmail(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)")))); workbench.setEmail(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
}else if("visit".equals((String) total.get("REPORT_SOURCE"))){
//来访
workbench.setVisit(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
} }
} }
} }
workbench.setTotal(workbench.getWeb()+workbench.getOa()+workbench.getSupplier()+workbench.getWeChat()+ workbench.setTotal(workbench.getWeb()+workbench.getOa()+workbench.getSupplier()+workbench.getWeChat()+
workbench.getSunacE()+workbench.getOffline()+workbench.getPhone()+workbench.getEmail()); workbench.getSunacE()+workbench.getOffline()+workbench.getPhone()+workbench.getEmail()+workbench.getVisit());
return workbench; return workbench;
} }
......
...@@ -258,7 +258,6 @@ ...@@ -258,7 +258,6 @@
<td style="width: 10% "></td> <td style="width: 10% "></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;供应商系统&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${workbench.supplier}</td> <td>&nbsp;&nbsp;&nbsp;&nbsp;供应商系统&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${workbench.supplier}</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;邮件&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${workbench.email}</td> <td>&nbsp;&nbsp;&nbsp;&nbsp;邮件&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${workbench.email}</td>
<td></td>
</tr> </tr>
</table> </table>
</div> </div>
......
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