# GmwrStrDataDateDTO.java

    package cloud.wconnect.workperformance.pojo.dto.gmwr.strdata;

    import cloud.wconnect.workperformance.cons.gmwr.strdata.GmwrStrDataEnum;
    import lombok.AllArgsConstructor;
    import lombok.Builder;
    import lombok.Data;

    import java.util.Arrays;
    import java.util.List;

    /**
     * DTO: Str Data Date
     *
     * @author zc
     * @date 2024/10/18
     */
    @Data
    @Builder
    @AllArgsConstructor
    public class GmwrStrDataDateDTO {
        /**
         * Date Category: 1 Week、2 MTD
         */
        private Integer category;
        /**
         * Date Category Name
         */
        private String categoryName;
        /**
         * 开始日期(yyyyMMdd)
         */
        private Long startDate;
        /**
         * 结束日期(yyyyMMdd)
         */
        private Long endDate;
        /**
         * List
         */
        private List<GmwrStrDataValueDTO> list;

        public GmwrStrDataDateDTO() {
            this.list = Arrays.stream(GmwrStrDataEnum.values()).map(item -> {
                GmwrStrDataValueDTO basicDTO = new GmwrStrDataValueDTO();
                basicDTO.setCategory(item.getCategory());
                basicDTO.setCategoryName(item.getCategoryName());
                return basicDTO;
            }).toList();
        }
    }