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 = /
......@@ -103,4 +104,4 @@ file.upload.path.separator = /
push.server.url=http://123.56.146.81:1880/v1/
faq.base.api=http://localhost:8182/sunac-core-api
user.office.name=\u5929\u6d25
user.office.name=\u5929\u6d25
\ No newline at end of file
......@@ -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,136 +82,137 @@
</style>
</head>
<body>
<ul class="nav nav-tabs">
<li class="active"><a href="${ctx}/report/deliverList">工作转交</a></li>
<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">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<ul class="ul-form">
<li><label>处理人:</label><form:input onchange="resetPageNo();" path="dealPersonName" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li class="btns">
<label style="width:auto;"><input id="btnSubmit" class="btn btn-primary" type="submit" value="筛选"/>&nbsp;&nbsp;</label>
</li>
<li class="clearfix"></li>
</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">
<li><label>处理人:</label><form:input onchange="resetPageNo();" path="dealPersonName" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li class="btns">
<label style="width:auto;"><input id="btnSubmit" class="btn btn-primary" type="submit" value="筛选"/>&nbsp;&nbsp;</label>
</li>
<li class="clearfix"></li>
</ul>
</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">
<thead>
<tr>
<th>选择</th>
<th>ID</th>
<th>标题</th>
<th>业务类型</th>
<th>被举报项目</th>
<th>举报人</th>
<th>举报人电话</th>
<th>举报时间</th>
<th>状态</th>
<th>处理结论</th>
<th>处理人</th>
<th>转交给</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<c:if test="${page.list.size()>0}">
<c:forEach items="${page.list}" var="report" varStatus="vs">
<tr>
<td><input type="checkbox" value="${report.id}"></td>
<td>${vs.count}</td>
<td>${report.supplementTitle}</td>
<td>
<c:if test="${report.supplementType eq '1'}">营销</c:if>
<c:if test="${report.supplementType eq '2'}">工程</c:if>
<c:if test="${report.supplementType eq '3'}">成本</c:if>
<c:if test="${report.supplementType eq '4'}">招采</c:if>
<c:if test="${report.supplementType eq '5'}">人力</c:if>
<c:if test="${report.supplementType eq '6'}">物业</c:if>
<c:if test="${report.supplementType eq '7'}">投诉</c:if>
</td>
<td>${report.reportProject}</td>
<td>${report.reportPersonName}</td>
<td>${report.reportPersonTel}</td>
<td>${report.reportTime}</td>
<td>
<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>
</td>
<td>
<c:if test="${report.dealResult eq null}">--</c:if>
<c:if test="${report.dealResult eq '1'}">投诉</c:if>
<c:if test="${report.dealResult eq '2'}">举报无效</c:if>
<c:if test="${report.dealResult eq '3'}">举报属实</c:if>
</td>
<td><c:if test="${report.dealResult eq null}">--</c:if>
<c:if test="${report.dealResult ne null}">${report.dealPersonName}</c:if>
</td>
<td>${report.exchangeAfterUser}</td>
<td>
<a href="${ctx}/report/view?id=${report.id}">查看</a>
</td>
</tr>
</c:forEach>
</c:if>
</tbody>
</table>
<c:if test="${page.list.size()=='0'}">
<span style="color: #999999;margin: 20px 0 70px 20px;display: block;">未查询到相关内容</span>
</c:if>
</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">
<thead>
<tr>
<th>选择</th>
<th>ID</th>
<th>标题</th>
<th>业务类型</th>
<th>被举报项目</th>
<th>举报人</th>
<th>举报人电话</th>
<th>举报时间</th>
<th>状态</th>
<th>处理结论</th>
<th>处理人</th>
<th>转交给</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<c:if test="${page.list.size()>0}">
<div class="pagination">${page}</div>
<c:forEach items="${page.list}" var="report" varStatus="vs">
<tr>
<td><input type="checkbox" value="${report.id}"></td>
<td>${vs.count}</td>
<td>${report.supplementTitle}</td>
<td>
<c:if test="${report.supplementType eq '1'}">营销</c:if>
<c:if test="${report.supplementType eq '2'}">工程</c:if>
<c:if test="${report.supplementType eq '3'}">成本</c:if>
<c:if test="${report.supplementType eq '4'}">招采</c:if>
<c:if test="${report.supplementType eq '5'}">人力</c:if>
<c:if test="${report.supplementType eq '6'}">物业</c:if>
<c:if test="${report.supplementType eq '7'}">投诉</c:if>
</td>
<td>${report.reportProject}</td>
<td>${report.reportPersonName}</td>
<td>${report.reportPersonTel}</td>
<td>${report.reportTime}</td>
<td>
<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>
</td>
<td>
<c:if test="${report.dealResult eq null}">--</c:if>
<c:if test="${report.dealResult eq '1'}">投诉</c:if>
<c:if test="${report.dealResult eq '2'}">举报无效</c:if>
<c:if test="${report.dealResult eq '3'}">举报属实</c:if>
</td>
<td><c:if test="${report.dealResult eq null}">--</c:if>
<c:if test="${report.dealResult ne null}">${report.dealPersonName}</c:if>
</td>
<td>${report.exchangeAfterUser}</td>
<td>
<a href="${ctx}/report/view?id=${report.id}">查看</a>
</td>
</tr>
</c:forEach>
</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() {
$("#btnSearch").click(function () {
$.ajax({
url: "${ctx}/report/viewTransfer?flag=2",
dataType: "html",
data: $('#searchForm1').serialize(),
cache: false,
beforeSend: function () {
// 禁用按钮防止重复提交
$("#btnSearch").attr({ disabled: "disabled" });
},
success: function(data) { //登录成功后返回的数据
$("#userList").empty();
$("#userList").html($(data));
},
error:function(){
alert("数据错误!");
},
complete: function () {
$("#btnSearch").removeAttr("disabled");
}
});
});
$("input:radio").click(function () {
$("input:radio").attr("checked",false);
$("#chooseItem").empty();
$(this).attr("checked",true);
$("#chooseItem").html("已选择 " + $("input:radio:checked").parent().next().next().next().html()+"<span onclick='remove();'><font size='5'> ×</font></span>");
</tbody>
</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}">
<div class="pagination">${page}</div>
</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() {
$("#btnSearch").click(function () {
$.ajax({
url: "${ctx}/report/viewTransfer?flag=2",
dataType: "html",
data: $('#searchForm1').serialize(),
cache: false,
beforeSend: function () {
// 禁用按钮防止重复提交
$("#btnSearch").attr({ disabled: "disabled" });
},
success: function(data) { //登录成功后返回的数据
$("#userList").empty();
$("#userList").html($(data));
},
error:function(){
alert("数据错误!");
},
complete: function () {
$("#btnSearch").removeAttr("disabled");
}
});
});
function chooseRen(obj) {
$("input:radio").click(function () {
$("input:radio").attr("checked",false);
$("#chooseItem").empty();
obj.checked = true;
$(this).attr("checked",true);
$("#chooseItem").html("已选择 " + $("input:radio:checked").parent().next().next().next().html()+"<span onclick='remove();'><font size='5'> ×</font></span>");
}
function remove(){
$("input:radio").attr("checked",false);
$("#chooseItem").empty();
}
function page(n,s,l){
});
});
function chooseRen(obj) {
$("input:radio").attr("checked",false);
$("#chooseItem").empty();
obj.checked = true;
$("#chooseItem").html("已选择 " + $("input:radio:checked").parent().next().next().next().html()+"<span onclick='remove();'><font size='5'> ×</font></span>");
}
function remove(){
$("input:radio").attr("checked",false);
$("#chooseItem").empty();
}
function page(n,s,l){
if (l == "1"){
$("#userPageNo").val(n);
$("#userPageSize").val(s);
$.ajax({
......@@ -235,68 +229,75 @@
}
});
return false;
}else {
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action", "${ctx}/report/deliverList");
$("#searchForm").submit();
return false;
}
function resetUserPageNo() {
$("#pageNo").val(0);
}
</script>
<span class="title">选择移交人员</span>
<form:form id="searchForm1" modelAttribute="user" action="#" method="post" class="breadcrumb form-search">
<input id="userPageNo" name="pageNo" type="hidden" value="${userPage.pageNo}"/>
<input id="userPageSize" name="pageSize" type="hidden" value="${userPage.pageSize}"/>
<ul class="ul-form">
<li><label>用户名:</label><form:input onchange="resetUserPageNo();" path="loginName" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li><label>姓名:</label><form:input onchange="resetUserPageNo();" path="name" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li><label>手机号码:</label><form:input onchange="resetUserPageNo();" path="mobile" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li class="btns">
<label style="width:auto;"><input id="btnSearch" class="btn btn-primary" type="button" value="筛选"/>&nbsp;&nbsp;</label>
</li>
<li class="clearfix"></li>
</ul>
</form:form>
<div id="userList">
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>选择</th>
<th>ID</th>
<th>用户名</th>
<th>姓名</th>
<th>组织</th>
<th>手机号码</th>
<th>角色</th>
</tr>
</thead>
<tbody>
}
function resetUserPageNo() {
$("#pageNo").val(0);
}
</script>
<span class="title">选择移交人员</span>
<form:form id="searchForm1" modelAttribute="user" action="#" method="post" class="breadcrumb form-search">
<input id="userPageNo" name="pageNo" type="hidden" value="${userPage.pageNo}"/>
<input id="userPageSize" name="pageSize" type="hidden" value="${userPage.pageSize}"/>
<ul class="ul-form">
<li><label>用户名:</label><form:input onchange="resetUserPageNo();" path="loginName" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li><label>姓名:</label><form:input onchange="resetUserPageNo();" path="name" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li><label>手机号码:</label><form:input onchange="resetUserPageNo();" path="mobile" htmlEscape="false" maxlength="50" class="input-small"/></li>
<li class="btns">
<label style="width:auto;"><input id="btnSearch" class="btn btn-primary" type="button" value="筛选"/>&nbsp;&nbsp;</label>
</li>
<li class="clearfix"></li>
</ul>
</form:form>
<div id="userList">
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>选择</th>
<th>ID</th>
<th>用户名</th>
<th>姓名</th>
<th>组织</th>
<th>手机号码</th>
<th>角色</th>
</tr>
</thead>
<tbody>
<c:if test="${userPage.list.size()>0}">
<c:forEach items="${userPage.list}" var="user" varStatus="vs">
<tr>
<td id="radioBtn"><input type="radio" value="${user.id}"></td>
<td>${vs.count}</td>
<td>${user.loginName}</td>
<td>${user.name}</td>
<td></td>
<td>${user.mobile}</td>
<td>${user.role.name}</td>
</tr>
</c:forEach>
</c:if>
</tbody>
</table>
<span id="chooseItem"></span>
<c:if test="${userPage.list.size()=='0'}">
<span style="color: #999999;margin: 20px 0 70px 20px;display: block;">未查询到相关内容</span>
</c:if>
<c:if test="${userPage.list.size()>0}">
<div class="pagination">${userPage}</div>
<c:forEach items="${userPage.list}" var="user" varStatus="vs">
<tr>
<td id="radioBtn"><input type="radio" value="${user.id}"></td>
<td>${vs.count}</td>
<td>${user.loginName}</td>
<td>${user.name}</td>
<td></td>
<td>${user.mobile}</td>
<td>${user.role.name}</td>
</tr>
</c:forEach>
</c:if>
</div>
<li class="btns">
<label style="width:auto;"><input id="btnConfirm" class="btn btn-primary" type="button" value="确定"/>&nbsp;&nbsp;
<input id="btnClose" class="btn btn-primary" type="button" value="关闭"/></label>
</li>
</tbody>
</table>
<span id="chooseItem"></span>
<c:if test="${userPage.list.size()=='0'}">
<span style="color: #999999;margin: 20px 0 70px 20px;display: block;">未查询到相关内容</span>
</c:if>
<c:if test="${userPage.list.size()>0}">
<div class="pagination">${userPage}</div>
</c:if>
</div>
<li class="btns">
<label style="width:auto;"><input id="btnConfirm" class="btn btn-primary" type="button" value="确定"/>&nbsp;&nbsp;
<input id="btnClose" class="btn btn-primary" type="button" value="关闭"/></label>
</li>
</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