提交 0f43dcbc authored 作者: 133's avatar 133

[清退、文件] 代码提交 0225

上级 917dd642
package com.tykj.dev.device.file.entity; package com.tykj.dev.device.file.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -17,9 +18,10 @@ import java.util.List; ...@@ -17,9 +18,10 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
@Data @Data
public class Confirm { public class Confirm {
@ApiModelProperty(name = "抬头")
private String title; private String title;
private List<ConfirmDevice> confirmDevices; @ApiModelProperty(name = "装备信息")
private List<DocumentDevice> confirmDevices;
} }
package com.tykj.dev.device.file.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author zjm
* @version 1.0.0
* @ClassName ConfirmDevice.java
* @Description TODO
* @createTime 2021年02月03日 16:06:00
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ConfirmDevice {
@ApiModelProperty(name = "型号")
private String model;
@ApiModelProperty(name = "部件")
private String parts;
@ApiModelProperty(name = "类型")
private String category;
@ApiModelProperty(name = "密级")
private String securityClassification;
@ApiModelProperty(name = "应用领域")
private String applicationField;
@ApiModelProperty(name = "装备序列号")
private String deviceSerialNumber;
@ApiModelProperty(name = "备注")
private String remark;
public ConfirmDevice toConfirmDevice(){
switch (category){
case "1":
category="密码机";
break;
case "2":
category="密码模块";
break;
case "3":
category="密码芯片";
break;
case "4":
category="说明书";
break;
case "5":
category="U盘";
break;
case "6":
category="光盘";
break;
case "7":
category="密码软件";
break;
case "8":
category="密码卡";
default:
category="-";
break;
}
switch (securityClassification){
case "1":
securityClassification="绝密";
break;
case "2":
securityClassification="机密";
break;
case "3":
securityClassification="秘密";
break;
default:
securityClassification="无";
break;
}
switch (applicationField){
case "1":
applicationField="省一级";
break;
case "2":
applicationField="市一级";
break;
case "3":
applicationField="县一级";
break;
default:
applicationField="无";
break;
}
return this;
}
}
package com.tykj.dev.device.file.entity; package com.tykj.dev.device.file.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -17,11 +18,18 @@ import java.util.List; ...@@ -17,11 +18,18 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
@Data @Data
public class Destruction { public class Destruction {
@ApiModelProperty(name = "抬头")
private String title; private String title;
@ApiModelProperty(name = "销毁单位")
private String disposeUnitName; private String disposeUnitName;
private List<DestructionDevice> confirmDevices; @ApiModelProperty(name = "报废时间")
private String time;
@ApiModelProperty(name = "单据号")
private String number;
private List<DocumentDevice> confirmDevices;
} }
package com.tykj.dev.device.file.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author zjm
* @version 1.0.0
* @ClassName DestructionDevice.java
* @Description 销毁单据 装备对象
* @createTime 2021年02月03日 17:31:00
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel(value = "单据涉及装备实体", description = "单据涉及装备实体")
public class DestructionDevice {
@ApiModelProperty(name = "型号")
private String model;
@ApiModelProperty(name = "部件")
private String parts;
@ApiModelProperty(name = "类型")
private String category;
@ApiModelProperty(name = "密级")
private String securityClassification;
@ApiModelProperty(name = "应用领域")
private String applicationField;
@ApiModelProperty(name = "数量")
private Integer count;
@ApiModelProperty(name = "装备序列号")
private String deviceSerialNumber;
@ApiModelProperty(name = "生产序列号")
private String productionSerialNumber;
@ApiModelProperty(name = "备注")
private String remark;
public DestructionDevice toDestructionDevice(){
switch (category){
case "1":
category="密码机";
break;
case "2":
category="密码模块";
break;
case "3":
category="密码芯片";
break;
case "4":
category="说明书";
break;
case "5":
category="U盘";
break;
case "6":
category="光盘";
break;
case "7":
category="密码软件";
break;
case "8":
category="密码卡";
default:
category="-";
break;
}
switch (securityClassification){
case "1":
securityClassification="绝密";
break;
case "2":
securityClassification="机密";
break;
case "3":
securityClassification="秘密";
break;
default:
securityClassification="无";
break;
}
switch (applicationField){
case "1":
applicationField="省一级";
break;
case "2":
applicationField="市一级";
break;
case "3":
applicationField="县一级";
break;
default:
applicationField="无";
break;
}
return this;
}
}
...@@ -48,6 +48,10 @@ public class DocumentDevice { ...@@ -48,6 +48,10 @@ public class DocumentDevice {
@ApiModelProperty(name = "备注") @ApiModelProperty(name = "备注")
private String remark; private String remark;
public Integer getLen(){
return deviceSerialNumber.length();
}
public DocumentDevice toDocumentDevice(){ public DocumentDevice toDocumentDevice(){
switch (category){ switch (category){
case "1": case "1":
......
...@@ -153,39 +153,19 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -153,39 +153,19 @@ public class JavaToPdfHtmlFreeMarker {
// 获取模板,并设置编码方式 // 获取模板,并设置编码方式
Template template = freemarkerCfg.getTemplate("bill.html"); Template template = freemarkerCfg.getTemplate("bill.html");
template.setEncoding("UTF-8"); template.setEncoding("UTF-8");
List<DocumentDevice> list=documents.getDocumentDevices();
for (int i=1; i<=3; i++){
boolean falg=true;
Integer page=0;
int pageNum = page + 1;
int pageSize = 7;
Integer totalNum = list.size();
//默认从零分页,这里要考虑这种情况,下面要计算。
Integer totalPage = 0; List<DocumentDevice> list=documents.getDocumentDevices();
while (falg){ List<List<DocumentDevice>> listList=toList(list);
if (totalNum > 0) {
totalPage = totalNum % pageSize == 0 ? totalNum / pageSize : totalNum / pageSize + 1;
}
if (pageNum >= totalPage) {
pageNum = totalPage;
falg=false;
}
int startPoint = (pageNum - 1) * pageSize;
int endPoint = startPoint + pageSize;
if (totalNum <= endPoint) {
endPoint = totalNum;
}
for (int i=1; i<=3; i++){
for (List<DocumentDevice> list1:listList) {
String htmlname=htmlPath+ UUID.randomUUID().toString()+".html"; String htmlname=htmlPath+ UUID.randomUUID().toString()+".html";
// 合并数据模型与模板 // 合并数据模型与模板
FileWriter fileWriter = new FileWriter(new File(htmlname)); FileWriter fileWriter = new FileWriter(new File(htmlname));
template.process(toMap(documents,list.subList(startPoint, endPoint),MAP.get(i)),fileWriter); template.process(toMap(documents,list1,MAP.get(i)),fileWriter);
out.flush(); out.flush();
strings[index]=htmlname; strings[index]=htmlname;
index++; index++;
pageNum++;
} }
} }
return strings; return strings;
...@@ -221,20 +201,36 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -221,20 +201,36 @@ public class JavaToPdfHtmlFreeMarker {
} }
private static Map<String,Object> toConfirmMap(Confirm confirm, List<ConfirmDevice> list){ private static Map<String,Object> toConfirmMap(Confirm confirm, List<DocumentDevice> list){
Map<String,Object> data = new HashMap(); Map<String,Object> data = new HashMap();
data.put("title",confirm.getTitle()); data.put("title",confirm.getTitle());
data.put("documentDevices",list.stream().map(ConfirmDevice::toConfirmDevice).collect(Collectors.toList())); AtomicInteger i= new AtomicInteger(1);
list.forEach(
documentDevice -> {
documentDevice.setCode(i.get());
i.set(i.get() + 1);
}
);
data.put("documentDevices",list.stream().map(DocumentDevice::toDocumentDevice).collect(Collectors.toList()));
return data; return data;
} }
private static Map<String,Object> toDestructionMap(Destruction destruction, List<DestructionDevice> list,String test){ private static Map<String,Object> toDestructionMap(Destruction destruction, List<DocumentDevice> list,String test){
Map<String,Object> data = new HashMap(); Map<String,Object> data = new HashMap();
data.put("title",destruction.getTitle()); data.put("title",destruction.getTitle());
data.put("ul",test); data.put("ul",test);
data.put("unitName",destruction.getDisposeUnitName()); data.put("unitName",destruction.getDisposeUnitName());
data.put("documentDevices",list.stream().map(DestructionDevice::toDestructionDevice).collect(Collectors.toList())); data.put("number",destruction.getNumber());
data.put("time",destruction.getTime());
AtomicInteger i= new AtomicInteger(1);
list.forEach(
documentDevice -> {
documentDevice.setCode(i.get());
i.set(i.get() + 1);
}
);
data.put("documentDevices",list.stream().map(DocumentDevice::toDocumentDevice).collect(Collectors.toList()));
return data; return data;
} }
...@@ -252,7 +248,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -252,7 +248,7 @@ public class JavaToPdfHtmlFreeMarker {
// 获取模板,并设置编码方式 // 获取模板,并设置编码方式
Template template = freemarkerCfg.getTemplate("bill2.html"); Template template = freemarkerCfg.getTemplate("bill2.html");
template.setEncoding("UTF-8"); template.setEncoding("UTF-8");
List<ConfirmDevice> list=confirm.getConfirmDevices(); List<DocumentDevice> list=confirm.getConfirmDevices();
boolean falg=true; boolean falg=true;
Integer page=0; Integer page=0;
int pageNum = page + 1; int pageNum = page + 1;
...@@ -355,39 +351,17 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -355,39 +351,17 @@ public class JavaToPdfHtmlFreeMarker {
// 获取模板,并设置编码方式 // 获取模板,并设置编码方式
Template template = freemarkerCfg.getTemplate("bill1.html"); Template template = freemarkerCfg.getTemplate("bill1.html");
template.setEncoding("UTF-8"); template.setEncoding("UTF-8");
List<DestructionDevice> list=destruction.getConfirmDevices(); List<DocumentDevice> list=destruction.getConfirmDevices();
List<List<DocumentDevice>> listList=toList(list);
for (int i=1; i<=3; i++){ for (int i=1; i<=3; i++){
boolean falg=true; for (List<DocumentDevice> list1:listList) {
Integer page=0;
int pageNum = page + 1;
int pageSize = 7;
Integer totalNum = list.size();
//默认从零分页,这里要考虑这种情况,下面要计算。
Integer totalPage = 0;
while (falg){
if (totalNum > 0) {
totalPage = totalNum % pageSize == 0 ? totalNum / pageSize : totalNum / pageSize + 1;
}
if (pageNum >= totalPage) {
pageNum = totalPage;
falg=false;
}
int startPoint = (pageNum - 1) * pageSize;
int endPoint = startPoint + pageSize;
if (totalNum <= endPoint) {
endPoint = totalNum;
}
String htmlname=htmlPath+ UUID.randomUUID().toString()+".html"; String htmlname=htmlPath+ UUID.randomUUID().toString()+".html";
// 合并数据模型与模板 // 合并数据模型与模板
FileWriter fileWriter = new FileWriter(new File(htmlname)); FileWriter fileWriter = new FileWriter(new File(htmlname));
template.process(toDestructionMap(destruction,list.subList(startPoint, endPoint),MAP1.get(i)),fileWriter); template.process(toDestructionMap(destruction,list1,MAP.get(i)),fileWriter);
out.flush(); out.flush();
strings[index]=htmlname; strings[index]=htmlname;
index++; index++;
pageNum++;
} }
} }
return strings; return strings;
...@@ -444,6 +418,52 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -444,6 +418,52 @@ public class JavaToPdfHtmlFreeMarker {
return new FileRet(); return new FileRet();
} }
/**
* 计算每一页打印的内容
* 判断是否超过一页展示的最多的内容
* 如大于
* 直接生成一个页面的数据 放入到集合中 List<List<DocumentDevice>>
* 不大于则计算相关的值,下一个内容
* @param documentDevices
* @return
*/
private static List<List<DocumentDevice>> toList(List<DocumentDevice> documentDevices) {
documentDevices=documentDevices.stream().sorted(Comparator.comparing(DocumentDevice::getLen).reversed()).collect(Collectors.toList());
List<List<DocumentDevice>> lists=new ArrayList<>();
List<DocumentDevice> list=new ArrayList<>();
AtomicInteger count = new AtomicInteger();
for (int i=0;i<documentDevices.size();i++){
DocumentDevice documentDevice=documentDevices.get(i);
int len=documentDevice.getDeviceSerialNumber().length();
if (len>=3500){
list.add(documentDevice);
lists.add(list);
list=new ArrayList<>();
}else {
int totle=count.get()+54+len;
if (totle>3510){
DocumentDevice documentDevice1=new DocumentDevice();
documentDevice1.setDeviceSerialNumber(documentDevice.getDeviceSerialNumber().substring(3510-count.get(),len));
documentDevice.setDeviceSerialNumber(documentDevice.getDeviceSerialNumber().substring(0,3510-count.get()));
list.add(documentDevice);
lists.add(list);
list=new ArrayList<>();
list.add(documentDevice1);
count.set(totle-3510);
}else {
list.add(documentDevice);
int yu=len%54;
int s=54-yu;
count.set(totle+s);
}
}
if (i==documentDevices.size()-1){
lists.add(list);
}
}
System.out.println("hah");
return lists;
}
} }
...@@ -10,13 +10,16 @@ import com.tykj.dev.device.task.service.TaskService; ...@@ -10,13 +10,16 @@ import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.vo.TaskSelectVo; import com.tykj.dev.device.task.subject.vo.TaskSelectVo;
import com.tykj.dev.device.task.subject.vo.TaskUserVo; import com.tykj.dev.device.task.subject.vo.TaskUserVo;
import com.tykj.dev.device.task.utils.TaskUtils; import com.tykj.dev.device.task.utils.TaskUtils;
import com.tykj.dev.device.user.subject.entity.SecurityUser;
import com.tykj.dev.misc.utils.PageUtil; import com.tykj.dev.misc.utils.PageUtil;
import com.tykj.dev.misc.utils.ResultUtil; import com.tykj.dev.misc.utils.ResultUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -153,8 +156,8 @@ public class RepelQueryController { ...@@ -153,8 +156,8 @@ public class RepelQueryController {
*/ */
@ApiOperation(value = "查询清退单列表") @ApiOperation(value = "查询清退单列表")
@GetMapping("/getList") @GetMapping("/getList")
public ResponseEntity getList() { public ResponseEntity getList(@ApiIgnore @AuthenticationPrincipal SecurityUser securityUser) {
return ResponseEntity.ok(repelQueryService.getList()); return ResponseEntity.ok(repelQueryService.getList(securityUser));
} }
......
...@@ -3,10 +3,14 @@ package com.tykj.dev.device.sendback.repository; ...@@ -3,10 +3,14 @@ package com.tykj.dev.device.sendback.repository;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail; import com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
public interface DeviceRepelDetailDao extends JpaRepository<DeviceRepelDetail, Integer>, JpaSpecificationExecutor<DeviceRepelDetail> { public interface DeviceRepelDetailDao extends JpaRepository<DeviceRepelDetail, Integer>, JpaSpecificationExecutor<DeviceRepelDetail> {
List<DeviceRepelDetail> findAllBySendTimeBetweenAndSendUnitIdAndRepelStatus(Date time,Date endTime, Integer unitId, Integer repelStatus); List<DeviceRepelDetail> findAllBySendTimeBetweenAndSendUnitIdAndRepelStatus(Date time,Date endTime, Integer unitId, Integer repelStatus);
@Query(value = "select d from DeviceRepelDetail as d where d.sendUnitId= ?1 or d.receiveUnitId = ?1")
List<DeviceRepelDetail> findAllBySendUnitIdOrReceiveUnitId(Integer unitId);
} }
...@@ -33,4 +33,6 @@ public interface DeviceRepelDetailService { ...@@ -33,4 +33,6 @@ public interface DeviceRepelDetailService {
* 根据年份以及单位 查询清退的装备列表 * 根据年份以及单位 查询清退的装备列表
*/ */
List<DeviceLibrary> findYearAndUnitToDeviceList(Date time,Date endTime,Integer unitId); List<DeviceLibrary> findYearAndUnitToDeviceList(Date time,Date endTime,Integer unitId);
List<DeviceRepelDetail> findUnitIdSendOrReceive(Integer unitId);
} }
...@@ -4,6 +4,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary; ...@@ -4,6 +4,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepel; import com.tykj.dev.device.sendback.entity.domain.DeviceRepel;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail; import com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail;
import com.tykj.dev.device.sendback.entity.vo.*; import com.tykj.dev.device.sendback.entity.vo.*;
import com.tykj.dev.device.user.subject.entity.SecurityUser;
import java.util.List; import java.util.List;
...@@ -87,7 +88,7 @@ public interface RepelQueryService { ...@@ -87,7 +88,7 @@ public interface RepelQueryService {
/** /**
查询清退单 查询清退单
*/ */
List<DeviceRepelDetail> getList(); List<DeviceRepelDetail> getList(SecurityUser securityUser);
} }
...@@ -79,6 +79,11 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService { ...@@ -79,6 +79,11 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService {
return new ArrayList<>(libraries); return new ArrayList<>(libraries);
} }
@Override
public List<DeviceRepelDetail> findUnitIdSendOrReceive(Integer unitId) {
return deviceRepelDetailDao.findAllBySendUnitIdOrReceiveUnitId(unitId);
}
private List<DeviceLibrary> findInvoleDevice(String involeDevice){ private List<DeviceLibrary> findInvoleDevice(String involeDevice){
if (involeDevice!=null && !involeDevice.equals(",") ) { if (involeDevice!=null && !involeDevice.equals(",") ) {
......
...@@ -10,6 +10,7 @@ import com.tykj.dev.device.sendback.service.*; ...@@ -10,6 +10,7 @@ import com.tykj.dev.device.sendback.service.*;
import com.tykj.dev.device.sendback.util.StringUtils; import com.tykj.dev.device.sendback.util.StringUtils;
import com.tykj.dev.device.task.service.TaskService; import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto; import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.user.subject.entity.SecurityUser;
import com.tykj.dev.device.user.subject.entity.Units; import com.tykj.dev.device.user.subject.entity.Units;
import com.tykj.dev.device.user.subject.service.UnitsService; import com.tykj.dev.device.user.subject.service.UnitsService;
import com.tykj.dev.misc.base.DeviceLifeStatus; import com.tykj.dev.misc.base.DeviceLifeStatus;
...@@ -194,9 +195,18 @@ public class RepelQueryServiceImpl implements RepelQueryService { ...@@ -194,9 +195,18 @@ public class RepelQueryServiceImpl implements RepelQueryService {
} }
@Override @Override
public List<DeviceRepelDetail> getList() { public List<DeviceRepelDetail> getList(SecurityUser securityUser) {
List<DeviceRepelDetail> list=new ArrayList<>(); List<DeviceRepelDetail> list=new ArrayList<>();
repelDetailService.findAll().stream().filter(i-> i.getRepelStatus()==2).forEach(
List<DeviceRepelDetail> deviceRepelDetails=new ArrayList<>();
Units units=securityUser.getCurrentUserInfo().getUnits();
if (securityUser.getCurrentUserInfo().getUnits().getLevel()!=1){
deviceRepelDetails=repelDetailService.findUnitIdSendOrReceive(units.getUnitId());
}else {
deviceRepelDetails=repelDetailService.findAll();
}
deviceRepelDetails.stream().filter(i-> i.getRepelStatus()!=null&&i.getRepelStatus()==2).forEach(
deviceRepelDetail -> { deviceRepelDetail -> {
if (deviceRepelDetail.getBillFile()!=null){ if (deviceRepelDetail.getBillFile()!=null){
deviceRepelDetail.setBillFiles(FilesUtil.stringFileToList(deviceRepelDetail.getBillFile())); deviceRepelDetail.setBillFiles(FilesUtil.stringFileToList(deviceRepelDetail.getBillFile()));
......
...@@ -12,22 +12,6 @@ ...@@ -12,22 +12,6 @@
/*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/ /*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/
@page { @page {
size:210mm 297mm; size:210mm 297mm;
/*margin: 0.25in;*/
/*-fs-flow-bottom: "footer";*/
/*-fs-flow-left: "left";*/
/*-fs-flow-right: "right";*/
/*border: thin solid black;*/
/*padding: 1em;*/
}
#footer {
font-size: 90%; font-style: italic;
position: absolute; top: 0; left: 0;
-fs-move-to-flow: "footer";
}
#pagenumber:before {
content: counter(page);
}
#pagecount:before {content: counter(pages);
} }
.returnTablePrint{ .returnTablePrint{
width: 100%; width: 100%;
...@@ -39,10 +23,6 @@ ...@@ -39,10 +23,6 @@
.returnTablePrint .content{ .returnTablePrint .content{
width: 100%; width: 100%;
height: 100%; height: 100%;
/* background: url("../../../assets/img/detailsBg.png") no-repeat; */
/*background-size: 100% 100%;*/
/*padding: 30px;*/
/*box-sizing: border-box;*/
} }
.returnTablePrint .content>div{ .returnTablePrint .content>div{
width: 100%; width: 100%;
...@@ -51,13 +31,13 @@ ...@@ -51,13 +31,13 @@
/* padding: 30px; */ /* padding: 30px; */
box-sizing: border-box; box-sizing: border-box;
} }
.returnTablePrint .content>p{ /* .returnTablePrint .content>p{
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
color: #4a475d; color: #4a475d;
} } */
.returnTablePrint .listWrapper{ .returnTablePrint .listWrapper{
/*margin: 0 auto;*/ /*margin: 0 auto;*/
...@@ -70,26 +50,26 @@ ...@@ -70,26 +50,26 @@
} }
.returnTablePrint .title{ .returnTablePrint .title{
width: 100%; width: 100%;
font-size: 20px; font-size: 22px;
text-align: center; text-align: center;
position: relative; position: relative;
/* margin: 0 0 15px; */ /* margin: 0 0 15px; */
padding:0 20px; padding:0 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.returnTablePrint .title span:nth-child(2){ /* .returnTablePrint .title span:nth-child(2){
font-size: 28px; font-size: 28px;
color: #000000; color: #000000;
} }
.returnTablePrint .title span:nth-child(2) span{ .returnTablePrint .title span:nth-child(2) span{
font-size: 20px; font-size: 20px;
color: #141414; color: #141414;
} } */
.returnTablePrint .title .number{ .returnTablePrint .title .number{
font-size: 10px; font-size: 12px;
color: #646464; color: #646464;
} }
.returnTablePrint .other{ /* .returnTablePrint .other{
width: 100%; width: 100%;
color: #141414; color: #141414;
font-size: 20px; font-size: 20px;
...@@ -103,14 +83,14 @@ ...@@ -103,14 +83,14 @@
.returnTablePrint .other>span span:nth-child(2){ .returnTablePrint .other>span span:nth-child(2){
display: inline-block; display: inline-block;
margin:0 40px 0 10px; margin:0 40px 0 10px;
} } */
.returnTablePrint .listCon{ .returnTablePrint .listCon{
height: 100%; height: 100%;
border: 1px solid #7f7f7f; border: 1px solid #7f7f7f;
} }
.returnTablePrint .line1{ .returnTablePrint .line1{
width: 100%; width: 100%;
font-size: 10px; font-size: 12px;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 1px solid #7f7f7f; border-bottom: 1px solid #7f7f7f;
color:#000; color:#000;
...@@ -194,7 +174,7 @@ ...@@ -194,7 +174,7 @@
right: 5px; right: 5px;
bottom: 5px; bottom: 5px;
font-style: normal; font-style: normal;
font-size: 10px; font-size: 12px;
} }
.returnTablePrint .line3 .right i{ .returnTablePrint .line3 .right i{
font-style: normal; font-style: normal;
...@@ -216,14 +196,14 @@ ...@@ -216,14 +196,14 @@
} }
.returnTablePrint .label{ .returnTablePrint .label{
color: #646464; color: #646464;
font-size: 10px; font-size: 12px;
} }
.returnTablePrint .value{ .returnTablePrint .value{
color: #000; color: #000;
font-size: 10px; font-size: 12px;
} }
.returnTablePrint .main-title { .returnTablePrint .main-title {
font-size: 18px; font-size: 20px;
color: #000000; color: #000000;
line-height: 20px; line-height: 20px;
text-align: center; text-align: center;
...@@ -239,12 +219,14 @@ ...@@ -239,12 +219,14 @@
} }
table.altrowstable { table.altrowstable {
width: 100%; width: 100%;
font-size:9px; font-size: 11px;
color:#141414; color:#141414;
border-width: 0px; border-width: 0px;
border-color: #a9c6c9; border-color: #a9c6c9;
border-collapse: collapse; border-collapse: collapse;
text-align: center; text-align: center;
table-layout: fixed;
word-break: break-all;
} }
table.altrowstable th { table.altrowstable th {
border-width: 0px; border-width: 0px;
...@@ -257,6 +239,8 @@ ...@@ -257,6 +239,8 @@
padding: 5px; padding: 5px;
border-style: solid; border-style: solid;
border-color: #a9c6c9; border-color: #a9c6c9;
word-break: break-all;
word-wrap: break-word;
} }
.oddrowcolor{ .oddrowcolor{
background-color:#fff; background-color:#fff;
...@@ -271,7 +255,6 @@ ...@@ -271,7 +255,6 @@
</head> </head>
<body> <body>
<!--<div id="footer" style=""> Page <span id="pagenumber"/> of <span id="pagecount"/> </div>-->
<div class="returnTablePrint"> <div class="returnTablePrint">
<div class="content"> <div class="content">
...@@ -310,12 +293,22 @@ ...@@ -310,12 +293,22 @@
<div class="line2 tableList"> <div class="line2 tableList">
<table class="altrowstable" id="alternatecolor"> <table class="altrowstable" id="alternatecolor">
<tr> <tr>
<th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>数量</th><th style="width: 300px">装备序列号</th> <th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>数量</th><th style="width: 300px;">装备序列号</th>
</tr> </tr>
<#list documentDevices as dev> <#list documentDevices as dev>
<tr> <tr>
<td>${dev.code}</td><td>${dev.model}</td><td>${dev.category}</td><td>${dev.securityClassification}</td><td>${dev.applicationField}</td><td>${dev.count}</td><td>${dev.deviceSerialNumber}</td> <td>
<!-- <td>${dev.model}</td><td>${dev.category}</td><td>密码</td><td>${dev.applicationField}</td><td>${dev.count}</td><td>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</td> --> <#if dev.code != 0>
${dev.code}
</#if>
</td>
<td>${dev.model}</td><td>${dev.category}</td><td>${dev.securityClassification}</td><td>${dev.applicationField}</td>
<td>
<#if dev.count != 0>
${dev.count}
</#if>
</td>
<td style="text-align: left;">${dev.deviceSerialNumber}</td>
</tr> </tr>
</#list> </#list>
</table> </table>
......
...@@ -17,16 +17,6 @@ ...@@ -17,16 +17,6 @@
/*border: thin solid black;*/ /*border: thin solid black;*/
/*padding: 1em;*/ /*padding: 1em;*/
} }
#footer {
font-size: 90%; font-style: italic;
position: absolute; top: 0; left: 0;
-fs-move-to-flow: "footer";
}
#pagenumber:before {
content: counter(page);
}
#pagecount:before {content: counter(pages);
}
.returnTablePrint{ .returnTablePrint{
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -90,14 +80,14 @@ ...@@ -90,14 +80,14 @@
color: #141414; color: #141414;
} }
.returnTablePrint .main-title { .returnTablePrint .main-title {
font-size: 28px; font-size: 22px;
color: #000000; color: #000000;
margin-bottom: 20px; margin-bottom: 20px;
text-align: center; text-align: center;
} }
table.altrowstable { table.altrowstable {
width: 100%; width: 100%;
font-size:20px; font-size:14px;
color:#141414; color:#141414;
border-width: 0px; border-width: 0px;
border-color: #a9c6c9; border-color: #a9c6c9;
...@@ -129,7 +119,7 @@ ...@@ -129,7 +119,7 @@
.person{ .person{
color: #4a475b; color: #4a475b;
text-align: right; text-align: right;
font-size: 18pt; font-size: 16px;
} }
.person > span{ .person > span{
display: inline-block; display: inline-block;
...@@ -142,7 +132,6 @@ ...@@ -142,7 +132,6 @@
</head> </head>
<body> <body>
<!--<div id="footer" style=""> Page <span id="pagenumber"/> of <span id="pagecount"/> </div>-->
<div class="returnTablePrint"> <div class="returnTablePrint">
<div class="content"> <div class="content">
...@@ -158,7 +147,7 @@ ...@@ -158,7 +147,7 @@
</p> </p>
<table class="altrowstable" id="alternatecolor"> <table class="altrowstable" id="alternatecolor">
<tr> <tr>
<th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>装备序列号</th> <th>序号</th><th style="width: 150px;">型号</th><th>形态</th><th>密级</th><th>应用领域</th><th style="width: 150px;">装备序列号</th>
</tr> </tr>
<#list documentDevices as dev> <#list documentDevices as dev>
<tr> <tr>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论