Browse Source

值班查岗相关接口开发

jichaobo 2 years ago
parent
commit
fe48a16900

+ 3 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/BaseCompanyPersonServiceImpl.java

@@ -80,6 +80,9 @@ public class BaseCompanyPersonServiceImpl extends AbstractCrudService<BaseCompan
         Integer count = 0;
         if (CollectionUtils.isNotEmpty(companyIdList)) {
             Integer spentTimeAvg = mhPostInspectMapper.mhPostInspectStatistics(" AVG(spent_time) ", 1, startTime, endTime, companyIdList, null);
+            if (spentTimeAvg==null){
+                spentTimeAvg = 0;
+            }
             answeredCount = mhPostInspectMapper.mhPostInspectStatistics(" count(*) ", 1, startTime, endTime, companyIdList, null);
             notAnsweredCount = mhPostInspectMapper.mhPostInspectStatistics(" count(*) ", 0, startTime, endTime, companyIdList, null);
             count = answeredCount + notAnsweredCount;

+ 3 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/MhPostInspectServiceImpl.java

@@ -86,6 +86,9 @@ public class MhPostInspectServiceImpl extends AbstractCrudService<MhPostInspectM
         String endTime = format.format(date);
         if (StringUtils.isNotBlank(companyId)) {
             Integer spentTimeAvg = baseMapper.mhPostInspectStatistics(" AVG(spent_time) ", 1, startTime, endTime, null, companyId);
+            if (spentTimeAvg==null){
+                spentTimeAvg = 0;
+            }
             answeredCount = baseMapper.mhPostInspectStatistics(" count(*) ", 1, startTime, endTime, null, companyId);
             notAnsweredCount = baseMapper.mhPostInspectStatistics(" count(*) ", 0, startTime, endTime, null, companyId);
             count = answeredCount + notAnsweredCount;