提交 f8701edf authored 作者: 133's avatar 133

[文件 模版] 提交

上级 e8234d44
...@@ -614,18 +614,18 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -614,18 +614,18 @@ public class JavaToPdfHtmlFreeMarker {
DocumentDevice documentDevice=documentDevices.get(i); DocumentDevice documentDevice=documentDevices.get(i);
int len=documentDevice.getDeviceSerialNumber().length(); int len=documentDevice.getDeviceSerialNumber().length();
String deviceSerialNumber=documentDevice.getDeviceSerialNumber(); String deviceSerialNumber=documentDevice.getDeviceSerialNumber();
if (len > 1568){ if (len > 784){
int page=0; int page=0;
int remainder = len % 1568; int remainder = len % 784;
int pageCount = (remainder > 0) ? len/1568 + 1 : len/1568; int pageCount = (remainder > 0) ? len/784 + 1 : len/784;
while (page<pageCount-1) { while (page<pageCount-1) {
if (page==0) { if (page==0) {
documentDevice.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(page * 1568, (page + 1) * 1568))); documentDevice.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(page * 784, (page + 1) * 784)));
list.add(documentDevice); list.add(documentDevice);
lists.add(list); lists.add(list);
}else { }else {
DocumentDevice documentDevice1=new DocumentDevice(); DocumentDevice documentDevice1=new DocumentDevice();
documentDevice1.setDeviceSerialNumber(toString(deviceSerialNumber.substring(page * 1568, (page + 1) * 1568))); documentDevice1.setDeviceSerialNumber(toString(deviceSerialNumber.substring(page * 784, (page + 1) * 784)));
list.add(documentDevice1); list.add(documentDevice1);
lists.add(list); lists.add(list);
} }
...@@ -633,22 +633,22 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -633,22 +633,22 @@ public class JavaToPdfHtmlFreeMarker {
page++; page++;
} }
DocumentDevice documentDevice1=new DocumentDevice(); DocumentDevice documentDevice1=new DocumentDevice();
documentDevice1.setDeviceSerialNumber(toString(deviceSerialNumber.substring((pageCount-1)*1568, len))); documentDevice1.setDeviceSerialNumber(toString(deviceSerialNumber.substring((pageCount-1)*784, len)));
list.add(documentDevice1); list.add(documentDevice1);
count.set(len-(pageCount-1)*1568); count.set(len-(pageCount-1)*784);
}else if (len==1568){ }else if (len==784){
list.add(documentDevice); list.add(documentDevice);
lists.add(list); lists.add(list);
list = new ArrayList<>(); list = new ArrayList<>();
} }
else { else {
int totle=count.get()+29+len; int totle=count.get()+len;
if (totle > 1568){ if (totle > 784){
// if (len>56) { // if (len>56) {
if (1568-count.get()>56) { if (784-count.get()>56) {
DocumentDevice documentDevice1 = new DocumentDevice(); DocumentDevice documentDevice1 = new DocumentDevice();
documentDevice1.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(1568 - count.get(), len))); documentDevice1.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(784 - count.get(), len)));
documentDevice.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(0, 1568 - count.get()))); documentDevice.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(0, 784 - count.get())));
list.add(documentDevice); list.add(documentDevice);
lists.add(list); lists.add(list);
list = new ArrayList<>(); list = new ArrayList<>();
...@@ -671,7 +671,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -671,7 +671,7 @@ public class JavaToPdfHtmlFreeMarker {
count.set(totle); count.set(totle);
} }
} }
if (list.size()==19){ if (list.size()==14){
lists.add(list); lists.add(list);
list = new ArrayList<>(); list = new ArrayList<>();
count.set(0); count.set(0);
...@@ -730,7 +730,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -730,7 +730,7 @@ public class JavaToPdfHtmlFreeMarker {
lists.add(list); lists.add(list);
list=new ArrayList<>(); list=new ArrayList<>();
}else { }else {
int totle=count.get()+29+len; int totle=count.get()+len;
if (totle>1568){ if (totle>1568){
if (1568-count.get()>56) { if (1568-count.get()>56) {
WorkHandoverDevice workHandoverDevice1 = new WorkHandoverDevice(); WorkHandoverDevice workHandoverDevice1 = new WorkHandoverDevice();
...@@ -789,7 +789,6 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -789,7 +789,6 @@ public class JavaToPdfHtmlFreeMarker {
}else { }else {
return str; return str;
} }
} }
} }
...@@ -157,7 +157,8 @@ ...@@ -157,7 +157,8 @@
} }
.returnTablePrint .tableList { .returnTablePrint .tableList {
height: 500px; height: 404px;
overflow:hidden;
} }
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(odd) { .returnTablePrint .line2>>>.el-table tbody tr:nth-child(odd) {
...@@ -169,13 +170,13 @@ ...@@ -169,13 +170,13 @@
} }
.returnTablePrint .line3 { .returnTablePrint .line3 {
height: 94px; height: 164px;
width: 100%; width: 100%;
} }
.returnTablePrint .line3 .left { .returnTablePrint .line3 .left {
display: inline-block; display: inline-block;
width: 49%; width: 47%;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
/* padding-bottom: 80px; */ /* padding-bottom: 80px; */
...@@ -193,7 +194,7 @@ ...@@ -193,7 +194,7 @@
border-right: 1px solid #7f7f7f; border-right: 1px solid #7f7f7f;
padding: 5px 10px 0; padding: 5px 10px 0;
height: 95%; height:97%;
} }
.returnTablePrint .line3 .left>span, .returnTablePrint .line3 .left>span,
...@@ -278,6 +279,39 @@ ...@@ -278,6 +279,39 @@
margin-left: 50px; margin-left: 50px;
} }
table.altrowstable2 {
width: 100%;
font-size: 16px;
color: #000;
border-width: 0px;
border-color: #a9c6c9;
border-collapse: collapse;
text-align: center;
table-layout: fixed;
word-break: break-all;
}
table.altrowstable2 th {
height: 25px;
line-height:25px;
font-size: 15px;
background-color: #fff;
border:1px solid #bebebe;
padding-top: 0;
}
table.altrowstable2 td {
height: 25px;
line-height:25px;
font-size: 15px;
word-break: break-all;
word-wrap: break-word;
border:1px solid #bebebe;
width: 100%;
}
table.altrowstable { table.altrowstable {
width: 100%; width: 100%;
font-size: 16px; font-size: 16px;
...@@ -291,26 +325,32 @@ ...@@ -291,26 +325,32 @@
} }
table.altrowstable th { table.altrowstable th {
height: 24px; height: 25px;
line-height:26px;
font-size: 15px; font-size: 15px;
background-color: #ebebeb; background-color: #ebebeb;
marign-top:none;
border:1px solid #bebebe;
padding-top: 0;
padding-bottom: 0;
} }
table.altrowstable td { table.altrowstable td {
height: 24px; height: 25px;
line-height:26px;
font-size: 15px; font-size: 15px;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
/*border:1px solid #bebebe;*/ border:1px solid #bebebe;
width: 100%; width: 100%;
} }
table.altrowstable .altrowstableTr:nth-child(odd) { /*table.altrowstable .altrowstableTr:nth-child(odd) {
height: 18px; height: 18px;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
background-color: #f2f2f2; background-color: #f2f2f2;
} } */
.leftImg { .leftImg {
position: absolute; position: absolute;
...@@ -322,7 +362,7 @@ ...@@ -322,7 +362,7 @@
position: absolute; position: absolute;
bottom: 0px; bottom: 0px;
right: 150px; right: 150px;
}
.oddrowcolor { .oddrowcolor {
background-color: #fff; background-color: #fff;
...@@ -383,11 +423,11 @@ ...@@ -383,11 +423,11 @@
<tr style="border-bottom: 1px solid #dedede; border-top: 1px solid #dedede;"> <tr style="border-bottom: 1px solid #dedede; border-top: 1px solid #dedede;">
<!-- <th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>数量</th><th style="width: 420px;">装备序列号</th><th>备注</th> --> <!-- <th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>数量</th><th style="width: 420px;">装备序列号</th><th>备注</th> -->
<th width="70px">序号</th> <th width="70px">序号</th>
<th>型号</th> <th width="96px">型号</th>
<th>形态</th> <th width="96px">部件</th>
<th width="50px">密级</th> <th width="50px">密级</th>
<th width="120px">应用领域</th> <th width="100px">应用领域</th>
<th>数量</th> <th width="72px">数量</th>
<th width="420px">装备序列号</th> <th width="420px">装备序列号</th>
<th>备注</th> <th>备注</th>
</tr> </tr>
...@@ -396,7 +436,7 @@ ...@@ -396,7 +436,7 @@
<td> <td>
${dev.code!} ${dev.code!}
</td> </td>
<td>${dev.model!}</td><td>${dev.category!}</td><td>${dev.securityClassification!}</td><td>${dev.applicationField!}</td> <td>${dev.model!}</td><td>${dev.parts!}</td><td>${dev.securityClassification!}</td><td>${dev.applicationField!}</td>
<td> <td>
${dev.count!} ${dev.count!}
</td> </td>
...@@ -405,14 +445,167 @@ ...@@ -405,14 +445,167 @@
</tr> </tr>
</#list> </#list>
</table> </table>
<table class="altrowstable2" id="alternatecolor">
<tr style="border-bottom: 1px solid #dedede;">
<th width="70px"></th>
<th width="96px"></th>
<th width="96px"></th>
<th width="50px"></th>
<th width="100px"></th>
<th width="72px"></th>
<th width="420px"></th>
<th></th>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div> </div>
<div class="line3"> <div class="line3">
<span class="left"> <span class="left">
<span style="padding:6px 0 12px ;"> <span style="padding:20px 0 32px ;">
<span class="label">发件单位:</span> <span class="label">发件单位:</span>
<span class="value">${senderUnit!}</span> <span class="value">${senderUnit!}</span>
</span> </span>
<span style="padding-bottom:12px ;"> <span style="padding-bottom:32px ;">
<span class="label"><span style="letter-spacing: 7px;">签发</span>人:</span> <span class="label"><span style="letter-spacing: 7px;">签发</span>人:</span>
<span class="value">${nameA1!}</span> <span class="value">${nameA1!}</span>
</span> </span>
...@@ -436,11 +629,11 @@ ...@@ -436,11 +629,11 @@
</span> </span>
<span class="right"> <span class="right">
<div style="width: 100%;"> <div style="width: 100%;">
<span style="width: 100%;display: inline-block;padding:6px 0 12px ;"> <span style="width: 100%;display: inline-block;padding:20px 0 32px ;">
<span class="label">收件单位:</span> <span class="label">收件单位:</span>
<span class="value">${receiveUnit}</span> <span class="value">${receiveUnit}</span>
</span> </span>
<span style="width: 100%;display: inline-block;padding-bottom:12px ;"> <span style="width: 100%;display: inline-block;padding-bottom:32px ;">
<span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span> <span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span>
<span class="value">${nameB!}</span> <span class="value">${nameB!}</span>
</span> </span>
...@@ -466,7 +659,7 @@ ...@@ -466,7 +659,7 @@
style="color: #fff;">0232</span></span> style="color: #fff;">0232</span></span>
<!--<div class="rightImg">--> <!--<div class="rightImg">-->
<!--<div id="pos1">--> <!--<div id="pos1">-->
<img id="imgB" style="position: fixed;bottom: 38px;right: 164px;width:80px;height:80px" src=${srcB} /> <img id="imgB" style="position: fixed;bottom: 66px;right: 164px;width:80px;height:80px" src=${srcB} />
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
...@@ -491,3 +684,5 @@ ...@@ -491,3 +684,5 @@
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
<tr> <tr>
<th width="70px">序号</th> <th width="70px">序号</th>
<th>型号</th> <th>型号</th>
<th>形态</th> <th>部件</th>
<th width="50px">密级</th> <th width="50px">密级</th>
<th width="120px">应用领域</th> <th width="120px">应用领域</th>
<th>数量</th> <th>数量</th>
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
<!--</#if>--> <!--</#if>-->
</td> </td>
<td>${dev.model!}</td> <td>${dev.model!}</td>
<td>${dev.category!}</td> <td>${dev.parts!}</td>
<td>${dev.securityClassification!}</td> <td>${dev.securityClassification!}</td>
<td>${dev.applicationField!}</td> <td>${dev.applicationField!}</td>
<td> <td>
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
<tr> <tr>
<th width="70px">序号</th> <th width="70px">序号</th>
<th style="width: 150px;">型号</th> <th style="width: 150px;">型号</th>
<th>形态</th> <th>部件</th>
<th width="100px">密级</th> <th width="100px">密级</th>
<th width="100px">应用领域</th> <th width="100px">应用领域</th>
<th>装备序列号</th> <th>装备序列号</th>
...@@ -197,12 +197,12 @@ ...@@ -197,12 +197,12 @@
<td> <td>
${dev.code!} ${dev.code!}
</td> </td>
<td>${dev.model}</td> <td>${dev.model!}</td>
<td>${dev.category}</td> <td>${dev.parts!}</td>
<td>${dev.securityClassification}</td> <td>${dev.securityClassification!}</td>
<td>${dev.applicationField}</td> <td>${dev.applicationField!}</td>
<td>${dev.deviceSerialNumber}</td> <td>${dev.deviceSerialNumber!}</td>
<td>${dev.proofreading}</td> <td>${dev.proofreading!}</td>
</tr> </tr>
</#list> </#list>
</table> </table>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论