|
@@ -1,5 +1,6 @@
|
|
|
package org.jeecg.modules.cmmsInspect.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import org.jeecg.modules.cmmsInspect.convert.CmmsInspectConvert;
|
|
|
import org.jeecg.modules.cmmsInspect.entity.CmmsInspect;
|
|
@@ -196,8 +197,19 @@ public class CmmsInspectServiceImpl extends ServiceImpl<CmmsInspectMapper, CmmsI
|
|
|
public IndexNum IndexInspectNum() {
|
|
|
List<Integer> list = cmmsInspectMapper.getIndexNum();
|
|
|
IndexNum indexNum = new IndexNum();
|
|
|
- indexNum.setTodaynum(list.get(1));
|
|
|
- indexNum.setTotalnum(list.get(0));
|
|
|
+ if (list.size() == 2 && ObjectUtil.isNotNull(list.get(0)) && ObjectUtil.isNotNull(list.get(1))){
|
|
|
+ indexNum.setTodaynum(list.get(1));
|
|
|
+ indexNum.setTotalnum(list.get(0));
|
|
|
+ }else if (list.size() == 1 && ObjectUtil.isNotNull(0)){
|
|
|
+ indexNum.setTodaynum(0);
|
|
|
+ indexNum.setTotalnum(list.get(0));
|
|
|
+ }else if (list.size() == 1 && ObjectUtil.isNotNull(1)){
|
|
|
+ indexNum.setTodaynum(list.get(1));
|
|
|
+ indexNum.setTotalnum(0);
|
|
|
+ }else {
|
|
|
+ indexNum.setTodaynum(0);
|
|
|
+ indexNum.setTotalnum(0);
|
|
|
+ }
|
|
|
return indexNum;
|
|
|
}
|
|
|
}
|