From d51f1306960d4159ec7608568b4e3b4d43cdaa04 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 24 Feb 2023 11:06:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=AE=9E=E4=BE=8B?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/OrganizationProcdefController.java | 79 ---------------------- .../organization/controller/ProcDefController.java | 77 +++++++++++++++++++++ .../controller/ProjectAdjustmentController.java | 5 -- pmapi/src/test/resources/application-dev.yml | 17 +++++ 4 files changed, 94 insertions(+), 84 deletions(-) delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/OrganizationProcdefController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/ProcDefController.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/OrganizationProcdefController.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/OrganizationProcdefController.java deleted file mode 100644 index 11a872e..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/OrganizationProcdefController.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.ningdatech.pmapi.organization.controller; - -import com.ningdatech.basic.model.PageVo; -import com.wflow.bean.dto.WflowOrgProcdefDto; -import com.wflow.bean.entity.WflowOrgModelHistorys; -import com.wflow.bean.vo.OrgProcdefVo; -import com.wflow.service.OrgProcdefService; -import com.wflow.workflow.service.OrgProcessModelService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.BeanUtils; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -/** - * @Classname OrganizationProcessController - * @Description - * @Date 2023/1/13 11:13 - * @Author PoffyZhang - */ -@Slf4j -@Validated -@RestController -@RequestMapping("/api/v1/organization/procdef") -@Api(value = "OrganizationProcdef", tags = "单位配置-流程配置") -@RequiredArgsConstructor -public class OrganizationProcdefController { - - private final OrgProcdefService orgProcdefService; - - private final OrgProcessModelService orgProcessModelService; - - @ApiOperation(value = "单位流程配置列表", notes = "单位流程配置列表") - @GetMapping("/list") - public PageVo list(@RequestParam String orgCode, @RequestParam(defaultValue = "1") Integer pageNumber, - @RequestParam(defaultValue = "10") Integer pageSize) { - return orgProcdefService.getOrgProcessByOrgCode(orgCode, pageNumber, pageSize); - } - - @ApiOperation(value = "单位流程配置详情", notes = "单位流程配置详情") - @GetMapping("/detail/{processDefId}") - public OrgProcdefVo detail(@PathVariable String processDefId) { - return orgProcessModelService.getProcess(processDefId); - } - - @ApiOperation(value = "单位流程配置保存", notes = "单位流程配置保存") - @PostMapping("/save") - public String save(@Validated @RequestBody WflowOrgProcdefDto wflowOrgProcdefDto) { - return orgProcessModelService.saveProcess(wflowOrgProcdefDto); - } - - @ApiOperation(value = "单位流程配置启用", notes = "单位流程配置启用") - @PutMapping("/enable/{processDefId}") - public String enableProcess(@PathVariable String processDefId) { - orgProcessModelService.enableProcess(processDefId, Boolean.FALSE); - return "启用成功"; - } - - @ApiOperation(value = "单位流程配置禁用", notes = "单位流程配置禁用") - @PutMapping("/disable/{processDefId}") - public String disableProcess(@PathVariable String processDefId) { - orgProcessModelService.enableProcess(processDefId, Boolean.TRUE); - return "禁用成功"; - } - - @ApiOperation(value = "单位流程配置部署", notes = "单位流程配置部署") - @PostMapping("/deploy/{processDefId}") - public String deploy(@Validated @PathVariable String processDefId) { - return orgProcessModelService.deployProcess(processDefId); - } - - @ApiOperation(value = "单位流程配置删除", notes = "单位流程配置删除") - @PostMapping("/delete/{processDefId}") - public Boolean delete(@PathVariable String processDefId) { - return orgProcessModelService.delProcess(processDefId); - } -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/ProcDefController.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/ProcDefController.java new file mode 100644 index 0000000..e36a119 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/ProcDefController.java @@ -0,0 +1,77 @@ +package com.ningdatech.pmapi.organization.controller; + +import com.ningdatech.basic.model.PageVo; +import com.wflow.bean.dto.WflowOrgProcdefDto; +import com.wflow.bean.vo.OrgProcdefVo; +import com.wflow.service.OrgProcdefService; +import com.wflow.workflow.service.OrgProcessModelService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * @Classname OrganizationProcessController + * @Description + * @Date 2023/1/13 11:13 + * @Author PoffyZhang + */ +@Slf4j +@Validated +@RestController +@RequestMapping("/api/v1/organization/procdef") +@Api(value = "OrganizationProcdef", tags = "单位配置-流程配置") +@RequiredArgsConstructor +public class ProcDefController { + + private final OrgProcdefService orgProcdefService; + + private final OrgProcessModelService orgProcessModelService; + + @ApiOperation(value = "单位流程配置列表", notes = "单位流程配置列表") + @GetMapping("/list") + public PageVo list(@RequestParam String orgCode, @RequestParam(defaultValue = "1") Integer pageNumber, + @RequestParam(defaultValue = "10") Integer pageSize) { + return orgProcdefService.getOrgProcessByOrgCode(orgCode, pageNumber, pageSize); + } + + @ApiOperation(value = "单位流程配置详情", notes = "单位流程配置详情") + @GetMapping("/detail/{processDefId}") + public OrgProcdefVo detail(@PathVariable String processDefId) { + return orgProcessModelService.getProcess(processDefId); + } + + @ApiOperation(value = "单位流程配置保存", notes = "单位流程配置保存") + @PostMapping("/save") + public String save(@Validated @RequestBody WflowOrgProcdefDto wflowOrgProcdefDto) { + return orgProcessModelService.saveProcess(wflowOrgProcdefDto); + } + + @ApiOperation(value = "单位流程配置启用", notes = "单位流程配置启用") + @PutMapping("/enable/{processDefId}") + public String enableProcess(@PathVariable String processDefId) { + orgProcessModelService.enableProcess(processDefId, Boolean.FALSE); + return "启用成功"; + } + + @ApiOperation(value = "单位流程配置禁用", notes = "单位流程配置禁用") + @PutMapping("/disable/{processDefId}") + public String disableProcess(@PathVariable String processDefId) { + orgProcessModelService.enableProcess(processDefId, Boolean.TRUE); + return "禁用成功"; + } + + @ApiOperation(value = "单位流程配置部署", notes = "单位流程配置部署") + @PostMapping("/deploy/{processDefId}") + public String deploy(@Validated @PathVariable String processDefId) { + return orgProcessModelService.deployProcess(processDefId); + } + + @ApiOperation(value = "单位流程配置删除", notes = "单位流程配置删除") + @PostMapping("/delete/{processDefId}") + public Boolean delete(@PathVariable String processDefId) { + return orgProcessModelService.delProcess(processDefId); + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ProjectAdjustmentController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ProjectAdjustmentController.java index 2c03574..1bbb63f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ProjectAdjustmentController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ProjectAdjustmentController.java @@ -4,15 +4,12 @@ import com.ningdatech.basic.model.PageVo; import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO; import com.ningdatech.pmapi.projectdeclared.model.req.AdjustmentListReq; import com.ningdatech.pmapi.projectdeclared.manage.ProjectAdjustmentManage; -import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; -import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.BeanUtils; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -34,8 +31,6 @@ public class ProjectAdjustmentController { private final ProjectAdjustmentManage projectAdjustmentManage; - private final ProjectLibManage projectLibManage; - @ApiOperation(value = "可做项目内容调整的列表", notes = "可做项目内容调整的列表") @GetMapping("/list") public PageVo list(@Validated @ModelAttribute AdjustmentListReq preReq) { diff --git a/pmapi/src/test/resources/application-dev.yml b/pmapi/src/test/resources/application-dev.yml index 7260845..b725afa 100644 --- a/pmapi/src/test/resources/application-dev.yml +++ b/pmapi/src/test/resources/application-dev.yml @@ -102,10 +102,27 @@ logging: root: info file: path: logs + nd: log: enabled: true type: DB + cache: + type: REDIS + serializerType: ProtoStuff + cacheNullVal: true + def: + keyPrefix: pm + # 文件存储 + file: + storage-type: ALI_OSS + ali: + protocol: https:// + bucket: devplat + urlPrefix: oss-cn-hangzhou.aliyuncs.com + endpoint: oss-cn-hangzhou.aliyuncs.com + accessKeyId: LTAI4GL7uypycnBjiRn55rMG + accessKeySecret: qwYC7bW9bkStsko7qkLVnToAzj0Y98 # 日志文件配置 log: path: ./logs