yxk-20260601-bug修复
1、通用查询督办模块:部门字典显示异常 2、通用查询督办模块:新创建的督办在最下面,需要把最新的放在最上面
This commit is contained in:
+6
-7
@@ -39,7 +39,6 @@ import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
@@ -198,12 +197,12 @@ public class TaskTaskController extends JeecgController<TaskTask, ITaskTaskServi
|
||||
//@AutoLog(value = "事项任务计划表(发起流程)-通过id查询")
|
||||
@Operation(summary = "事项任务计划表(发起流程)-通过businessId查询")
|
||||
@GetMapping(value = "/queryByBusinessId")
|
||||
public Result<List<TaskTask>> queryByBusinessId(@RequestParam(name = "businessId", required = true) String businessId) throws Exception {
|
||||
List<TaskTask> taskTaskList = taskTaskService.getTaskTaskListByBusinessId(businessId);
|
||||
if (CollectionUtils.isEmpty(taskTaskList)) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(taskTaskList);
|
||||
public Result<IPage<TaskTask>> queryByBusinessId(@RequestParam(name = "businessId", required = true) String businessId,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception {
|
||||
Page<TaskTask> page = new Page<>(pageNo, pageSize);
|
||||
IPage<TaskTask> pageList = taskTaskService.getTaskTaskPageByBusinessId(page, businessId);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@ package org.jeecg.modules.tasktask.service;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.tasktask.entity.TaskTask;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 事项任务计划表(发起流程)
|
||||
* @Author: jeecg-boot
|
||||
@@ -16,7 +16,7 @@ public interface ITaskTaskService extends IService<TaskTask> {
|
||||
boolean singleFlowStart(TaskTask taskTask,String userName) throws Exception;
|
||||
boolean multiFlowStart(TaskTask taskTask,String userName,Integer intervalType, Integer startCount) throws Exception;
|
||||
Result<?> handleFlowStart(TaskTask taskTask, String username, Integer intervalType, Integer startCount)throws Exception;
|
||||
List<TaskTask> getTaskTaskListByBusinessId(String businessId) throws Exception;
|
||||
IPage<TaskTask> getTaskTaskPageByBusinessId(Page<TaskTask> page, String businessId) throws Exception;
|
||||
boolean updateDeptHandlerName(String processInstanceId, String deptHandlerName);
|
||||
boolean deleteSingleProcess(String processInstId);
|
||||
}
|
||||
|
||||
+12
-6
@@ -2,6 +2,8 @@ package org.jeecg.modules.tasktask.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.util.Assert;
|
||||
@@ -50,7 +52,8 @@ public class TaskTaskServiceImpl extends ServiceImpl<TaskTaskMapper, TaskTask> i
|
||||
TaskTask newTask = new TaskTask();
|
||||
BeanUtils.copyProperties(taskTask, newTask);
|
||||
newTask.setId(null);
|
||||
newTask.setStartTime(null);
|
||||
// 立即发起流程以实际发起时刻为准,避免流程记录缺少开始时间。
|
||||
newTask.setStartTime(new Date());
|
||||
this.save(newTask);
|
||||
Result<String> res = bpmBaseExtApiImpl.startMutilProcess(taskTask.getFlowCode(), newTask.getId(), taskTask.getFormUrl(), taskTask.getFormUrl(), userName, jsonString);
|
||||
String procId = res.getResult();
|
||||
@@ -140,14 +143,17 @@ public class TaskTaskServiceImpl extends ServiceImpl<TaskTaskMapper, TaskTask> i
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
public List<TaskTask> getTaskTaskListByBusinessId(String businessId) throws Exception{
|
||||
@Override
|
||||
public IPage<TaskTask> getTaskTaskPageByBusinessId(Page<TaskTask> page, String businessId) throws Exception{
|
||||
if (StringUtils.isBlank(businessId)) {
|
||||
return Collections.emptyList();
|
||||
return page;
|
||||
}
|
||||
LambdaQueryWrapper<TaskTask> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(TaskTask::getBusinessId, businessId);
|
||||
// 2. 查询不到数据 → MP 本身会返回空集合,不是 null
|
||||
return this.list(queryWrapper);
|
||||
queryWrapper.eq(TaskTask::getBusinessId, businessId)
|
||||
// Show the latest started or created process first for the current business.
|
||||
.orderByDesc(TaskTask::getStartTime)
|
||||
.orderByDesc(TaskTask::getCreateTime);
|
||||
return this.page(page, queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user