fanxw vor 10 Monaten
Ursprung
Commit
e4e4d5938f

+ 8 - 3
src/main/java/com/chinaitop/depot/business/service/impl/BusinessDeliveryStorageNoticeServiceImpl.java

@@ -945,8 +945,13 @@ public class BusinessDeliveryStorageNoticeServiceImpl implements BusinessDeliver
945
                     				String demandAmount = businessDeliveryStorageNoticeV.getShipingCount();
945
                     				String demandAmount = businessDeliveryStorageNoticeV.getShipingCount();
946
                     				BigDecimal demandAmountD = new BigDecimal(demandAmount);
946
                     				BigDecimal demandAmountD = new BigDecimal(demandAmount);
947
                     				
947
                     				
948
-                    				// 除法. 已完成数量/要求数量
949
-                    				BigDecimal complete = sumCkslD.divide(demandAmountD, 4, BigDecimal.ROUND_HALF_DOWN);
948
+                    				BigDecimal complete = null;
949
+                    				if (demandAmountD.compareTo(new BigDecimal(0)) != 0) {
950
+                    					// 除法. 已完成数量/要求数量
951
+                    					complete = sumCkslD.divide(demandAmountD, 4, BigDecimal.ROUND_HALF_DOWN);
952
+                    				} else {
953
+                    					complete = new BigDecimal(1);
954
+                    				}
950
                     				// 乘以100,得到的是百分比.
955
                     				// 乘以100,得到的是百分比.
951
                     				BigDecimal completeRate = complete.multiply(new BigDecimal("100"));
956
                     				BigDecimal completeRate = complete.multiply(new BigDecimal("100"));
952
                     				// 赋值:设置完成百分比.
957
                     				// 赋值:设置完成百分比.
@@ -976,7 +981,7 @@ public class BusinessDeliveryStorageNoticeServiceImpl implements BusinessDeliver
976
                     businessDeliveryStorageNoticeV.setSysl("0");
981
                     businessDeliveryStorageNoticeV.setSysl("0");
977
                 }
982
                 }
978
             }
983
             }
979
-             
984
+
980
             pageInfo = new PageInfo<BusinessDeliveryStorageNoticeAuditVO>(noticeList);
985
             pageInfo = new PageInfo<BusinessDeliveryStorageNoticeAuditVO>(noticeList);
981
         }
986
         }
982
         return pageInfo;
987
         return pageInfo;