feat: 通用草稿办理接口

This commit is contained in:
2024-07-10 17:17:33 +08:00
parent 10bb8408e2
commit bb572ededd
2 changed files with 17 additions and 3 deletions
@@ -8,7 +8,10 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@@ -41,5 +44,17 @@ public class ESProcessCommonController {
}
/**
* 草稿办理
* @param draftId
*/
@AutoLog(value = "草稿办理")
@ApiOperation(value="草稿办理", notes="草稿办理")
@GetMapping("/draftHandle")
@Translation
public Result<?> draftHandle(@RequestParam("draftId") @ApiParam("草稿Id") String draftId) {
return Result.OK(actFlowCommonService.getExistDraft(draftId));
}
}
@@ -323,10 +323,9 @@ public class ActFlowCommonService {
return standTypeVO;
}
public ProcessDraft getExistDraft(String draftId, ProcessTypeEnum processTypeEnum) {
public ProcessDraft getExistDraft(String draftId) {
String userId = UserUtils.getUserId();
LambdaQueryWrapper<ProcessDraft> draftWrapper = new LambdaQueryWrapper<>();
draftWrapper.eq(ProcessDraft::getPrcType, processTypeEnum.getValue());
draftWrapper.eq(ProcessDraft::getUserId, userId);
draftWrapper.eq(ProcessDraft::getId, draftId);
return processDraftService.getOne(draftWrapper);