Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

ZhouRuiTing 5 rokov pred
rodič
commit
2731df6f48

+ 13 - 13
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TimeCalculationServiceImpl.java

@@ -52,8 +52,8 @@ public class TimeCalculationServiceImpl extends ServiceImpl<TimeCalculationMappe
         //日期
         LocalDate todayDate = LocalDate.now(ZoneOffset.of("+8"));
         resultMap.put("date", todayDate);
-        //时间占比 预先定义好长度为10的数组再向里面添加
-        Integer[] timeArray = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+        //时间占比 预先定义好长度为11的数组再向里面添加
+        Integer[] timeArray = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
         //把当天所有行为分别加在一起装进数组
         List<TimeCalculation> list = timeCalculationMapper.selectList(new QueryWrapper<TimeCalculation>()
                 .eq("user_id", userId)
@@ -63,7 +63,7 @@ public class TimeCalculationServiceImpl extends ServiceImpl<TimeCalculationMappe
         }
         resultMap.put("timeDistribution", timeArray);
         Double total = (double) (timeArray[0] + timeArray[1] + timeArray[2] + timeArray[3] +
-                timeArray[4] + timeArray[5] + timeArray[6]) / 3600;
+                timeArray[4] + timeArray[5] + timeArray[6] + timeArray[10]) / 3600;
         resultMap.put("total", new DecimalFormat("0.00").format(total));
         httpRespMsg.data = resultMap;
         return httpRespMsg;
@@ -104,24 +104,24 @@ public class TimeCalculationServiceImpl extends ServiceImpl<TimeCalculationMappe
                 map.put("name", userMap.get("name"));
                 map.put("phone", userMap.get("phone"));
                 //然后根据日期和用户id获取到所有的记录 然后手动累加在一起
-                Long[] timeArray = {0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L};
-                //其他 编程 上网 文档 设计 美工 运营 看小说 影视娱乐 听音乐
-                List<Map<String, Object>> tatistics = timeCalculationMapper
-                        .getTodayStatistics((String) userMap.get("id"), date, companyId);
-                for (Map<String, Object> dataMap : tatistics) {
+                Long[] timeArray = {0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L};
+                //其他 编程 上网 文档 设计 美工 运营 看小说 影视娱乐 听音乐 聊天
+                for (Map<String, Object> dataMap : timeCalculationMapper
+                        .getTodayStatistics((String) userMap.get("id"), date, companyId)) {
                     timeArray[(int) dataMap.get("type") + 1] += (Long) dataMap.get("duration");
                 }
-                Long[] resultArray = new Long[6];
-                //编程 上网 文档 设计 娱乐 其他
+                Long[] resultArray = new Long[7];
+                //编程 上网 文档 设计 娱乐 聊天 其他
                 resultArray[0] = timeArray[1];
                 resultArray[1] = timeArray[2];
                 resultArray[2] = timeArray[3];
                 resultArray[3] = timeArray[4] + timeArray[5];
                 resultArray[4] = timeArray[7] + timeArray[8] + timeArray[9];
-                resultArray[5] = timeArray[0];
-                //将后端的9中行为类型分门别类转换为前端的6种并转换为字符串格式
+                resultArray[5] = timeArray[10];
+                resultArray[6] = timeArray[0];
+                //将后端的10中行为类型分门别类转换为前端的6种并转换为字符串格式
                 String[] stringArray = new String[6];
-                for (int i = 0; i < 6; i++) {
+                for (int i = 0; i < 7; i++) {
                     stringArray[i] = convertSecond(resultArray[i]);
                 }
                 map.put("statistics", stringArray);

+ 9 - 0
fhKeeper/formulahousekeeper/mywork/macpackage

@@ -0,0 +1,9 @@
+cd /Users/quyueting/manHourHousekeeper/fhKeeper/formulahousekeeper/build-mywork-Desktop_Qt_5_14_0_clang_64bit-Profile/
+rm mywork.dmg
+macdeployqt mywork.app -dmg -qmldir=/Users/quyueting/Qt5.14.0/5.14.0/clang_64/qml
+#将/Users/quyueting/Qt5.14.0/5.14.0/clang_64/qml文件夹下的QtWebEngine和QtWebChannel这两个文件夹复制到 你的App/Contents/Resources/qml目录下边
+cp -R /Users/quyueting/Qt5.14.0/5.14.0/clang_64/qml/QtWebEngine mywork.app/Contents/Resources/qml/
+cp -R /Users/quyueting/Qt5.14.0/5.14.0/clang_64/qml/QtWebChannel mywork.app/Contents/Resources/qml/
+rm mywork.dmg
+macdeployqt mywork.app -dmg -qmldir=/Users/quyueting/Qt5.14.0/5.14.0/clang_64/qml
+

+ 3 - 0
fhKeeper/formulahousekeeper/mywork/mywork.pro

@@ -38,3 +38,6 @@ qnx: target.path = /tmp/$${TARGET}/bin
 else: unix:!android: target.path = /opt/$${TARGET}/bin
 !isEmpty(target.path): INSTALLS += target
 RC_ICONS = favicon.ico
+
+DISTFILES += \
+    macpackage

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/desktop/detail.vue

@@ -161,6 +161,7 @@ export default {
             "看小说",
             "影视娱乐",
             // "听音乐",
+            "聊天",
             "其他工作"
           ]
         },
@@ -190,6 +191,7 @@ export default {
               { value: (this.timeList[4] / 3600).toFixed(2), name: "设计" },
               { value: (this.timeList[7] / 3600).toFixed(2), name: "看小说" },
               { value: (this.timeList[8] / 3600).toFixed(2), name: "影视娱乐" },
+              { value: (this.timeList[10] / 3600).toFixed(2), name: "聊天" },
               { value: (this.timeList[0] / 3600).toFixed(2), name: "其他工作" }
             ]
           }
