提交 000b6ae6 authored 作者: kxjia's avatar kxjia

开发问题管理工作流

上级 ef2cf5aa
...@@ -16,6 +16,9 @@ import org.jeecg.modules.flowable.apithird.business.entity.FlowForm; ...@@ -16,6 +16,9 @@ import org.jeecg.modules.flowable.apithird.business.entity.FlowForm;
import org.jeecg.modules.flowable.apithird.business.entity.SysDeployForm; import org.jeecg.modules.flowable.apithird.business.entity.SysDeployForm;
import org.jeecg.modules.flowable.apithird.business.service.IFlowFormService; import org.jeecg.modules.flowable.apithird.business.service.IFlowFormService;
import org.jeecg.modules.flowable.apithird.business.service.ISysDeployFormService; import org.jeecg.modules.flowable.apithird.business.service.ISysDeployFormService;
import org.jeecg.modules.stm.my.entity.MyTaskFlow;
import org.jeecg.modules.stm.my.service.IMyTaskFlowService;
import org.jeecg.modules.stm.utils.UserUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.*; import java.util.*;
...@@ -35,6 +38,10 @@ public class FlowFormController { ...@@ -35,6 +38,10 @@ public class FlowFormController {
@Autowired @Autowired
private RepositoryService repositoryService; private RepositoryService repositoryService;
@Autowired
private IMyTaskFlowService myTaskFlowService;
@RequestMapping("/list") @RequestMapping("/list")
public Result<IPage<FlowForm>> getFormList( public Result<IPage<FlowForm>> getFormList(
...@@ -384,7 +391,6 @@ public class FlowFormController { ...@@ -384,7 +391,6 @@ public class FlowFormController {
} }
} }
} }
return extensionProperties; return extensionProperties;
} }
......
...@@ -266,6 +266,7 @@ public class FlowTaskController { ...@@ -266,6 +266,7 @@ public class FlowTaskController {
@PostMapping(value = "/getMyTaskFlow") @PostMapping(value = "/getMyTaskFlow")
public Result getMyTaskFlow(@RequestBody FlowTaskVo flowTaskVo) { public Result getMyTaskFlow(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.getMyTaskFlow(flowTaskVo); return flowTaskService.getMyTaskFlow(flowTaskVo);
} }
......
...@@ -482,7 +482,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl ...@@ -482,7 +482,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getProcessInstanceId()).active().singleResult(); Task task = taskService.createTaskQuery().processInstanceId(processInstance.getProcessInstanceId()).active().singleResult();
result.put("deployId", DeployId); result.put("deployId", DeployId);
result.put("taskId", task.getId()); result.put("taskId", task.getId());
result.put("procInsId", task.getProcessInstanceId()); result.put("procInsId", task.getProcessDefinitionId());
result.put("executionId", task.getExecutionId()); result.put("executionId", task.getExecutionId());
result.put("instanceId", task.getProcessInstanceId()); result.put("instanceId", task.getProcessInstanceId());
......
...@@ -41,9 +41,7 @@ import org.jeecg.common.system.vo.LoginUser; ...@@ -41,9 +41,7 @@ import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.SpringContextUtils; import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.modules.flowable.apithird.business.entity.FlowForm; import org.jeecg.modules.flowable.apithird.business.entity.FlowForm;
import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness;
import org.jeecg.modules.flowable.apithird.business.entity.MyTaskFlow;
import org.jeecg.modules.flowable.apithird.business.service.IFlowFormService; import org.jeecg.modules.flowable.apithird.business.service.IFlowFormService;
import org.jeecg.modules.flowable.apithird.business.service.IMyTaskFlowService;
import org.jeecg.modules.flowable.apithird.business.service.ISysDeployFormService; import org.jeecg.modules.flowable.apithird.business.service.ISysDeployFormService;
import org.jeecg.modules.flowable.apithird.business.service.impl.FlowMyBusinessServiceImpl; import org.jeecg.modules.flowable.apithird.business.service.impl.FlowMyBusinessServiceImpl;
import org.jeecg.modules.flowable.apithird.entity.ActStatus; import org.jeecg.modules.flowable.apithird.entity.ActStatus;
...@@ -64,6 +62,8 @@ import org.jeecg.modules.flowable.flow.FindNextNodeUtil; ...@@ -64,6 +62,8 @@ import org.jeecg.modules.flowable.flow.FindNextNodeUtil;
import org.jeecg.modules.flowable.flow.FlowableUtils; import org.jeecg.modules.flowable.flow.FlowableUtils;
import org.jeecg.modules.flowable.service.IFlowTaskService; import org.jeecg.modules.flowable.service.IFlowTaskService;
import org.jeecg.modules.stm.my.entity.MyTask; import org.jeecg.modules.stm.my.entity.MyTask;
import org.jeecg.modules.stm.my.entity.MyTaskFlow;
import org.jeecg.modules.stm.my.service.IMyTaskFlowService;
import org.jeecg.modules.stm.my.service.IMyTaskService; import org.jeecg.modules.stm.my.service.IMyTaskService;
import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -111,8 +111,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask ...@@ -111,8 +111,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
@Override @Override
public Result complete(FlowTaskVo taskVo) { public Result complete(FlowTaskVo taskVo) {
Task task = taskService.createTaskQuery().taskId(taskVo.getTaskId()).singleResult(); Task task = taskService.createTaskQuery().taskId(taskVo.getTaskId()).singleResult();
if (Objects.isNull(task)) { if (Objects.isNull(task)) {
return Result.error("任务不存在"); return Result.error("任务不存在");
...@@ -133,6 +131,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask ...@@ -133,6 +131,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
Task nextTask = taskService.createTaskQuery() Task nextTask = taskService.createTaskQuery()
.processInstanceId(taskVo.getInstanceId()) .processInstanceId(taskVo.getInstanceId())
.singleResult(); .singleResult();
if(nextTask!=null){ if(nextTask!=null){
String userType = userTypeObject.toString(); String userType = userTypeObject.toString();
String approvalId = taskVo.getValues().get("approval").toString(); String approvalId = taskVo.getValues().get("approval").toString();
......
package org.jeecg.modules.stm.my.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.stm.my.entity.MyTaskFlow;
import org.jeecg.modules.stm.my.service.IMyTaskFlowService;
import org.jeecg.modules.stm.utils.UserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.Arrays;
/**
* @Description: my_task_flow
* @Author: jeecg-boot
* @Date: 2026-04-01
* @Version: V1.0
*/
@Tag(name="my_task_flow")
@RestController
@RequestMapping("/my/myTaskFlow")
@Slf4j
public class MyTaskFlowController extends JeecgController<MyTaskFlow, IMyTaskFlowService> {
@Autowired
private IMyTaskFlowService myTaskFlowService;
/**
* 分页列表查询
*
* @param myTaskFlow
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "my_task_flow-分页列表查询")
@Operation(summary="my_task_flow-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MyTaskFlow>> queryPageList(MyTaskFlow myTaskFlow,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MyTaskFlow> queryWrapper = QueryGenerator.initQueryWrapper(myTaskFlow, req.getParameterMap());
Page<MyTaskFlow> page = new Page<MyTaskFlow>(pageNo, pageSize);
IPage<MyTaskFlow> pageList = myTaskFlowService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param myTaskFlow
* @return
*/
@AutoLog(value = "my_task_flow-添加")
@Operation(summary="my_task_flow-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MyTaskFlow myTaskFlow) {
if(myTaskFlow.getUid()==null&&myTaskFlow.getRoleId()==null) {
myTaskFlow.setUid(UserUtil.getUserId());
}
myTaskFlowService.save(myTaskFlow);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param myTaskFlow
* @return
*/
@AutoLog(value = "my_task_flow-编辑")
@Operation(summary="my_task_flow-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody MyTaskFlow myTaskFlow) {
myTaskFlowService.updateById(myTaskFlow);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "my_task_flow-通过id删除")
@Operation(summary="my_task_flow-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
myTaskFlowService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "my_task_flow-批量删除")
@Operation(summary="my_task_flow-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.myTaskFlowService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "my_task_flow-通过id查询")
@Operation(summary="my_task_flow-通过id查询")
@GetMapping(value = "/queryById")
public Result<MyTaskFlow> queryById(@RequestParam(name="id",required=true) String id) {
MyTaskFlow myTaskFlow = myTaskFlowService.getById(id);
if(myTaskFlow==null) {
return Result.error("未找到对应数据");
}
return Result.OK(myTaskFlow);
}
/**
* 导出excel
*
* @param request
* @param myTaskFlow
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MyTaskFlow myTaskFlow) {
return super.exportXls(request, myTaskFlow, MyTaskFlow.class, "my_task_flow");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MyTaskFlow.class);
}
}
package org.jeecg.modules.flowable.apithird.business.entity; package org.jeecg.modules.stm.my.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.io.Serializable;
/** /**
* @Description: my_task_flow * @Description: my_task_flow
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2026-03-19 * @Date: 2026-04-01
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
...@@ -65,12 +57,21 @@ public class MyTaskFlow implements Serializable { ...@@ -65,12 +57,21 @@ public class MyTaskFlow implements Serializable {
@Excel(name = "procDefId", width = 15) @Excel(name = "procDefId", width = 15)
@Schema(description = "procDefId") @Schema(description = "procDefId")
private java.lang.String procDefId; private java.lang.String procDefId;
/**uid*/ /**uid*/
@Excel(name = "uid", width = 15) @Excel(name = "procDefId", width = 15)
@Schema(description = "uid") @Schema(description = "uid")
private java.lang.String uid; private java.lang.String uid;
/**taskDefinitionKey*/
/**角色ID*/
@Excel(name = "roleId", width = 15)
@Schema(description = "roleId")
private java.lang.String roleId;
/**工作流节点ID*/
@Excel(name = "taskDefinitionKey", width = 15) @Excel(name = "taskDefinitionKey", width = 15)
@Schema(description = "taskDefinitionKey") @Schema(description = "taskDefinitionKey")
private java.lang.String taskDefinitionKey; private java.lang.String taskDefinitionKey;
} }
package org.jeecg.modules.flowable.apithird.business.mapper; package org.jeecg.modules.stm.my.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.flowable.apithird.business.entity.MyTaskFlow;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.stm.my.entity.MyTaskFlow;
/** /**
* @Description: my_task_flow * @Description: my_task_flow
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2026-03-19 * @Date: 2026-04-01
* @Version: V1.0 * @Version: V1.0
*/ */
public interface MyTaskFlowMapper extends BaseMapper<MyTaskFlow> { public interface MyTaskFlowMapper extends BaseMapper<MyTaskFlow> {
......
package org.jeecg.modules.flowable.apithird.business.service; package org.jeecg.modules.stm.my.service;
import org.jeecg.modules.flowable.apithird.business.entity.MyTaskFlow; import org.jeecg.modules.stm.my.entity.MyTaskFlow;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* @Description: my_task_flow * @Description: my_task_flow
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2026-03-19 * @Date: 2026-04-01
* @Version: V1.0 * @Version: V1.0
*/ */
public interface IMyTaskFlowService extends IService<MyTaskFlow> { public interface IMyTaskFlowService extends IService<MyTaskFlow> {
public MyTaskFlow selectMyTaskFlowByDeployId(String deployId,String targetId) ; MyTaskFlow selectMyTaskFlowByDeployId(String deployId,String targetId);
} }
package org.jeecg.modules.flowable.apithird.business.service.impl; package org.jeecg.modules.stm.my.service.impl;
import org.jeecg.modules.flowable.apithird.business.entity.FlowForm; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.flowable.apithird.business.entity.MyTaskFlow; import org.jeecg.modules.stm.my.entity.MyTaskFlow;
import org.jeecg.modules.flowable.apithird.business.mapper.MyTaskFlowMapper; import org.jeecg.modules.stm.my.mapper.MyTaskFlowMapper;
import org.jeecg.modules.flowable.apithird.business.mapper.SysDeployFormMapper; import org.jeecg.modules.stm.my.service.IMyTaskFlowService;
import org.jeecg.modules.flowable.apithird.business.service.IMyTaskFlowService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/** /**
* @Description: my_task_flow * @Description: my_task_flow
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2026-03-19 * @Date: 2026-04-01
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
public class MyTaskFlowServiceImpl extends ServiceImpl<MyTaskFlowMapper, MyTaskFlow> implements IMyTaskFlowService {
@Autowired
private MyTaskFlowMapper myTaskFlowMapper;
public class MyTaskFlowServiceImpl extends ServiceImpl<MyTaskFlowMapper, MyTaskFlow> implements IMyTaskFlowService {
@Override @Override
public MyTaskFlow selectMyTaskFlowByDeployId(String deployId,String targetId) { public MyTaskFlow selectMyTaskFlowByDeployId(String deployId,String targetId) {
return myTaskFlowMapper.selectMyTaskFlowByDeployId(deployId,targetId); return this.baseMapper.selectMyTaskFlowByDeployId(deployId,targetId);
} }
} }
...@@ -66,22 +66,8 @@ public class StProblemCheckController extends JeecgController<StProblemCheck, IS ...@@ -66,22 +66,8 @@ public class StProblemCheckController extends JeecgController<StProblemCheck, IS
Page<StProblemCheck> page = new Page<StProblemCheck>(pageNo, pageSize); Page<StProblemCheck> page = new Page<StProblemCheck>(pageNo, pageSize);
IPage<StProblemCheck> pageList = stProblemCheckService.page(page, queryWrapper); IPage<StProblemCheck> pageList = stProblemCheckService.page(page, queryWrapper);
List<StProblemCheck> list = pageList.getRecords();
if(CollectionUtils.isEmpty(list)){
}else{
for(StProblemCheck stPlanMan:pageList.getRecords()){
String tableName = getTableNameByMyBatisPlus();
if(tableName!=null&&!tableName.equals("")){
//需要根据 tableName 反查DeployId
String deployId=iSysDictService.queryDictTextByKeyOfformTableName(tableName);
stPlanMan.setDeployId(deployId);
}
}
}
return Result.OK(pageList); return Result.OK(pageList);
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.flowable.apithird.business.mapper.MyTaskFlowMapper"> <mapper namespace="org.jeecg.modules.stm.my.mapper.MyTaskFlowMapper">
<select id="selectMyTaskFlowByDeployId" resultType="org.jeecg.modules.stm.my.entity.MyTaskFlow">
<select id="selectMyTaskFlowByDeployId" resultType="org.jeecg.modules.flowable.apithird.business.entity.MyTaskFlow">
SELECT t.deploy_id,t.task_id,t.proc_ins_id,t.execution_id,t.proc_def_id,t.target_id SELECT t.deploy_id,t.task_id,t.proc_ins_id,t.execution_id,t.proc_def_id,t.target_id
FROM my_task_flow t FROM my_task_flow t
WHERE t.deploy_id=#{deployId} AND t.target_id=#{targetId} WHERE t.deploy_id=#{deployId} AND t.target_id=#{targetId}
ORDER BY t.id DESC ORDER BY t.id DESC
LIMIT 1 LIMIT 1
</select> </select>
</mapper> </mapper>
...@@ -19,10 +19,25 @@ management: ...@@ -19,10 +19,25 @@ management:
exposure: exposure:
include: metrics,httpexchanges,jeecghttptrace include: metrics,httpexchanges,jeecghttptrace
flowable:
database-schema-update: false
cmmn:
enabled: false
app:
enabled: false
content:
enabled: false
dmn:
enabled: false
form:
enabled: false
spring: spring:
# main: # main:
# # 启动加速 (建议开发环境,开启后flyway自动升级失效) # # 启动加速 (建议开发环境,开启后flyway自动升级失效)
# lazy-initialization: true # lazy-initialization: true
liquibase:
enabled: false
flyway: flyway:
# 是否启用flyway # 是否启用flyway
enabled: false enabled: false
......
# Module path to generate in the backend Java project # Module path to generate in the backend Java project
project_path=F:\\gitcode\\JeecgBoot\\jeecg-boot\\jeecg-boot-module\\jeecg-module-stm project_path=F:\\gitcode\\JeecgBoot\\jeecg-boot\\jeecg-boot-module\\jeecg-module-demo
## Path to generate in the frontend VUE3 project ## Path to generate in the frontend VUE3 project
#ui_project_path=F:\\gitcode\\1jeecg-boot-github\\jeecgboot-vue3 #ui_project_path=F:\\gitcode\\1jeecg-boot-github\\jeecgboot-vue3
# Business package path # Business package path
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
diver_name=com.mysql.jdbc.Driver diver_name=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/jeecg-boot?useUnicode=true&characterEncoding=UTF-8 url=jdbc:mysql://localhost:3306/jeecg-boot?useUnicode=true&characterEncoding=UTF-8
username=root username=root
password=root password=123456
database_name=jeecg-boot database_name=jeecg-boot
#oracle #oracle
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论