Merge branch 'dev' of http://git.znkjfw.com/ak/zn-cloud into frx
This commit is contained in:
commit
082a8667cd
@ -13,4 +13,15 @@ public class PageUtils {
|
||||
return (pageParam.getPageNo() - 1) * pageParam.getPageSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据当前页面,判断是否还有下一页
|
||||
* @param total
|
||||
* @param pageParam
|
||||
* @return
|
||||
*/
|
||||
public static boolean hasNextPage(int total, PageParam pageParam) {
|
||||
int totalPages = (total + pageParam.getPageSize() - 1) / pageParam.getPageSize();
|
||||
return pageParam.getPageNo() < totalPages;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -41,14 +41,12 @@ public class FinancialPaymentController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建财务支付子表")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:financial-payment:create')")
|
||||
public CommonResult<Long> createFinancialPayment(@Valid @RequestBody FinancialPaymentSaveVO vo) {
|
||||
return success(financialPaymentService.createFinancialPayment(vo));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新财务支付管理")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:financial-payment:update')")
|
||||
public CommonResult<Boolean> updateFinancialPayment(@Valid @RequestBody FinancialPaymentSaveReqVO updateReqVO) {
|
||||
financialPaymentService.updateFinancialPayment(updateReqVO);
|
||||
return success(true);
|
||||
@ -71,7 +69,6 @@ public class FinancialPaymentController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除财务支付管理")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('bpm:financial-payment:delete')")
|
||||
public CommonResult<Boolean> deleteFinancialPayment(@RequestParam("id") Long id) {
|
||||
financialPaymentService.deleteFinancialPayment(id);
|
||||
return success(true);
|
||||
@ -80,7 +77,6 @@ public class FinancialPaymentController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得财务支付管理")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:financial-payment:query')")
|
||||
public CommonResult<FinancialPaymentRespVO> getFinancialPayment(@RequestParam("id") Long id) {
|
||||
FinancialPaymentDO financialPayment = financialPaymentService.getFinancialPayment(id);
|
||||
FinancialPaymentRespVO vo = BeanUtils.toBean(financialPayment, FinancialPaymentRespVO.class);
|
||||
@ -105,7 +101,6 @@ public class FinancialPaymentController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得财务支付管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('bpm:financial-payment:query')")
|
||||
public CommonResult<PageResult<FinancialPaymentRespVO>> getFinancialPaymentPage(@Valid FinancialPaymentPageReqVO pageReqVO) {
|
||||
PageResult<FinancialPaymentDO> pageResult = financialPaymentService.getFinancialPaymentPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, FinancialPaymentRespVO.class));
|
||||
|
@ -198,4 +198,13 @@ public class BpmTaskController {
|
||||
|
||||
return success(taskService.getTaskListByProcessInstanceIds(historyProcessInstanceIds));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("getCurrentToDoProcessInstacePreAndNex-page")
|
||||
@Operation(summary = "获取当前待处理流程实例(带查询条件),上一个流程和下一个流程的实例ID")
|
||||
public CommonResult<Map<String,String>> getCurrentToDoProcessInstacePreAndNex(@RequestParam("processInstanceId") String processInstanceId,@Valid BpmTaskTodoPageReqVO pageVO) {
|
||||
return success(taskService.getCurrentToDoProcessInstacePreAndNex(getLoginUserId(), processInstanceId, pageVO));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ -61,4 +62,7 @@ public class BpmProcessInstancePageItemRespVO {
|
||||
private String userName ;
|
||||
}
|
||||
|
||||
@Schema(description = "业务表字段信息", example = "报销总金额:999.11,开户行信息:银行卡,收款人卡号:1234567")
|
||||
private String detailInfo ;
|
||||
|
||||
}
|
||||
|
@ -55,6 +55,10 @@ public interface BpmProcessInstanceConvert {
|
||||
Map<String, List<Task>> taskMap,
|
||||
Map<Long, AdminUserRespDTO> userMap ) {
|
||||
List<BpmProcessInstancePageItemRespVO> list = convertList(page.getList());
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BpmProcessInstancePageItemRespVO vo = list.get(i) ;
|
||||
vo.setDetailInfo(page.getList().get(i).getDetailInfo()) ;
|
||||
}
|
||||
list.forEach(respVO -> respVO.setTasks(convertList2(taskMap.get(respVO.getId()),userMap)));
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
@ -94,8 +98,9 @@ public interface BpmProcessInstanceConvert {
|
||||
default BpmProcessInstanceRespVO convert2(HistoricProcessInstance processInstance, BpmProcessInstanceExtDO processInstanceExt,
|
||||
ProcessDefinition processDefinition, BpmProcessDefinitionExtDO processDefinitionExt,
|
||||
String bpmnXml, AdminUserRespDTO startUser, DeptRespDTO dept) {
|
||||
BpmProcessInstanceRespVO respVO = convert2(processInstance);
|
||||
BpmProcessInstanceRespVO respVO = new BpmProcessInstanceRespVO() ;
|
||||
copyTo(processInstanceExt, respVO);
|
||||
respVO = convert2(processInstance);
|
||||
// definition
|
||||
respVO.setProcessDefinition(convert2(processDefinition));
|
||||
copyTo(processDefinitionExt, respVO.getProcessDefinition());
|
||||
|
@ -93,4 +93,27 @@ public class BpmProcessInstanceExtDO extends BaseDO {
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
/**
|
||||
* 流程业务主键ID
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String businessKey ;
|
||||
|
||||
/**
|
||||
* 当前流程实例对应的表名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String tableName ;
|
||||
|
||||
/**
|
||||
* 当前流程实例在我的流程列表中需要显示的字段中英文
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String fieldNames ;
|
||||
|
||||
/**
|
||||
* 当前流程实例在我的流程列表中需要显示的转换后的数据
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String detailInfo ;
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 功能描述
|
||||
*
|
||||
* @author: yj
|
||||
* @date: 2024年09月24日 12:10
|
||||
*/
|
||||
@Mapper
|
||||
public interface DynamicMapper extends BaseMapperX<Object> {
|
||||
|
||||
@Select("${SQL}")
|
||||
Map<String,String> selectListByTableName(@Param("SQL")String sql);
|
||||
}
|
@ -3,13 +3,18 @@ package cn.iocoder.yudao.module.bpm.dal.mysql.task;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.*;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
|
||||
@Mapper
|
||||
public interface BpmProcessInstanceExtMapper extends BaseMapperX<BpmProcessInstanceExtDO> {
|
||||
|
||||
@ -30,9 +35,34 @@ public interface BpmProcessInstanceExtMapper extends BaseMapperX<BpmProcessInsta
|
||||
}
|
||||
|
||||
default PageResult<BpmProcessInstanceExtDO> selectPage(Long userId, BpmProcessInstanceMyPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
||||
//只能查询流程标识定义为oa开头的流程
|
||||
.likeIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, "oa_")
|
||||
// return selectPage(reqVO, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
||||
// //只能查询流程标识定义为oa开头的流程
|
||||
// .likeIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, "oa_")
|
||||
// .eqIfPresent(BpmProcessInstanceExtDO::getStartUserId, userId)
|
||||
// .likeIfPresent(BpmProcessInstanceExtDO::getName, reqVO.getName())
|
||||
// .eqIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, reqVO.getProcessDefinitionId())
|
||||
// .eqIfPresent(BpmProcessInstanceExtDO::getCategory, reqVO.getCategory())
|
||||
// .eqIfPresent(BpmProcessInstanceExtDO::getStatus, reqVO.getStatus())
|
||||
// .eqIfPresent(BpmProcessInstanceExtDO::getResult, reqVO.getResult())
|
||||
// .betweenIfPresent(BpmProcessInstanceExtDO::getCreateTime, reqVO.getCreateTime())
|
||||
// .orderByDesc(BpmProcessInstanceExtDO::getId));
|
||||
Long tenantId = TenantContextHolder.getTenantId() ;
|
||||
MPJLambdaWrapperX<BpmProcessInstanceExtDO> queryWrapper = new MPJLambdaWrapperX<>();
|
||||
queryWrapper.selectAll(BpmProcessInstanceExtDO.class);
|
||||
queryWrapper.selectAs("b.BUSINESS_KEY_", BpmProcessInstanceExtDO::getBusinessKey);
|
||||
queryWrapper.selectAs("d.name", BpmProcessInstanceExtDO::getTableName);
|
||||
queryWrapper.selectAs("d.field_names", BpmProcessInstanceExtDO::getFieldNames);
|
||||
queryWrapper.leftJoin(BpmProcessDefinitionExtDO.class,"e", on -> on.
|
||||
eq(BpmProcessDefinitionExtDO::getProcessDefinitionId,
|
||||
BpmProcessInstanceExtDO::getProcessDefinitionId)) ;
|
||||
//通过流程定义的关联业务配置表单ID,获取业务表,需要显示的中文名及英文字段
|
||||
queryWrapper.leftJoin("bpm_business_table_info d on e.business_table_info_id = d.id") ;
|
||||
//通过流程实例ID 获取流程业务主键ID
|
||||
queryWrapper.leftJoin("ACT_HI_PROCINST b on b.PROC_INST_ID_ = t.process_instance_id") ;
|
||||
//通过流程业务主键ID 查询对应的业务表,获取业务数据 业务表名,是通过流程定义获取
|
||||
//queryWrapper.leftJoin("(select * from ( select name from bpm_business_table_info where id = e.business_table_info_id ) ) c on b.BUSINESS_KEY_ = c.id") ;
|
||||
queryWrapper.eq("t.TENANT_ID", tenantId);
|
||||
queryWrapper.likeIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, "oa_")
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getStartUserId, userId)
|
||||
.likeIfPresent(BpmProcessInstanceExtDO::getName, reqVO.getName())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, reqVO.getProcessDefinitionId())
|
||||
@ -40,7 +70,8 @@ public interface BpmProcessInstanceExtMapper extends BaseMapperX<BpmProcessInsta
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(BpmProcessInstanceExtDO::getResult, reqVO.getResult())
|
||||
.betweenIfPresent(BpmProcessInstanceExtDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(BpmProcessInstanceExtDO::getId));
|
||||
.orderByDesc(BpmProcessInstanceExtDO::getId) ;
|
||||
return selectJoinPage(reqVO, BpmProcessInstanceExtDO.class, queryWrapper);
|
||||
}
|
||||
|
||||
default BpmProcessInstanceExtDO selectByProcessInstanceId(String processInstanceId) {
|
||||
|
@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.module.bpm.framework.util;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 功能描述
|
||||
*
|
||||
* @author: yj
|
||||
* @date: 2024年09月25日 18:53
|
||||
*/
|
||||
@Data
|
||||
public class PaginationResult {
|
||||
//上一个
|
||||
private String previousId;
|
||||
//当前
|
||||
private String currentId;
|
||||
//下一个
|
||||
private String nextId;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -239,4 +239,14 @@ public interface BpmTaskService {
|
||||
BpmTaskExtDO getTaskByProcessInstanceIdAndResult(String processInstanceId, Integer result);
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前待处理流程实例(带查询条件),上一个流程和下一个流程的实例ID
|
||||
*
|
||||
* @param userId 用户编号
|
||||
* @param processInstanceId 流程实例id
|
||||
* @param pageReqVO 分页请求
|
||||
* @return 流程任务分页
|
||||
*/
|
||||
Map<String,String> getCurrentToDoProcessInstacePreAndNex(Long userId, String processInstanceId,BpmTaskTodoPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessI
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*;
|
||||
import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAEntryDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOARegularDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOASalaryDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOASealDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO;
|
||||
@ -29,7 +28,6 @@ import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService;
|
||||
import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService;
|
||||
import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService;
|
||||
import cn.iocoder.yudao.module.bpm.service.oa.BpmOAEntryService;
|
||||
import cn.iocoder.yudao.module.bpm.service.oa.BpmOARegularService;
|
||||
import cn.iocoder.yudao.module.bpm.service.oa.BpmOASalaryService;
|
||||
import cn.iocoder.yudao.module.bpm.service.oa.BpmOASealService;
|
||||
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||
@ -119,9 +117,6 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
@Resource
|
||||
private BpmOASalaryService bpmOASalaryService;
|
||||
|
||||
@Resource
|
||||
private BpmOARegularService bpmOARegularService;
|
||||
|
||||
@Override
|
||||
public PageResult<BpmTaskCCPageItemRespVO> getCCTaskPage(Long userId, BpmTaskDonePageReqVO pageVO) {
|
||||
// 查询被抄送的Task
|
||||
@ -270,7 +265,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
|
||||
// 获得 ProcessInstance
|
||||
List<HistoricProcessInstance> historicProcessInstances = processInstanceService.getHistoricProcessInstances(
|
||||
convertSet(tasks, HistoricTaskInstance::getProcessInstanceId));
|
||||
convertSet(tasks, HistoricTaskInstance::getProcessInstanceId));
|
||||
|
||||
// 判断搜索条件是否选择用户
|
||||
if (pageVO.getUserId() != null) {
|
||||
@ -560,17 +555,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
if (salaryDO != null) {
|
||||
|
||||
DeptRespDTO dto = deptApi.getDept(salaryDO.getCompanyDeptId()).getCheckedData();
|
||||
paramMap.put("company_dept_flag", dto.getFlag()); //配置工厂编号flag
|
||||
}
|
||||
}
|
||||
|
||||
// 判断 转正流程时
|
||||
if (instance.getProcessDefinitionId().contains("oa_regular")) {
|
||||
BpmOARegularDO regularDO = bpmOARegularService.getByProcessInstanceId(instance.getProcessInstanceId());
|
||||
if (regularDO != null) {
|
||||
|
||||
DeptRespDTO dto = deptApi.getDept(regularDO.getDeptId()).getCheckedData();
|
||||
paramMap.put("regular_dept_flag", dto.getFlag()); //配置转正部门flag
|
||||
paramMap.put("company_dept_flag", dto.getFlag()); //配置工厂idflag
|
||||
}
|
||||
}
|
||||
|
||||
@ -1390,10 +1375,10 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
List<Task> tasks = taskQuery.list();
|
||||
if (!tasks.isEmpty()) {
|
||||
Task currentTask = tasks.get(0);
|
||||
System.out.println("当前任务节点ID: " + currentTask.getId());
|
||||
System.out.println("当前任务节点名称: " + currentTask.getName());
|
||||
System.out.println("当前任务节点创建时间: " + currentTask.getCreateTime());
|
||||
System.out.println("当前任务节点分配给: " + currentTask.getAssignee());
|
||||
// System.out.println("当前任务节点ID: " + currentTask.getId());
|
||||
// System.out.println("当前任务节点名称: " + currentTask.getName());
|
||||
// System.out.println("当前任务节点创建时间: " + currentTask.getCreateTime());
|
||||
// System.out.println("当前任务节点分配给: " + currentTask.getAssignee());
|
||||
return currentTask.getId();
|
||||
} else {
|
||||
System.out.println("没有找到当前进行中的任务节点");
|
||||
@ -1414,4 +1399,132 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
.eq(BpmTaskExtDO::getProcessInstanceId, processInstanceId)
|
||||
.eq(BpmTaskExtDO::getResult, result));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前待处理流程实例(带查询条件),上一个流程和下一个流程的实例ID
|
||||
*
|
||||
* @param userId 用户编号
|
||||
* @param processInstanceId 流程实例id
|
||||
* @param pageVO 分页请求
|
||||
* @return 流程任务分页
|
||||
*/
|
||||
public Map<String,String> getCurrentToDoProcessInstacePreAndNex(Long userId, String processInstanceId,BpmTaskTodoPageReqVO pageVO) {
|
||||
PageResult<BpmTaskTodoPageItemRespVO> list = getTodoTaskPage(userId, pageVO) ;
|
||||
|
||||
List<BpmTaskTodoPageItemRespVO> vos = list.getList() ;
|
||||
List<String> processInstanceIds = new ArrayList<>() ;
|
||||
for (BpmTaskTodoPageItemRespVO vo : vos) {
|
||||
processInstanceIds.add(vo.getProcessInstance().getId()) ;
|
||||
}
|
||||
String pre = null ;
|
||||
String next = null ;
|
||||
Long total = list.getTotal() ;
|
||||
|
||||
Integer pageNo = pageVO.getPageNo() ;
|
||||
//hasNext == true 还有下一页 false 没有下一页
|
||||
boolean hasNext = PageUtils.hasNextPage(total.intValue(),pageVO) ;
|
||||
//hasPre == true 还有下上页 false 没有上一页
|
||||
boolean hasPre = pageVO.getPageNo() > 1 ;
|
||||
//获取上一个
|
||||
for (int i = 0; i < processInstanceIds.size(); i++) {
|
||||
if( processInstanceIds.get(i).equals(processInstanceId) ) {
|
||||
if( i > 0 ) {
|
||||
pre = processInstanceIds.get(i - 1) ;
|
||||
}else if( hasPre ) {
|
||||
pageVO.setPageNo(pageNo - 1);
|
||||
list = getTodoTaskPage(userId, pageVO) ;
|
||||
BpmTaskTodoPageItemRespVO vo = list.getList().get(list.getList().size()-1);
|
||||
pre = vo.getProcessInstance().getId() ;
|
||||
}else {
|
||||
pre = null ;
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取下一个
|
||||
for (int i = 0; i < processInstanceIds.size(); i++) {
|
||||
if( processInstanceIds.get(i).equals(processInstanceId) ) {
|
||||
if( i < processInstanceIds.size() - 1 ) {
|
||||
next = processInstanceIds.get(i + 1) ;
|
||||
}else if( hasNext ) {
|
||||
pageVO.setPageNo(pageNo + 1);
|
||||
list = getTodoTaskPage(userId, pageVO) ;
|
||||
BpmTaskTodoPageItemRespVO vo = list.getList().get(0);
|
||||
next = vo.getProcessInstance().getId() ;
|
||||
}else {
|
||||
next = null ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// int index = processInstanceIds.indexOf(processInstanceId);
|
||||
// if(index == 0 ) {
|
||||
// //下标未0
|
||||
// if (pageNo == 1) {
|
||||
// //如果pageNo == 1 说明是第一页,第一条数据,那么就没有pre
|
||||
// log.info("没有上个");
|
||||
// pre = null;
|
||||
// } else {
|
||||
// //如果pageNo > 1 说明是不是第一页的第一条数据,那么就有pre
|
||||
// //设置当前页面-1,并查询数据
|
||||
// pageVO.setPageNo(pageNo - 1);
|
||||
// log.info("查询上一页");
|
||||
// list = getTodoTaskPage(userId, pageVO) ;
|
||||
// BpmTaskTodoPageItemRespVO vo = list.getList().get(list.getList().size()-1);
|
||||
// pre = vo.getProcessInstance().getId() ;
|
||||
// }
|
||||
// if( processInstanceIds.size() == 1 ) {
|
||||
// //说明这一页,只有一条数据,没有下一条了
|
||||
// log.info("没有下一个");
|
||||
// next = null ;
|
||||
// }else {
|
||||
// next = processInstanceIds.get(index + 1);
|
||||
// }
|
||||
// } else if( index == processInstanceIds.size() -1 ) {
|
||||
// //如果下标==数据集合的size-1,说明是当前页面的最后一条数据
|
||||
// pre = processInstanceIds.get(index - 1);
|
||||
// if(!hasNext) {
|
||||
// //如果没有下一页了
|
||||
// log.info("没有下一个");
|
||||
// next = null; ;
|
||||
// }else {
|
||||
// //正常下一条数据
|
||||
// //设置当前页面+1,并查询数据
|
||||
// pageVO.setPageNo(pageNo + 1);
|
||||
// log.info("查询下一页");
|
||||
// list = getTodoTaskPage(userId, pageVO) ;
|
||||
// BpmTaskTodoPageItemRespVO vo = list.getList().get(0);
|
||||
// next = vo.getProcessInstance().getId() ;
|
||||
//
|
||||
// //审批处理后的下一条数据, 因为处理的是当前页最后一条数据,假设10条数据,处理了一条变成9条,重新查询后,会把原来第二页的数据查询在第一页的来。
|
||||
// //所有重新查询当前页面后,取最后一条数据
|
||||
// /**
|
||||
// log.info("审批后重新查询");
|
||||
// list = getTodoTaskPage(userId, pageVO) ;
|
||||
// BpmTaskTodoPageItemRespVO vo1 = list.getList().get(processInstanceIds.size() -1);
|
||||
// next = vo1.getProcessInstance().getId() ;
|
||||
// **/
|
||||
// }
|
||||
//
|
||||
// }else if( index > 0 && index < processInstanceIds.size() ){
|
||||
// //如果下标大于0 且不等于processInstanceIds.size() ,说明是中间的数据
|
||||
// pre = processInstanceIds.get(index - 1);
|
||||
// next = processInstanceIds.get(index + 1);
|
||||
// }else {
|
||||
// log.info("传入的processInstanceId:"+processInstanceId+"在列表中不存在");
|
||||
// pre = null ;
|
||||
// next = null ;
|
||||
// }
|
||||
|
||||
Map<String,String> map = new HashMap<>() ;
|
||||
map.put("pre",pre) ;
|
||||
map.put("next",next);
|
||||
map.put("current",processInstanceId) ;
|
||||
map.put("total",total.toString()) ;
|
||||
map.put("currentPage",pageVO.getPageNo().toString()) ;
|
||||
return map ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user