Commit 9ae7efe8 by 丁伟峰

Merge branch 'feat-dingwf-mvp616' into develop

2 parents d06882a9 964eaaed
......@@ -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
......
......@@ -35,6 +35,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@Slf4j
@Service
......@@ -58,7 +59,6 @@ public class OrderCreateServiceImpl implements OrderCreateService {
label = "最低";
} else if (i == prioritiesLevels) {
label = "最高";
} else {
label = String.format("优先级%d", i);
}
......@@ -88,6 +88,7 @@ public class OrderCreateServiceImpl implements OrderCreateService {
log.info("[createOrder] current XID: {}", RootContext.getXID());
OrderRequestEntity entity = new OrderRequestEntity();
entity.setId(UUID.randomUUID().toString().replace("-", ""));
entity.setName(req.getName());
entity.setPhone(req.getPhone());
entity.setAddress(req.getAddress());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!