Reiskuchen %!s(int64=5) %!d(string=hai) anos
pai
achega
2802d74649

+ 3 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -60,7 +60,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             List<Map<String, Object>> nameList = new ArrayList<>();
             if (user.getRole() == 0) {
                 //普通员工只能看自己的
-                Map map = new HashMap();
+                Map<String, Object> map = new HashMap<>();
                 map.put("id", user.getId());
                 map.put("name", user.getName());
                 List<Map<String, Object>> list = reportMapper.getReportByDate(date, (String) map.get("id"));
@@ -80,7 +80,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         calculateTime += show.getDuration();
                     }
                     //数据库是秒,时间转换为小时;
-                    double d = calculateTime*1.0/3600;
+                    double d = calculateTime * 1.0 / 3600;
                     map.put("calculateTime", df.format(d));
                 }
             } else {
@@ -103,7 +103,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         calculateTime += show.getDuration();
                     }
                     //数据库是秒,时间转换为小时;
-                    double d = calculateTime*1.0/3600;
+                    double d = calculateTime * 1.0 / 3600;
                     map.put("calculateTime", df.format(d));
                 }
             }

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -21,7 +21,7 @@
 
     <!--根据日期获取全部报告信息-->
     <select id="getAllReportByDate" resultType="java.util.Map">
-        SELECT c.name, b.project_name AS project, a.working_time AS duration, a.content, a.create_time AS time
+        SELECT c.name, b.project_name AS project, a.working_time AS duration, a.content, a.create_time AS time, a.state
         FROM report AS a
         JOIN project AS b ON a.project_id=b.id
         LEFT JOIN user AS c ON a.creator_id=c.id
@@ -34,7 +34,7 @@
 
     <!--根据日期获取报告信息-->
     <select id="getReportByDate" resultType="java.util.Map">
-        SELECT b.project_name AS project, a.working_time AS time, a.content
+        SELECT b.project_name AS project, a.working_time AS time, a.content, a.state
         FROM report AS a
         JOIN project AS b ON a.project_id=b.id
         WHERE 1=1