huangfuli 3 vuotta sitten
vanhempi
commit
73c4b0ec1d

+ 2 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ExportVView.java

@@ -110,11 +110,11 @@ public class ExportVView {
     /**
      * 毛重
      */
-    private String grossWeight;
+    private Double grossWeight;
     /**
      * 皮重
      */
-    private String tare;
+    private Double tare;
     /**
      * 扣重
      */

+ 10 - 10
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -2644,13 +2644,13 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 contextstyle.setDataFormat(df.getBuiltinFormat("#,##0.00"));//保留两位小数点
                 HSSFDataFormat df3 = wb.createDataFormat(); // 此处设置数据格式
                 contextstyle2.setDataFormat(df3.getBuiltinFormat("#,###0.000"));//保留两位小数点
-                if (!StringUtils.isEmpty(exportVView.getGrossWeight())) {
-                    cell.setCellValue(Double.parseDouble(exportVView.getGrossWeight()));
+                if (exportVView.getGrossWeight() != null) {
+                    cell.setCellValue(editDouble(exportVView.getGrossWeight()));
                 }
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(27);
-                if (!StringUtils.isEmpty(exportVView.getTare())) {
-                    cell.setCellValue(Double.parseDouble(exportVView.getTare()));
+                if (exportVView.getTare() != null) {
+                    cell.setCellValue(editDouble(exportVView.getTare()));
                 }
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(28);
@@ -3501,10 +3501,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 contextstyle.setDataFormat(df.getBuiltinFormat("#,##0.00"));//保留两位小数点
                 HSSFDataFormat df1 = wb.createDataFormat(); // 此处设置数据格式
                 contextstyle1.setDataFormat(df1.getBuiltinFormat("#,##0.00"));//保留两位小数点
-                cell.setCellValue(Double.parseDouble(exportVView.getGrossWeight()));
+                cell.setCellValue(editDouble(exportVView.getGrossWeight()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(27);
-                cell.setCellValue(Double.parseDouble(exportVView.getTare()));
+                cell.setCellValue(editDouble(exportVView.getTare()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(28);
                 cell.setCellValue(editFloat(exportVView.getBuckleWeight()));
@@ -4386,10 +4386,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 HSSFDataFormat df1 = wb.createDataFormat(); // 此处设置数据格式
                 contextstyle1.setDataFormat(df1.getBuiltinFormat("#,##0.00"));//保留两位小数点
                 cell = rowx.createCell(30);
-                cell.setCellValue(Double.parseDouble(exportVView.getGrossWeight()));
+                cell.setCellValue(editDouble(exportVView.getGrossWeight()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(31);
-                cell.setCellValue(Double.parseDouble(exportVView.getTare()));
+                cell.setCellValue(editDouble(exportVView.getTare()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(32);
                 cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));
@@ -5265,10 +5265,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 HSSFDataFormat df1 = wb.createDataFormat(); // 此处设置数据格式
                 contextstyle1.setDataFormat(df1.getBuiltinFormat("#,##0.00"));//保留两位小数点
                 cell = rowx.createCell(30);
-                cell.setCellValue(Double.parseDouble(exportVView.getGrossWeight()));
+                cell.setCellValue(editDouble(exportVView.getGrossWeight()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(31);
-                cell.setCellValue(Double.parseDouble(exportVView.getTare()));
+                cell.setCellValue(editDouble(exportVView.getTare()));
                 cell.setCellStyle(contextstyle);
                 cell = rowx.createCell(32);
                 cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));

+ 10 - 10
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseBaseInfoMapper.xml

@@ -133,8 +133,8 @@
         w.title_no as titleNo,
         w.title_no_other as titleNoOther,
         s.settlement_price as netWeightPrice,
-        s.gross_weight as grossWeight,
-        s.tare as tare,
+        ROUND(s.gross_weight,2) as grossWeight,
+        ROUND(s.tare,2) as tare,
         s.deduction_weight as buckleWeight,
         s.net_weight as netWeight,
         s.deduction_amount as unitDeduction,
@@ -204,8 +204,8 @@
         w.title_no as titleNo,
         w.title_no_other as titleNoOther,
         w.cost as netWeightPrice,
-        w.gross_weight as grossWeight,
-        w.tare as tare,
+        ROUND(w.gross_weight,2) as grossWeight,
+        ROUND(w.tare,2) as tare,
         w.deduction_weight as buckleWeight,
         w.net_weight as netWeight,
         '' as unitDeduction,
@@ -282,8 +282,8 @@
         w.title_no as titleNo,
         w.title_no_other as titleNoOther,
         0 as netWeightPrice,
-        w.gross_weight as grossWeight,
-        w.tare as tare,
+        ROUND(w.gross_weight,2) as grossWeight,
+        ROUND(w.tare,2) as tare,
         w.deduction_weight as buckleWeight,
         w.net_weight as netWeight,
         '' as unitDeduction,
@@ -348,8 +348,8 @@
         w.ship_name as shipName,
         m.unit_contract_price as unitContractPrice,
         m.weight as weight,
-        w.gross_weight as grossWeight,
-        w.tare as tare,
+        ROUND(w.gross_weight,2) as grossWeight,
+        ROUND(w.tare,2) as tare,
         '' as contractStatus,
         0 as feedbackWeight,
         w.in_out_date as feedbackDate,
@@ -419,8 +419,8 @@
         '' as shipName,
         m.unit_contract_price as unitContractPrice,
         m.weight as weight,
-        s.gross_weight as grossWeight,
-        s.tare as tare,
+        ROUND(s.gross_weight,2) as grossWeight,
+        ROUND(s.tare,2) as tare,
         CASE WHEN ( SELECT sum( ssrr.amount_not_receivable ) FROM stock_sale_receipt_report ssrr WHERE ssrr.contract_no
         = s.contract_no ) > 0 THEN
         '未结算' ELSE '已结算' END AS contractStatus,