| | |
| | | import org.dromara.common.idempotent.annotation.RepeatSubmit; |
| | | import org.dromara.common.log.annotation.Log; |
| | | import org.dromara.common.log.enums.BusinessType; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | | import org.dromara.common.web.core.BaseController; |
| | | import org.dromara.workflow.domain.bo.ModelBo; |
| | |
| | | import org.dromara.workflow.service.IActModelService; |
| | | import org.flowable.engine.RepositoryService; |
| | | import org.flowable.engine.repository.Model; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 模型管理 控制层 |
| | |
| | | @RequestMapping("/workflow/model") |
| | | public class ActModelController extends BaseController { |
| | | |
| | | private final RepositoryService repositoryService; |
| | | |
| | | @Autowired(required = false) |
| | | private RepositoryService repositoryService; |
| | | private final IActModelService actModelService; |
| | | |
| | | |
| | |
| | | * @param modelBo 模型参数 |
| | | */ |
| | | @GetMapping("/list") |
| | | public TableDataInfo<Model> page(ModelBo modelBo) { |
| | | return actModelService.page(modelBo); |
| | | public TableDataInfo<Model> page(ModelBo modelBo, PageQuery pageQuery) { |
| | | return actModelService.page(modelBo, pageQuery); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 导出模型zip压缩包 |
| | | * |
| | | * @param modelId 模型id |
| | | * @param modelIds 模型id |
| | | * @param response 相应 |
| | | */ |
| | | @GetMapping("/export/zip/{modelId}") |
| | | public void exportZip(@NotEmpty(message = "模型id不能为空") @PathVariable String modelId, |
| | | @GetMapping("/export/zip/{modelIds}") |
| | | public void exportZip(@NotEmpty(message = "模型id不能为空") @PathVariable List<String> modelIds, |
| | | HttpServletResponse response) { |
| | | actModelService.exportZip(modelId, response); |
| | | actModelService.exportZip(modelIds, response); |
| | | } |
| | | |
| | | /** |
| | | * 复制模型 |
| | | * |
| | | * @param modelBo 模型数据 |
| | | */ |
| | | @PostMapping("/copyModel") |
| | | public R<Void> copyModel(@RequestBody ModelBo modelBo) { |
| | | return toAjax(actModelService.copyModel(modelBo)); |
| | | } |
| | | } |