Compare commits
3 Commits
18447d04df
...
9b61650fef
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9b61650fef | ||
![]() |
973f7e4bcf | ||
![]() |
1d80ee957e |
@ -7,6 +7,8 @@ import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.procure.BpmOAProcureSa
|
||||
import cn.iocoder.yudao.module.bpm.convert.oa.BpmOAProcureConvert;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAProcureDO;
|
||||
import cn.iocoder.yudao.module.bpm.service.oa.BpmOAProcureService;
|
||||
import cn.iocoder.yudao.module.system.api.project.ProjectApi;
|
||||
import cn.iocoder.yudao.module.system.api.project.dto.ProjectDTO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -27,6 +29,9 @@ public class BpmOAProcureController {
|
||||
@Resource
|
||||
private BpmOAProcureService bpmOaProcureService;
|
||||
|
||||
@Resource
|
||||
private ProjectApi projectApi;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建OA 采购申请")
|
||||
// @PreAuthorize("@ss.hasPermission('bpm:oa-procure:create')")
|
||||
@ -57,7 +62,13 @@ public class BpmOAProcureController {
|
||||
// @PreAuthorize("@ss.hasPermission('bpm:oa-procure:query')")
|
||||
public CommonResult<BpmOAProcureRespVO> getOaProcure(@RequestParam("id") Long id) {
|
||||
BpmOAProcureDO oaProcure = bpmOaProcureService.getOaProcure(id);
|
||||
return success(BpmOAProcureConvert.INSTANCE.convert(oaProcure));
|
||||
BpmOAProcureRespVO respVO = BpmOAProcureConvert.INSTANCE.convert(oaProcure);
|
||||
if (respVO != null && respVO.getProjectNo() != null) {
|
||||
ProjectDTO projectDTO = projectApi.getProject(respVO.getProjectNo()).getCheckedData();
|
||||
respVO.setProjectName(projectDTO.getName());
|
||||
}
|
||||
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
|
||||
@ -74,7 +85,13 @@ public class BpmOAProcureController {
|
||||
public CommonResult<BpmOAProcureRespVO> getByProcessInstanceId(@RequestParam("processInstanceId") String processInstanceId) {
|
||||
|
||||
BpmOAProcureDO oaProcure = bpmOaProcureService.getByProcessInstanceId(processInstanceId);
|
||||
return success(BpmOAProcureConvert.INSTANCE.convert(oaProcure));
|
||||
BpmOAProcureRespVO respVO = BpmOAProcureConvert.INSTANCE.convert(oaProcure);
|
||||
if (respVO != null && respVO.getProjectNo() != null) {
|
||||
ProjectDTO projectDTO = projectApi.getProject(respVO.getProjectNo()).getCheckedData();
|
||||
respVO.setProjectName(projectDTO.getName());
|
||||
}
|
||||
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,9 @@ import cn.iocoder.yudao.module.system.api.project.dto.ProjectDTO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jodd.util.StringUtil;
|
||||
import org.mapstruct.ap.internal.util.Strings;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -52,7 +54,7 @@ public class BpmOAReimbursementController {
|
||||
|
||||
BpmOAReimbursementDO reimbursement = service.getReimbursement(id);
|
||||
BpmOAReimbursementRespVO respVO = service.convert(reimbursement);
|
||||
if (respVO != null && Strings.isNotEmpty(respVO.getProjectNo())) {
|
||||
if (respVO != null && StringUtil.isNotEmpty(respVO.getProjectNo())) {
|
||||
// 设置项目名称
|
||||
ProjectDTO projectDTO = projectApi.getProject(respVO.getProjectNo()).getCheckedData();
|
||||
respVO.setProjectName(projectDTO.getName());
|
||||
@ -75,7 +77,7 @@ public class BpmOAReimbursementController {
|
||||
|
||||
BpmOAReimbursementDO reimbursement = service.getByProcessInstanceId(processInstanceId);
|
||||
BpmOAReimbursementRespVO respVO = service.convert(reimbursement);
|
||||
if (respVO != null && Strings.isNotEmpty(respVO.getProjectNo())) {
|
||||
if (respVO != null && StringUtil.isNotEmpty(respVO.getProjectNo())) {
|
||||
// 设置项目名称
|
||||
ProjectDTO projectDTO = projectApi.getProject(respVO.getProjectNo()).getCheckedData();
|
||||
respVO.setProjectName(projectDTO.getName());
|
||||
|
@ -22,6 +22,12 @@ public class BpmOAProcureRespVO {
|
||||
@Schema(description = "申请人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "26976")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "项目编号", example = "26976")
|
||||
private String projectNo;
|
||||
|
||||
@Schema(description = "项目名称", example = "26976")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "申请事由", example = "不喜欢")
|
||||
private String reason;
|
||||
|
||||
|
@ -21,6 +21,9 @@ public class BpmOAProcureSaveReqVO {
|
||||
@Schema(description = "申请人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "26976")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "项目编号", example = "26976")
|
||||
private String projectNo;
|
||||
|
||||
@Schema(description = "申请事由", example = "不喜欢")
|
||||
private String reason;
|
||||
|
||||
|
@ -49,6 +49,10 @@ public class BpmOAProcureDO extends BaseDO {
|
||||
* 申请人的用户编号
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
private String projectNo;
|
||||
/**
|
||||
* 申请事由
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user