|
@@ -468,13 +468,29 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
vo.setConfigId(vs.getConfigId());
|
|
|
vo.setSensorId(vs.getSensorId());
|
|
|
vo.setSensorType(vs.getSensorType());
|
|
|
- vo.setSensorX(saveTwoDecimalPlaces(vs.getSensorX().doubleValue()));
|
|
|
- vo.setSensorY(saveTwoDecimalPlaces(vs.getSensorY().doubleValue()));
|
|
|
- vo.setSensorZ(saveTwoDecimalPlaces(vs.getSensorZ().doubleValue()));
|
|
|
- vo.setSensorH(saveTwoDecimalPlaces(vs.getSensorH().doubleValue()));
|
|
|
- vo.setSensorP(saveTwoDecimalPlaces(vs.getSensorP().doubleValue()));
|
|
|
- vo.setSensorR(saveTwoDecimalPlaces(vs.getSensorR().doubleValue()));
|
|
|
- vo.setSensorPort(vs.getSensorPort());
|
|
|
+ if(StringUtil.isNotEmpty(vs.getSensorX())){
|
|
|
+ vo.setSensorX(saveTwoDecimalPlaces(vs.getSensorX().doubleValue()));
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotEmpty(vs.getSensorY())){
|
|
|
+ vo.setSensorY(saveTwoDecimalPlaces(vs.getSensorY().doubleValue()));
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotEmpty(vs.getSensorZ())){
|
|
|
+ vo.setSensorZ(saveTwoDecimalPlaces(vs.getSensorZ().doubleValue()));
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotEmpty(vs.getSensorH())){
|
|
|
+ vo.setSensorH(saveTwoDecimalPlaces(vs.getSensorH().doubleValue()));
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotEmpty(vs.getSensorP())){
|
|
|
+ vo.setSensorP(saveTwoDecimalPlaces(vs.getSensorP().doubleValue()));
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotEmpty(vs.getSensorR())){
|
|
|
+ vo.setSensorR(saveTwoDecimalPlaces(vs.getSensorR().doubleValue()));
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotEmpty(vs.getSensorPort())){
|
|
|
+ vo.setSensorPort(vs.getSensorPort());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1854,6 +1870,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".pdf");
|
|
|
os = new BufferedOutputStream(response.getOutputStream());
|
|
|
|
|
|
+ //监听生成pdf数据
|
|
|
PdfWriter.getInstance(document, os);
|
|
|
|
|
|
// 以下生成PDF
|
|
@@ -1942,14 +1959,11 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
document.add(pdfPTable1);
|
|
|
|
|
|
|
|
|
- //新的一页
|
|
|
- document.newPage();
|
|
|
+ //新的一页,横向显示
|
|
|
document.setPageSize(PageSize.A4.rotate());
|
|
|
- PdfPTable pdfPTable2 = new PdfPTable(5);
|
|
|
- addTitleList(pdfPTable2, font, new String[]{"测试项目","90<总分<100","80<总分<90","70<总分<80","0<总分<70"});
|
|
|
- addDataList(pdfPTable2, font, new String[]{"评价等级","优秀(G)","良好(A)","一般(M)","较差(P)",
|
|
|
- "评价等级","++++++","+++++","++++","+++",});
|
|
|
- document.add(pdfPTable2);
|
|
|
+ document.newPage();
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|