Browse Source

Merge remote-tracking branch 'origin/master'

yusm 7 months ago
parent
commit
4e26d15ee1

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

@@ -356,6 +356,53 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     DecimalFormat df = new DecimalFormat("0.00");
                     DecimalFormat df = new DecimalFormat("0.00");
                     memb.put("reportTime", df.format(reportTime));
                     memb.put("reportTime", df.format(reportTime));
                 }
                 }
+                //显示考勤数据
+                if (timeType.getShowCorpwxCardtime() == 1) {
+                    List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("id", userIds));
+                    if (companyId == 469) {
+                        //赛元微电子,需要按照corpwxUserid或者姓名匹配
+                        List<String> corpwxUserIds = userList.stream().map(User::getCorpwxUserid).collect(Collectors.toList());
+                        List<UserCorpwxTime> corpwxTimeList = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", companyId).in("corpwx_userid", corpwxUserIds).eq("create_date", date));
+                        for (Map<String, Object> memb : nameList) {
+                            userList.stream().filter(u->u.getId().equals(memb.get("id"))).findFirst().ifPresent(u->{
+                                memb.put("corpwxUserId", u.getCorpwxUserid());
+                            });
+                            String corpwxUserId = (String)memb.get("corpwxUserId");
+                            Optional<UserCorpwxTime> first = corpwxTimeList.stream().filter(u -> u.getCorpwxUserid().equals(corpwxUserId)).findFirst();
+                            if (first.isPresent()) {
+                                UserCorpwxTime corpwxTime = first.get();
+                                memb.put("cardTime", corpwxTime.getWorkHours());
+                            }
+                        }
+                        //再匹配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());
+                                }
+                            }
+                        }
+                    } else {
+                        List<String> corpwxUserIds = userList.stream().map(User::getCorpwxUserid).collect(Collectors.toList());
+                        List<UserCorpwxTime> corpwxTimeList = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", companyId).in("corpwx_userid", corpwxUserIds).eq("create_date", date));
+                        for (Map<String, Object> memb : nameList) {
+                            userList.stream().filter(u->u.getId().equals(memb.get("id"))).findFirst().ifPresent(u->{
+                                memb.put("corpwxUserId", u.getCorpwxUserid());
+                            });
+                            String corpwxUserId = (String)memb.get("corpwxUserId");
+                            Optional<UserCorpwxTime> first = corpwxTimeList.stream().filter(u -> u.getCorpwxUserid().equals(corpwxUserId)).findFirst();
+                            if (first.isPresent()) {
+                                UserCorpwxTime corpwxTime = first.get();
+                                memb.put("cardTime", corpwxTime.getWorkHours());
+                            }
+                        }
+                    }
+                }
             }
             }
 
 
             //处理项目专业进度的数据展示
             //处理项目专业进度的数据展示

+ 7 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -153,7 +153,7 @@
         </template>
         </template>
 
 
         <template v-if="ins == 27">
         <template v-if="ins == 27">
-          <el-radio v-model="isWarn" label="1">仅显示预警数据</el-radio>
+          <el-checkbox v-model="isWarn" @change="groupChange()">仅显示预警数据</el-checkbox>
         </template>
         </template>
 
 
         <el-select v-if="ins == 24 && tabPosition == 1" v-model="groupConsumptionName" placeholder="请选择任务分组" :clearable="tabsType == 'all' ? true : false" filterable size="small" @change="getList(true)" :multiple="tabsType == 'all' ? true : false" collapse-tags style="margin-left:10px; width: 250px" :key="groupTaskKey">
         <el-select v-if="ins == 24 && tabPosition == 1" v-model="groupConsumptionName" placeholder="请选择任务分组" :clearable="tabsType == 'all' ? true : false" filterable size="small" @change="getList(true)" :multiple="tabsType == 'all' ? true : false" collapse-tags style="margin-left:10px; width: 250px" :key="groupTaskKey">
@@ -2017,7 +2017,7 @@ export default {
       selectStageName: '',
       selectStageName: '',
 
 
       estimatedWorkingHoursType: '按项目查看',
       estimatedWorkingHoursType: '按项目查看',
-      isWarn: '0'
+      isWarn: false
     };
     };
   },
   },
   computed: {},
   computed: {},
