法规清单关联平台件后,点击流程状态跳转,平台件数据
This commit is contained in:
+28
-3
@@ -2,15 +2,21 @@ package com.jero.modules.wkflow.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.entity.LawsInventoryPlatformEO;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import com.jero.modules.project.enums.ReviewResultEnum;
|
||||
import com.jero.modules.project.service.impl.LawsInventoryPlatformEOServiceImpl;
|
||||
import com.jero.modules.project.service.impl.ProjectLawsInventoryEOServiceImpl;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
|
||||
@@ -23,18 +29,17 @@ import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
import com.jero.modules.wkflow.mapper.ProcessHistoryEOMapper;
|
||||
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 流程历史表
|
||||
* @Author: jero-boot
|
||||
@@ -50,6 +55,10 @@ public class ProcessHistoryEOServiceImpl extends ServiceImpl<ProcessHistoryEOMap
|
||||
private IProcessInfoEOService processInfoEOService;
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
@Autowired
|
||||
private LawsInventoryPlatformEOServiceImpl lawsInventoryPlatformEOService;
|
||||
@Autowired
|
||||
private ProjectLawsInventoryEOServiceImpl projectLawsInventoryEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -296,6 +305,22 @@ public class ProcessHistoryEOServiceImpl extends ServiceImpl<ProcessHistoryEOMap
|
||||
if (StringUtils.isEmpty(projectLawsInventoryId)) {
|
||||
throw new JeroBootException("法规清单id不能为空!");
|
||||
}
|
||||
//查询是否关联平台件
|
||||
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(LawsInventoryPlatformEO::getLawsInventoryId,projectLawsInventoryId);
|
||||
List<LawsInventoryPlatformEO> platformEOList = lawsInventoryPlatformEOService.list(wrapper);
|
||||
|
||||
//List<String> valueList = FlowStateEnum.getValueInfo();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = new ArrayList<>();
|
||||
if(ObjectUtils.isNotEmpty(platformEOList)){
|
||||
List<String> lawsInventoryIdList = platformEOList.stream()
|
||||
.map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).distinct().collect(Collectors.toList());
|
||||
lawsInventoryEOList = projectLawsInventoryEOService.listByIds(lawsInventoryIdList);
|
||||
if(ObjectUtils.isNotEmpty(lawsInventoryEOList)){
|
||||
projectLawsInventoryId = lawsInventoryEOList.get(0).getId();
|
||||
}
|
||||
}
|
||||
|
||||
String flowType = (String) params.get("flowType");
|
||||
List<String> flowTypeList = new ArrayList<>();
|
||||
flowTypeList.add(flowType);
|
||||
|
||||
Reference in New Issue
Block a user