tangxiaobao
2021-07-14 c64da5152d32c366eecfb20b3fdc023be1d27681
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -264,7 +264,7 @@
            }
            //当事件为特殊人群上报时,需要查询事件与人口关联关系
            if(eventDetailsVO.getEventType().equals(6)){
            if(eventDetailsVO.getEventType() != null && eventDetailsVO.getEventType().equals(6)){
                List<EventSpecialPopulationDetailsVO> specialPopulationList = eventSpecialCrowdRecordMapper.getSpecialPopulationIds(eventDetailsVO.getId());
                if(!specialPopulationList.isEmpty()){
                    specialPopulationList.forEach(special -> {
@@ -1021,6 +1021,7 @@
        }
        EventDO eventDO = new EventDO();
        BeanUtils.copyProperties(publicityEventAddDTO, eventDO);
        eventDO.setHappenTime(publicityEventAddDTO.getPropagandaTime());
        eventDO.setGridMemberId(publicityEventAddDTO.getUserId());
        eventDO.setEventCategory(2l);//宣传事件
        eventDO.setEventStatus(2);//事件状态 2发布
@@ -1939,6 +1940,16 @@
            statisticsDetailVO.setNoEventZFTotal(0);
        }
        //查询网格
        EventGridDataDO gridDataDO = eventGridDataMapper.selectById(statisticsDTO.getGridId());
        if(gridDataDO != null){
            Map<String,Long> sspCountMap = this.baseMapper.getSSPEventTotal(gridDataDO.getGridCommunityId());
            if(!sspCountMap.isEmpty()){
                statisticsDetailVO.setEventSSPTotal(sspCountMap.get("eventSSPTotal")!=null?sspCountMap.get("eventSSPTotal").intValue():0);
                statisticsDetailVO.setNoEventSSPTotal(sspCountMap.get("noEventSSPTotal")!=null?sspCountMap.get("noEventSSPTotal").intValue():0);
            }
        }
        //统计数据
        Integer sum = statisticsDetailVO.getEventTFTotal() + statisticsDetailVO.getEventMDTotal() + statisticsDetailVO.getEventZATotal()
                + statisticsDetailVO.getEventBWDTotal() + statisticsDetailVO.getEventTSTotal() + statisticsDetailVO.getEventGGTotal()
@@ -2271,6 +2282,9 @@
        List<EventWorkVO> list = new ArrayList<>();
        for(EventWorkVO eventWorkVO: listHalfYearByDyn()){
            EventWorkVO result = this.eventMapper.countByTime(eventWorkVO.getStart(),eventWorkVO.getEnd(),communityId);
            result.setEventTotal(result.getEventTotal() + result.getSspTotal());
            result.setEventAdd(result.getEventAdd() + result.getSspAdd());
            result.setEventSolve(result.getEventSolve() + result.getSspSolve());
            result.setMonth(eventWorkVO.getMonth());
            list.add(result);
        }
@@ -2293,11 +2307,11 @@
        List<EventWorkVO> dateList = new ArrayList<>();
        Date now  = new Date();
        for(int i= 6;i>=1;i--){
            Date date = DateUtils.getDateM(now,-i);
            Date date = DateUtils.getDateM(now,-(i-1));
            DateTime endDay = DateUtil.endOfMonth(date);
            int m = DateUtil.month(endDay);
            m++;
//            m++;
            if(m == 12){
                m = 0;
            }
@@ -2307,23 +2321,14 @@
            EventWorkVO eventWorkVO = new EventWorkVO();
            eventWorkVO.setMonth(monthStr[m]+"月上旬");
            eventWorkVO.setStart(month+ "-01 00:00:00");
            eventWorkVO.setEnd(month+ "-"+half+" 23:59:58");
            eventWorkVO.setEnd(month+ "-"+half+" 23:59:59");
            dateList.add(eventWorkVO);
            EventWorkVO eventWorkVO1 = new EventWorkVO();
            eventWorkVO1.setMonth(monthStr[m]+"月下旬");
            eventWorkVO1.setStart(month+ "-"+half+" 23:59:58");
            eventWorkVO1.setStart(month+ "-"+half+" 23:59:59");
            eventWorkVO1.setEnd(DateUtils.getDateFormatString(endDay,"yyyy-MM-dd HH:mm:ss"));
            dateList.add(eventWorkVO1);
        }
        return dateList;
    }
    public static void main(String[] args) {
        String content = "30,104";
        String re = "[1-9][0-9](\\.[0-9]{1,6})?,[1-9][0-9]{2}(\\.[0-9]{1,6})?";
        System.out.println(content.matches(re));
    }
}