|
@@ -2197,7 +2197,23 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
contextstyle1.setBorderTop(HSSFCellStyle.BORDER_THIN);
|
|
|
// 下styleDetailTitle
|
|
|
contextstyle1.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
-
|
|
|
+ HSSFCellStyle contextstyle5 = wb.createCellStyle();
|
|
|
+ // 指定单元格居中对齐
|
|
|
+ contextstyle5.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
|
+ // 指定单元格垂直居中对齐
|
|
|
+ contextstyle5.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
|
|
+ // 指定单元格自动换行
|
|
|
+ contextstyle5.setWrapText(true);
|
|
|
+ // 设置单元格字体
|
|
|
+ contextstyle5.setFont(fontDetail);
|
|
|
+ // 右边框
|
|
|
+ contextstyle5.setBorderRight(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 左边框
|
|
|
+ contextstyle5.setBorderLeft(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 上边框
|
|
|
+ contextstyle5.setBorderTop(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 下styleDetailTitle
|
|
|
+ contextstyle5.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
|
|
|
HSSFCellStyle contextstyle2 = wb.createCellStyle();
|
|
|
// 指定单元格居中对齐
|
|
@@ -2217,6 +2233,24 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
// 下styleDetailTitle
|
|
|
contextstyle2.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
|
|
|
+ HSSFCellStyle hssContextStyle5 = wb.createCellStyle();
|
|
|
+ // 指定单元格居中对齐
|
|
|
+ hssContextStyle5.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
|
+ // 指定单元格垂直居中对齐
|
|
|
+ hssContextStyle5.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
|
|
+ // 指定单元格自动换行
|
|
|
+ hssContextStyle5.setWrapText(true);
|
|
|
+ // 设置单元格字体
|
|
|
+ hssContextStyle5.setFont(fontDetail1);
|
|
|
+ // 右边框
|
|
|
+ hssContextStyle5.setBorderRight(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 左边框
|
|
|
+ hssContextStyle5.setBorderLeft(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 上边框
|
|
|
+ hssContextStyle5.setBorderTop(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 下styleDetailTitle
|
|
|
+ hssContextStyle5.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
+
|
|
|
HSSFCellStyle contextstyle = wb.createCellStyle();
|
|
|
// 指定单元格居中对齐
|
|
|
contextstyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
@@ -2457,10 +2491,12 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
|
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
DecimalFormat df1 = new DecimalFormat("0.000");
|
|
|
+ hssContextStyle5.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,#####0.00000"));//保留两位小数点
|
|
|
contextstyle2.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,#####0.00000"));//保留两位小数点
|
|
|
contextstyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));//保留两位小数点
|
|
|
contextstyle1.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.000"));//保留两位小数点
|
|
|
contextstyle2.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));//保留两位小数点
|
|
|
+ contextstyle5.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00000"));//保留两位小数点
|
|
|
|
|
|
// 详情信息
|
|
|
if (!CollectionUtils.isEmpty(dataList)) {
|
|
@@ -2591,7 +2627,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
//纯重合计
|
|
|
cell = rowp.createCell(30);
|
|
|
cell.setCellValue(netWeightTotal);
|
|
|
- cell.setCellStyle(contextstyle2);
|
|
|
+ cell.setCellStyle(hssContextStyle5);
|
|
|
cell = rowp.createCell(31);
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowp.createCell(32);
|
|
@@ -2882,7 +2918,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(30);
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));
|
|
|
- cell.setCellStyle(contextstyle2);
|
|
|
+ cell.setCellStyle(contextstyle5);
|
|
|
cell = rowx.createCell(31);
|
|
|
cell.setCellValue(editDouble(exportVView.getDeliveryGrossWeight()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
@@ -3154,6 +3190,23 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
contextstyle1.setBorderTop(HSSFCellStyle.BORDER_THIN);
|
|
|
// 下styleDetailTitle
|
|
|
contextstyle1.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
+ HSSFCellStyle contextstyle5 = wb.createCellStyle();
|
|
|
+ // 指定单元格居中对齐
|
|
|
+ contextstyle5.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
|
+ // 指定单元格垂直居中对齐
|
|
|
+ contextstyle5.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
|
|
+ // 指定单元格自动换行
|
|
|
+ contextstyle5.setWrapText(true);
|
|
|
+ // 设置单元格字体
|
|
|
+ contextstyle5.setFont(fontDetail1);
|
|
|
+ // 右边框
|
|
|
+ contextstyle5.setBorderRight(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 左边框
|
|
|
+ contextstyle5.setBorderLeft(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 上边框
|
|
|
+ contextstyle5.setBorderTop(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 下styleDetailTitle
|
|
|
+ contextstyle5.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
|
|
|
HSSFCellStyle styleDetailYellow = wb.createCellStyle();
|
|
|
// 指定单元格居中对齐
|
|
@@ -3401,6 +3454,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
rowp.setHeightInPoints(20);
|
|
|
HSSFDataFormat df1 = wb.createDataFormat(); // 此处设置数据格式
|
|
|
contextstyle1.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.00"));//保留两位小数点
|
|
|
+ contextstyle5.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.00000"));//保留两位小数点
|
|
|
cell = rowp.createCell(1);
|
|
|
cell.setCellValue("平均值/合计");
|
|
|
cell.setCellStyle(styleDetail);
|
|
@@ -3469,7 +3523,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
//纯重合计
|
|
|
cell = rowp.createCell(29);
|
|
|
cell.setCellValue(netWeightTotal);
|
|
|
- cell.setCellStyle(contextstyle1);
|
|
|
+ cell.setCellStyle(contextstyle5);
|
|
|
cell = rowp.createCell(30);
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowp.createCell(31);
|
|
@@ -4041,7 +4095,23 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
contextstyle2.setBorderTop(HSSFCellStyle.BORDER_THIN);
|
|
|
// 下styleDetailTitle
|
|
|
contextstyle2.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
-
|
|
|
+ HSSFCellStyle contextstyle5 = wb.createCellStyle();
|
|
|
+ // 指定单元格居中对齐
|
|
|
+ contextstyle5.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
|
+ // 指定单元格垂直居中对齐
|
|
|
+ contextstyle5.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
|
|
+ // 指定单元格自动换行
|
|
|
+ contextstyle5.setWrapText(true);
|
|
|
+ // 设置单元格字体
|
|
|
+ contextstyle5.setFont(fontDetail1);
|
|
|
+ // 右边框
|
|
|
+ contextstyle5.setBorderRight(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 左边框
|
|
|
+ contextstyle5.setBorderLeft(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 上边框
|
|
|
+ contextstyle5.setBorderTop(HSSFCellStyle.BORDER_THIN);
|
|
|
+ // 下styleDetailTitle
|
|
|
+ contextstyle5.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
HSSFCellStyle styleDetailYellow = wb.createCellStyle();
|
|
|
// 指定单元格居中对齐
|
|
|
styleDetailYellow.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
@@ -4271,6 +4341,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
DecimalFormat df1 = new DecimalFormat("0.000");
|
|
|
contextstyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));//保留两位小数点
|
|
|
contextstyle2.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));//保留两位小数点
|
|
|
+ contextstyle5.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00000"));//保留两位小数点
|
|
|
|
|
|
// 详情信息
|
|
|
if (!CollectionUtils.isEmpty(dataList)) {
|
|
@@ -4423,7 +4494,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
//纯重合计
|
|
|
cell = rowp.createCell(35);
|
|
|
cell.setCellValue(netWeightTotal);
|
|
|
- cell.setCellStyle(contextstyle2);
|
|
|
+ cell.setCellStyle(contextstyle5);
|
|
|
cell = rowp.createCell(36);
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowp.createCell(37);
|