Commit d8a327ca by 刘鑫

pref(工程师日历): 就近申明变量

1 parent 3fd18d2b
......@@ -97,7 +97,6 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
@Override
public Result<?> getEngineersCalendar(EngineerCalendarDTO.Request req) {
// 技术员日历,查询 capacity_engineer_calendar表,如果当日有各种事项,进行显示;否则显示正常上班;
List<EngineerCalendarDTO.Engineer> engineers = new ArrayList<>();
List<String> allCodes = engineerUtil.getEngineersByLevel(req.getLevelType(), req.getLevelValue()).stream()
.map(EngineerInfoEntity::getEngineerCode).collect(Collectors.toList());
......@@ -105,6 +104,7 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
Page<EngineerInfoEntity> page = engineerUtil.filterEngineersByKeyAndPage(allCodes, req.getKey(), req.getPage(), req.getSize());
String edate = DateUtils.localDateFromStr(req.getDate()).plusDays(14).toString();
List<EngineerCalendarDTO.Engineer> engineers = new ArrayList<>();
for (EngineerInfoEntity e : page.getContent()) {
EngineerCalendarDTO.Engineer engineer = new EngineerCalendarDTO.Engineer();
engineer.setEngineerCode(e.getEngineerCode());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!