| | |
| | | eventDO.setGridMemberStreet(eventGridDataDO.getGridStreetId()); |
| | | |
| | | //检查特殊人群上报时参数 |
| | | if(commonEventAddDTO.getEventType().equals(6)){ |
| | | if(commonEventAddDTO.getPopulationIds() == null || commonEventAddDTO.getPopulationIds().size() <= 0){ |
| | | return R.fail("上报人员为空"); |
| | | } |
| | | } |
| | | // if(commonEventAddDTO.getEventType().equals(6)){ |
| | | // if(commonEventAddDTO.getPopulationIds() == null || commonEventAddDTO.getPopulationIds().size() <= 0){ |
| | | // return R.fail("上报人员为空"); |
| | | // } |
| | | // } |
| | | |
| | | eventDO.setEventCategory(1l);//办件事件 |
| | | eventDO.setEventStatus(2);//事件状态 2发布 |
| | |
| | | eventDO.setOrderSn(getEventOrderSn(eventDO.getEventType())); |
| | | |
| | | if (eventMapper.insert(eventDO) == 1) { |
| | | |
| | | //如果是特殊人群,则新增特殊人群与事件关系 |
| | | if(commonEventAddDTO.getEventType().equals(6)){ |
| | | List<EventSpecialCrowdRecordDO> crowdRecordList = new ArrayList<>(); |
| | | commonEventAddDTO.getPopulationIds().forEach(populationId -> { |
| | | EventSpecialCrowdRecordDO specialCrowdRecordDO = new EventSpecialCrowdRecordDO(); |
| | | specialCrowdRecordDO.setEventId(eventDO.getId()); |
| | | specialCrowdRecordDO.setPopulationId(populationId); |
| | | specialCrowdRecordDO.setCreateAt(new Date()); |
| | | crowdRecordList.add(specialCrowdRecordDO); |
| | | }); |
| | | //添加特殊人群上报事件与人口关系 |
| | | eventSpecialCrowdRecordService.saveBatch(crowdRecordList); |
| | | if(commonEventAddDTO.getPopulationIds() != null && commonEventAddDTO.getPopulationIds().size() > 0){ |
| | | List<EventSpecialCrowdRecordDO> crowdRecordList = new ArrayList<>(); |
| | | commonEventAddDTO.getPopulationIds().forEach(populationId -> { |
| | | EventSpecialCrowdRecordDO specialCrowdRecordDO = new EventSpecialCrowdRecordDO(); |
| | | specialCrowdRecordDO.setEventId(eventDO.getId()); |
| | | specialCrowdRecordDO.setPopulationId(populationId); |
| | | specialCrowdRecordDO.setCreateAt(new Date()); |
| | | crowdRecordList.add(specialCrowdRecordDO); |
| | | }); |
| | | //添加特殊人群上报事件与人口关系 |
| | | eventSpecialCrowdRecordService.saveBatch(crowdRecordList); |
| | | } |
| | | } |
| | | |
| | | //添加音频 |