zxz há 2 anos atrás
pai
commit
caf823a954

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

@@ -2835,12 +2835,14 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
 //                }
                 cell.setCellStyle(contextstyle1);
                 cell = rowx.createCell(37);
-                if (exportVView.getPureWeight() == null) {
-                    cell.setCellValue(editFloat(exportVView.getPureWeight()));
-                } else {
-                    cell.setCellValue(editDouble(Double.valueOf(exportVView.getPureWeight()) / 1000));
-                }
-                cell.setCellStyle(styleDetail);
+//                if (exportVView.getPureWeight() == null) {
+//                    cell.setCellValue(editFloat(Float.valueOf(Math.round(exportVView.getPureWeight()*1000)/1000)));
+//                } else {
+//                    cell.setCellValue(editDouble(Double.valueOf(Math.round(exportVView.getPureWeight()*1000)/1000) / 1000));
+//                }
+//                cell.setCellValue(new Formatter().format("%.3f",editDouble(Double.valueOf(exportVView.getPureWeight() != null ? exportVView.getPureWeight() / 1000 : 0))).toString());
+                cell.setCellValue(editDouble(Double.parseDouble(df1.format(exportVView.getPureWeight() != null ? exportVView.getPureWeight()/ 1000 : 0))));
+                cell.setCellStyle(contextstyle1);
                 cell = rowx.createCell(38);
                 cell.setCellValue(editDouble(exportVView.getUnloadingDeduction() != null ? exportVView.getUnloadingDeduction() : 0));
                 cell.setCellStyle(contextstyle);

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

@@ -75,7 +75,7 @@
         a.unit_deduction as unitDeduction,
         a.unload_deduction as unloadingDeduction,
         a.solid_grain_price as pureWeightPrice,
-        case when a.goods_name like '%潮粮%' then a.pure_weight else a.net_weight end as pureWeight,
+        ROUND(case when a.goods_name like '%潮粮%' then a.pure_weight else a.net_weight end,3) as pureWeight,
         a.amount_ing_payable as amountIngPayable,
         a.amount_ed_payable as amountEdPayable,
         i.payee_name as payeeName,
@@ -149,7 +149,7 @@
         s.deduction_amount as unitDeduction,
         '' as pureWeightPrice,
         0 as unloadingDeduction,
-        case when w.goods_name like '%潮粮%' then w.pure_weight*1000 else w.net_weight*1000 end as pureWeight,
+        ROUND(case when w.goods_name like '%潮粮%' then w.pure_weight*1000 else w.net_weight*1000 end,3) as pureWeight,
         s.amount_ing_payable as amountIngPayable,
         s.amount_ed_payable as amountEdPayable,
         i.payee_name as payeeName,
@@ -224,7 +224,7 @@
         IFNULL(q.deduction_amount,0) as unitDeduction,
         0 as unloadingDeduction,
         '' as pureWeightPrice,
-        case when w.goods_name like '%潮粮%' then w.pure_weight*1000 else w.net_weight*1000 end as pureWeight,
+        ROUND(case when w.goods_name like '%潮粮%' then w.pure_weight*1000 else w.net_weight*1000 end,3) as pureWeight,
         -- ROUND(IFNULL(r.amount_ing_payable,(w.cost+IFNULL(t.tran_price,0))*t.load_net_weight),2) as amountIngPayable,
         case when cmi.settlement_weight_method = '1' then
         ROUND((w.cost-IFNULL(q.deduction_amount,0))*t.load_net_weight,2)
@@ -308,7 +308,7 @@
         '' as unitDeduction,
         0 as unloadingDeduction,
         '' as pureWeightPrice,
-        case when w.goods_name like '%潮粮%' then w.pure_weight*1000 else w.net_weight*1000 end as pureWeight,
+        ROUND(case when w.goods_name like '%潮粮%' then w.pure_weight*1000 else w.net_weight*1000 end,3) as pureWeight,
         0 as amountIngPayable,
         0 as amountEdPayable,
         '' as payeeName,