feat(REQ-3004) - 测试表单引擎
This commit is contained in:
parent
df6861fbb1
commit
a3c718fa4e
@ -212,6 +212,9 @@ public class FormModelServiceImpl implements FormModelService {
|
||||
.tenantId(model.getTenantId())
|
||||
.deploy();
|
||||
|
||||
model.setDeploymentId(deploy.getId());
|
||||
repositoryService.saveModel(model);
|
||||
|
||||
return deploy.getId();
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package cn.axzo.workflow.server.controller.web.form;
|
||||
|
||||
import cn.axzo.workflow.common.model.request.form.definition.FormDefinitionUpdateDTO;
|
||||
import cn.axzo.workflow.common.model.response.form.definition.FormDefinitionVO;
|
||||
import cn.axzo.workflow.core.service.FormModelService;
|
||||
import cn.axzo.workflow.form.service.FormDefinitionService;
|
||||
@ -11,8 +10,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -24,6 +21,8 @@ import static cn.azxo.framework.common.model.CommonResponse.success;
|
||||
|
||||
/**
|
||||
* 表单定义相关控制器
|
||||
* <p>
|
||||
* 对应的是发布后的 definition 表
|
||||
*
|
||||
* @author wangli
|
||||
* @since 2023/7/19 16:45
|
||||
@ -39,17 +38,15 @@ public class FormDefinitionController {
|
||||
|
||||
@Resource
|
||||
private FormDefinitionService formDefinitionService;
|
||||
@Resource
|
||||
private FormModelService formModelService;
|
||||
|
||||
@Operation(summary = "通过指定表单模型 ID 获取表单定义草稿内容")
|
||||
@GetMapping()
|
||||
@GetMapping("/draft/get")
|
||||
public CommonResponse<FormDefinitionVO> getDraft(@NotBlank(message = "表单模型ID不能为空") @RequestParam String formModelId,
|
||||
@RequestParam(required = false, defaultValue = "") String tenantId) {
|
||||
@RequestParam(required = false, defaultValue = "") String tenantId) {
|
||||
return success(formDefinitionService.getDraft(formModelId, tenantId));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过表单模型 ID 获取表单定义内容")
|
||||
@Operation(summary = "通过表单模型 ID 获取表单定义发布内容")
|
||||
@GetMapping("/get")
|
||||
public CommonResponse<FormDefinitionVO> get(@NotBlank(message = "表单模型ID不能为空") @RequestParam String formModelId,
|
||||
@RequestParam(required = false, defaultValue = "") String tenantId) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user