| | |
| | | import org.sxkj.gd.workorder.param.GdClueEventRejectParam; |
| | | import org.sxkj.gd.workorder.service.IGdClueEventService; |
| | | import org.sxkj.gd.workorder.service.IGdTaskResultService; |
| | | import org.sxkj.gd.workorder.vo.GdClueEventCountVO; |
| | | import org.sxkj.gd.workorder.vo.GdClueEventListVO; |
| | | import org.sxkj.gd.workorder.vo.GdClueEventVO; |
| | | import org.sxkj.gd.utils.GdGeoAddressUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | |
| | | if (detail == null) { |
| | | throw new RuntimeException("事件不存在"); |
| | | } |
| | | String address = GdGeoAddressUtil.getFormattedAddress(detail.getLongitude(), detail.getLatitude()); |
| | | if (StringUtil.isNotBlank(address)) { |
| | | detail.setEventLocation(address); |
| | | } |
| | | return detail; |
| | | } |
| | | |
| | | @Override |
| | | public GdClueEventCountVO getGdClueEventCount() { |
| | | Long deptId = Long.valueOf(AuthUtil.getDeptId()); |
| | | Long userId = AuthUtil.getUserId(); |
| | | GdClueEventCountVO countVO = baseMapper.selectGdClueEventCount(deptId, userId); |
| | | if (countVO == null) { |
| | | GdClueEventCountVO empty = new GdClueEventCountVO(); |
| | | empty.setTotalCount(0L); |
| | | empty.setMyCount(0L); |
| | | return empty; |
| | | } |
| | | return countVO; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean distributeClueEvent(GdClueEventDistributeParam distributeParam) { |
| | | GdTaskResultEntity taskResult = gdTaskResultService.getById(distributeParam.getResultId()); |