Browse Source

Merge branch 'develop' into release_temp

master
sunyuchao 4 years ago
parent
commit
bb1948385f
  1. 4
      epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java
  2. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  3. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StatsStaffPatrolRecordDailyDao.xml

4
epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java

@ -105,10 +105,10 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory<CpA
break;
}
} catch (RenException e) {
logger.error("CpAuthGatewayFilterFactory认证出错,错误信息:{}", ExceptionUtils.getErrorStackTrace(e));
logger.error("CpAuthGatewayFilterFactory认证出错RenException,错误信息:{}", ExceptionUtils.getErrorStackTrace(e));
return response(exchange, new Result<>().error(e.getCode(), e.getMessage()));
} catch (Exception e) {
logger.error("CpAuthGatewayFilterFactory认证出错,错误信息:{}", ExceptionUtils.getErrorStackTrace(e));
logger.error("CpAuthGatewayFilterFactory认证出错Exception,错误信息:{}", ExceptionUtils.getErrorStackTrace(e));
return response(exchange, new Result<>().error(e.getMessage()));
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java

@ -2054,11 +2054,17 @@ public class DataStatsServiceImpl implements DataStatsService {
int patrolDurationInteger = 0;
HashSet set = new HashSet();
for (CustomerDataManageResultDTO.CustomerDataManage u : patrolEnd) {
if (org.getOrgId().equals(u.getOrgId())) {
if ("community".equals(agencyGrid.getLevel()) && org.getOrgId().equals(u.getOrgId())) {
patroCount += u.getPatrolCount();
patrolDurationInteger += u.getPatrolDurationInteger();
set.add(u.getStaffId());
}
if (!"community".equals(agencyGrid.getLevel()) && u.getOrgId().contains(org.getOrgId())) {
patroCount += u.getPatrolCount();
patrolDurationInteger += u.getPatrolDurationInteger();
set.add(u.getStaffId());
}
}
patro = set.size();
Integer minutes = patrolDurationInteger / 60;

6
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StatsStaffPatrolRecordDailyDao.xml

@ -24,7 +24,7 @@
date_id dateId, grid_id, staff_id staffId, patrol_total , total_time
<choose>
<when test='dataType == "agency"'>
, agency_id orgId
, grid_pids orgId
</when>
<otherwise>
, grid_id orgId
@ -36,8 +36,8 @@
AND patrol_total > 0
<choose>
<when test='dataType == "agency"'>
<foreach collection="idList" item="id" open="AND agency_id IN (" separator="," close=")">
#{id}
<foreach collection="idList" item="id" open="AND (" close=")" separator=" OR ">
grid_pids like concat('%', #{id}, '%')
</foreach>
</when>
<otherwise>

Loading…
Cancel
Save