| | |
| | | @Service |
| | | public class BaseCaseServiceImpl extends ServiceImpl<BaseCaseMapper, BaseCase> implements IBaseCaseService { |
| | | |
| | | private CityPlatformService cityPlatformService; |
| | | // private CityPlatformService cityPlatformService; |
| | | private IViolationsService violationsService; |
| | | private IVideoAlarmReportService videoAlarmReportService; |
| | | |
| | | @Value("${fdfs.fileUrl}") |
| | | private String fileUrl; |
| | | |
| | | @Autowired |
| | | public void setCityPlatformService(CityPlatformService cityPlatformService) { |
| | | this.cityPlatformService = cityPlatformService; |
| | | } |
| | | // @Autowired |
| | | // public void setCityPlatformService(CityPlatformService cityPlatformService) { |
| | | // this.cityPlatformService = cityPlatformService; |
| | | // } |
| | | |
| | | @Autowired |
| | | public void setViolationsService(IViolationsService violationsService) { |
| | |
| | | } |
| | | EventAddParamDto dto = EventAddParamDto.builder().y84(baseCase.getLatitude().toString()).x84(baseCase.getLongitude().toString()) |
| | | .source(11).address(baseCase.getSite()).eventDesc(eventDesc).eventSign(baseCase.getCode()).medias(medias).build(); |
| | | ResultResponseDto<EventAddResponseDto> result = cityPlatformService.addEvent(dto); |
| | | if (result.getCode() == 0) { |
| | | EventAddResponseDto responseDto = result.getResult(); |
| | | baseCase.setTaskCode(responseDto.getTaskcode()); |
| | | this.updateById(baseCase); |
| | | return null; |
| | | } else { |
| | | return result.getMsg(); |
| | | } |
| | | // ResultResponseDto<EventAddResponseDto> result = cityPlatformService.addEvent(dto); |
| | | // if (result.getCode() == 0) { |
| | | // EventAddResponseDto responseDto = result.getResult(); |
| | | // baseCase.setTaskCode(responseDto.getTaskcode()); |
| | | // this.updateById(baseCase); |
| | | // return null; |
| | | // } else { |
| | | // return result.getMsg(); |
| | | // } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public String processEvent(Integer caseId) { |
| | | BaseCase baseCase = this.getById(caseId); |
| | | EventProcessParamDto paramDto = EventProcessParamDto.builder().eventSign(baseCase.getCode()).taskcode(baseCase.getTaskCode()).build(); |
| | | ResultResponseDto<EventProcessResponseDto> responseDto = cityPlatformService.getEventProcess(paramDto); |
| | | if (responseDto.getCode() == 0) { |
| | | EventProcessResponseDto eventProcessResponseDto = responseDto.getResult(); |
| | | /*********** 未处理市平台返回数据 ***************/ |
| | | return null; |
| | | } else { |
| | | return responseDto.getMsg(); |
| | | } |
| | | // ResultResponseDto<EventProcessResponseDto> responseDto = cityPlatformService.getEventProcess(paramDto); |
| | | // if (responseDto.getCode() == 0) { |
| | | // EventProcessResponseDto eventProcessResponseDto = responseDto.getResult(); |
| | | // /*********** 未处理市平台返回数据 ***************/ |
| | | // return null; |
| | | // } else { |
| | | // return responseDto.getMsg(); |
| | | // } |
| | | return null; |
| | | } |
| | | |
| | | @Override |