Merge branch 'refs/heads/zt-test' into test

This commit is contained in:
FCL
2026-02-04 11:49:39 +08:00
296 changed files with 187 additions and 22420 deletions

View File

@@ -11,9 +11,12 @@ import com.alibaba.druid.support.logging.Log;
import com.alibaba.druid.support.logging.LogFactory;
import com.alibaba.druid.util.JdbcUtils;
import com.alibaba.druid.util.MySqlUtils;
import java.net.SocketTimeoutException;
import java.sql.*;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

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;

View File

@@ -1,22 +0,0 @@
package com.zt.plat.module.bpm.controller.admin.base.user;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "用户精简信息 VO")
@Data
public class UserSimpleBaseVO {
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String nickname;
@Schema(description = "用户头像", example = "https://www.iocoder.cn/1.png")
private String avatar;
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long deptId;
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
private String deptName;
}

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