2 Revize f13758f5a4 ... 4a0239b1ba

Autor SHA1 Zpráva Datum
  QuYueTing 4a0239b1ba Merge branch 'master' of http://47.100.37.243:10191/quyueting/manHourHousekeeper před 1 měsícem
  QuYueTing 5064a351ca 泓浒工时成本统计模块的人员导出Bug修改 před 1 měsícem

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

@@ -896,8 +896,6 @@ public class UserCorpwxTimeController {
         HttpRespMsg msg = new HttpRespMsg();
         // 固定处理公司ID为7544的数据
         Integer companyId = 7544;
-        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
-
         String fileName = multipartFile.getOriginalFilename();
         File file = new File(fileName == null ? "file" : fileName);
         InputStream inputStream = null;
@@ -1259,6 +1257,7 @@ public class UserCorpwxTimeController {
             List<Report> existingReports = reportService.list(new QueryWrapper<Report>()
                     .eq("creator_id", user.getId())
                     .eq("create_date", workDate)
+                    .eq("state", 1)//仅计算审核通过的
                     .eq("company_id", companyId));
             
             // 计算系统中已填报的总工时
@@ -1316,11 +1315,13 @@ public class UserCorpwxTimeController {
             
             // 保留两位小数
             newWorkTime = Math.round(newWorkTime * 100.0) / 100.0;
-            
-            System.out.println("项目ID: " + report.getProjectId() + 
-                             ", 原工时: " + oldWorkTime + 
-                             ", 新工时: " + newWorkTime + 
-                             ", 比例: " + String.format("%.2f%%", ratio * 100));
+            if (report.getCreatorId().equals("8523550786255921152")) {
+                System.out.println("项目ID: " + report.getProjectId() +
+                        ", 原工时: " + oldWorkTime +
+                        ", 新工时: " + newWorkTime +
+                        ", 比例: " + String.format("%.2f%%", ratio * 100));
+            }
+
             
             // 更新工时
             report.setWorkingTime(newWorkTime);

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

@@ -7620,7 +7620,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         }
         //如果开启也企业微信考勤同步,仅仅显示有考勤记录的人员
         if (timeType.getSyncCorpwxTime() == 1 && onlyHaveAttendance == 1) {
-            noReportDataList = noReportDataList.stream().filter(item -> !(item.cardTime == null && item.status.equals(MessageUtils.message("leave.notFill")))).collect(Collectors.toList());
+            noReportDataList = noReportDataList.stream().filter(item -> item.cardTime != null).collect(Collectors.toList());
         }
 
         //排序

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -63,7 +63,7 @@
                 </el-col>
                 <el-col :span="2" style="display: flex;justify-content: flex-end;">
                     <el-button @click="reportExportCustomization" size="small" :loading="reportExportLoading"
-                        v-if="user.companyId == 7536">报表导出</el-button>
+                        v-if="user.companyId == 7536 && singleChoiceType == '工单'">报表导出</el-button>
                     <el-button @click="exportTheCustomListFlg" size="small" :loading="theCustomListFlgBtnLoading"
                         v-else-if="theCustomListFlg">报表导出</el-button>
                     <el-button @click="showExportDialog" size="small" v-else>报表导出</el-button>