Browse Source

考勤时间

seyason 2 years ago
parent
commit
5b2c06f4f2

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCorpwxTimeController.java

@@ -317,7 +317,7 @@ public class UserCorpwxTimeController {
                 .eq("corpwx_userid", user.getCorpwxUserid()).eq("create_date", date));
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
         LocalDate localDate = LocalDate.parse(date, df);
-        if(!localDate.isEqual(LocalDate.now())&&oldCorpwxTimes.size()>0){
+        if(!localDate.isEqual(LocalDate.now())&&oldCorpwxTimes.size()>0 && oldCorpwxTimes.get(0).getWorkHours() > 0){
             UserCorpwxTime time = oldCorpwxTimes.get(0);
             resultMap.put("time", time);
             msg.data=resultMap;

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

@@ -354,7 +354,9 @@
                     <span v-if="workForm.time">{{$t('other.attendancePunch')}}: {{workForm.time.startTime}}-{{workForm.time.endTime}}, {{workForm.time.workHours}}{{$t('time.hour')}}</span>
                     <!--批量填报和批量代填不显示考勤记录-->
                     <span v-if="!isBatch && (user.timeType.syncDingding==1 || user.timeType.syncCorpwxTime==1)&&!workForm.time" >{{$t('other.noAttendanceRecord')}}</span>
-                    <el-button type="default" style="margin-left:5px;" size="mini" :loading="syncTimeLoading" v-if="!isBatch && user.timeType.syncCorpwxTime==1 && (workForm.createDate == today || (!workForm.time))" icon="el-icon-refresh" @click="refreshWXCardTime(workForm.createDate)"></el-button>
+                    <el-button type="default" style="margin-left:5px;" size="mini" :loading="syncTimeLoading" 
+                    v-if="!isBatch && user.timeType.syncCorpwxTime==1 && (workForm.createDate == today || !workForm.time || workForm.time.workHours == 0)" icon="el-icon-refresh" 
+                            @click="refreshWXCardTime(workForm.createDate)"></el-button>
                 </el-form-item>
                 <!-- 000000 -->
                 <div v-for="(domain, index) in workForm.domains" :key="domain.id" :style="index>0?'margin-top:10px;':''">
@@ -1953,7 +1955,7 @@
                 // console.log('test',this.depData,this.data[0].membCount,this.reportList.length);
             },
             refreshWXCardTime(workdate) {
-                if (workdate) return;
+                if (!workdate) return;
                 this.syncTimeLoading = true;
                 this.http.post('/user-corpwx-time/getPunchRecordBySelf',{
                     date: workdate,
@@ -5710,7 +5712,7 @@
                             totalTime += parseFloat(this.workForm.domains[t].workingTime);
                         }
                         //批量填报不校验考勤时长,交给后台校验
-                        if (!isBatch) {
+                        if (!this.isBatch) {
                             if(this.user.timeType.notAllowedNoAttendance == 1){
                                 if (this.workForm.time){
                                     if (this.workForm.time.workHours == 0){