删除与 ztcloud 的 bpm 中重复的代码, 改为以jar包方式引入 ztcloud 的bpm

This commit is contained in:
ranke
2026-01-30 11:46:25 +08:00
parent afc1ffa4fe
commit 1c62711f74
296 changed files with 44 additions and 27720 deletions

View File

@@ -4,11 +4,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-bpm</artifactId>
<artifactId>zt-module-bpm-dsc</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>zt-module-bpm-server</artifactId>
<artifactId>zt-module-bpm-server-dsc</artifactId>
<name>${project.artifactId}</name>
<description>
@@ -28,6 +28,16 @@
<artifactId>zt-module-bpm-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-bpm-server</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-bpm-api-dsc</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-system-api</artifactId>

View File

@@ -1,79 +0,0 @@
package com.zt.plat.module.bpm.api.definition;
import com.zt.plat.framework.common.enums.CommonStatusEnum;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.bpm.api.definition.dto.BpmCategoryPageReqDTO;
import com.zt.plat.module.bpm.api.definition.dto.BpmCategoryRespDTO;
import com.zt.plat.module.bpm.api.definition.dto.BpmCategorySaveReqDTO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.category.BpmCategoryPageReqVO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.category.BpmCategorySaveReqVO;
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmCategoryDO;
import com.zt.plat.module.bpm.service.definition.BpmCategoryService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import java.util.List;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
/**
* BPM 流程分类 Api 实现类
*
* @author ZT
*/
@RestController
@Validated
public class BpmCategoryApiImpl implements BpmCategoryApi {
@Resource
private BpmCategoryService categoryService;
@Override
public CommonResult<Long> createCategory(@Valid BpmCategorySaveReqDTO createReqDTO) {
BpmCategorySaveReqVO createReqVO = BeanUtils.toBean(createReqDTO, BpmCategorySaveReqVO.class);
return success(categoryService.createCategory(createReqVO));
}
@Override
public CommonResult<Boolean> updateCategory(@Valid BpmCategorySaveReqDTO updateReqDTO) {
BpmCategorySaveReqVO updateReqVO = BeanUtils.toBean(updateReqDTO, BpmCategorySaveReqVO.class);
categoryService.updateCategory(updateReqVO);
return success(true);
}
@Override
public CommonResult<Boolean> updateCategorySortBatch(List<Long> ids) {
categoryService.updateCategorySortBatch(ids);
return success(true);
}
@Override
public CommonResult<Boolean> deleteCategory(Long id) {
categoryService.deleteCategory(id);
return success(true);
}
@Override
public CommonResult<BpmCategoryRespDTO> getCategory(Long id) {
BpmCategoryDO category = categoryService.getCategory(id);
return success(BeanUtils.toBean(category, BpmCategoryRespDTO.class));
}
@Override
public CommonResult<PageResult<BpmCategoryRespDTO>> getCategoryPage(@Valid BpmCategoryPageReqDTO pageReqDTO) {
BpmCategoryPageReqVO pageReqVO = BeanUtils.toBean(pageReqDTO, BpmCategoryPageReqVO.class);
PageResult<BpmCategoryDO> pageResult = categoryService.getCategoryPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, BpmCategoryRespDTO.class));
}
@Override
public CommonResult<List<BpmCategoryRespDTO>> getCategorySimpleList() {
List<BpmCategoryDO> list = categoryService.getCategoryListByStatus(CommonStatusEnum.ENABLE.getStatus());
return success(BeanUtils.toBean(list, BpmCategoryRespDTO.class));
}
}

View File

