hfxc226 3 年 前
コミット
6cb923cc37

+ 81 - 57
platform-common/src/main/java/com/platform/common/util/DateUtils.java

@@ -1,5 +1,6 @@
 package com.platform.common.util;
 
+import com.platform.common.exception.BusinessException;
 import lombok.experimental.UtilityClass;
 import lombok.extern.slf4j.Slf4j;
 
@@ -28,7 +29,7 @@ public class DateUtils {
     public final static String PATTERN_YMD_ZH_NO = "yyyy年M月d日";
     public final static String PATTERNYMDHMS = "yyyyMMddHHmmss";
 
-    public final static String PATTERNYMD= "yyyyMMdd";
+    public final static String PATTERNYMD = "yyyyMMdd";
 
     private final static ZoneId ZONE_ID = ZoneId.systemDefault();
 
@@ -83,7 +84,7 @@ public class DateUtils {
      */
     public static LocalDateTime getFirstDayOfThisMonth() {
         LocalDateTime now = LocalDateTime.now();
-        LocalDateTime firstday  =  now.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
+        LocalDateTime firstday = now.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
         return firstday;
     }
 
@@ -94,8 +95,8 @@ public class DateUtils {
      */
     public static LocalDateTime getLastDayOfThisMonth() {
         LocalDateTime now = LocalDateTime.now();
-        LocalDateTime lastDay  =  now.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
-        return lastDay ;
+        LocalDateTime lastDay = now.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
+        return lastDay;
     }
 
     /**
@@ -105,7 +106,7 @@ public class DateUtils {
      */
     public static LocalDateTime getFirstDayOfThisYear(int year) {
         LocalDateTime now = LocalDateTime.now();
-        LocalDateTime firstday  =  now.withYear(year).with(TemporalAdjusters.firstDayOfYear()).withHour(0).withMinute(0).withSecond(0);
+        LocalDateTime firstday = now.withYear(year).with(TemporalAdjusters.firstDayOfYear()).withHour(0).withMinute(0).withSecond(0);
         return firstday;
     }
 
@@ -116,8 +117,8 @@ public class DateUtils {
      */
     public static LocalDateTime getLastDayOfThisYear(int year) {
         LocalDateTime now = LocalDateTime.now();
-        LocalDateTime lastDay  =  now.withYear(year).with(TemporalAdjusters.lastDayOfYear()).withHour(23).withMinute(59).withSecond(59);
-        return lastDay ;
+        LocalDateTime lastDay = now.withYear(year).with(TemporalAdjusters.lastDayOfYear()).withHour(23).withMinute(59).withSecond(59);
+        return lastDay;
     }
 
     /**
@@ -127,7 +128,7 @@ public class DateUtils {
      */
     public static LocalDateTime getFirstDayOfMonth(Integer month) {
         LocalDateTime now = LocalDateTime.now();
-        LocalDateTime firstday  =  now.withMonth(month).with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
+        LocalDateTime firstday = now.withMonth(month).with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
         return firstday;
     }
 
@@ -138,7 +139,7 @@ public class DateUtils {
      */
     public static LocalDateTime getFirstDayOfMonth(Integer year, Integer month) {
         LocalDateTime now = LocalDateTime.now();
-        LocalDateTime firstday  =  now.withYear(year).withMonth(month).with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
+        LocalDateTime firstday = now.withYear(year).withMonth(month).with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
         return firstday;
     }
 
@@ -149,8 +150,8 @@ public class DateUtils {
      */
     public static LocalDateTime getLastDayOfMonth(Integer month) {
         LocalDateTime now = LocalDateTime.now();
-        LocalDateTime lastDay  =  now.withMonth(month).with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
-        return lastDay ;
+        LocalDateTime lastDay = now.withMonth(month).with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
+        return lastDay;
     }
 
     /**
@@ -160,17 +161,18 @@ public class DateUtils {
      */
     public static LocalDateTime getLastDayOfMonth(Integer year, Integer month) {
         LocalDateTime now = LocalDateTime.now();
-        LocalDateTime lastDay  =  now.withYear(year).withMonth(month).with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
-        return lastDay ;
+        LocalDateTime lastDay = now.withYear(year).withMonth(month).with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
+        return lastDay;
     }
+
     /**
      * 指定年月的最后一天开始时间
      *
      * @return
      */
     public static LocalDateTime getFirstDayOfMonth(LocalDate month) {
-        LocalDateTime day  =  month.atStartOfDay();
-        LocalDateTime firstday  =  day.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
+        LocalDateTime day = month.atStartOfDay();
+        LocalDateTime firstday = day.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
         return firstday;
     }
 
@@ -180,8 +182,8 @@ public class DateUtils {
      * @return
      */
     public static LocalDateTime getLastDayOfMonth(LocalDate month) {
-        LocalDateTime day  =  month.atStartOfDay();
-        LocalDateTime lastDay  =  day.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
+        LocalDateTime day = month.atStartOfDay();
+        LocalDateTime lastDay = day.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
         return lastDay;
     }
 
@@ -193,7 +195,7 @@ public class DateUtils {
      * @return
      */
     public static LocalDateTime getFirstDayOfWeek(int year, int week) {
-        WeekFields weekFields = WeekFields.of(DayOfWeek.MONDAY,1);
+        WeekFields weekFields = WeekFields.of(DayOfWeek.MONDAY, 1);
         LocalDateTime ldt = LocalDateTime.now()
                 .withYear(year)
                 .with(weekFields.weekOfYear(), week)
@@ -209,7 +211,7 @@ public class DateUtils {
      * @return
      */
     public static LocalDateTime getLastDayOfWeek(int year, int week) {
-        WeekFields weekFields = WeekFields.of(DayOfWeek.MONDAY,1);
+        WeekFields weekFields = WeekFields.of(DayOfWeek.MONDAY, 1);
         LocalDateTime ldt = LocalDateTime.now()
                 .withYear(year)
                 .with(weekFields.weekOfYear(), week)
@@ -224,7 +226,7 @@ public class DateUtils {
      * @return
      */
     public static LocalDateTime getLastDayOfWeekOfYear(int year) {
-        WeekFields weekFields = WeekFields.of(DayOfWeek.MONDAY,1);
+        WeekFields weekFields = WeekFields.of(DayOfWeek.MONDAY, 1);
         LocalDateTime lastDayOfYear = DateUtils.getLastDayOfThisYear(year);
         Integer lastWeek = lastDayOfYear.get(weekFields.weekOfYear());
         return getLastDayOfWeek(year, lastWeek);
@@ -357,11 +359,12 @@ public class DateUtils {
 
     /**
      * 获取两个时间点的月份差
+     *
      * @param dt1 第一个时间点 前面的时间
      * @param dt2 第二个时间点 后面的时间
      * @return int,即需求的月数差
      */
-    public static int monthDiff(LocalDate dt1,LocalDate dt2){
+    public static int monthDiff(LocalDate dt1, LocalDate dt2) {
         //获取第一个时间点的月份
         int month1 = dt1.getMonthValue();
         //获取第一个时间点的年份
@@ -371,7 +374,7 @@ public class DateUtils {
         //获取第二个时间点的年份
         int year2 = dt2.getYear();
         //返回两个时间点的月数差
-        return (year2 - year1) *12 + (month2 - month1);
+        return (year2 - year1) * 12 + (month2 - month1);
     }
 
     /**
@@ -396,50 +399,54 @@ public class DateUtils {
 
     /**
      * 相差分钟数
+     *
      * @param startTime
      * @param endTime
      * @return
      */
-    public static long getDurationMinutes(LocalDateTime startTime, LocalDateTime  endTime ){
-        Duration duration = Duration.between(startTime,endTime);
+    public static long getDurationMinutes(LocalDateTime startTime, LocalDateTime endTime) {
+        Duration duration = Duration.between(startTime, endTime);
         return duration.toMinutes();
     }
 
     /**
      * 相差分钟数:字符串格式
+     *
      * @param startTime
      * @param endTime
      * @return
      */
-    public static String getDurationMinutesStr(LocalDateTime startTime, LocalDateTime  endTime ){
-        return String.valueOf(getDurationMinutes(startTime,endTime ));
+    public static String getDurationMinutesStr(LocalDateTime startTime, LocalDateTime endTime) {
+        return String.valueOf(getDurationMinutes(startTime, endTime));
     }
 
     /**
      * 相差小时数
+     *
      * @param startTime
      * @param endTime
      * @return
      */
-    public static double getDurationHours(LocalDateTime startTime, LocalDateTime  endTime ){
-        Duration duration = Duration.between(startTime,endTime);
+    public static double getDurationHours(LocalDateTime startTime, LocalDateTime endTime) {
+        Duration duration = Duration.between(startTime, endTime);
         long minitues = duration.toMinutes();
-        double hours = BigDecimalUtil.round(minitues/60.0, 2);
+        double hours = BigDecimalUtil.round(minitues / 60.0, 2);
         return hours;
     }
 
     /**
      * 相差小时数:字符串
+     *
      * @param startTime
      * @param endTime
      * @return
      */
-    public static String getDurationHoursStr(LocalDateTime startTime, LocalDateTime  endTime ){
-        Duration duration = Duration.between(startTime,endTime);
-        return String.valueOf(getDurationHours(startTime,endTime ));
+    public static String getDurationHoursStr(LocalDateTime startTime, LocalDateTime endTime) {
+        Duration duration = Duration.between(startTime, endTime);
+        return String.valueOf(getDurationHours(startTime, endTime));
     }
 
-    public static String dateDiff(LocalDateTime end, LocalDateTime now){
+    public static String dateDiff(LocalDateTime end, LocalDateTime now) {
         //获取秒数
         long nowSecond = now.toEpochSecond(ZoneOffset.ofHours(0));
         long endSecond = end.toEpochSecond(ZoneOffset.ofHours(0));
@@ -453,7 +460,7 @@ public class DateUtils {
         long h = absSeconds / 60 / 60 % 24;
         //获取天数
         long d = absSeconds / 60 / 60 / 24;
-        return d+"天"+h+"小时"+m+"分钟"+s+"秒";
+        return d + "天" + h + "小时" + m + "分钟" + s + "秒";
     }
 
     public static void main(String[] args) {
@@ -484,17 +491,17 @@ public class DateUtils {
      * @return
      */
     public static List<Map<String, LocalDateTime>> getMonthStartAndEndByYear(int year, int month) {
-        List<Map<String, LocalDateTime>> monthStartAndEndList = new ArrayList<Map<String,LocalDateTime>>();
+        List<Map<String, LocalDateTime>> monthStartAndEndList = new ArrayList<Map<String, LocalDateTime>>();
         // 每年的 一月一号,零时零分零秒
-        for(int i = 1;i<month;i++){
+        for (int i = 1; i < month; i++) {
             Map<String, LocalDateTime> dateTimeMap = new HashMap<String, LocalDateTime>();
             LocalDateTime searchStartTimeMonth = getFirstDayOfMonth(year, i).plusDays(-1);
             LocalDateTime searchEndTimeMonth = getLastDayOfMonth(year, i).plusDays(1);
             dateTimeMap.put("searchStartTimeMonth", searchStartTimeMonth);
-            dateTimeMap.put("searchEndTimeMonth",searchEndTimeMonth);
+            dateTimeMap.put("searchEndTimeMonth", searchEndTimeMonth);
             monthStartAndEndList.add(dateTimeMap);
         }
-        return  monthStartAndEndList;
+        return monthStartAndEndList;
     }
 
     /**
@@ -505,23 +512,23 @@ public class DateUtils {
      * @return
      */
     public static List<Map<String, LocalDateTime>> getYearStartAndEndByYear(int startYear, int endYear) {
-        if(startYear < 2020){
+        if (startYear < 2020) {
             startYear = 2020;
         }
-        if(endYear == 2021){
+        if (endYear == 2021) {
             endYear = LocalDate.now().getYear();
         }
-        List<Map<String, LocalDateTime>> startAndEndList = new ArrayList<Map<String,LocalDateTime>>();
+        List<Map<String, LocalDateTime>> startAndEndList = new ArrayList<Map<String, LocalDateTime>>();
         // 每年的 一月一号,零时零分零秒
-        for(int i = startYear;i<=endYear;i++){
+        for (int i = startYear; i <= endYear; i++) {
             Map<String, LocalDateTime> dateTimeMap = new HashMap<String, LocalDateTime>();
             LocalDateTime searchStartTimeMonth = getFirstDayOfThisYear(i);
             LocalDateTime searchEndTimeMonth = getLastDayOfThisYear(i);
             dateTimeMap.put("searchStartTime", searchStartTimeMonth);
-            dateTimeMap.put("searchEndTime",searchEndTimeMonth);
+            dateTimeMap.put("searchEndTime", searchEndTimeMonth);
             startAndEndList.add(dateTimeMap);
         }
-        return  startAndEndList;
+        return startAndEndList;
     }
 
     /**
@@ -532,18 +539,18 @@ public class DateUtils {
      * @return
      */
     public static List<Map<String, LocalDateTime>> getMonthStartAndEndByYear(LocalDate startMonth, LocalDate endMonth) {
-        List<Map<String, LocalDateTime>> monthStartAndEndList = new ArrayList<Map<String,LocalDateTime>>();
+        List<Map<String, LocalDateTime>> monthStartAndEndList = new ArrayList<Map<String, LocalDateTime>>();
         int month = DateUtils.monthDiff(startMonth, endMonth);
-        for(int i = 0;i<=month;i++){
+        for (int i = 0; i <= month; i++) {
             LocalDate date = DateUtils.plus(startMonth, i, ChronoUnit.MONTHS);
             Map<String, LocalDateTime> dateTimeMap = new HashMap<String, LocalDateTime>();
             LocalDateTime searchStartTimeMonth = getFirstDayOfMonth(date);
             LocalDateTime searchEndTimeMonth = getLastDayOfMonth(date);
             dateTimeMap.put("searchStartTimeMonth", searchStartTimeMonth);
-            dateTimeMap.put("searchEndTimeMonth",searchEndTimeMonth);
+            dateTimeMap.put("searchEndTimeMonth", searchEndTimeMonth);
             monthStartAndEndList.add(dateTimeMap);
         }
-        return  monthStartAndEndList;
+        return monthStartAndEndList;
     }
 
     /**
@@ -553,8 +560,8 @@ public class DateUtils {
      * @return
      */
     public static List<Map<String, LocalDateTime>> getWeekStartAndEndByYear(int year) {
-        List<Map<String, LocalDateTime>> weekStartAndEndList = new ArrayList<Map<String,LocalDateTime>>();
-        WeekFields weekFields = WeekFields.of(DayOfWeek.MONDAY,1);
+        List<Map<String, LocalDateTime>> weekStartAndEndList = new ArrayList<Map<String, LocalDateTime>>();
+        WeekFields weekFields = WeekFields.of(DayOfWeek.MONDAY, 1);
         LocalDate now = LocalDate.now();
         LocalDateTime firstDayOfYear = DateUtils.getFirstDayOfThisYear(year);
         LocalDateTime lastDayOfYear = DateUtils.getLastDayOfThisYear(year);
@@ -562,31 +569,31 @@ public class DateUtils {
         Integer firstWeek = firstDayOfYear.get(weekFields.weekOfYear());
         Integer lastWeek = lastDayOfYear.get(weekFields.weekOfYear());
         // 每年的 一月一号,零时零分零秒
-        for(int i = firstWeek;i<lastWeek;i++){
+        for (int i = firstWeek; i < lastWeek; i++) {
             Map<String, LocalDateTime> dateTimeMap = new HashMap<String, LocalDateTime>();
             LocalDateTime searchStartTimeWeek = getFirstDayOfWeek(year, i);
             LocalDateTime searchEndTimeWeek = getLastDayOfWeek(year, i);
             dateTimeMap.put("searchStartTimeWeek", searchStartTimeWeek);
-            dateTimeMap.put("searchEndTimeWeek",searchEndTimeWeek);
+            dateTimeMap.put("searchEndTimeWeek", searchEndTimeWeek);
             weekStartAndEndList.add(dateTimeMap);
         }
-        return  weekStartAndEndList;
+        return weekStartAndEndList;
     }
 
-    public static List<LocalDateTime> currentWeek(){
+    public static List<LocalDateTime> currentWeek() {
         List<LocalDateTime> list = new ArrayList<>();
         LocalDateTime now = LocalDateTime.now();
-        for(int i=-6;i<0;i++){
+        for (int i = -6; i < 0; i++) {
             list.add(now.plusDays(i));
         }
         list.add(now);
         return list;
     }
 
-    public static List<LocalDate> currentWeekDate(){
+    public static List<LocalDate> currentWeekDate() {
         List<LocalDate> list = new ArrayList<>();
         LocalDate now = LocalDate.now();
-        for(int i=-6;i<0;i++){
+        for (int i = -6; i < 0; i++) {
             list.add(now.plusDays(i));
         }
         list.add(now);
@@ -616,6 +623,23 @@ public class DateUtils {
         return ldt;
     }
 
+    /**
+     * 根据
+     */
+    public static String getChineseWeekName(DayOfWeek dayOfWeek) {
+        if(dayOfWeek == null){
+            return "星期一";
+        }
+        String[][] strArray = {{"MONDAY", "星期一"}, {"TUESDAY", "星期二"}, {"WEDNESDAY", "星期三"}, {"THURSDAY", "星期四"}, {"FRIDAY", "星期五"}, {"SATURDAY", "星期六"}, {"SUNDAY", "星期日"}};
+        String k = String.valueOf(dayOfWeek);
+        for (int i = 0; i < strArray.length; i++) {
+            if (k.equals(strArray[i][0])) {
+                k = strArray[i][1];
+                return k;
+            }
+        }
+        throw new BusinessException("未知dayOfWeek" + String.valueOf(dayOfWeek));
+    }
 
 }
 

+ 1 - 1
platform-dao/src/main/java/com/platform/dao/enums/SbInfoStatusEnum.java

@@ -66,11 +66,11 @@ public enum SbInfoStatusEnum {
     public static List<Map<String, Object>> toList() {
         List<Map<String, Object>> list = Lists.newArrayList();//Lists.newArrayList()其实和new ArrayList()几乎一模
         //  一样, 唯一它帮你做的(其实是javac帮你做的), 就是自动推导(不是"倒")尖括号里的数据类型.
-
         for (SbInfoStatusEnum obj : SbInfoStatusEnum.values()) {
             Map<String, Object> map = new HashMap<>();
             map.put("value", obj.getValue());
             map.put("name", obj.getName());
+            list.add(map);
         }
         return list;
     }

+ 2 - 2
platform-dao/src/main/java/com/platform/dao/vo/sb/SbInfoWorkplaceLineVO.java

@@ -21,9 +21,9 @@ public class SbInfoWorkplaceLineVO extends BaseVO implements Serializable {
     /**
      * 周几(从今天开始往前一周)
      */
-    private String day;
+    private String week;
     /**
      * 维修单数量
      */
-    private Integer num;
+    private Integer value;
 }

+ 1 - 1
platform-dao/src/main/java/com/platform/dao/vo/sb/SbInfoWorkplacePieVO.java

@@ -24,7 +24,7 @@ public class SbInfoWorkplacePieVO extends BaseVO implements Serializable {
     /**
      * 状态名称
      */
-    private String statusNme;
+    private String item;
     /**
      * 数量
      */

+ 33 - 39
platform-service/src/main/java/com/platform/service/sb/impl/SbInfoServiceImpl.java

@@ -554,7 +554,7 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
         setRepairNum(now, vo);
 
         // 设备一周故障数据
-        setRepairNumWeek( now, vo);
+        setRepairNumWeek(now, vo);
         return vo;
     }
 
@@ -563,56 +563,55 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
         List<SbInfo> sbInfoList = mapper.selectAll();
         // 设置使用中数据,维修,调拨中,报废数据
 
-
         // 设备状态数据统计
         Double totalNumber = 0.0;
         int useNumber = 0;
-        if(CollectionUtil.isNotEmpty(sbInfoList)){
+        if (CollectionUtil.isNotEmpty(sbInfoList)) {
             totalNumber = new Double(sbInfoList.size());
-            List< SbInfoWorkplacePieVO> sbInfoWorkplacePieVOList = new ArrayList<>();
-            for(Map<String, Object> statusMap: SbInfoStatusEnum.toList()){
+            List<SbInfoWorkplacePieVO> sbInfoWorkplacePieVOList = new ArrayList<>();
+            for (Map<String, Object> statusMap : SbInfoStatusEnum.toList()) {
                 SbInfoWorkplacePieVO sbInfoWorkplacePieVO = new SbInfoWorkplacePieVO();
-                sbInfoWorkplacePieVO.setStatusNme((String) statusMap.get("name"));
+                sbInfoWorkplacePieVO.setItem((String) statusMap.get("name"));
                 int num = 0;
-                for(SbInfo sbInfo: sbInfoList){
-                    if(sbInfo.getStatus().equals(statusMap.get("value"))){
+                for (SbInfo sbInfo : sbInfoList) {
+                    if (sbInfo.getStatus().equals(statusMap.get("value"))) {
                         num++;
                     }
                 }
                 sbInfoWorkplacePieVO.setCount(num);
                 sbInfoWorkplacePieVO.setStatus((Integer) statusMap.get("value"));
-                if(totalNumber == 0){
+                if (totalNumber == 0) {
                     sbInfoWorkplacePieVO.setPercent(0.0);
-                }else{
-                    sbInfoWorkplacePieVO.setPercent(num/totalNumber);
+                } else {
+                    sbInfoWorkplacePieVO.setPercent(BigDecimalUtil.decimal(num / totalNumber, 2));
                 }
                 sbInfoWorkplacePieVOList.add(sbInfoWorkplacePieVO);
-                if(statusMap.get("value").equals(SbInfoStatusEnum.IN_USE.getValue())){
+                if (statusMap.get("value").equals(SbInfoStatusEnum.IN_USE.getValue())) {
                     vo.setUseNumber(num);
                     vo.setDbNumber(num);
-                }else if(statusMap.get("value").equals(SbInfoStatusEnum.IN_DIAOBO.getValue())){
+                } else if (statusMap.get("value").equals(SbInfoStatusEnum.IN_DIAOBO.getValue())) {
                     vo.setBfNumber(num);
-                }else if(statusMap.get("value").equals(SbInfoStatusEnum.IN_STOP.getValue())){
+                } else if (statusMap.get("value").equals(SbInfoStatusEnum.IN_STOP.getValue())) {
                     vo.setStopNumber(num);
-                }else if(statusMap.get("value").equals(SbInfoStatusEnum.SCRAPED.getValue())){
+                } else if (statusMap.get("value").equals(SbInfoStatusEnum.SCRAPED.getValue())) {
                     vo.setPdNumber(num);
                 }
             }
             vo.setPieDataList(sbInfoWorkplacePieVOList);
         }
-        if(vo.getUseNumber() == null){
+        if (vo.getUseNumber() == null) {
             vo.setUseNumber(0);
         }
-        if(vo.getDbNumber() == null){
+        if (vo.getDbNumber() == null) {
             vo.setDbNumber(0);
         }
-        if(vo.getBfNumber() == null){
+        if (vo.getBfNumber() == null) {
             vo.setBfNumber(0);
         }
-        if(vo.getStopNumber() == null){
+        if (vo.getStopNumber() == null) {
             vo.setStopNumber(0);
         }
-        if(vo.getPdNumber() == null){
+        if (vo.getPdNumber() == null) {
             vo.setPdNumber(0);
         }
         vo.setTotalDNumber(vo.getDbNumber() + vo.getBfNumber() + vo.getStopNumber() + vo.getPdNumber());
@@ -632,16 +631,18 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
         int notPlanNumber = 0;
         int otherNumber = 0;
         int noIdeaNumber = 0;
-        if(CollectionUtil.isNotEmpty(repairList)){
+        if (CollectionUtil.isNotEmpty(repairList)) {
             totalRepairNumber = repairList.size();
-            for(RepairApplicationForm repairApplicationForm: repairList){
-                if(repairApplicationForm.getCategory().equals(RepairApplicationFormCategoryEnum.PLAN.getValue())){
+            for (RepairApplicationForm repairApplicationForm : repairList) {
+                if (repairApplicationForm.getCategory().equals(RepairApplicationFormCategoryEnum.PLAN.getValue())) {
                     planNumber++;
-                }if(repairApplicationForm.getCategory().equals(RepairApplicationFormCategoryEnum.PLAN_NOT.getValue())){
+                }
+                if (repairApplicationForm.getCategory().equals(RepairApplicationFormCategoryEnum.PLAN_NOT.getValue())) {
                     notPlanNumber++;
-                }if(repairApplicationForm.getCategory().equals(RepairApplicationFormCategoryEnum.OTHER.getValue())){
+                }
+                if (repairApplicationForm.getCategory().equals(RepairApplicationFormCategoryEnum.OTHER.getValue())) {
                     otherNumber++;
-                }else{
+                } else {
                     noIdeaNumber++;
                 }
             }
@@ -672,24 +673,17 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
         List<RepairApplicationForm> repairList = repairApplicationFormMapper.selectByExample(weekendRepair);
         List<LocalDate> timeList = DateUtils.currentWeekDate();
         List<SbInfoWorkplaceLineVO> voList = new ArrayList<>();
-        String[][] strArray = {{"MONDAY", "一"}, {"TUESDAY", "二"}, {"WEDNESDAY", "三"}, {"THURSDAY", "四"}, {"FRIDAY", "五"}, {"SATURDAY", "六"}, {"SUNDAY", "日"}};
-        for(LocalDate time: timeList){
-            String k = String.valueOf(time.getDayOfWeek());
-            for (int i = 0; i < strArray.length; i++) {
-                if (k.equals(strArray[i][0])) {
-                    k = strArray[i][1];
-                    break;
-                }
-            }
+        for (LocalDate time : timeList) {
+            String k = DateUtils.getChineseWeekName(time.getDayOfWeek());
             SbInfoWorkplaceLineVO lineVO = new SbInfoWorkplaceLineVO();
             int num = 0;
-            for(RepairApplicationForm form: repairList){
-                if(time.isEqual(form.getApplyTime().toLocalDate())){
+            for (RepairApplicationForm form : repairList) {
+                if (time.isEqual(form.getApplyTime().toLocalDate())) {
                     num++;
                 }
             }
-            lineVO.setNum(num);
-            lineVO.setDay(k);
+            lineVO.setValue(num);
+            lineVO.setWeek(k);
             voList.add(lineVO);
         }
         vo.setLineDataList(voList);