فهرست منبع

增加直属审核人的部门显示

seyason 7 ماه پیش
والد
کامیت
111c727d48

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/ProjectAuditor.java

@@ -45,6 +45,8 @@ public class ProjectAuditor extends Model<ProjectAuditor> {
     @TableField("auditor_name")
     private String auditorName;
 
+    @TableField(exist = false)
+    private String auditorDeptName;
 
     @Override
     protected Serializable pkVal() {

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

@@ -731,7 +731,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         //优先取个人的非项目审核人
                         String superiorId = user.getSuperiorId();
                         //其次取员工的部门主要负责人
+                        boolean isDirectSuperior = true;
                         if (superiorId == null) {
+                            isDirectSuperior = false;
                             Integer departmentId = user.getDepartmentId();
                             Department department = departmentMapper.selectById(departmentId);
                             if (department != null) {
@@ -745,6 +747,11 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                                 ProjectAuditor auditor = new ProjectAuditor();
                                 auditor.setAuditorId(superiorId);
                                 auditor.setAuditorName(superior.getName());
+                                if (isDirectSuperior) {
+                                    Integer deptId = user.getDepartmentId();
+                                    Department department = departmentMapper.selectById(deptId);
+                                    auditor.setAuditorDeptName(department != null? department.getDepartmentName(): null);
+                                }
                                 auditorList1.add(auditor);
                                 r.setAuditUserList(auditorList1);
                             }
@@ -10301,18 +10308,19 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         List<Map<String, Object>> resultList = new ArrayList<>();
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
         for (UserCorpwxTime corpwxTime : userCorpwxTimeList) {
-            boolean isFull = false;
+            boolean isMatch = true;
             double reportTime = 0;
             for (Report report : reportList) {
                 if (corpwxTime.getCreateDate().isEqual(report.getCreateDate())) {
                     reportTime = report.getWorkingTime();
-                    if (corpwxTime.getWorkHours() <= report.getWorkingTime()) {
-                        isFull = true;
+                    //不一致
+                    if (Math.abs(corpwxTime.getWorkHours() - report.getWorkingTime()) > 0.01) {
+                        isMatch = false;
                     }
                     break;
                 }
             }
-            if (!isFull) {
+            if (!isMatch) {
                 Map<String, Object> map = new HashMap<>();
                 map.put("name", corpwxTime.getName()==null?corpwxTime.getCorpwxUserid():corpwxTime.getName());
                 map.put("createDate", dateTimeFormatter.format(corpwxTime.getCreateDate()));

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

@@ -205,7 +205,7 @@
                                                         <span v-else>
                                                             <span v-if="item2.isDeptAudit==0">
                                                                 <span v-if="item2.projectAuditState==0">
-                                                                    <!-- 待项目审核人 --> {{user.companyId == 469?"待部门主管":$t('other.waitForTheProjectReviewer')}}
+                                                                    <!-- 待项目审核人 --> {{user.companyId == 469?(item2.auditorDeptName?item2.auditorDeptName:"待部门主管"):$t('other.waitForTheProjectReviewer')}}
                                                                     <span v-if="item2.projectAuditorName != null">(
                                                                         <!-- {{item2.projectAuditorName}} -->
                                                                         <TranslationOpenData :configurationItems="{ openType: 'userName', openId: item2.projectAuditorName, renderIndex: 0 }" />
@@ -213,7 +213,7 @@
                                                                     <!-- 审核 --> {{$t('other.audit')}}
                                                                 </span>
                                                                 <span style="color:#32CD32;" v-else-if="item2.projectAuditState==1">
-                                                                    <!-- 项目审核人 --> {{user.companyId == 469?"部门主管":$t('other.projectAuditor')}}
+                                                                    <!-- 项目审核人 --> {{user.companyId == 469?(item2.auditorDeptName?item2.auditorDeptName:"部门主管"):$t('other.projectAuditor')}}
                                                                     <span v-if="item2.projectAuditorName != null">(
                                                                         <!-- {{item2.projectAuditorName}} -->
                                                                         <TranslationOpenData :configurationItems="{ openType: 'userName', openId: item2.projectAuditorName, renderIndex: 0 }" />