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; break;
} }
} catch (RenException e) { } 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())); return response(exchange, new Result<>().error(e.getCode(), e.getMessage()));
} catch (Exception e) { } catch (Exception e) {
logger.error("CpAuthGatewayFilterFactory认证出错,错误信息:{}", ExceptionUtils.getErrorStackTrace(e)); logger.error("CpAuthGatewayFilterFactory认证出错Exception,错误信息:{}", ExceptionUtils.getErrorStackTrace(e));
return response(exchange, new Result<>().error(e.getMessage())); 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; int patrolDurationInteger = 0;
HashSet set = new HashSet(); HashSet set = new HashSet();
for (CustomerDataManageResultDTO.CustomerDataManage u : patrolEnd) { for (CustomerDataManageResultDTO.CustomerDataManage u : patrolEnd) {
if (org.getOrgId().equals(u.getOrgId())) { if ("community".equals(agencyGrid.getLevel()) && org.getOrgId().equals(u.getOrgId())) {
patroCount += u.getPatrolCount(); patroCount += u.getPatrolCount();
patrolDurationInteger += u.getPatrolDurationInteger(); patrolDurationInteger += u.getPatrolDurationInteger();
set.add(u.getStaffId()); 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(); patro = set.size();
Integer minutes = patrolDurationInteger / 60; 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 date_id dateId, grid_id, staff_id staffId, patrol_total , total_time
<choose> <choose>
<when test='dataType == "agency"'> <when test='dataType == "agency"'>
, agency_id orgId , grid_pids orgId
</when> </when>
<otherwise> <otherwise>
, grid_id orgId , grid_id orgId
@ -36,8 +36,8 @@
AND patrol_total > 0 AND patrol_total > 0
<choose> <choose>
<when test='dataType == "agency"'> <when test='dataType == "agency"'>
<foreach collection="idList" item="id" open="AND agency_id IN (" separator="," close=")"> <foreach collection="idList" item="id" open="AND (" close=")" separator=" OR ">
#{id} grid_pids like concat('%', #{id}, '%')
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>

Loading…
Cancel
Save