Commit 1e68c8be by Java-张振楠

部署前修改

parent c5b54072
......@@ -3,6 +3,7 @@ package com.ejweb.modules.report.web;
import com.ejweb.conf.GConstants;
import com.ejweb.core.base.BaseController;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.report.entity.ReportAttachmentEntity;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.service.ReportService;
import com.itextpdf.text.*;
......@@ -22,6 +23,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
/**
* 举报转为文档Controller
......@@ -49,6 +51,7 @@ public class ReportToPdfController extends BaseController {
BaseFont bfChinese = BaseFont.createFont("STSongStd-Light","UniGB-UCS2-H",BaseFont.NOT_EMBEDDED);
Font title = new Font(bfChinese,16,Font.BOLD);//文字加粗
Font textfont = new Font(bfChinese,14,Font.NORMAL);//正常文字
Font urlfont = new Font(bfChinese,12,Font.NORMAL);//路径文字
//document是创建的文档,FileOutputStream是向文档中输入
PdfWriter.getInstance(document, new FileOutputStream(GConstants.FILE_UPLOAD_DIR+"pdf/"+reportEntity.getReportProject()+"_"+reportEntity.getId()+".pdf"));
//打开文档
......@@ -87,7 +90,21 @@ public class ReportToPdfController extends BaseController {
PdfPCell reportAttachment = new PdfPCell(new Paragraph("附件:",textfont));
reportAttachment.setBorderWidth(0);
table1.addCell(reportAttachment);
PdfPCell reportAttachment1 = new PdfPCell(new Paragraph(reportEntity.getReportProject()==null?"":reportEntity.getReportProject(),textfont));
//获取附件列表
ReportAttachmentEntity reportAttachmentBean = new ReportAttachmentEntity();
reportAttachmentBean.setReportId(reportEntity.getId());
reportAttachmentBean.setAttachmentType("0");
List<ReportAttachmentEntity> list = reportService.getAttachmentInfo(reportAttachmentBean);
Paragraph paragraphPath1 = new Paragraph();
if (list != null && list.size() != 0) {
for (ReportAttachmentEntity reportAttachmentEntity : list) {
Chunk chunk = new Chunk(reportAttachmentEntity.getAttachmentPath(),urlfont);
paragraphPath1.add(chunk);
paragraphPath1.add(Chunk.NEWLINE);
}
}
PdfPCell reportAttachment1 = new PdfPCell(paragraphPath1);
reportAttachment1.setBorderWidth(0);
table1.addCell(reportAttachment1);
document.add(table1);
......@@ -227,7 +244,22 @@ public class ReportToPdfController extends BaseController {
PdfPCell supplementAttachment = new PdfPCell(new Paragraph("附件:",textfont));
supplementAttachment.setBorderWidth(0);
table3.addCell(supplementAttachment);
PdfPCell supplementAttachment1 = new PdfPCell(new Paragraph(reportEntity.getSupplementAttachment()==null?"":reportEntity.getSupplementAttachment(),textfont));
//获取附件列表
ReportAttachmentEntity reportAttachmentBean1 = new ReportAttachmentEntity();
reportAttachmentBean.setReportId(reportEntity.getId());
reportAttachmentBean.setAttachmentType("1");
List<ReportAttachmentEntity> list1 = reportService.getAttachmentInfo(reportAttachmentBean);
Paragraph paragraphPath2 = new Paragraph();
if (list != null && list.size() != 0) {
for (ReportAttachmentEntity reportAttachmentEntity : list) {
Chunk chunk = new Chunk(reportAttachmentEntity.getAttachmentPath(),urlfont);
paragraphPath1.add(chunk);
paragraphPath1.add(Chunk.NEWLINE);
}
}
PdfPCell supplementAttachment1 = new PdfPCell(paragraphPath2);
supplementAttachment1.setBorderWidth(0);
table3.addCell(supplementAttachment1);
document.add(table3);
......
......@@ -73,9 +73,9 @@ userfiles.prefix=static
#projectPath=D\:\\workspace\\jeesite
# The Upload File DIR, Must End With File Separator
#file.upload.dir=/mnt/sunac/
file.upload.dir=/mnt/sunac/
## file.upload.dir=D:\\WorkSapce\\JEESpace\\ejweb-api-1.0\\files\\
file.upload.dir=/D:/uploads/
#file.upload.dir=/D:/uploads/
# Max Upload File Size: (default 30M=30*1024*1024(B)=31457280 bytes)
file.max.upload.size=31457280
# The File Path Date Format(default yyyyMM)
......@@ -94,7 +94,8 @@ file.image.thumb.is.allow=true
file.image.thumb.width=640
file.image.thumb.height=640
# The Prefix Url
file.prefix.url=http://123.56.146.81:8808/
#file.prefix.url=http://123.56.146.81:8808/
file.prefix.url=http://192.168.3.232:8080/
# The Prefix separator
file.upload.path.separator = /
......
......@@ -6,6 +6,9 @@ jdbc.driver.class=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://123.56.146.7:3306/sunac_report?useUnicode=true&characterEncoding=utf-8
jdbc.username=reportuser
jdbc.password=$R@20$7
#jdbc.url=jdbc:mysql://123.56.146.7:3306/sunac_report?useUnicode=true&characterEncoding=utf-8
#jdbc.username=reportuser
#jdbc.password=$R@20$7
#初始化连接
jdbc.initialSize=0
......
......@@ -47,13 +47,6 @@
$("#fade").hide();
});
});
function page(n,s){
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action", "${ctx}/report/deliverList");
$("#searchForm").submit();
return false;
}
function resetPageNo() {
$("#pageNo").val(0);
}
......@@ -89,10 +82,10 @@
</style>
</head>
<body>
<ul class="nav nav-tabs">
<ul class="nav nav-tabs">
<li class="active"><a href="${ctx}/report/deliverList">工作转交</a></li>
</ul>
<form:form id="searchForm" modelAttribute="report" action="${ctx}/report/deliverList" method="post" class="breadcrumb form-search">
</ul>
<form:form id="searchForm" modelAttribute="report" action="${ctx}/report/deliverList" 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}"/>
<ul class="ul-form">
......@@ -102,12 +95,12 @@
</li>
<li class="clearfix"></li>
</ul>
</form:form>
<li class="btns">
</form:form>
<li class="btns">
<label style="width:auto;"><input id="btnDistribute" class="btn btn-primary" type="button" value="分配"/>&nbsp;&nbsp;</label>
</li>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
</li>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>选择</th>
......@@ -167,15 +160,15 @@
</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>
<div id="fade" class="black_overlay"></div>
<div id="chooseDiv" class="white_content">
</c:if>
<div id="fade" class="black_overlay"></div>
<div id="chooseDiv" class="white_content">
<div id="chooseContent">
<script type="text/javascript">
$(document).ready(function() {
......@@ -219,6 +212,7 @@
$("#chooseItem").empty();
}
function page(n,s,l){
if (l == "1"){
$("#userPageNo").val(n);
$("#userPageSize").val(s);
$.ajax({
......@@ -235,6 +229,13 @@
}
});
return false;
}else {
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action", "${ctx}/report/deliverList");
$("#searchForm").submit();
return false;
}
}
function resetUserPageNo() {
$("#pageNo").val(0);
......@@ -297,6 +298,6 @@
<input id="btnClose" class="btn btn-primary" type="button" value="关闭"/></label>
</li>
</div>
</div>
</div>
</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