forked from sfms3.0/sfms3.0
1416 changed files with 24817 additions and 24996 deletions
@ -1,79 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition; |
|||
|
|||
import com.win.module.bpm.controller.admin.definition.vo.form.*; |
|||
import com.win.module.bpm.convert.definition.BpmFormConvert; |
|||
import com.win.module.bpm.dal.dataobject.definition.BpmFormDO; |
|||
import com.win.module.bpm.service.definition.BpmFormService; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 动态表单") |
|||
@RestController |
|||
@RequestMapping("/bpm/form") |
|||
@Validated |
|||
public class BpmFormController { |
|||
|
|||
@Resource |
|||
private BpmFormService formService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建动态表单") |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:create')") |
|||
public CommonResult<Long> createForm(@Valid @RequestBody BpmFormCreateReqVO createReqVO) { |
|||
return success(formService.createForm(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新动态表单") |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:update')") |
|||
public CommonResult<Boolean> updateForm(@Valid @RequestBody BpmFormUpdateReqVO updateReqVO) { |
|||
formService.updateForm(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除动态表单") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:delete')") |
|||
public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) { |
|||
formService.deleteForm(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得动态表单") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:query')") |
|||
public CommonResult<BpmFormRespVO> getForm(@RequestParam("id") Long id) { |
|||
BpmFormDO form = formService.getForm(id); |
|||
return success(BpmFormConvert.INSTANCE.convert(form)); |
|||
} |
|||
|
|||
@GetMapping("/list-all-simple") |
|||
@Operation(summary = "获得动态表单的精简列表", description = "用于表单下拉框") |
|||
public CommonResult<List<BpmFormSimpleRespVO>> getSimpleForms() { |
|||
List<BpmFormDO> list = formService.getFormList(); |
|||
return success(BpmFormConvert.INSTANCE.convertList2(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得动态表单分页") |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:query')") |
|||
public CommonResult<PageResult<BpmFormRespVO>> getFormPage(@Valid BpmFormPageReqVO pageVO) { |
|||
PageResult<BpmFormDO> pageResult = formService.getFormPage(pageVO); |
|||
return success(BpmFormConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
} |
@ -1,97 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.util.io.IoUtils; |
|||
import com.win.module.bpm.controller.admin.definition.vo.model.*; |
|||
import com.win.module.bpm.convert.definition.BpmModelConvert; |
|||
import com.win.module.bpm.service.definition.BpmModelService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
|
|||
import java.io.IOException; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 流程模型") |
|||
@RestController |
|||
@RequestMapping("/bpm/model") |
|||
@Validated |
|||
public class BpmModelController { |
|||
|
|||
@Resource |
|||
private BpmModelService modelService; |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得模型分页") |
|||
public CommonResult<PageResult<BpmModelPageItemRespVO>> getModelPage(BpmModelPageReqVO pageVO) { |
|||
return success(modelService.getModelPage(pageVO)); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得模型") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:query')") |
|||
public CommonResult<BpmModelRespVO> getModel(@RequestParam("id") String id) { |
|||
BpmModelRespVO model = modelService.getModel(id); |
|||
return success(model); |
|||
} |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "新建模型") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:create')") |
|||
public CommonResult<String> createModel(@Valid @RequestBody BpmModelCreateReqVO createRetVO) { |
|||
return success(modelService.createModel(createRetVO, null)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "修改模型") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:update')") |
|||
public CommonResult<Boolean> updateModel(@Valid @RequestBody BpmModelUpdateReqVO modelVO) { |
|||
modelService.updateModel(modelVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@PostMapping("/import") |
|||
@Operation(summary = "导入模型") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:import')") |
|||
public CommonResult<String> importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException { |
|||
BpmModelCreateReqVO createReqVO = BpmModelConvert.INSTANCE.convert(importReqVO); |
|||
// 读取文件
|
|||
String bpmnXml = IoUtils.readUtf8(importReqVO.getBpmnFile().getInputStream(), false); |
|||
return success(modelService.createModel(createReqVO, bpmnXml)); |
|||
} |
|||
|
|||
@PostMapping("/deploy") |
|||
@Operation(summary = "部署模型") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:deploy')") |
|||
public CommonResult<Boolean> deployModel(@RequestParam("id") String id) { |
|||
modelService.deployModel(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@PutMapping("/update-state") |
|||
@Operation(summary = "修改模型的状态", description = "实际更新的部署的流程定义的状态") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:update')") |
|||
public CommonResult<Boolean> updateModelState(@Valid @RequestBody BpmModelUpdateStateReqVO reqVO) { |
|||
modelService.updateModelState(reqVO.getId(), reqVO.getState()); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除模型") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:delete')") |
|||
public CommonResult<Boolean> deleteModel(@RequestParam("id") String id) { |
|||
modelService.deleteModel(id); |
|||
return success(true); |
|||
} |
|||
} |
@ -1,59 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionListReqVO; |
|||
import com.win.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageItemRespVO; |
|||
import com.win.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionPageReqVO; |
|||
import com.win.module.bpm.controller.admin.definition.vo.process.BpmProcessDefinitionRespVO; |
|||
import com.win.module.bpm.service.definition.BpmProcessDefinitionService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
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; |
|||
|
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 流程定义") |
|||
@RestController |
|||
@RequestMapping("/bpm/process-definition") |
|||
@Validated |
|||
public class BpmProcessDefinitionController { |
|||
|
|||
@Resource |
|||
private BpmProcessDefinitionService bpmDefinitionService; |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得流程定义分页") |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") |
|||
public CommonResult<PageResult<BpmProcessDefinitionPageItemRespVO>> getProcessDefinitionPage( |
|||
BpmProcessDefinitionPageReqVO pageReqVO) { |
|||
return success(bpmDefinitionService.getProcessDefinitionPage(pageReqVO)); |
|||
} |
|||
|
|||
@GetMapping ("/list") |
|||
@Operation(summary = "获得流程定义列表") |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") |
|||
public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList( |
|||
BpmProcessDefinitionListReqVO listReqVO) { |
|||
return success(bpmDefinitionService.getProcessDefinitionList(listReqVO)); |
|||
} |
|||
|
|||
@GetMapping ("/get-bpmn-xml") |
|||
@Operation(summary = "获得流程定义的 BPMN XML") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") |
|||
public CommonResult<String> getProcessDefinitionBpmnXML(@RequestParam("id") String id) { |
|||
String bpmnXML = bpmDefinitionService.getProcessDefinitionBpmnXML(id); |
|||
return success(bpmnXML); |
|||
} |
|||
} |
@ -1,58 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleCreateReqVO; |
|||
import com.win.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleRespVO; |
|||
import com.win.module.bpm.controller.admin.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; |
|||
import com.win.module.bpm.service.definition.BpmTaskAssignRuleService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 任务分配规则") |
|||
@RestController |
|||
@RequestMapping("/bpm/task-assign-rule") |
|||
@Validated |
|||
public class BpmTaskAssignRuleController { |
|||
|
|||
@Resource |
|||
private BpmTaskAssignRuleService taskAssignRuleService; |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得任务分配规则列表") |
|||
@Parameters({ |
|||
@Parameter(name = "modelId", description = "模型编号", example = "1024"), |
|||
@Parameter(name = "processDefinitionId", description = "流程定义的编号", example = "2048") |
|||
}) |
|||
@PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:query')") |
|||
public CommonResult<List<BpmTaskAssignRuleRespVO>> getTaskAssignRuleList( |
|||
@RequestParam(value = "modelId", required = false) String modelId, |
|||
@RequestParam(value = "processDefinitionId", required = false) String processDefinitionId) { |
|||
return success(taskAssignRuleService.getTaskAssignRuleList(modelId, processDefinitionId)); |
|||
} |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建任务分配规则") |
|||
@PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:create')") |
|||
public CommonResult<Long> createTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleCreateReqVO reqVO) { |
|||
return success(taskAssignRuleService.createTaskAssignRule(reqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新任务分配规则") |
|||
@PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:update')") |
|||
public CommonResult<Boolean> updateTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleUpdateReqVO reqVO) { |
|||
taskAssignRuleService.updateTaskAssignRule(reqVO); |
|||
return success(true); |
|||
} |
|||
} |
@ -1,85 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition; |
|||
|
|||
import com.win.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO; |
|||
import com.win.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; |
|||
import com.win.module.bpm.controller.admin.definition.vo.group.BpmUserGroupRespVO; |
|||
import com.win.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; |
|||
import com.win.module.bpm.convert.definition.BpmUserGroupConvert; |
|||
import com.win.module.bpm.dal.dataobject.definition.BpmUserGroupDO; |
|||
import com.win.module.bpm.service.definition.BpmUserGroupService; |
|||
import com.win.framework.common.enums.CommonStatusEnum; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 用户组") |
|||
@RestController |
|||
@RequestMapping("/bpm/user-group") |
|||
@Validated |
|||
public class BpmUserGroupController { |
|||
|
|||
@Resource |
|||
private BpmUserGroupService userGroupService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建用户组") |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:create')") |
|||
public CommonResult<Long> createUserGroup(@Valid @RequestBody BpmUserGroupCreateReqVO createReqVO) { |
|||
return success(userGroupService.createUserGroup(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新用户组") |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:update')") |
|||
public CommonResult<Boolean> updateUserGroup(@Valid @RequestBody BpmUserGroupUpdateReqVO updateReqVO) { |
|||
userGroupService.updateUserGroup(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除用户组") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:delete')") |
|||
public CommonResult<Boolean> deleteUserGroup(@RequestParam("id") Long id) { |
|||
userGroupService.deleteUserGroup(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得用户组") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:query')") |
|||
public CommonResult<BpmUserGroupRespVO> getUserGroup(@RequestParam("id") Long id) { |
|||
BpmUserGroupDO userGroup = userGroupService.getUserGroup(id); |
|||
return success(BpmUserGroupConvert.INSTANCE.convert(userGroup)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得用户组分页") |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:query')") |
|||
public CommonResult<PageResult<BpmUserGroupRespVO>> getUserGroupPage(@Valid BpmUserGroupPageReqVO pageVO) { |
|||
PageResult<BpmUserGroupDO> pageResult = userGroupService.getUserGroupPage(pageVO); |
|||
return success(BpmUserGroupConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/list-all-simple") |
|||
@Operation(summary = "获取用户组精简信息列表", description = "只包含被开启的用户组,主要用于前端的下拉选项") |
|||
public CommonResult<List<BpmUserGroupRespVO>> getSimpleUserGroups() { |
|||
// 获用户门列表,只要开启状态的
|
|||
List<BpmUserGroupDO> list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus()); |
|||
// 排序后,返回给前端
|
|||
return success(BpmUserGroupConvert.INSTANCE.convertList2(list)); |
|||
} |
|||
|
|||
} |
@ -1,24 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.form; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import javax.validation.constraints.*; |
|||
|
|||
/** |
|||
* 动态表单 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BpmFormBaseVO { |
|||
|
|||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotNull(message = "表单名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "表单状态-参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "表单状态不能为空") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "备注", example = "我是备注") |
|||
private String remark; |
|||
|
|||
} |
@ -1,22 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.form; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.List; |
|||
|
|||
@Schema(description = "管理后台 - 动态表单创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmFormCreateReqVO extends BpmFormBaseVO { |
|||
|
|||
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单的配置不能为空") |
|||
private String conf; |
|||
|
|||
@Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单项的数组不能为空") |
|||
private List<String> fields; |
|||
|
|||
} |
@ -1,18 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.form; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 动态表单分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmFormPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "表单名称", example = "闻荫") |
|||
private String name; |
|||
|
|||
} |
@ -1,31 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.form; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.time.LocalDateTime; |
|||
import java.util.List; |
|||
|
|||
@Schema(description = "管理后台 - 动态表单 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmFormRespVO extends BpmFormBaseVO { |
|||
|
|||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单的配置不能为空") |
|||
private String conf; |
|||
|
|||
@Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单项的数组不能为空") |
|||
private List<String> fields; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -1,16 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.form; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
@Schema(description = "管理后台 - 流程表单精简 Response VO") |
|||
@Data |
|||
public class BpmFormSimpleRespVO { |
|||
|
|||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
private String name; |
|||
|
|||
} |
@ -1,25 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.form; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import javax.validation.constraints.*; |
|||
import java.util.List; |
|||
|
|||
@Schema(description = "管理后台 - 动态表单更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmFormUpdateReqVO extends BpmFormBaseVO { |
|||
|
|||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotNull(message = "表单编号不能为空") |
|||
private Long id; |
|||
|
|||
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单的配置不能为空") |
|||
private String conf; |
|||
|
|||
@Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单项的数组不能为空") |
|||
private List<String> fields; |
|||
|
|||
} |
@ -1,32 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.group; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 用户组 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BpmUserGroupBaseVO { |
|||
|
|||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotNull(message = "组名不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫源码") |
|||
@NotNull(message = "描述不能为空") |
|||
private String description; |
|||
|
|||
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3") |
|||
@NotNull(message = "成员编号数组不能为空") |
|||
private Set<Long> memberUserIds; |
|||
|
|||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "状态不能为空") |
|||
private Integer status; |
|||
|
|||
} |
@ -1,11 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.group; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 用户组创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmUserGroupCreateReqVO extends BpmUserGroupBaseVO { |
|||
|
|||
} |
@ -1,29 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.group; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import com.win.framework.common.util.date.DateUtils; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 用户组分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmUserGroupPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "组名", example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "状态", example = "1") |
|||
private Integer status; |
|||
|
|||
@DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime[] createTime; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.group; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 用户组 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmUserGroupRespVO extends BpmUserGroupBaseVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.group; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
@Schema(description = "管理后台 - 用户组精简信息 Response VO") |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class BpmUserGroupSimpleRespVO { |
|||
|
|||
@Schema(description = "用户组编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "用户组名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
private String name; |
|||
|
|||
} |
@ -1,17 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.group; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import javax.validation.constraints.*; |
|||
|
|||
@Schema(description = "管理后台 - 用户组更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotNull(message = "编号不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -1,21 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的导入 Request VO 相比流程模型的新建来说,只是多了一个 bpmnFile 文件") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmModeImportReqVO extends BpmModelCreateReqVO { |
|||
|
|||
@Schema(description = "BPMN 文件", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "BPMN 文件不能为空") |
|||
private MultipartFile bpmnFile; |
|||
|
|||
} |
@ -1,40 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.model; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
/** |
|||
* 流程模型 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BpmModelBaseVO { |
|||
|
|||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_win") |
|||
@NotEmpty(message = "流程标识不能为空") |
|||
private String key; |
|||
|
|||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotEmpty(message = "流程名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程描述", example = "我是描述") |
|||
private String description; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") |
|||
@NotEmpty(message = "流程分类不能为空") |
|||
private String category; |
|||
|
|||
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") |
|||
private Integer formType; |
|||
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") |
|||
private Long formId; |
|||
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/create") |
|||
private String formCustomCreatePath; |
|||
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/view") |
|||
private String formCustomViewPath; |
|||
|
|||
} |
@ -1,25 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的创建 Request VO") |
|||
@Data |
|||
public class BpmModelCreateReqVO { |
|||
|
|||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_win") |
|||
@NotEmpty(message = "流程标识不能为空") |
|||
private String key; |
|||
|
|||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotEmpty(message = "流程名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程描述", example = "我是描述") |
|||
private String description; |
|||
|
|||
} |
@ -1,48 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的分页的每一项 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmModelPageItemRespVO extends BpmModelBaseVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "表单名字", example = "请假表单") |
|||
private String formName; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** |
|||
* 最新部署的流程定义 |
|||
*/ |
|||
private ProcessDefinition processDefinition; |
|||
|
|||
@Schema(description = "流程定义") |
|||
@Data |
|||
public static class ProcessDefinition { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer version; |
|||
|
|||
@Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime deploymentTime; |
|||
|
|||
@Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer suspensionState; |
|||
|
|||
} |
|||
|
|||
} |
@ -1,25 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.model; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
|
|||
@Schema(description = "管理后台 - 流程模型分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmModelPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "标识-精准匹配", example = "process1641042089407") |
|||
private String key; |
|||
|
|||
@Schema(description = "名字-模糊匹配", example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") |
|||
private String category; |
|||
|
|||
} |
@ -1,25 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmModelRespVO extends BpmModelBaseVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String bpmnXml; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -1,39 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的更新 Request VO") |
|||
@Data |
|||
public class BpmModelUpdateReqVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotEmpty(message = "编号不能为空") |
|||
private String id; |
|||
|
|||
@Schema(description = "流程名称", example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程描述", example = "我是描述") |
|||
private String description; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") |
|||
private String category; |
|||
|
|||
@Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String bpmnXml; |
|||
|
|||
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") |
|||
private Integer formType; |
|||
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") |
|||
private Long formId; |
|||
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/create") |
|||
private String formCustomCreatePath; |
|||
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/view") |
|||
private String formCustomViewPath; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型更新状态 Request VO") |
|||
@Data |
|||
public class BpmModelUpdateStateReqVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotNull(message = "编号不能为空") |
|||
private String id; |
|||
|
|||
@Schema(description = "状态-见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "状态不能为空") |
|||
private Integer state; |
|||
|
|||
} |
@ -1,18 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.process; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 流程定义列表 Request VO") |
|||
@Data |
|||
@ToString(callSuper = true) |
|||
@EqualsAndHashCode(callSuper = true) |
|||
public class BpmProcessDefinitionListReqVO extends PageParam { |
|||
|
|||
@Schema(description = "中断状态-参见 SuspensionState 枚举", example = "1") |
|||
private Integer suspensionState; |
|||
|
|||
} |
@ -1,22 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.process; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 流程定义的分页的每一项 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionRespVO { |
|||
|
|||
@Schema(description = "表单名字", example = "请假表单") |
|||
private String formName; |
|||
|
|||
@Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime deploymentTime; |
|||
|
|||
} |
@ -1,18 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.process; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 流程定义分页 Request VO") |
|||
@Data |
|||
@ToString(callSuper = true) |
|||
@EqualsAndHashCode(callSuper = true) |
|||
public class BpmProcessDefinitionPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "标识-精准匹配", example = "process1641042089407") |
|||
private String key; |
|||
|
|||
} |
@ -1,48 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.process; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
import java.util.List; |
|||
|
|||
@Schema(description = "管理后台 - 流程定义 Response VO") |
|||
@Data |
|||
public class BpmProcessDefinitionRespVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer version; |
|||
|
|||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotEmpty(message = "流程名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程描述", example = "我是描述") |
|||
private String description; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") |
|||
@NotEmpty(message = "流程分类不能为空") |
|||
private String category; |
|||
|
|||
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") |
|||
private Integer formType; |
|||
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") |
|||
private Long formId; |
|||
@Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String formConf; |
|||
@Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private List<String> formFields; |
|||
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/create") |
|||
private String formCustomCreatePath; |
|||
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/view") |
|||
private String formCustomViewPath; |
|||
|
|||
@Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer suspensionState; |
|||
|
|||
} |
@ -1,24 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.rule; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 流程任务分配规则 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BpmTaskAssignRuleBaseVO { |
|||
|
|||
@Schema(description = "规则类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "bpm_task_assign_rule_type") |
|||
@NotNull(message = "规则类型不能为空") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "规则值数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3") |
|||
@NotNull(message = "规则值数组不能为空") |
|||
private Set<Long> options; |
|||
|
|||
} |
@ -1,24 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.rule; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务分配规则的创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO { |
|||
|
|||
@Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotEmpty(message = "流程模型的编号不能为空") |
|||
private String modelId; |
|||
|
|||
@Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
|||
@NotEmpty(message = "流程任务定义的编号不能为空") |
|||
private String taskDefinitionKey; |
|||
|
|||
} |
@ -1,28 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.rule; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务分配规则的 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO { |
|||
|
|||
@Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
|||
private String modelId; |
|||
|
|||
@Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") |
|||
private String processDefinitionId; |
|||
|
|||
@Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
|||
private String taskDefinitionKey; |
|||
@Schema(description = "流程任务定义的名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "关注闻荫") |
|||
private String taskDefinitionName; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.definition.vo.rule; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务分配规则的更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO { |
|||
|
|||
@Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotNull(message = "任务分配规则的编号不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -1,63 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.oa; |
|||
|
|||
import com.win.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO; |
|||
import com.win.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO; |
|||
import com.win.module.bpm.controller.admin.oa.vo.BpmOALeaveRespVO; |
|||
import com.win.module.bpm.convert.oa.BpmOALeaveConvert; |
|||
import com.win.module.bpm.dal.dataobject.oa.BpmOALeaveDO; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.bpm.service.oa.BpmOALeaveService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
import static com.win.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
|||
|
|||
/** |
|||
* OA 请假申请 Controller,用于演示自己存储数据,接入工作流的例子 |
|||
* |
|||
* @author jason |
|||
* @author 闻荫源码 |
|||
*/ |
|||
@Tag(name = "管理后台 - OA 请假申请") |
|||
@RestController |
|||
@RequestMapping("/bpm/oa/leave") |
|||
@Validated |
|||
public class BpmOALeaveController { |
|||
|
|||
@Resource |
|||
private BpmOALeaveService leaveService; |
|||
|
|||
@PostMapping("/create") |
|||
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:create')") |
|||
@Operation(summary = "创建请求申请") |
|||
public CommonResult<Long> createLeave(@Valid @RequestBody BpmOALeaveCreateReqVO createReqVO) { |
|||
return success(leaveService.createLeave(getLoginUserId(), createReqVO)); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") |
|||
@Operation(summary = "获得请假申请") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
public CommonResult<BpmOALeaveRespVO> getLeave(@RequestParam("id") Long id) { |
|||
BpmOALeaveDO leave = leaveService.getLeave(id); |
|||
return success(BpmOALeaveConvert.INSTANCE.convert(leave)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") |
|||
@Operation(summary = "获得请假申请分页") |
|||
public CommonResult<PageResult<BpmOALeaveRespVO>> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) { |
|||
PageResult<BpmOALeaveDO> pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO); |
|||
return success(BpmOALeaveConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
} |
@ -1,5 +0,0 @@ |
|||
/** |
|||
* OA 示例,用于演示外部业务接入 BPM 工作流的示例 |
|||
* 一般的接入方式,只需要调用 接口,后续 Admin 用户在管理后台的【待办事务】进行审批 |
|||
*/ |
|||
package com.win.module.bpm.controller.admin.oa; |
@ -1,33 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.oa.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.time.LocalDateTime; |
|||
import javax.validation.constraints.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
/** |
|||
* 请假申请 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BpmOALeaveBaseVO { |
|||
|
|||
@Schema(description = "请假的开始时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "开始时间不能为空") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime startTime; |
|||
@Schema(description = "请假的结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "结束时间不能为空") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime endTime; |
|||
|
|||
@Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读闻荫源码") |
|||
private String reason; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.oa.vo; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.AssertTrue; |
|||
|
|||
@Schema(description = "管理后台 - 请假申请创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmOALeaveCreateReqVO extends BpmOALeaveBaseVO { |
|||
|
|||
@AssertTrue(message = "结束时间,需要在开始时间之后") |
|||
public boolean isEndTimeValid() { |
|||
return !getEndTime().isBefore(getStartTime()); |
|||
} |
|||
|
|||
} |
@ -1,29 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.oa.vo; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.time.LocalDateTime; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 请假申请分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmOALeavePageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "状态-参见 bpm_process_instance_result 枚举", example = "1") |
|||
private Integer result; |
|||
|
|||
@Schema(description = "请假类型-参见 bpm_oa_type", example = "1") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "原因-模糊匹配", example = "阅读闻荫源码") |
|||
private String reason; |
|||
|
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
@Schema(description = "申请时间") |
|||
private LocalDateTime[] createTime; |
|||
|
|||
} |
@ -1,32 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.oa.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 请假申请 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmOALeaveRespVO extends BpmOALeaveBaseVO { |
|||
|
|||
@Schema(description = "请假表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "状态-参见 bpm_process_instance_result 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer result; |
|||
|
|||
@Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "申请时间不能为空") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "流程id") |
|||
private String processInstanceId; |
|||
|
|||
} |
@ -1,39 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO; |
|||
import com.win.module.bpm.service.task.BpmActivityService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
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; |
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 流程活动实例") |
|||
@RestController |
|||
@RequestMapping("/bpm/activity") |
|||
@Validated |
|||
public class BpmActivityController { |
|||
|
|||
@Resource |
|||
private BpmActivityService activityService; |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "生成指定流程实例的高亮流程图", |
|||
description = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成") |
|||
@Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('bpm:task:query')") |
|||
public CommonResult<List<BpmActivityRespVO>> getActivityList( |
|||
@RequestParam("processInstanceId") String processInstanceId) { |
|||
return success(activityService.getActivityListByProcessInstanceId(processInstanceId)); |
|||
} |
|||
} |
@ -1,59 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.bpm.controller.admin.task.vo.instance.*; |
|||
import com.win.module.bpm.service.task.BpmProcessInstanceService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
import static com.win.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
|||
|
|||
@Tag(name = "管理后台 - 流程实例") // 流程实例,通过流程定义创建的一次“申请”
|
|||
@RestController |
|||
@RequestMapping("/bpm/process-instance") |
|||
@Validated |
|||
public class BpmProcessInstanceController { |
|||
|
|||
@Resource |
|||
private BpmProcessInstanceService processInstanceService; |
|||
|
|||
@GetMapping("/my-page") |
|||
@Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用") |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") |
|||
public CommonResult<PageResult<BpmProcessInstancePageItemRespVO>> getMyProcessInstancePage( |
|||
@Valid BpmProcessInstanceMyPageReqVO pageReqVO) { |
|||
return success(processInstanceService.getMyProcessInstancePage(getLoginUserId(), pageReqVO)); |
|||
} |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "新建流程实例") |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") |
|||
public CommonResult<String> createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) { |
|||
return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO)); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得指定流程实例", description = "在【流程详细】界面中,进行调用") |
|||
@Parameter(name = "id", description = "流程实例的编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:query')") |
|||
public CommonResult<BpmProcessInstanceRespVO> getProcessInstance(@RequestParam("id") String id) { |
|||
return success(processInstanceService.getProcessInstanceVO(id)); |
|||
} |
|||
|
|||
@DeleteMapping("/cancel") |
|||
@Operation(summary = "取消流程实例", description = "撤回发起的流程") |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-instance:cancel')") |
|||
public CommonResult<Boolean> cancelProcessInstance(@Valid @RequestBody BpmProcessInstanceCancelReqVO cancelReqVO) { |
|||
processInstanceService.cancelProcessInstance(getLoginUserId(), cancelReqVO); |
|||
return success(true); |
|||
} |
|||
} |
@ -1,78 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.bpm.controller.admin.task.vo.task.*; |
|||
import com.win.module.bpm.service.task.BpmTaskService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
|
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
import static com.win.framework.web.core.util.WebFrameworkUtils.getLoginUserId; |
|||
|
|||
@Tag(name = "管理后台 - 流程任务实例") |
|||
@RestController |
|||
@RequestMapping("/bpm/task") |
|||
@Validated |
|||
public class BpmTaskController { |
|||
|
|||
@Resource |
|||
private BpmTaskService taskService; |
|||
|
|||
@GetMapping("todo-page") |
|||
@Operation(summary = "获取 Todo 待办任务分页") |
|||
@PreAuthorize("@ss.hasPermission('bpm:task:query')") |
|||
public CommonResult<PageResult<BpmTaskTodoPageItemRespVO>> getTodoTaskPage(@Valid BpmTaskTodoPageReqVO pageVO) { |
|||
return success(taskService.getTodoTaskPage(getLoginUserId(), pageVO)); |
|||
} |
|||
|
|||
@GetMapping("done-page") |
|||
@Operation(summary = "获取 Done 已办任务分页") |
|||
@PreAuthorize("@ss.hasPermission('bpm:task:query')") |
|||
public CommonResult<PageResult<BpmTaskDonePageItemRespVO>> getDoneTaskPage(@Valid BpmTaskDonePageReqVO pageVO) { |
|||
return success(taskService.getDoneTaskPage(getLoginUserId(), pageVO)); |
|||
} |
|||
|
|||
@GetMapping("/list-by-process-instance-id") |
|||
@Operation(summary = "获得指定流程实例的任务列表", description = "包括完成的、未完成的") |
|||
@Parameter(name = "processInstanceId", description = "流程实例的编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('bpm:task:query')") |
|||
public CommonResult<List<BpmTaskRespVO>> getTaskListByProcessInstanceId( |
|||
@RequestParam("processInstanceId") String processInstanceId) { |
|||
return success(taskService.getTaskListByProcessInstanceId(processInstanceId)); |
|||
} |
|||
|
|||
@PutMapping("/approve") |
|||
@Operation(summary = "通过任务") |
|||
@PreAuthorize("@ss.hasPermission('bpm:task:update')") |
|||
public CommonResult<Boolean> approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) { |
|||
taskService.approveTask(getLoginUserId(), reqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@PutMapping("/reject") |
|||
@Operation(summary = "不通过任务") |
|||
@PreAuthorize("@ss.hasPermission('bpm:task:update')") |
|||
public CommonResult<Boolean> rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) { |
|||
taskService.rejectTask(getLoginUserId(), reqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@PutMapping("/update-assignee") |
|||
@Operation(summary = "更新任务的负责人", description = "用于【流程详情】的【转派】按钮") |
|||
@PreAuthorize("@ss.hasPermission('bpm:task:update')") |
|||
public CommonResult<Boolean> updateTaskAssignee(@Valid @RequestBody BpmTaskUpdateAssigneeReqVO reqVO) { |
|||
taskService.updateTaskAssignee(getLoginUserId(), reqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
} |
@ -1,25 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.activity; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 流程活动的 Response VO") |
|||
@Data |
|||
public class BpmActivityRespVO { |
|||
|
|||
@Schema(description = "流程活动的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String key; |
|||
@Schema(description = "流程活动的类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "StartEvent") |
|||
private String type; |
|||
|
|||
@Schema(description = "流程活动的开始时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime startTime; |
|||
@Schema(description = "流程活动的结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime endTime; |
|||
|
|||
@Schema(description = "关联的流程任务的编号-关联的流程任务,只有 UserTask 等类型才有", example = "2048") |
|||
private String taskId; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.instance; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
@Schema(description = "管理后台 - 流程实例的取消 Request VO") |
|||
@Data |
|||
public class BpmProcessInstanceCancelReqVO { |
|||
|
|||
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotEmpty(message = "流程实例的编号不能为空") |
|||
private String id; |
|||
|
|||
@Schema(description = "取消原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "不请假了!") |
|||
@NotEmpty(message = "取消原因不能为空") |
|||
private String reason; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.instance; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
import java.util.Map; |
|||
|
|||
@Schema(description = "管理后台 - 流程实例的创建 Request VO") |
|||
@Data |
|||
public class BpmProcessInstanceCreateReqVO { |
|||
|
|||
@Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotEmpty(message = "流程定义编号不能为空") |
|||
private String processDefinitionId; |
|||
|
|||
@Schema(description = "变量实例") |
|||
private Map<String, Object> variables; |
|||
|
|||
} |
@ -1,39 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.instance; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 流程实例的分页 Item Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmProcessInstanceMyPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "流程名称", example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程定义的编号", example = "2048") |
|||
private String processDefinitionId; |
|||
|
|||
@Schema(description = "流程实例的状态-参见 bpm_process_instance_status", example = "1") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "流程实例的结果-参见 bpm_process_instance_result", example = "2") |
|||
private Integer result; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") |
|||
private String category; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
} |
@ -1,54 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.instance; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.time.LocalDateTime; |
|||
import java.util.List; |
|||
|
|||
@Schema(description = "管理后台 - 流程实例的分页 Item Response VO") |
|||
@Data |
|||
public class BpmProcessInstancePageItemRespVO { |
|||
|
|||
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
|||
private String processDefinitionId; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private String category; |
|||
|
|||
@Schema(description = "流程实例的状态-参见 bpm_process_instance_status", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "流程实例的结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
|||
private Integer result; |
|||
|
|||
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime endTime; |
|||
|
|||
/** |
|||
* 当前任务 |
|||
*/ |
|||
private List<Task> tasks; |
|||
|
|||
@Schema(description = "流程任务") |
|||
@Data |
|||
public static class Task { |
|||
|
|||
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
private String name; |
|||
|
|||
} |
|||
|
|||
} |
@ -1,94 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.instance; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.time.LocalDateTime; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Schema(description = "管理后台 - 流程实例的 Response VO") |
|||
@Data |
|||
public class BpmProcessInstanceRespVO { |
|||
|
|||
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private String category; |
|||
|
|||
@Schema(description = "流程实例的状态-参见 bpm_process_instance_status", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "流程实例的结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
|||
private Integer result; |
|||
|
|||
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime endTime; |
|||
|
|||
@Schema(description = "提交的表单值", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private Map<String, Object> formVariables; |
|||
|
|||
@Schema(description = "业务的唯一标识-例如说,请假申请的编号", example = "1") |
|||
private String businessKey; |
|||
|
|||
/** |
|||
* 发起流程的用户 |
|||
*/ |
|||
private User startUser; |
|||
|
|||
/** |
|||
* 流程定义 |
|||
*/ |
|||
private ProcessDefinition processDefinition; |
|||
|
|||
@Schema(description = "用户信息") |
|||
@Data |
|||
public static class User { |
|||
|
|||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Long id; |
|||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") |
|||
private String nickname; |
|||
|
|||
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Long deptId; |
|||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部") |
|||
private String deptName; |
|||
|
|||
} |
|||
|
|||
@Schema(description = "流程定义信息") |
|||
@Data |
|||
public static class ProcessDefinition { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") |
|||
private Integer formType; |
|||
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") |
|||
private Long formId; |
|||
@Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String formConf; |
|||
@Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private List<String> formFields; |
|||
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/create") |
|||
private String formCustomCreatePath; |
|||
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/view") |
|||
private String formCustomViewPath; |
|||
|
|||
@Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String bpmnXml; |
|||
|
|||
} |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.task; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
@Schema(description = "管理后台 - 通过流程任务的 Request VO") |
|||
@Data |
|||
public class BpmTaskApproveReqVO { |
|||
|
|||
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotEmpty(message = "任务编号不能为空") |
|||
private String id; |
|||
|
|||
@Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "不错不错!") |
|||
@NotEmpty(message = "审批意见不能为空") |
|||
private String reason; |
|||
|
|||
} |
@ -1,26 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.task; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务的 Done 已完成的分页项 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO { |
|||
|
|||
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime endTime; |
|||
@Schema(description = "持续时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000") |
|||
private Long durationInMillis; |
|||
|
|||
@Schema(description = "任务结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
|||
private Integer result; |
|||
@Schema(description = "审批建议", requiredMode = Schema.RequiredMode.REQUIRED, example = "不请假了!") |
|||
private String reason; |
|||
|
|||
} |
@ -1,31 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.task; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务的 Done 已办的分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskDonePageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "流程任务名", example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "开始的创建收间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime beginCreateTime; |
|||
|
|||
@Schema(description = "结束的创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime endCreateTime; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.task; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
@Schema(description = "管理后台 - 不通过流程任务的 Request VO") |
|||
@Data |
|||
public class BpmTaskRejectReqVO { |
|||
|
|||
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotEmpty(message = "任务编号不能为空") |
|||
private String id; |
|||
|
|||
@Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "不错不错!") |
|||
@NotEmpty(message = "审批意见不能为空") |
|||
private String reason; |
|||
|
|||
} |
@ -1,37 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.task; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务的 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO { |
|||
|
|||
@Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "user-001") |
|||
private String definitionKey; |
|||
|
|||
/** |
|||
* 审核的用户信息 |
|||
*/ |
|||
private User assigneeUser; |
|||
|
|||
@Schema(description = "用户信息") |
|||
@Data |
|||
public static class User { |
|||
|
|||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Long id; |
|||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") |
|||
private String nickname; |
|||
|
|||
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Long deptId; |
|||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部") |
|||
private String deptName; |
|||
|
|||
} |
|||
} |
@ -1,53 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.task; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务的 Running 进行中的分页项 Response VO") |
|||
@Data |
|||
public class BpmTaskTodoPageItemRespVO { |
|||
|
|||
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "接收时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime claimTime; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "激活状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer suspensionState; |
|||
|
|||
/** |
|||
* 所属流程实例 |
|||
*/ |
|||
private ProcessInstance processInstance; |
|||
|
|||
@Data |
|||
@Schema(description = "流程实例") |
|||
public static class ProcessInstance { |
|||
|
|||
@Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "发起人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long startUserId; |
|||
|
|||
@Schema(description = "发起人的用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") |
|||
private String startUserNickname; |
|||
|
|||
@Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
|||
private String processDefinitionId; |
|||
|
|||
} |
|||
|
|||
} |
@ -1,28 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.task; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import com.win.framework.common.util.date.DateUtils; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务的 TODO 待办的分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskTodoPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "流程任务名", example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
} |
@ -1,21 +0,0 @@ |
|||
package com.win.module.bpm.controller.admin.task.vo.task; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务的更新负责人的 Request VO") |
|||
@Data |
|||
public class BpmTaskUpdateAssigneeReqVO { |
|||
|
|||
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotEmpty(message = "任务编号不能为空") |
|||
private String id; |
|||
|
|||
@Schema(description = "新审批人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
|||
@NotNull(message = "新审批人的用户编号不能为空") |
|||
private Long assigneeUserId; |
|||
|
|||
} |
@ -1,4 +0,0 @@ |
|||
/** |
|||
* 占位 |
|||
*/ |
|||
package com.win.module.bpm.controller.app; |
@ -0,0 +1,79 @@ |
|||
package com.win.module.bpm.controller.definition; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.bpm.controller.definition.vo.form.*; |
|||
import com.win.module.bpm.convert.definition.BpmFormConvert; |
|||
import com.win.module.bpm.dal.dataobject.definition.BpmFormDO; |
|||
import com.win.module.bpm.service.definition.BpmFormService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 动态表单") |
|||
@RestController |
|||
@RequestMapping("/bpm/form") |
|||
@Validated |
|||
public class BpmFormController { |
|||
|
|||
@Resource |
|||
private BpmFormService formService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建动态表单") |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:create')") |
|||
public CommonResult<Long> createForm(@Valid @RequestBody BpmFormCreateReqVO createReqVO) { |
|||
return success(formService.createForm(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新动态表单") |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:update')") |
|||
public CommonResult<Boolean> updateForm(@Valid @RequestBody BpmFormUpdateReqVO updateReqVO) { |
|||
formService.updateForm(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除动态表单") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:delete')") |
|||
public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) { |
|||
formService.deleteForm(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得动态表单") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:query')") |
|||
public CommonResult<BpmFormRespVO> getForm(@RequestParam("id") Long id) { |
|||
BpmFormDO form = formService.getForm(id); |
|||
return success(BpmFormConvert.INSTANCE.convert(form)); |
|||
} |
|||
|
|||
@GetMapping("/list-all-simple") |
|||
@Operation(summary = "获得动态表单的精简列表", description = "用于表单下拉框") |
|||
public CommonResult<List<BpmFormSimpleRespVO>> getSimpleForms() { |
|||
List<BpmFormDO> list = formService.getFormList(); |
|||
return success(BpmFormConvert.INSTANCE.convertList2(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得动态表单分页") |
|||
@PreAuthorize("@ss.hasPermission('bpm:form:query')") |
|||
public CommonResult<PageResult<BpmFormRespVO>> getFormPage(@Valid BpmFormPageReqVO pageVO) { |
|||
PageResult<BpmFormDO> pageResult = formService.getFormPage(pageVO); |
|||
return success(BpmFormConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,96 @@ |
|||
package com.win.module.bpm.controller.definition; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.util.io.IoUtils; |
|||
import com.win.module.bpm.controller.definition.vo.model.*; |
|||
import com.win.module.bpm.convert.definition.BpmModelConvert; |
|||
import com.win.module.bpm.service.definition.BpmModelService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
import java.io.IOException; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 流程模型") |
|||
@RestController |
|||
@RequestMapping("/bpm/model") |
|||
@Validated |
|||
public class BpmModelController { |
|||
|
|||
@Resource |
|||
private BpmModelService modelService; |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得模型分页") |
|||
public CommonResult<PageResult<BpmModelPageItemRespVO>> getModelPage(BpmModelPageReqVO pageVO) { |
|||
return success(modelService.getModelPage(pageVO)); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得模型") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:query')") |
|||
public CommonResult<BpmModelRespVO> getModel(@RequestParam("id") String id) { |
|||
BpmModelRespVO model = modelService.getModel(id); |
|||
return success(model); |
|||
} |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "新建模型") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:create')") |
|||
public CommonResult<String> createModel(@Valid @RequestBody BpmModelCreateReqVO createRetVO) { |
|||
return success(modelService.createModel(createRetVO, null)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "修改模型") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:update')") |
|||
public CommonResult<Boolean> updateModel(@Valid @RequestBody BpmModelUpdateReqVO modelVO) { |
|||
modelService.updateModel(modelVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@PostMapping("/import") |
|||
@Operation(summary = "导入模型") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:import')") |
|||
public CommonResult<String> importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException { |
|||
BpmModelCreateReqVO createReqVO = BpmModelConvert.INSTANCE.convert(importReqVO); |
|||
// 读取文件
|
|||
String bpmnXml = IoUtils.readUtf8(importReqVO.getBpmnFile().getInputStream(), false); |
|||
return success(modelService.createModel(createReqVO, bpmnXml)); |
|||
} |
|||
|
|||
@PostMapping("/deploy") |
|||
@Operation(summary = "部署模型") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:deploy')") |
|||
public CommonResult<Boolean> deployModel(@RequestParam("id") String id) { |
|||
modelService.deployModel(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@PutMapping("/update-state") |
|||
@Operation(summary = "修改模型的状态", description = "实际更新的部署的流程定义的状态") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:update')") |
|||
public CommonResult<Boolean> updateModelState(@Valid @RequestBody BpmModelUpdateStateReqVO reqVO) { |
|||
modelService.updateModelState(reqVO.getId(), reqVO.getState()); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除模型") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:model:delete')") |
|||
public CommonResult<Boolean> deleteModel(@RequestParam("id") String id) { |
|||
modelService.deleteModel(id); |
|||
return success(true); |
|||
} |
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.win.module.bpm.controller.definition; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.bpm.controller.definition.vo.process.BpmProcessDefinitionListReqVO; |
|||
import com.win.module.bpm.controller.definition.vo.process.BpmProcessDefinitionPageItemRespVO; |
|||
import com.win.module.bpm.controller.definition.vo.process.BpmProcessDefinitionPageReqVO; |
|||
import com.win.module.bpm.controller.definition.vo.process.BpmProcessDefinitionRespVO; |
|||
import com.win.module.bpm.service.definition.BpmProcessDefinitionService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
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; |
|||
|
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 流程定义") |
|||
@RestController |
|||
@RequestMapping("/bpm/process-definition") |
|||
@Validated |
|||
public class BpmProcessDefinitionController { |
|||
|
|||
@Resource |
|||
private BpmProcessDefinitionService bpmDefinitionService; |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得流程定义分页") |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") |
|||
public CommonResult<PageResult<BpmProcessDefinitionPageItemRespVO>> getProcessDefinitionPage( |
|||
BpmProcessDefinitionPageReqVO pageReqVO) { |
|||
return success(bpmDefinitionService.getProcessDefinitionPage(pageReqVO)); |
|||
} |
|||
|
|||
@GetMapping ("/list") |
|||
@Operation(summary = "获得流程定义列表") |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") |
|||
public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList( |
|||
BpmProcessDefinitionListReqVO listReqVO) { |
|||
return success(bpmDefinitionService.getProcessDefinitionList(listReqVO)); |
|||
} |
|||
|
|||
@GetMapping ("/get-bpmn-xml") |
|||
@Operation(summary = "获得流程定义的 BPMN XML") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')") |
|||
public CommonResult<String> getProcessDefinitionBpmnXML(@RequestParam("id") String id) { |
|||
String bpmnXML = bpmDefinitionService.getProcessDefinitionBpmnXML(id); |
|||
return success(bpmnXML); |
|||
} |
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.win.module.bpm.controller.definition; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.module.bpm.controller.definition.vo.rule.BpmTaskAssignRuleCreateReqVO; |
|||
import com.win.module.bpm.controller.definition.vo.rule.BpmTaskAssignRuleRespVO; |
|||
import com.win.module.bpm.controller.definition.vo.rule.BpmTaskAssignRuleUpdateReqVO; |
|||
import com.win.module.bpm.service.definition.BpmTaskAssignRuleService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 任务分配规则") |
|||
@RestController |
|||
@RequestMapping("/bpm/task-assign-rule") |
|||
@Validated |
|||
public class BpmTaskAssignRuleController { |
|||
|
|||
@Resource |
|||
private BpmTaskAssignRuleService taskAssignRuleService; |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得任务分配规则列表") |
|||
@Parameters({ |
|||
@Parameter(name = "modelId", description = "模型编号", example = "1024"), |
|||
@Parameter(name = "processDefinitionId", description = "流程定义的编号", example = "2048") |
|||
}) |
|||
@PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:query')") |
|||
public CommonResult<List<BpmTaskAssignRuleRespVO>> getTaskAssignRuleList( |
|||
@RequestParam(value = "modelId", required = false) String modelId, |
|||
@RequestParam(value = "processDefinitionId", required = false) String processDefinitionId) { |
|||
return success(taskAssignRuleService.getTaskAssignRuleList(modelId, processDefinitionId)); |
|||
} |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建任务分配规则") |
|||
@PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:create')") |
|||
public CommonResult<Long> createTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleCreateReqVO reqVO) { |
|||
return success(taskAssignRuleService.createTaskAssignRule(reqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新任务分配规则") |
|||
@PreAuthorize("@ss.hasPermission('bpm:task-assign-rule:update')") |
|||
public CommonResult<Boolean> updateTaskAssignRule(@Valid @RequestBody BpmTaskAssignRuleUpdateReqVO reqVO) { |
|||
taskAssignRuleService.updateTaskAssignRule(reqVO); |
|||
return success(true); |
|||
} |
|||
} |
@ -0,0 +1,85 @@ |
|||
package com.win.module.bpm.controller.definition; |
|||
|
|||
import com.win.module.bpm.controller.definition.vo.group.BpmUserGroupCreateReqVO; |
|||
import com.win.module.bpm.controller.definition.vo.group.BpmUserGroupPageReqVO; |
|||
import com.win.module.bpm.controller.definition.vo.group.BpmUserGroupRespVO; |
|||
import com.win.module.bpm.controller.definition.vo.group.BpmUserGroupUpdateReqVO; |
|||
import com.win.module.bpm.convert.definition.BpmUserGroupConvert; |
|||
import com.win.module.bpm.dal.dataobject.definition.BpmUserGroupDO; |
|||
import com.win.module.bpm.service.definition.BpmUserGroupService; |
|||
import com.win.framework.common.enums.CommonStatusEnum; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 用户组") |
|||
@RestController |
|||
@RequestMapping("/bpm/user-group") |
|||
@Validated |
|||
public class BpmUserGroupController { |
|||
|
|||
@Resource |
|||
private BpmUserGroupService userGroupService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建用户组") |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:create')") |
|||
public CommonResult<Long> createUserGroup(@Valid @RequestBody BpmUserGroupCreateReqVO createReqVO) { |
|||
return success(userGroupService.createUserGroup(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新用户组") |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:update')") |
|||
public CommonResult<Boolean> updateUserGroup(@Valid @RequestBody BpmUserGroupUpdateReqVO updateReqVO) { |
|||
userGroupService.updateUserGroup(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除用户组") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:delete')") |
|||
public CommonResult<Boolean> deleteUserGroup(@RequestParam("id") Long id) { |
|||
userGroupService.deleteUserGroup(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得用户组") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:query')") |
|||
public CommonResult<BpmUserGroupRespVO> getUserGroup(@RequestParam("id") Long id) { |
|||
BpmUserGroupDO userGroup = userGroupService.getUserGroup(id); |
|||
return success(BpmUserGroupConvert.INSTANCE.convert(userGroup)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得用户组分页") |
|||
@PreAuthorize("@ss.hasPermission('bpm:user-group:query')") |
|||
public CommonResult<PageResult<BpmUserGroupRespVO>> getUserGroupPage(@Valid BpmUserGroupPageReqVO pageVO) { |
|||
PageResult<BpmUserGroupDO> pageResult = userGroupService.getUserGroupPage(pageVO); |
|||
return success(BpmUserGroupConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/list-all-simple") |
|||
@Operation(summary = "获取用户组精简信息列表", description = "只包含被开启的用户组,主要用于前端的下拉选项") |
|||
public CommonResult<List<BpmUserGroupRespVO>> getSimpleUserGroups() { |
|||
// 获用户门列表,只要开启状态的
|
|||
List<BpmUserGroupDO> list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus()); |
|||
// 排序后,返回给前端
|
|||
return success(BpmUserGroupConvert.INSTANCE.convertList2(list)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.win.module.bpm.controller.definition.vo.form; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import javax.validation.constraints.*; |
|||
|
|||
/** |
|||
* 动态表单 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BpmFormBaseVO { |
|||
|
|||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotNull(message = "表单名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "表单状态-参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "表单状态不能为空") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "备注", example = "我是备注") |
|||
private String remark; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.win.module.bpm.controller.definition.vo.form; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.List; |
|||
|
|||
@Schema(description = "管理后台 - 动态表单创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmFormCreateReqVO extends BpmFormBaseVO { |
|||
|
|||
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单的配置不能为空") |
|||
private String conf; |
|||
|
|||
@Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单项的数组不能为空") |
|||
private List<String> fields; |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.win.module.bpm.controller.definition.vo.form; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 动态表单分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmFormPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "表单名称", example = "闻荫") |
|||
private String name; |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.win.module.bpm.controller.definition.vo.form; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.time.LocalDateTime; |
|||
import java.util.List; |
|||
|
|||
@Schema(description = "管理后台 - 动态表单 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmFormRespVO extends BpmFormBaseVO { |
|||
|
|||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单的配置不能为空") |
|||
private String conf; |
|||
|
|||
@Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单项的数组不能为空") |
|||
private List<String> fields; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.win.module.bpm.controller.definition.vo.form; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
@Schema(description = "管理后台 - 流程表单精简 Response VO") |
|||
@Data |
|||
public class BpmFormSimpleRespVO { |
|||
|
|||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
private String name; |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.win.module.bpm.controller.definition.vo.form; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import javax.validation.constraints.*; |
|||
import java.util.List; |
|||
|
|||
@Schema(description = "管理后台 - 动态表单更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmFormUpdateReqVO extends BpmFormBaseVO { |
|||
|
|||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotNull(message = "表单编号不能为空") |
|||
private Long id; |
|||
|
|||
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单的配置不能为空") |
|||
private String conf; |
|||
|
|||
@Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "表单项的数组不能为空") |
|||
private List<String> fields; |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.win.module.bpm.controller.definition.vo.group; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 用户组 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BpmUserGroupBaseVO { |
|||
|
|||
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotNull(message = "组名不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫源码") |
|||
@NotNull(message = "描述不能为空") |
|||
private String description; |
|||
|
|||
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3") |
|||
@NotNull(message = "成员编号数组不能为空") |
|||
private Set<Long> memberUserIds; |
|||
|
|||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "状态不能为空") |
|||
private Integer status; |
|||
|
|||
} |
@ -0,0 +1,11 @@ |
|||
package com.win.module.bpm.controller.definition.vo.group; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 用户组创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmUserGroupCreateReqVO extends BpmUserGroupBaseVO { |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.win.module.bpm.controller.definition.vo.group; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import com.win.framework.common.util.date.DateUtils; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 用户组分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmUserGroupPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "组名", example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "状态", example = "1") |
|||
private Integer status; |
|||
|
|||
@DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime[] createTime; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.win.module.bpm.controller.definition.vo.group; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 用户组 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmUserGroupRespVO extends BpmUserGroupBaseVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.win.module.bpm.controller.definition.vo.group; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
@Schema(description = "管理后台 - 用户组精简信息 Response VO") |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class BpmUserGroupSimpleRespVO { |
|||
|
|||
@Schema(description = "用户组编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "用户组名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
private String name; |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.win.module.bpm.controller.definition.vo.group; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import javax.validation.constraints.*; |
|||
|
|||
@Schema(description = "管理后台 - 用户组更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotNull(message = "编号不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.win.module.bpm.controller.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的导入 Request VO 相比流程模型的新建来说,只是多了一个 bpmnFile 文件") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmModeImportReqVO extends BpmModelCreateReqVO { |
|||
|
|||
@Schema(description = "BPMN 文件", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "BPMN 文件不能为空") |
|||
private MultipartFile bpmnFile; |
|||
|
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.win.module.bpm.controller.definition.vo.model; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
/** |
|||
* 流程模型 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BpmModelBaseVO { |
|||
|
|||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_win") |
|||
@NotEmpty(message = "流程标识不能为空") |
|||
private String key; |
|||
|
|||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotEmpty(message = "流程名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程描述", example = "我是描述") |
|||
private String description; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") |
|||
@NotEmpty(message = "流程分类不能为空") |
|||
private String category; |
|||
|
|||
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") |
|||
private Integer formType; |
|||
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") |
|||
private Long formId; |
|||
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/create") |
|||
private String formCustomCreatePath; |
|||
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/view") |
|||
private String formCustomViewPath; |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.win.module.bpm.controller.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的创建 Request VO") |
|||
@Data |
|||
public class BpmModelCreateReqVO { |
|||
|
|||
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_win") |
|||
@NotEmpty(message = "流程标识不能为空") |
|||
private String key; |
|||
|
|||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotEmpty(message = "流程名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程描述", example = "我是描述") |
|||
private String description; |
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.win.module.bpm.controller.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的分页的每一项 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmModelPageItemRespVO extends BpmModelBaseVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "表单名字", example = "请假表单") |
|||
private String formName; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** |
|||
* 最新部署的流程定义 |
|||
*/ |
|||
private ProcessDefinition processDefinition; |
|||
|
|||
@Schema(description = "流程定义") |
|||
@Data |
|||
public static class ProcessDefinition { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer version; |
|||
|
|||
@Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime deploymentTime; |
|||
|
|||
@Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer suspensionState; |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.win.module.bpm.controller.definition.vo.model; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
|
|||
@Schema(description = "管理后台 - 流程模型分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmModelPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "标识-精准匹配", example = "process1641042089407") |
|||
private String key; |
|||
|
|||
@Schema(description = "名字-模糊匹配", example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") |
|||
private String category; |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.win.module.bpm.controller.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmModelRespVO extends BpmModelBaseVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String bpmnXml; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.win.module.bpm.controller.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型的更新 Request VO") |
|||
@Data |
|||
public class BpmModelUpdateReqVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotEmpty(message = "编号不能为空") |
|||
private String id; |
|||
|
|||
@Schema(description = "流程名称", example = "闻荫") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程描述", example = "我是描述") |
|||
private String description; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") |
|||
private String category; |
|||
|
|||
@Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String bpmnXml; |
|||
|
|||
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") |
|||
private Integer formType; |
|||
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") |
|||
private Long formId; |
|||
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/create") |
|||
private String formCustomCreatePath; |
|||
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/view") |
|||
private String formCustomViewPath; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.win.module.bpm.controller.definition.vo.model; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Schema(description = "管理后台 - 流程模型更新状态 Request VO") |
|||
@Data |
|||
public class BpmModelUpdateStateReqVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotNull(message = "编号不能为空") |
|||
private String id; |
|||
|
|||
@Schema(description = "状态-见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "状态不能为空") |
|||
private Integer state; |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.win.module.bpm.controller.definition.vo.process; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 流程定义列表 Request VO") |
|||
@Data |
|||
@ToString(callSuper = true) |
|||
@EqualsAndHashCode(callSuper = true) |
|||
public class BpmProcessDefinitionListReqVO extends PageParam { |
|||
|
|||
@Schema(description = "中断状态-参见 SuspensionState 枚举", example = "1") |
|||
private Integer suspensionState; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.win.module.bpm.controller.definition.vo.process; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 流程定义的分页的每一项 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionRespVO { |
|||
|
|||
@Schema(description = "表单名字", example = "请假表单") |
|||
private String formName; |
|||
|
|||
@Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private LocalDateTime deploymentTime; |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.win.module.bpm.controller.definition.vo.process; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 流程定义分页 Request VO") |
|||
@Data |
|||
@ToString(callSuper = true) |
|||
@EqualsAndHashCode(callSuper = true) |
|||
public class BpmProcessDefinitionPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "标识-精准匹配", example = "process1641042089407") |
|||
private String key; |
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.win.module.bpm.controller.definition.vo.process; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
import java.util.List; |
|||
|
|||
@Schema(description = "管理后台 - 流程定义 Response VO") |
|||
@Data |
|||
public class BpmProcessDefinitionRespVO { |
|||
|
|||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private String id; |
|||
|
|||
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer version; |
|||
|
|||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "闻荫") |
|||
@NotEmpty(message = "流程名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "流程描述", example = "我是描述") |
|||
private String description; |
|||
|
|||
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1") |
|||
@NotEmpty(message = "流程分类不能为空") |
|||
private String category; |
|||
|
|||
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1") |
|||
private Integer formType; |
|||
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024") |
|||
private Long formId; |
|||
@Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private String formConf; |
|||
@Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
private List<String> formFields; |
|||
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/create") |
|||
private String formCustomCreatePath; |
|||
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", |
|||
example = "/bpm/oa/leave/view") |
|||
private String formCustomViewPath; |
|||
|
|||
@Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
private Integer suspensionState; |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.win.module.bpm.controller.definition.vo.rule; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 流程任务分配规则 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BpmTaskAssignRuleBaseVO { |
|||
|
|||
@Schema(description = "规则类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "bpm_task_assign_rule_type") |
|||
@NotNull(message = "规则类型不能为空") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "规则值数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3") |
|||
@NotNull(message = "规则值数组不能为空") |
|||
private Set<Long> options; |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.win.module.bpm.controller.definition.vo.rule; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务分配规则的创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO { |
|||
|
|||
@Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotEmpty(message = "流程模型的编号不能为空") |
|||
private String modelId; |
|||
|
|||
@Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
|||
@NotEmpty(message = "流程任务定义的编号不能为空") |
|||
private String taskDefinitionKey; |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.win.module.bpm.controller.definition.vo.rule; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务分配规则的 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO { |
|||
|
|||
@Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
private Long id; |
|||
|
|||
@Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
|||
private String modelId; |
|||
|
|||
@Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") |
|||
private String processDefinitionId; |
|||
|
|||
@Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
|||
private String taskDefinitionKey; |
|||
@Schema(description = "流程任务定义的名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "关注闻荫") |
|||
private String taskDefinitionName; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.win.module.bpm.controller.definition.vo.rule; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Schema(description = "管理后台 - 流程任务分配规则的更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO { |
|||
|
|||
@Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|||
@NotNull(message = "任务分配规则的编号不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -0,0 +1,63 @@ |
|||
package com.win.module.bpm.controller.oa; |
|||
|
|||
import com.win.module.bpm.controller.oa.vo.BpmOALeaveCreateReqVO; |
|||
import com.win.module.bpm.controller.oa.vo.BpmOALeavePageReqVO; |
|||
import com.win.module.bpm.controller.oa.vo.BpmOALeaveRespVO; |
|||
import com.win.module.bpm.convert.oa.BpmOALeaveConvert; |
|||
import com.win.module.bpm.dal.dataobject.oa.BpmOALeaveDO; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.bpm.service.oa.BpmOALeaveService; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
import static com.win.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
|||
|
|||
/** |
|||
* OA 请假申请 Controller,用于演示自己存储数据,接入工作流的例子 |
|||
* |
|||
* @author jason |
|||
* @author 闻荫源码 |
|||
*/ |
|||
@Tag(name = "管理后台 - OA 请假申请") |
|||
@RestController |
|||
@RequestMapping("/bpm/oa/leave") |
|||
@Validated |
|||
public class BpmOALeaveController { |
|||
|
|||
@Resource |
|||
private BpmOALeaveService leaveService; |
|||
|
|||
@PostMapping("/create") |
|||
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:create')") |
|||
@Operation(summary = "创建请求申请") |
|||
public CommonResult<Long> createLeave(@Valid @RequestBody BpmOALeaveCreateReqVO createReqVO) { |
|||
return success(leaveService.createLeave(getLoginUserId(), createReqVO)); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") |
|||
@Operation(summary = "获得请假申请") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
public CommonResult<BpmOALeaveRespVO> getLeave(@RequestParam("id") Long id) { |
|||
BpmOALeaveDO leave = leaveService.getLeave(id); |
|||
return success(BpmOALeaveConvert.INSTANCE.convert(leave)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@PreAuthorize("@ss.hasPermission('bpm:oa-leave:query')") |
|||
@Operation(summary = "获得请假申请分页") |
|||
public CommonResult<PageResult<BpmOALeaveRespVO>> getLeavePage(@Valid BpmOALeavePageReqVO pageVO) { |
|||
PageResult<BpmOALeaveDO> pageResult = leaveService.getLeavePage(getLoginUserId(), pageVO); |
|||
return success(BpmOALeaveConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,5 @@ |
|||
/** |
|||
* OA 示例,用于演示外部业务接入 BPM 工作流的示例 |
|||
* 一般的接入方式,只需要调用 接口,后续 Admin 用户在管理后台的【待办事务】进行审批 |
|||
*/ |
|||
package com.win.module.bpm.controller.oa; |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue