Commit 6cbb86c3 authored by xixinzhao's avatar xixinzhao

bug修改

parent ef9a8f1e
......@@ -31,6 +31,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;
import java.util.*;
import java.util.stream.Collectors;
......@@ -94,12 +96,17 @@ public class PlanServiceImpl implements IPlanService {
Set<String> distinctUserIds = new HashSet<>(Arrays.asList(temp));
List<AgencyUserModel> userModels = remoteSecurityService.listUserByUserIds(Joiner.on(",").join(distinctUserIds));
Map<String, String> userIdNameMap = userModels.stream().collect(Collectors.toMap(AgencyUserModel::getUserId, AgencyUserModel::getRealName));
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
content.forEach(c -> {
this.buildUserName(c, "createBy", userIdNameMap);
if (c.containsKey("status")) {
String finishStatusDesc = PlanStatusEnum.getName(Integer.parseInt(c.get("status").toString()));
c.put("statusDesc", finishStatusDesc);
}
if (c.containsKey("createDate")) {
String createTime = dateTimeFormatter.format((TemporalAccessor) c.get("createDate"));
c.put("createDateStr", createTime);
}
});
return new PageImpl<>(content, param, total);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment