qiangxuan преди 2 седмици
родител
ревизия
3025ecf98d

+ 6 - 4
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetOriginalProductRecord/controller/BilletOriginalProductRecordController.java

@@ -2069,11 +2069,13 @@ public class BilletOriginalProductRecordController extends JeecgController<Bille
 			 localWeight = BigDecimal.valueOf(localWeight)
 					 .setScale(4, RoundingMode.HALF_UP)
 					 .doubleValue();
+			 
+			 BilletStatisticsDetail detail = v != null ? v : new BilletStatisticsDetail(count, localWeight, size);
 
-			 BilletStatisticsDetail detail = v != null ? v :
-					 new BilletStatisticsDetail(0, 0.0, size);
-			 detail.setAmountTotal(detail.getAmountTotal() + count);
-			 detail.setBlankOutput(detail.getBlankOutput() + localWeight);
+			 if (v != null) {
+				 detail.setAmountTotal(detail.getAmountTotal() + count);
+				 detail.setBlankOutput(detail.getBlankOutput() + localWeight);
+			 }
 			 return detail;
 		 });
 	 }