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

[文件 模版] 提交

上级 e8234d44
......@@ -614,18 +614,18 @@ public class JavaToPdfHtmlFreeMarker {
DocumentDevice documentDevice=documentDevices.get(i);
int len=documentDevice.getDeviceSerialNumber().length();
String deviceSerialNumber=documentDevice.getDeviceSerialNumber();
if (len > 1568){
if (len > 784){
int page=0;
int remainder = len % 1568;
int pageCount = (remainder > 0) ? len/1568 + 1 : len/1568;
int remainder = len % 784;
int pageCount = (remainder > 0) ? len/784 + 1 : len/784;
while (page<pageCount-1) {
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);
lists.add(list);
}else {
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);
lists.add(list);
}
......@@ -633,22 +633,22 @@ public class JavaToPdfHtmlFreeMarker {
page++;
}
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);
count.set(len-(pageCount-1)*1568);
}else if (len==1568){
count.set(len-(pageCount-1)*784);
}else if (len==784){
list.add(documentDevice);
lists.add(list);
list = new ArrayList<>();
}
else {
int totle=count.get()+29+len;
if (totle > 1568){
int totle=count.get()+len;
if (totle > 784){
// if (len>56) {
if (1568-count.get()>56) {
if (784-count.get()>56) {
DocumentDevice documentDevice1 = new DocumentDevice();
documentDevice1.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(1568 - count.get(), len)));
documentDevice.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(0, 1568 - count.get())));
documentDevice1.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(784 - count.get(), len)));
documentDevice.setDeviceSerialNumber(toString(documentDevice.getDeviceSerialNumber().substring(0, 784 - count.get())));
list.add(documentDevice);
lists.add(list);
list = new ArrayList<>();
......@@ -671,7 +671,7 @@ public class JavaToPdfHtmlFreeMarker {
count.set(totle);
}
}
if (list.size()==19){
if (list.size()==14){
lists.add(list);
list = new ArrayList<>();
count.set(0);
......@@ -730,7 +730,7 @@ public class JavaToPdfHtmlFreeMarker {
lists.add(list);
list=new ArrayList<>();
}else {
int totle=count.get()+29+len;
int totle=count.get()+len;
if (totle>1568){
if (1568-count.get()>56) {
WorkHandoverDevice workHandoverDevice1 = new WorkHandoverDevice();
......@@ -789,7 +789,6 @@ public class JavaToPdfHtmlFreeMarker {
}else {
return str;
}
}
}
......@@ -372,7 +372,7 @@
<tr>
<th width="70px">序号</th>
<th>型号</th>
<th>形态</th>
<th>部件</th>
<th width="50px">密级</th>
<th width="120px">应用领域</th>
<th>数量</th>
......@@ -387,7 +387,7 @@
<!--</#if>-->
</td>
<td>${dev.model!}</td>
<td>${dev.category!}</td>
<td>${dev.parts!}</td>
<td>${dev.securityClassification!}</td>
<td>${dev.applicationField!}</td>
<td>
......
......@@ -186,7 +186,7 @@
<tr>
<th width="70px">序号</th>
<th style="width: 150px;">型号</th>
<th>形态</th>
<th>部件</th>
<th width="100px">密级</th>
<th width="100px">应用领域</th>
<th>装备序列号</th>
......@@ -197,12 +197,12 @@
<td>
${dev.code!}
</td>
<td>${dev.model}</td>
<td>${dev.category}</td>
<td>${dev.securityClassification}</td>
<td>${dev.applicationField}</td>
<td>${dev.deviceSerialNumber}</td>
<td>${dev.proofreading}</td>
<td>${dev.model!}</td>
<td>${dev.parts!}</td>
<td>${dev.securityClassification!}</td>
<td>${dev.applicationField!}</td>
<td>${dev.deviceSerialNumber!}</td>
<td>${dev.proofreading!}</td>
</tr>
</#list>
</table>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论