Compare commits
No commits in common. "9b61650fef9761b510f79b2a6dfafb319254565e" and "18447d04df80c57fb86f9f7181fe92ce9ebdba1f" have entirely different histories.
9b61650fef
...
18447d04df
@ -7,8 +7,6 @@ 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;
|
||||
@ -29,9 +27,6 @@ public class BpmOAProcureController {
|
||||
@Resource
|
||||
private BpmOAProcureService bpmOaProcureService;
|
||||
|
||||
@Resource
|
||||
private ProjectApi projectApi;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建OA 采购申请")
|
||||
// @PreAuthorize("@ss.hasPermission('bpm:oa-procure:create')")
|
||||
@ -62,13 +57,7 @@ public class BpmOAProcureController {
|
||||
// @PreAuthorize("@ss.hasPermission('bpm:oa-procure:query')")
|
||||
public CommonResult<BpmOAProcureRespVO> getOaProcure(@RequestParam("id") Long id) {
|
||||
BpmOAProcureDO oaProcure = bpmOaProcureService.getOaProcure(id);
|
||||
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);
|
||||
return success(BpmOAProcureConvert.INSTANCE.convert(oaProcure));
|
||||
}
|
||||
|
||||
|
||||
@ -85,13 +74,7 @@ public class BpmOAProcureController {
|
||||
public CommonResult<BpmOAProcureRespVO> getByProcessInstanceId(@RequestParam("processInstanceId") String processInstanceId) {
|
||||
|
||||
BpmOAProcureDO oaProcure = bpmOaProcureService.getByProcessInstanceId(processInstanceId);
|
||||
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);
|
||||
return success(BpmOAProcureConvert.INSTANCE.convert(oaProcure));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,9 +10,7 @@ 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.*;
|
||||
|
||||
@ -54,7 +52,7 @@ public class BpmOAReimbursementController {
|
||||
|
||||
BpmOAReimbursementDO reimbursement = service.getReimbursement(id);
|
||||
BpmOAReimbursementRespVO respVO = service.convert(reimbursement);
|
||||
if (respVO != null && StringUtil.isNotEmpty(respVO.getProjectNo())) {
|
||||
if (respVO != null && Strings.isNotEmpty(respVO.getProjectNo())) {
|
||||
// 设置项目名称
|
||||
ProjectDTO projectDTO = projectApi.getProject(respVO.getProjectNo()).getCheckedData();
|
||||
respVO.setProjectName(projectDTO.getName());
|
||||
@ -77,7 +75,7 @@ public class BpmOAReimbursementController {
|
||||
|
||||
BpmOAReimbursementDO reimbursement = service.getByProcessInstanceId(processInstanceId);
|
||||
BpmOAReimbursementRespVO respVO = service.convert(reimbursement);
|
||||
if (respVO != null && StringUtil.isNotEmpty(respVO.getProjectNo())) {
|
||||
if (respVO != null && Strings.isNotEmpty(respVO.getProjectNo())) {
|
||||
// 设置项目名称
|
||||
ProjectDTO projectDTO = projectApi.getProject(respVO.getProjectNo()).getCheckedData();
|
||||
respVO.setProjectName(projectDTO.getName());
|
||||
|
@ -22,12 +22,6 @@ 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,9 +21,6 @@ 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,10 +49,6 @@ public class BpmOAProcureDO extends BaseDO {
|
||||
* 申请人的用户编号
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
private String projectNo;
|
||||
/**
|
||||
* 申请事由
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user