|
|
@ -162,6 +162,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.fasterxml.jackson.databind.JsonNode; |
|
|
|
import com.fasterxml.jackson.databind.JsonNode; |
|
|
@ -593,12 +594,15 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
.stream() |
|
|
|
.stream() |
|
|
|
.collect(Collectors.toMap(Schedule::getProcessDefinitionCode, Function.identity())); |
|
|
|
.collect(Collectors.toMap(Schedule::getProcessDefinitionCode, Function.identity())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<Integer, String> userMap = userMapper.selectList(new QueryWrapper<>()).stream() |
|
|
|
|
|
|
|
.collect(Collectors.toMap(User::getId, User::getUserName)); |
|
|
|
|
|
|
|
|
|
|
|
for (ProcessDefinition pd : processDefinitions) { |
|
|
|
for (ProcessDefinition pd : processDefinitions) { |
|
|
|
// todo: use batch query
|
|
|
|
// todo: use batch query
|
|
|
|
ProcessDefinitionLog processDefinitionLog = |
|
|
|
ProcessDefinitionLog processDefinitionLog = |
|
|
|
processDefinitionLogMapper.queryByDefinitionCodeAndVersion(pd.getCode(), pd.getVersion()); |
|
|
|
processDefinitionLogMapper.queryByDefinitionCodeAndVersion(pd.getCode(), pd.getVersion()); |
|
|
|
User user = userMapper.selectById(processDefinitionLog.getOperator()); |
|
|
|
pd.setModifyBy(userMap.get(processDefinitionLog.getOperator())); |
|
|
|
pd.setModifyBy(user.getUserName()); |
|
|
|
pd.setUserName(userMap.get(pd.getUserId())); |
|
|
|
Schedule schedule = scheduleMap.get(pd.getCode()); |
|
|
|
Schedule schedule = scheduleMap.get(pd.getCode()); |
|
|
|
pd.setScheduleReleaseState(schedule == null ? null : schedule.getReleaseState()); |
|
|
|
pd.setScheduleReleaseState(schedule == null ? null : schedule.getReleaseState()); |
|
|
|
} |
|
|
|
} |
|
|
|