|
@@ -1,9 +1,9 @@
|
|
|
package cn.iocoder.yudao.adminserver.modules.activiti.controller.form;
|
|
|
|
|
|
import cn.iocoder.yudao.adminserver.modules.activiti.controller.form.vo.*;
|
|
|
-import cn.iocoder.yudao.adminserver.modules.activiti.convert.form.OsFormConvert;
|
|
|
-import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.form.OsFormDO;
|
|
|
-import cn.iocoder.yudao.adminserver.modules.activiti.service.form.OsFormService;
|
|
|
+import cn.iocoder.yudao.adminserver.modules.activiti.convert.form.WfFormConvert;
|
|
|
+import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.form.WfForm;
|
|
|
+import cn.iocoder.yudao.adminserver.modules.activiti.service.form.WfFormService;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
|
@@ -28,24 +28,24 @@ import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.E
|
|
|
// TODO @风里雾里: Os=》Wf,/os 改成 /wl 开头。目前这个模块,咱先定位成给工作流用的
|
|
|
@Api(tags = "动态表单")
|
|
|
@RestController
|
|
|
-@RequestMapping("/os/form")
|
|
|
+@RequestMapping("/wl/form")
|
|
|
@Validated
|
|
|
-public class OsFormController {
|
|
|
+public class WlFormController {
|
|
|
|
|
|
@Resource
|
|
|
- private OsFormService formService;
|
|
|
+ private WfFormService formService;
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
@ApiOperation("创建动态表单")
|
|
|
@PreAuthorize("@ss.hasPermission('os:form:create')")
|
|
|
- public CommonResult<Long> createForm(@Valid @RequestBody OsFormCreateReqVO createReqVO) {
|
|
|
+ public CommonResult<Long> createForm(@Valid @RequestBody WfFormCreateReqVO createReqVO) {
|
|
|
return success(formService.createForm(createReqVO));
|
|
|
}
|
|
|
|
|
|
@PutMapping("/update")
|
|
|
@ApiOperation("更新动态表单")
|
|
|
@PreAuthorize("@ss.hasPermission('os:form:update')")
|
|
|
- public CommonResult<Boolean> updateForm(@Valid @RequestBody OsFormUpdateReqVO updateReqVO) {
|
|
|
+ public CommonResult<Boolean> updateForm(@Valid @RequestBody WfFormUpdateReqVO updateReqVO) {
|
|
|
formService.updateForm(updateReqVO);
|
|
|
return success(true);
|
|
|
}
|
|
@@ -63,38 +63,38 @@ public class OsFormController {
|
|
|
@ApiOperation("获得动态表单")
|
|
|
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
|
|
@PreAuthorize("@ss.hasPermission('os:form:query')")
|
|
|
- public CommonResult<OsFormRespVO> getForm(@RequestParam("id") Long id) {
|
|
|
- OsFormDO form = formService.getForm(id);
|
|
|
- return success(OsFormConvert.INSTANCE.convert(form));
|
|
|
+ public CommonResult<WfFormRespVO> getForm(@RequestParam("id") Long id) {
|
|
|
+ WfForm form = formService.getForm(id);
|
|
|
+ return success(WfFormConvert.INSTANCE.convert(form));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/list")
|
|
|
@ApiOperation("获得动态表单列表")
|
|
|
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
|
|
|
@PreAuthorize("@ss.hasPermission('os:form:query')")
|
|
|
- public CommonResult<List<OsFormRespVO>> getFormList(@RequestParam("ids") Collection<Long> ids) {
|
|
|
- List<OsFormDO> list = formService.getFormList(ids);
|
|
|
- return success(OsFormConvert.INSTANCE.convertList(list));
|
|
|
+ public CommonResult<List<WfFormRespVO>> getFormList(@RequestParam("ids") Collection<Long> ids) {
|
|
|
+ List<WfForm> list = formService.getFormList(ids);
|
|
|
+ return success(WfFormConvert.INSTANCE.convertList(list));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/page")
|
|
|
@ApiOperation("获得动态表单分页")
|
|
|
@PreAuthorize("@ss.hasPermission('os:form:query')")
|
|
|
- public CommonResult<PageResult<OsFormRespVO>> getFormPage(@Valid OsFormPageReqVO pageVO) {
|
|
|
- PageResult<OsFormDO> pageResult = formService.getFormPage(pageVO);
|
|
|
- return success(OsFormConvert.INSTANCE.convertPage(pageResult));
|
|
|
+ public CommonResult<PageResult<WfFormRespVO>> getFormPage(@Valid WfFormPageReqVO pageVO) {
|
|
|
+ PageResult<WfForm> pageResult = formService.getFormPage(pageVO);
|
|
|
+ return success(WfFormConvert.INSTANCE.convertPage(pageResult));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/export-excel")
|
|
|
@ApiOperation("导出动态表单 Excel")
|
|
|
@PreAuthorize("@ss.hasPermission('os:form:export')")
|
|
|
@OperateLog(type = EXPORT)
|
|
|
- public void exportFormExcel(@Valid OsFormExportReqVO exportReqVO,
|
|
|
+ public void exportFormExcel(@Valid WfFormExportReqVO exportReqVO,
|
|
|
HttpServletResponse response) throws IOException {
|
|
|
- List<OsFormDO> list = formService.getFormList(exportReqVO);
|
|
|
+ List<WfForm> list = formService.getFormList(exportReqVO);
|
|
|
// 导出 Excel
|
|
|
- List<OsFormExcelVO> datas = OsFormConvert.INSTANCE.convertList02(list);
|
|
|
- ExcelUtils.write(response, "动态表单.xls", "数据", OsFormExcelVO.class, datas);
|
|
|
+ List<WfFormExcelVO> datas = WfFormConvert.INSTANCE.convertList02(list);
|
|
|
+ ExcelUtils.write(response, "动态表单.xls", "数据", WfFormExcelVO.class, datas);
|
|
|
}
|
|
|
|
|
|
}
|