Browse Source

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

zhangyuewww 1 year ago
parent
commit
6b7240406e

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

@@ -4190,10 +4190,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 if (!StringUtils.isEmpty(exportVView.getWaterContent())
                         && !StringUtils.isEmpty(exportVView.getImpurity())
                         && !StringUtils.isEmpty(exportVView.getMildewGrain())
-                        && !StringUtils.isEmpty(exportVView.getImperfectGrain())
+//                        && !StringUtils.isEmpty(exportVView.getImperfectGrain())
                         && !StringUtils.isEmpty(exportVView.getBulkDensity())
                         && !StringUtils.isEmpty(exportVView.getJiaorenli())) {
-                    //水分累计和
+                    //净重累计和
                     netWeightTmp = netWeightTmp + (Double.valueOf(String.valueOf(exportVView.getNetWeight() != null ? exportVView.getNetWeight() : "0")));
                 }
                 //水分累计和
@@ -4256,7 +4256,11 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell.setCellValue(Double.parseDouble(df.format(mildewGrainTotal / netWeightTmp)));
             cell.setCellStyle(contextstyle2);
             cell = rowp.createCell(20);
-            cell.setCellValue(Double.parseDouble(df.format(imperfectGrainTotal / netWeightTmp)));
+            if (imperfectGrainTotal != 0){
+                cell.setCellValue(Double.parseDouble(df.format(imperfectGrainTotal / netWeightTmp)));
+            }else {
+                cell.setCellValue(imperfectGrainTotal / netWeightTmp);
+            }
             cell.setCellStyle(contextstyle2);
             cell = rowp.createCell(21);
             cell.setCellValue(Double.parseDouble(df.format(bulkDensityTotal / netWeightTmp)));
@@ -4265,7 +4269,11 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             cell.setCellValue(Double.parseDouble(df.format(jiaorenliTotal / netWeightTmp)));
             cell.setCellStyle(contextstyle2);
             cell = rowp.createCell(23);
-            cell.setCellValue(Double.parseDouble(df.format(protrinTotal / netWeightTmp)));
+            if (protrinTotal != 0){
+                cell.setCellValue(Double.parseDouble(df.format(protrinTotal / netWeightTmp)));
+            }else {
+                cell.setCellValue(protrinTotal / netWeightTmp);
+            }
             cell.setCellStyle(contextstyle2);
             cell = rowp.createCell(24);
             cell.setCellStyle(styleDetail);