diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/workbench/controller/WorkbenchController.java b/pmapi/src/main/java/com/ningdatech/pmapi/workbench/controller/WorkbenchController.java index ae38438..26d82e2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/workbench/controller/WorkbenchController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/workbench/controller/WorkbenchController.java @@ -1,8 +1,10 @@ package com.ningdatech.pmapi.workbench.controller; +import com.ningdatech.log.annotation.WebLog; import com.ningdatech.pmapi.workbench.manage.WorkbenchManage; import com.ningdatech.pmapi.workbench.model.vo.WorkbenchVO; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -28,4 +30,10 @@ public class WorkbenchController { return workbenchManage.getWorkbenchData(year); } + @ApiOperation(value = "催办", notes = "催办") + @PostMapping("/urging/{recordId}") + @WebLog("催办") + public String urging(@PathVariable Long recordId){ + return workbenchManage.urging(recordId); + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java index b948244..c40af29 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.collect.Sets; +import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.model.PageVo; import com.ningdatech.pmapi.common.helper.UserInfoHelper; import com.ningdatech.pmapi.projectdeclared.manage.DefaultDeclaredProjectManage; @@ -29,10 +30,8 @@ import com.ningdatech.pmapi.workbench.model.vo.WorkbenchVO; import com.wflow.enums.WarningNoticeTypeEnum; import lombok.AllArgsConstructor; import org.springframework.stereotype.Component; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; + +import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ForkJoinPool; import java.util.stream.Collectors; @@ -224,4 +223,20 @@ public class WorkbenchManage { } return projectEarlyWarning; } + + /** + * 催办 + * @param recordId + * @return + */ + public String urging(Long recordId) { + WflowEarlyWarningRecords record = earlyWarningRecordsService.getById(recordId); + + VUtils.isTrue(Objects.isNull(record)) + .throwMessage("催办失败,id不存在!"); + + + + return "催办成功"; + } }