@@ -1,76 +0,0 @@
package com.zt.plat.module.bpm.api.definition;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.bpm.api.definition.dto.BpmFormPageReqDTO;
import com.zt.plat.module.bpm.api.definition.dto.BpmFormRespDTO;
import com.zt.plat.module.bpm.api.definition.dto.BpmFormSaveReqDTO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO;
import com.zt.plat.module.bpm.controller.admin.definition.vo.form.BpmFormSaveReqVO;
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmFormDO;
import com.zt.plat.module.bpm.service.definition.BpmFormService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import java.util.List;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
/**
* 动态表单 Api 实现类
*
* @author ZT
*/
@RestController
@Validated
public class BpmFormApiImpl implements BpmFormApi {
@Resource
private BpmFormService formService;
@Override
public CommonResult<Long> createForm(@Valid BpmFormSaveReqDTO createReqDTO) {
BpmFormSaveReqVO createReqVO = BeanUtils.toBean(createReqDTO, BpmFormSaveReqVO.class);
return success(formService.createForm(createReqVO));
}
@Override
public CommonResult<Boolean> updateForm(@Valid BpmFormSaveReqDTO updateReqDTO) {
BpmFormSaveReqVO updateReqVO = BeanUtils.toBean(updateReqDTO, BpmFormSaveReqVO.class);
formService.updateForm(updateReqVO);
return success(true);
}
@Override
public CommonResult<Boolean> deleteForm(Long id) {
formService.deleteForm(id);
return success(true);
}
@Override
public CommonResult<BpmFormRespDTO> getForm(Long id) {
BpmFormDO form = formService.getForm(id);
return success(BeanUtils.toBean(form, BpmFormRespDTO.class));
}
@Override
public CommonResult<PageResult<BpmFormRespDTO>> getFormPage(BpmFormPageReqDTO pageReqDTO) {
BpmFormPageReqVO pageReqVO = BeanUtils.toBean(pageReqDTO, BpmFormPageReqVO.class);
PageResult<BpmFormDO> pageResult = formService.getFormPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, BpmFormRespDTO.class));
}
@Override
public CommonResult<List<BpmFormRespDTO>> getFormSimpleList() {
List<BpmFormDO> list = formService.getFormList();
// 只返回 id、name 字段
List<BpmFormRespDTO> dtoList = list.stream()
.map(formDO -> new BpmFormRespDTO().setId(formDO.getId()).setName(formDO.getName()))
.collect(java.util.stream.Collectors.toList());
return success(dtoList);
}
}

View File

@@ -1,41 +0,0 @@
package com.zt.plat.module.bpm.api.definition;
import com.zt.plat.framework.common.enums.CommonStatusEnum;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.bpm.api.definition.dto.BpmUserGroupRespDTO;
import com.zt.plat.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
import com.zt.plat.module.bpm.service.definition.BpmUserGroupService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
import jakarta.annotation.Resource;
import java.util.List;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
/**
* 用户组 Api 实现类
*
* @author ZT
*/
@RestController
@Validated
public class BpmUserGroupApiImpl implements BpmUserGroupApi {
@Resource
private BpmUserGroupService userGroupService;
@Override
public CommonResult<BpmUserGroupRespDTO> getUserGroup(Long id) {
BpmUserGroupDO userGroup = userGroupService.getUserGroup(id);
return success(BeanUtils.toBean(userGroup, BpmUserGroupRespDTO.class));
}
@Override
public CommonResult<List<BpmUserGroupRespDTO>> getUserGroupSimpleList() {
List<BpmUserGroupDO> list = userGroupService.getUserGroupListByStatus(CommonStatusEnum.ENABLE.getStatus());
return success(BeanUtils.toBean(list, BpmUserGroupRespDTO.class));
}
}

View File

@@ -1,4 +0,0 @@
/**
* bpm API 实现类,定义暴露给其它模块的 API
*/
package com.zt.plat.module.bpm.api;

View File

@@ -1,15 +0,0 @@
package com.zt.plat.module.bpm.controller.admin.base.dept;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "部门精简信息 VO")
@Data
public class DeptSimpleBaseVO {
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "技术部")
private String name;
}

View File

@@ -1,4 +0,0 @@
/**
* 基础包,放一些通用的 VO 类
*/
package com.zt.plat.module.bpm.controller.admin.base;

Some files were not shown because too many files have changed in this diff Show More