fenghaifu преди 2 години
родител
ревизия
134d61a35d
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.java

+ 4 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.java

@@ -625,7 +625,10 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 				bdVal = new BigDecimal(fabricMoOrderRK.getIQuantityIn() - fabricMoOrderRK.getISQuantity());
 				fabricMoOrderRK.setISQuantityN(bdVal.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
 				Double curIMoneyCk = iMoneyCk * fabricMoOrderRK.getIQuantityIn() / fabricOMOrder.getIQuantityIn() ;
-				bdVal = new BigDecimal((fabricMoOrderRK.getIProcessFee() + curIMoneyCk) / fabricMoOrderRK.getIQuantityIn());
+				bdVal = new BigDecimal(0);
+				if (fabricMoOrderRK.getIQuantityIn()!=0) {
+					new BigDecimal((fabricMoOrderRK.getIProcessFee() + curIMoneyCk) / fabricMoOrderRK.getIQuantityIn());
+				}
 				fabricMoOrderRK.setIPrice(bdVal.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
 			}
 		}