@@ -2730,8 +2730,11 @@ export default {
           sl.endDate = this.rangeDatas[1]
           sl.endDate = this.rangeDatas[1]
         }else if(this.ins == 27) {
         }else if(this.ins == 27) {
           fName = this.$t('xiangMuYuGuGongShiBiao') + '.xlsx'
           fName = this.$t('xiangMuYuGuGongShiBiao') + '.xlsx'
-          url = "/project/exportProjectEstimatedWorkTime"
+          // url = "/project/exportProjectEstimatedWorkTime"
+          url = "/project/exportProjectEstimatedWorkNew"
           this.proJuctId ? sl.projectId = this.proJuctId : ''
           this.proJuctId ? sl.projectId = this.proJuctId : ''
+          this.isWarn ? sl.isWarn = 1 : ''
+          this.estimatedWorkingHoursType == '按项目查看' ? sl.type = 0 : sl.type = 1
         }else if(this.ins == 28) {
         }else if(this.ins == 28) {
           fName = this.$t('yuanGongRenWuWanChengQingKuangBiao') + '.xlsx'
           fName = this.$t('yuanGongRenWuWanChengQingKuangBiao') + '.xlsx'
           url = "/task/exportUserTaskCompleteDetail"
           url = "/task/exportUserTaskCompleteDetail"
@@ -4436,7 +4439,7 @@ export default {
         pageSize: this.size,
         pageSize: this.size,
         type: this.estimatedWorkingHoursType == '按项目查看' ? 0 : 1
         type: this.estimatedWorkingHoursType == '按项目查看' ? 0 : 1
       }
       }
-      this.isWarn == '1' ? parameter.isWarn = '1' : ''
+      this.isWarn ? parameter.isWarn = '1' : ''
       this.proJuctId ? parameter.projectId = this.proJuctId : ''
       this.proJuctId ? parameter.projectId = this.proJuctId : ''
       this.listLoading = true
       this.listLoading = true
       // let { data } = await this.postData('/project/getProjectEstimatedWork', {
       // let { data } = await this.postData('/project/getProjectEstimatedWork', {

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -169,9 +169,10 @@
                                         <span style="margin-right:20px;" v-if="user.timeType.onlyShowPercent==0">
                                         <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> -->
                                             <!-- <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')}}
+                                            {{$t('other.totalWorkingHours')}}:
                                             <!-- <span :style="parseFloat(item1.reportTime)>parseFloat(item1.calculateTime)+0.5?'color:red':''">{{item1.reportTime}}h</span> -->
                                             <!-- <span :style="parseFloat(item1.reportTime)>parseFloat(item1.calculateTime)+0.5?'color:red':''">{{item1.reportTime}}h</span> -->
                                             <span >{{item1.reportTime | amounts}}</span>h
                                             <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>
                                         </span>
                                         <span class="approvalProcessBox" v-if="user.timeType.showFillauditTime == 1">
                                         <span class="approvalProcessBox" v-if="user.timeType.showFillauditTime == 1">
                                             <i class="iconfont firerock-iconliucheng1"></i>
                                             <i class="iconfont firerock-iconliucheng1"></i>
@@ -180,6 +181,7 @@
                                                 {{$t('other.approvalProcess')}}
                                                 {{$t('other.approvalProcess')}}
                                             </span>
                                             </span>
                                         </span>
                                         </span>
+                                        
                                     </span>
                                     </span>
                                     <div class="checkbtn" style="padding-right:20px;">
                                     <div class="checkbtn" style="padding-right:20px;">
                                         <!--编辑和删除日报-->
                                         <!--编辑和删除日报-->

+ 5 - 5
fhKeeper/formulahousekeeper/timesheet_h5/src/views/deviceManagement/useRegistration.vue

@@ -148,11 +148,11 @@ export default {
     },
     },
     scanClick() {
     scanClick() {
       this.showQrcode = true
       this.showQrcode = true
-      setTimeout(() => {
-        // const val = '{"id":3,"deviceCode":"设备编号1","deviceName":"设备名称1","deviceModel":"设备型号1","manufacturer":"制造商1","purchaseDate":"2024-10-09","maintenanceDate":"2024-10-10","companyId":10,"usageStatus":false,"usageUserId":null,"usageUserName":null,"projectId":null,"projectName":null,"startTime":null,"endTime":null,"startOrEnd":null,"deviceLogId":null,"useTime":null}'
-        const val = localStorage.getItem('scanCodeData')
-        this.determineQrcode(val)
-      }, 3000)
+      // setTimeout(() => {
+      //   // const val = '{"id":3,"deviceCode":"设备编号1","deviceName":"设备名称1","deviceModel":"设备型号1","manufacturer":"制造商1","purchaseDate":"2024-10-09","maintenanceDate":"2024-10-10","companyId":10,"usageStatus":false,"usageUserId":null,"usageUserName":null,"projectId":null,"projectName":null,"startTime":null,"endTime":null,"startOrEnd":null,"deviceLogId":null,"useTime":null}'
+      //   const val = localStorage.getItem('scanCodeData')
+      //   this.determineQrcode(val)
+      // }, 3000)
     },
     },
     determineQrcode(val) {
     determineQrcode(val) {
       console.log(val, '<=========== val')
       console.log(val, '<=========== val')