Browse Source

Merge remote-tracking branch 'origin/master'

yusm 1 month ago
parent
commit
6d6c9a6cc2

+ 0 - 5
fhKeeper/formulahousekeeper/copy_deploy_files.bat

@@ -1,5 +0,0 @@
-xcopy timesheet\dist\* timesheet_deploy\static_pc\dist\ /y /e /i /q
-xcopy timesheet_h5\dist\* timesheet_deploy\static_h5\dist\ /y /e /i /q
-xcopy management-platform\target\timesheet-3.4.0.jar timesheet_deploy\ /y
-echo "all deployment files are ready!"
-pause

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

@@ -337,20 +337,20 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         int state = 1;
                         for (Map<String, Object> m : rList) {
                             double t = (double) m.get("time");
+                            int curState = (int)m.get("state");
                             reportTime += t;
-
-                            //取最低的状态
+                            //取最低的状态,驳回
                             if (state == 2) {
                                 continue;
                             }
                             if (state == 0) {
-                                if ((int)m.get("state") == 2) {
+                                if (curState == 2) {
                                     state = 2;
                                 } else {
                                     continue;
                                 }
                             } else {
-                                state = (int)m.get("state");
+                                state = curState;
                             }
                         }
                         memb.put("state", state);
@@ -11791,18 +11791,29 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
 
         //获取填报工时记录表
         List<Report> reportList = new ArrayList<>();
+        int HONGHUCompanyId = 7536;
+        int LEAVE_PROJECT_ID = 80333;
         if (canViewAll && StringUtils.isEmpty(userId) && deptId == null) {
             //查看全公司的
-            reportList = reportMapper.selectList(new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").eq("company_id", companyId).between("create_date", firstDay, lastDay).groupBy("creator_id,create_date"));
+            QueryWrapper<Report> reportQueryWrapper = new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").eq("company_id", companyId).between("create_date", firstDay, lastDay).groupBy("creator_id,create_date");
+            if (companyId == HONGHUCompanyId) {
+                reportQueryWrapper.ne("project_id", LEAVE_PROJECT_ID);//泓浒,排除掉请假项目,请假是自动生成的,不计考勤工时
+            }
+            reportList = reportMapper.selectList(reportQueryWrapper);
         } else if (manageUserList.size() > 0) {
             List<String> userIdList = manageUserList.stream().map(User::getId).collect(Collectors.toList());
             if (userIdList.size() > 0) {
+                QueryWrapper<Report> reportQueryWrapper = new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").between("create_date", firstDay, lastDay).groupBy("creator_id,create_date");
                 if (userIdList.size() == 1) {
+                    reportQueryWrapper.eq("creator_id", userIdList.get(0));
                     //按单个人匹配
-                    reportList = reportMapper.selectList(new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").eq("creator_id", userIdList.get(0)).between("create_date", firstDay, lastDay).groupBy("creator_id,create_date"));
                 } else {
-                    reportList = reportMapper.selectList(new QueryWrapper<Report>().select("creator_id,create_date, sum(working_time) as working_time").in("creator_id", userIdList).between("create_date", firstDay, lastDay).groupBy("creator_id,create_date"));
+                    reportQueryWrapper.in("creator_id", userIdList);
+                }
+                if (companyId == HONGHUCompanyId) {
+                    reportQueryWrapper.ne("project_id", LEAVE_PROJECT_ID);//泓浒,排除掉请假项目,请假是自动生成的,不计考勤工时
                 }
+                reportList = reportMapper.selectList(reportQueryWrapper);
             }
         }
         //比对userCorpwxTimeList和reportList,找出工时未填满的记录

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

@@ -1785,6 +1785,9 @@
                     </el-input>
                     <selectCat v-if="user.userNameNeedTranslate == '1'" :filterable="true" :searchBoxTop="'1'" :size="'small'" :subject="usersList" :subjectId="usersListId" :distinction="'15'" :clearable="true" @selectCal="selectCal"></selectCat>
                     <div style="float: right; vertical-align: middle;height:32px">
+                        <el-link v-if="user.companyId==7536" style="margin-right: 14px"
+                        type="primary" v-loading="refreshAttendanceLoading"
+                        @click="refreshAttendanceCli()" >刷新考勤</el-link>
                         <el-link
                         type="primary" v-loading="remindering"
                         @click="batchRejectAndRemind()" >一键驳回并提醒</el-link>
@@ -2682,6 +2685,7 @@
                 transferWorkingHoursVisable: false,
                 multiOptionData:[],
                 businessTripsArray: [],
+                refreshAttendanceLoading: false
             };
         },
         watch: {
@@ -2766,6 +2770,39 @@
         },
         methods: {
             ...mapMutations(['upDataLoading']),
+            // 刷新考勤
+            refreshAttendanceCli() {
+                const firstDay = this.dayjs(this.date, 'YYYY-MM').startOf('month');
+                const lastDay = this.dayjs(this.date, 'YYYY-MM').endOf('month');
+                const formData = {
+                    startDate: firstDay.format('YYYY-MM-DD'),
+                    endDate: lastDay.format('YYYY-MM-DD')
+                }
+                this.refreshAttendanceLoading = true;
+                this.http.post('/user-fv-time/syncHongHuFvTime',{
+                    ...formData
+                },res => {
+                    this.refreshAttendanceLoading = false;
+                    if(res.code == 'ok'){
+                        this.$message({
+                            message: `刷新成功!`,
+                            type: 'success'
+                        })
+                        this.showReportTimeLessThanCardTimeList()
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.refreshAttendanceLoading = false;
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
             // 已填工时情况表设置背景色
             hasworkTblCellStyle({ columnIndex, row, column }) {
                 if(columnIndex > 2) {
@@ -2820,9 +2857,9 @@
                 this.http.post(
                     "/report/getReportTimeLessThanCardTimeList",
                     {
-                    date: this.notfullSelectDateMonth,
-                    deptId: this.deptIdForHasReport.length>0?this.deptIdForHasReport[this.deptIdForHasReport.length-1]:null,
-                    userId: this.usersListId
+                        date: this.notfullSelectDateMonth,
+                        deptId: this.deptIdForHasReport.length>0?this.deptIdForHasReport[this.deptIdForHasReport.length-1]:null,
+                        userId: this.usersListId,
                     },
                     (res) => {
                     if (res.code == "ok") {

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet_mld/src/views/project/gantt.vue

@@ -407,12 +407,12 @@ export default {
       // 更改为统一的
       if([2,3,4,5,6].includes(taskStatus)) {
           return `<div class="task_text">
-            ${task.taskStatus == 2 ? `<div class="circle greyStr"></div> <div class="circle greyStr"></div>` : ''}
-            ${task.taskStatus == 3 ? `<div class="circle orangeStr"></div> <div class="circle orangeStr"></div>` : ''}
+            ${task.taskStatus == 2 ? `<div class="circle greyStr"></div>` : ''}
+            ${task.taskStatus == 3 ? `<div class="circle orangeStr"></div> <div class="circle"></div>` : ''}
             ${task.taskStatus == 4 ? `<div class="exclamation-circle circle greenStr" style="color: #8ecaf8">V</div> <div class="circle orangeStr"></div>` : ''}
-            ${task.taskStatus == 5 ? `<div class="exclamation-circle circle redStr" style="color: #f56c6c">!</div> <div class="circle redStr"></div>` : ''}
+            ${task.taskStatus == 5 ? `<div class="exclamation-circle circle redStr" style="color: #f56c6c">!</div> <div class="circle"></div>` : ''}
             ${task.taskStatus == 6 ? `<div class="exclamation-circle circle greenStr" style="color: #8ecaf8">V</div> <div class="exclamation-circle circle redStr" style="color: #f56c6c">!</div>` : ''}
-            <div>${texts}</div>
+            <div style="margin-left: 6px;">${texts}</div>
           </div>`;
       }