@@ -225,6 +227,8 @@ export default {
           return "影视娱乐";
         case 9:
           return "听音乐";
+        case 10:
+          return "聊天";
         default:
           return "未知";
       }

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/desktop/index.vue

@@ -26,7 +26,7 @@
             </div>
           </div>
           <div class="one_card_txt">
-            <!-- null 0-编程,1-查资料,2-看文档,3-做设计,4-美工,5-运营,6-看小说,7-打游戏,8-听音乐 -->
+            <!-- -1-未知 null 0-编程,1-查资料,2-看文档,3-做设计,4-美工,5-运营,6-看小说,7-打游戏,8-听音乐 9-聊天 -->
             <span>{{converType(item.pic_type == null ? 0 : item.pic_type+1)}}</span>
             <div class="bottom clearfix">
               <el-link>
@@ -121,6 +121,8 @@ export default {
           return "影视娱乐";
         case 9:
           return "听音乐";
+        case 10:
+          return "聊天";
         default:
           return "未知";
       }

+ 3 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/statistics.vue

@@ -17,7 +17,7 @@
         </el-form-item>
         <!-- <el-form-item style="float:right;">
           <el-link type="primary" :underline="false" @click="handleAdd">异常申请</el-link>
-        </el-form-item> -->
+        </el-form-item>-->
       </el-form>
     </el-col>
 
@@ -37,7 +37,8 @@
       <el-table-column prop="statistics[2]" label="文档" sortable></el-table-column>
       <el-table-column prop="statistics[3]" label="设计" sortable></el-table-column>
       <el-table-column prop="statistics[4]" label="娱乐" sortable></el-table-column>
-      <el-table-column prop="statistics[5]" label="其他工作" sortable></el-table-column>
+      <el-table-column prop="statistics[5]" label="聊天" sortable></el-table-column>
+      <el-table-column prop="statistics[6]" label="其他工作" sortable></el-table-column>
       <el-table-column prop="sum" label="总时长" sortable></el-table-column>
     </el-table>