QuYueTing 8 mēneši atpakaļ
vecāks
revīzija
939334ab1a

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

@@ -376,14 +376,16 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         }
                         //再匹配corpwxUserid为null的,需要按照姓名匹配
                         List<String> userNameList = userList.stream().filter(u->u.getCorpwxUserid() == null).map(User::getName).collect(Collectors.toList());
-                        List<UserCorpwxTime> corpwxTimeList2 = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", companyId).in("name", userNameList).eq("create_date", date));
-                        for (Map<String, Object> memb : nameList) {
-                            if (memb.get("corpwxUserId") == null) {
-                                String name = (String)memb.get("name");
-                                Optional<UserCorpwxTime> first = corpwxTimeList2.stream().filter(u -> u.getName().equals(name)).findFirst();
-                                if (first.isPresent()) {
-                                    UserCorpwxTime corpwxTime = first.get();
-                                    memb.put("cardTime", corpwxTime.getWorkHours());
+                        if (userNameList.size() > 0) {
+                            List<UserCorpwxTime> corpwxTimeList2 = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", companyId).in("name", userNameList).eq("create_date", date));
+                            for (Map<String, Object> memb : nameList) {
+                                if (memb.get("corpwxUserId") == null) {
+                                    String name = (String)memb.get("name");
+                                    Optional<UserCorpwxTime> first = corpwxTimeList2.stream().filter(u -> u.getName().equals(name)).findFirst();
+                                    if (first.isPresent()) {
+                                        UserCorpwxTime corpwxTime = first.get();
+                                        memb.put("cardTime", corpwxTime.getWorkHours());
+                                    }
                                 }
                             }
                         }

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -204,7 +204,7 @@
     "AskForLeave": "请假",
     "dailyWork": "工作日报",
     "people": "人",
-    "totalWorkingHours": "工作总时长",
+    "totalWorkingHours": "填报时长",
     "approvalProcess": "审批流程",
     "project": "项目",
     "waitForTheProjectReviewer": "待项目审核人",

+ 2 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -167,12 +167,8 @@
                                     </span>
                                     <span style="margin-left:30px;">
                                         <span style="margin-right:20px;" v-if="user.timeType.onlyShowPercent==0">
-                                            <!-- <i v-if="parseFloat(item1.reportTime)>parseFloat(item1.calculateTime)+0.5" style="color:red;margin-right:8px;" class="fa fa-exclamation-triangle"></i> -->
-                                            <!-- 工作总时长: -->
-                                            {{$t('other.totalWorkingHours')}}:
-                                            <!-- <span :style="parseFloat(item1.reportTime)>parseFloat(item1.calculateTime)+0.5?'color:red':''">{{item1.reportTime}}h</span> -->
-                                            <span >{{item1.reportTime | amounts}}</span>h
-                                            <span v-if="user.timeType.showCorpwxCardtime" :style="item1.cardTime !=item1.reportTime?'margin-left:10px;color:#ff0000;':'margin-left:10px;'">考勤时长:{{item1.cardTime | amounts}}h</span>
+                                            <span v-if="user.timeType.showCorpwxCardtime" :style="item1.cardTime !=item1.reportTime?'color:#ff0000;':''">考勤时长:{{item1.cardTime | amounts}}h</span>
+                                            <span style="margin-left:10px;">{{$t('other.totalWorkingHours')}}:{{item1.reportTime | amounts}}h</span>
                                         </span>
                                         <span class="approvalProcessBox" v-if="user.timeType.showFillauditTime == 1">
                                             <i class="iconfont firerock-iconliucheng1"></i>