|
|
|
@ -162,6 +162,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
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.extension.plugins.pagination.Page; |
|
|
|
|
import com.fasterxml.jackson.databind.JsonNode; |
|
|
|
@ -593,12 +594,15 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
|
|
|
|
|
.stream() |
|
|
|
|
.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) { |
|
|
|
|
// todo: use batch query
|
|
|
|
|
ProcessDefinitionLog processDefinitionLog = |
|
|
|
|
processDefinitionLogMapper.queryByDefinitionCodeAndVersion(pd.getCode(), pd.getVersion()); |
|
|
|
|
User user = userMapper.selectById(processDefinitionLog.getOperator()); |
|
|
|
|
pd.setModifyBy(user.getUserName()); |
|
|
|
|
pd.setModifyBy(userMap.get(processDefinitionLog.getOperator())); |
|
|
|
|
pd.setUserName(userMap.get(pd.getUserId())); |
|
|
|
|
Schedule schedule = scheduleMap.get(pd.getCode()); |
|
|
|
|
pd.setScheduleReleaseState(schedule == null ? null : schedule.getReleaseState()); |
|
|
|
|
} |
|
|
|
|