Commit 24d8089f LN

除0错误修改

1 个父辈 612eb27a
......@@ -230,7 +230,11 @@ public class SmdBoxMimoController {
} else {
dto.setType(1);
}
int usage = (storage.getTotalSlots() - storage.getEmptySlots()) * 100 / storage.getTotalSlots();
int usage = 0;
if(storage.getTotalSlots()>0){
usage= (storage.getTotalSlots() - storage.getEmptySlots()) * 100 / storage.getTotalSlots();
}
dto.setUsage(usage);
int inCount = getTodayInOutCount(storage.getId(), inOutDataList, true);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!