Commit a098dffd by 丁伟峰

单条容量查询,返回lengend;

1 parent 7f9f686a
......@@ -18,7 +18,7 @@ public class CapacityQueryOrderRespDTO {
@Data
@Accessors(chain = true)
public static class LegendDTO {
private int type;
private Integer type;
private String memo;
}
......@@ -36,6 +36,6 @@ public class CapacityQueryOrderRespDTO {
private String text;
private String begin;
private String end;
private int type;
private Integer type;
}
}
......@@ -83,10 +83,18 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
CapacityQueryOrderRespDTO capacityQueryRespDTO = new CapacityQueryOrderRespDTO();
capacityQueryRespDTO.setBeginDate(reqDTO.getBeginDate()).setEndDate(reqDTO.getEndDate());
capacityQueryRespDTO.setCalendar(getTeamCaparityByLayerAndDays(teamId, layer, reqDTO.getBeginDate(), reqDTO.getEndDate()));
capacityQueryRespDTO.setLegend(getLengends());
capacityQueryRespDTO.setRemark(String.format("%s-%s", teamId, layer));
return Result.success(capacityQueryRespDTO);
}
private List<CapacityQueryOrderRespDTO.LegendDTO> getLengends() {
List<CapacityQueryOrderRespDTO.LegendDTO> legends = new ArrayList<>();
legends.add(new CapacityQueryOrderRespDTO.LegendDTO().setType(1).setMemo("剩余30%以上"));
legends.add(new CapacityQueryOrderRespDTO.LegendDTO().setType(2).setMemo("剩余60%以上"));
legends.add(new CapacityQueryOrderRespDTO.LegendDTO().setType(3).setMemo("剩余30%以内"));
return legends;
}
@Override
public Result<?> getTeamStatData(CapacityStatQueryReqDTO capacityStatQueryReqDTO) {
Page<?> stats = null;
......@@ -250,7 +258,7 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate date = LocalDate.parse(day, dateFormatter);
DayOfWeek weekday = date.getDayOfWeek();
return String.format("周%s", weekday.getDisplayName(TextStyle.SHORT, Locale.CHINA));
return weekday.getDisplayName(TextStyle.SHORT, Locale.CHINA);
}
@lombok.Data
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!