| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.sxkj.common.constant.WordOrderConstant; |
| | |
| | | * @author lw |
| | | * @since 2026-01-14 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class GdClueEventServiceImpl extends BaseServiceImpl<GdClueEventMapper, GdClueEventEntity> implements IGdClueEventService { |
| | |
| | | throw new RuntimeException("事件不存在"); |
| | | } |
| | | String address = GdGeoAddressUtil.getFormattedAddress(detail.getLongitude(), detail.getLatitude()); |
| | | log.info("地址:{}", address); |
| | | if (StringUtil.isNotBlank(address)) { |
| | | detail.setEventLocation(address); |
| | | } |
| | |
| | | clueEvent.setCreateUser(AuthUtil.getUserId()); |
| | | clueEvent.setCreateDept(Long.valueOf(AuthUtil.getDeptId())); |
| | | clueEvent.setCreateTime(new Date()); |
| | | clueEvent.setEventName(distributeParam.getEventName()); |
| | | if (!save(clueEvent)) { |
| | | throw new RuntimeException("事件分发失败"); |
| | | } |
| | | taskResult.setDistributeStatus(1); |
| | | taskResult.setUpdateUser(AuthUtil.getUserId()); |
| | | taskResult.setUpdateTime(new Date()); |
| | | if (!gdTaskResultService.updateById(taskResult)) { |
| | | if (!gdTaskResultService.updateTaskResultById(taskResult)) { |
| | | throw new RuntimeException("成果状态更新失败"); |
| | | } |
| | | return true; |
| | |
| | | if (taskResult == null || (taskResult.getIsDeleted() != null && taskResult.getIsDeleted() != 0)) { |
| | | throw new RuntimeException("成果不存在"); |
| | | } |
| | | // 使用XML方式更新成果信息(更新所有字段) |
| | | taskResult.setDistributeStatus(targetStatus); |
| | | taskResult.setUpdateUser(AuthUtil.getUserId()); |
| | | taskResult.setUpdateTime(new Date()); |
| | | if (!gdTaskResultService.updateById(taskResult)) { |
| | | if (!gdTaskResultService.updateTaskResultById(taskResult)) { |
| | | throw new RuntimeException("成果状态更新失败"); |
| | | } |
| | | return true; |