diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/BpmFormController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/BpmFormController.java index 98b5061b3..65d9a578f 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/BpmFormController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/BpmFormController.java @@ -84,16 +84,4 @@ public class BpmFormController { return success(BpmFormConvert.INSTANCE.convertPage(pageResult)); } - @GetMapping("/export-excel") - @ApiOperation("导出动态表单 Excel") - @PreAuthorize("@ss.hasPermission('bpm:form:export')") - @OperateLog(type = EXPORT) - public void exportFormExcel(@Valid BpmFormExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = formService.getFormList(exportReqVO); - // 导出 Excel - List datas = BpmFormConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "动态表单.xls", "数据", BpmFormExcelVO.class, datas); - } - } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormExportReqVO.java index eb9228332..5accb8e6b 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormExportReqVO.java @@ -1,33 +1,14 @@ package cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; -import org.springframework.format.annotation.DateTimeFormat; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; -@ApiModel(value = "动态表单 Excel 导出 Request VO", description = "参数和 OsFormPageReqVO 是一致的") +@ApiModel(value = "动态表单 Excel 导出 Request VO", description = "参数和 BpmFormPageReqVO 是一致的") @Data public class BpmFormExportReqVO { @ApiModelProperty(value = "表单名称") private String name; - @ApiModelProperty(value = "商户状态") - private Integer status; - - @ApiModelProperty(value = "表单JSON") - private String formJson; - - @ApiModelProperty(value = "备注") - private String remark; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始创建时间") - private Date beginCreateTime; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束创建时间") - private Date endCreateTime; - } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormPageReqVO.java index 870235fd9..503cbe82e 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/form/vo/BpmFormPageReqVO.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import org.springframework.format.annotation.DateTimeFormat; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; @ApiModel("动态表单分页 Request VO") @Data @@ -16,21 +16,4 @@ public class BpmFormPageReqVO extends PageParam { @ApiModelProperty(value = "表单名称") private String name; - @ApiModelProperty(value = "商户状态") - private Integer status; - - @ApiModelProperty(value = "表单JSON") - private String formJson; - - @ApiModelProperty(value = "备注") - private String remark; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始创建时间") - private Date beginCreateTime; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束创建时间") - private Date endCreateTime; - } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/form/BpmForm.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/form/BpmForm.java index 49967f295..c3435c15b 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/form/BpmForm.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/dataobject/form/BpmForm.java @@ -37,10 +37,10 @@ public class BpmForm extends BaseDO { * 状态 */ private Integer status; - /** - * 表单JSON - */ - private String formJson; +// /** +// * 表单JSON +// */ +// private String formJson; /** * 表单配置 * diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/mysql/form/BpmFormMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/mysql/form/BpmFormMapper.java index 268eff62c..ab21094f3 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/mysql/form/BpmFormMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/dal/mysql/form/BpmFormMapper.java @@ -22,20 +22,6 @@ public interface BpmFormMapper extends BaseMapperX { default PageResult selectPage(BpmFormPageReqVO reqVO) { return selectPage(reqVO, new QueryWrapperX() .likeIfPresent("name", reqVO.getName()) - .eqIfPresent("status", reqVO.getStatus()) - .eqIfPresent("form_json", reqVO.getFormJson()) - .eqIfPresent("remark", reqVO.getRemark()) - .betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - .orderByDesc("id")); - } - - default List selectList(BpmFormExportReqVO reqVO) { - return selectList(new QueryWrapperX() - .likeIfPresent("name", reqVO.getName()) - .eqIfPresent("status", reqVO.getStatus()) - .eqIfPresent("form_json", reqVO.getFormJson()) - .eqIfPresent("remark", reqVO.getRemark()) - .betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) .orderByDesc("id")); } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormService.java index 154e002a1..b37ea0e50 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormService.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.adminserver.modules.bpm.service.form; import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormExportReqVO; import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormPageReqVO; import cn.iocoder.yudao.adminserver.modules.bpm.controller.form.vo.BpmFormUpdateReqVO; import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.form.BpmForm; @@ -65,12 +64,4 @@ public interface BpmFormService { */ PageResult getFormPage(BpmFormPageReqVO pageReqVO); - /** - * 获得动态表单列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 动态表单列表 - */ - List getFormList(BpmFormExportReqVO exportReqVO); - } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormServiceImpl.java index 03a8be84e..deebe697c 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/form/BpmFormServiceImpl.java @@ -77,9 +77,4 @@ public class BpmFormServiceImpl implements BpmFormService { return formMapper.selectPage(pageReqVO); } - @Override - public List getFormList(BpmFormExportReqVO exportReqVO) { - return formMapper.selectList(exportReqVO); - } - } diff --git a/yudao-admin-ui/src/api/bpm/form.js b/yudao-admin-ui/src/api/bpm/form.js new file mode 100644 index 000000000..768ff7a69 --- /dev/null +++ b/yudao-admin-ui/src/api/bpm/form.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +// 创建工作流的表单定义 +export function createForm(data) { + return request({ + url: '/bpm/form/create', + method: 'post', + data: data + }) +} + +// 更新工作流的表单定义 +export function updateForm(data) { + return request({ + url: '/bpm/form/update', + method: 'put', + data: data + }) +} + +// 删除工作流的表单定义 +export function deleteForm(id) { + return request({ + url: '/bpm/form/delete?id=' + id, + method: 'delete' + }) +} + +// 获得工作流的表单定义 +export function getForm(id) { + return request({ + url: '/bpm/form/get?id=' + id, + method: 'get' + }) +} + +// 获得工作流的表单定义分页 +export function getFormPage(query) { + return request({ + url: '/bpm/form/page', + method: 'get', + params: query + }) +} + +export class exportFormExcel { +} diff --git a/yudao-admin-ui/src/views/bpm/form/index.vue b/yudao-admin-ui/src/views/bpm/form/index.vue new file mode 100644 index 000000000..c9af34559 --- /dev/null +++ b/yudao-admin-ui/src/views/bpm/form/index.vue @@ -0,0 +1,214 @@ + + +