|
@@ -508,9 +508,9 @@ public class SpeedWarehouseInOutInfoServiceImpl extends ServiceImpl<SpeedWarehou
|
|
|
sheet.setColumnWidth(7, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(8, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(9, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(10, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(10, 14 * 256 + 184);
|
|
|
sheet.setColumnWidth(11, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(12, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(12, 14 * 256 + 184);
|
|
|
sheet.setColumnWidth(13, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(14, "日期".getBytes().length*2*256);
|
|
|
sheet.setColumnWidth(15, 12 * 256 + 184);
|
|
@@ -571,7 +571,7 @@ public class SpeedWarehouseInOutInfoServiceImpl extends ServiceImpl<SpeedWarehou
|
|
|
|
|
|
Float netWeightTotal = 0f;//净重合计
|
|
|
Double grainFundTotal = 0d;//粮款合计
|
|
|
-
|
|
|
+ contextstyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));//保留两位小数点
|
|
|
DecimalFormat decimalFormat = new DecimalFormat("#.00");
|
|
|
for (int i = 0; i < speedWarehouseInOutInfo.getSpeedWarehouseInOutInfoList().size(); i++) {
|
|
|
SpeedWarehouseInOutInfo speedWarehouseInOutInfo1 = speedWarehouseInOutInfo.getSpeedWarehouseInOutInfoList().get(i);
|
|
@@ -600,7 +600,7 @@ public class SpeedWarehouseInOutInfoServiceImpl extends ServiceImpl<SpeedWarehou
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowp.createCell(9);
|
|
|
cell.setCellValue(Float.parseFloat(decimalFormat.format(netWeightTotal)));
|
|
|
- cell.setCellStyle(contextstyle1);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
cell = rowp.createCell(10);
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowp.createCell(11);
|
|
@@ -697,15 +697,20 @@ public class SpeedWarehouseInOutInfoServiceImpl extends ServiceImpl<SpeedWarehou
|
|
|
cell.setCellValue(editString(speedWarehouseInOutInfo1.getGoodsName()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
- df.setRoundingMode(RoundingMode.HALF_UP);
|
|
|
cell = rowx.createCell(7);
|
|
|
- cell.setCellValue(editFloat(Float.parseFloat(df.format(Double.valueOf(speedWarehouseInOutInfo1.getGrossWeight() != null ? speedWarehouseInOutInfo1.getGrossWeight(): 0f)))));
|
|
|
+ if (speedWarehouseInOutInfo1.getGrossWeight()!=null) {
|
|
|
+ cell.setCellValue(editFloat(speedWarehouseInOutInfo1.getGrossWeight()));
|
|
|
+ }
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(8);
|
|
|
- cell.setCellValue(editFloat(Float.parseFloat(df.format(Double.valueOf(speedWarehouseInOutInfo1.getTare() != null ? speedWarehouseInOutInfo1.getTare(): 0f)))));
|
|
|
+ if (speedWarehouseInOutInfo1.getTare()!=null) {
|
|
|
+ cell.setCellValue(editFloat(speedWarehouseInOutInfo1.getTare()));
|
|
|
+ }
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(9);
|
|
|
- cell.setCellValue(editFloat(Float.parseFloat(df.format(speedWarehouseInOutInfo1.getNetWeight() != null ? speedWarehouseInOutInfo1.getNetWeight(): 0f))));
|
|
|
+ if (speedWarehouseInOutInfo1.getNetWeight()!=null) {
|
|
|
+ cell.setCellValue(editFloat(speedWarehouseInOutInfo1.getNetWeight()));
|
|
|
+ }
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(10);
|
|
|
cell.setCellValue(editString(speedWarehouseInOutInfo1.getBulkDensity()));
|
|
@@ -714,10 +719,14 @@ public class SpeedWarehouseInOutInfoServiceImpl extends ServiceImpl<SpeedWarehou
|
|
|
cell.setCellValue(editString(speedWarehouseInOutInfo1.getWaterContent()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowx.createCell(12);
|
|
|
- cell.setCellValue(editDouble(Double.parseDouble(df.format(speedWarehouseInOutInfo1.getUnitPrice() != null ? speedWarehouseInOutInfo1.getUnitPrice(): 0))));
|
|
|
+ if (speedWarehouseInOutInfo1.getUnitPrice()!=null) {
|
|
|
+ cell.setCellValue(editDouble(speedWarehouseInOutInfo1.getUnitPrice()));
|
|
|
+ }
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(13);
|
|
|
- cell.setCellValue(editDouble(Double.parseDouble(df.format(Double.valueOf(speedWarehouseInOutInfo1.getGrainFund() != null ? speedWarehouseInOutInfo1.getGrainFund(): 0)))));
|
|
|
+ if (speedWarehouseInOutInfo1.getGrainFund()!=null) {
|
|
|
+ cell.setCellValue(editDouble(speedWarehouseInOutInfo1.getGrainFund()));
|
|
|
+ }
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(14);
|
|
|
String date = addDateOneDay(speedWarehouseInOutInfo1.getCreateDate() != null ? speedWarehouseInOutInfo1.getCreateDate() : new Date());
|