浏览代码

日报导出增加一列

cs 2 年之前
父节点
当前提交
f54da18b57

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

@@ -3829,6 +3829,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 //titles.add("考勤时长");
                 titles.add(MessageUtils.message("excel.attDuration"));
             }
+            //titles.add("审核流程状态");
+            titles.add(MessageUtils.message("excel.auditProcess"));
             //创建表头
             HSSFRow headRow = sheet.createRow(0);
             //设置列宽 setColumnWidth的第二个参数要乘以256 这个参数的单位是1/256个字符宽度
@@ -4138,6 +4140,53 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         }
                     }
                     row.createCell(index).setCellValue(cellValue);
+                    index ++;
+                }
+                //审核流程状态
+                Integer packageEngineering = company.getPackageEngineering();
+                if (packageEngineering.equals(0)){
+                    List<User> users = userMapper.selectList(new QueryWrapper<User>().eq("company_id",user.getCompanyId()));
+                    if(String.valueOf(map.get("state")).equals("1")){
+                        row.createCell(index).setCellValue("——");
+                    }else if (String.valueOf(map.get("state")).equals("-1")){
+                        row.createCell(index).setCellValue("导入待审核");
+                    } else {
+                        //部门审核
+                        if(String.valueOf(map.get("is_dept_audit")).equals("1")){
+                            String deptAuditorId = map.get("deptAuditorName")+"";
+                            String departmentName = map.get("departmentName") + "";
+                            for (User item : users) {
+                                if (item.getId().equals(deptAuditorId)){
+                                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                        String deptAuditorName ="$userName="+ item.getCorpwxRealUserid() +"$";
+                                        departmentName = "$departmentName=" + departmentName + "$";
+                                        row.createCell(index).setCellValue("待" + departmentName + "(" + deptAuditorName + ")审核");
+                                    }else {
+                                        row.createCell(index).setCellValue("待" + departmentName + "(" + item.getName() + ")审核");
+                                    }
+                                    break;
+                                }
+
+                            }
+                        }else {
+                            //项目审核或分组审核
+                            if (String.valueOf(map.get("projectAuditState")).equals("0") || String.valueOf(map.get("groupAuditState")).equals("0")){
+                                String projectAuditorName = map.get("projectAuditorName")+"";
+                                String projectAuditorId = map.get("projectAuditorId")+"";
+                                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                    for (User item : users) {
+                                        if (item.getId().equals(projectAuditorId)){
+                                            projectAuditorName ="$userName="+ item.getCorpwxUserid() +"$";
+                                            row.createCell(index).setCellValue("待项目审核人" + "(" + projectAuditorName + ")审核");
+                                            break;
+                                        }
+                                    }
+                                }else {
+                                    row.createCell(index).setCellValue("待项目审核人" + "(" + projectAuditorName + ")审核");
+                                }
+                            }
+                        }
+                    }
                 }
                 rowNum++;
             }

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages.properties

@@ -691,6 +691,7 @@ excel.validity = 有效期
 excel.deptHeadCount=部门人数
 excel.joinCenterCount=参与的研究中心的数量
 excel.tripPeopleCount=出差的人次
+excel.reviewProcessStatus=审核流程状态
 #推送
 push.fillIn=您今天的工时填报还未完成
 push.name=屈跃庭

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_en_US.properties

@@ -691,6 +691,7 @@ excel.validity = term of validity
 excel.deptHeadCount=Department headcount
 excel.joinCenterCount=Number of research centers involved
 excel.tripPeopleCount=Number of people on business trip
+excel.reviewProcessStatus=Review process status
 #推送
 push.fillIn=Your work hour report for today has not been completed.
 push.name=Qu Yue ting

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -60,7 +60,7 @@
         SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project,b.project_code as projectCode,b.category_name as categoryName, a.working_time AS duration, a.content, a.create_time   AS time,a.create_date as createDate,
         a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType,a.start_time as startTime,u.job_number as jobNumber,
         a.end_time  as endTime, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
-        a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
+        a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
         ,c.plate1 as plate1,c.plate2 as plate2,c.plate3 as plate3,c.plate4 as plate4,c.plate5 as plate5
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId,a.custom_data as customData
         ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, department.department_name as departmentName,department.department_id as departmentId, a.overtime_hours as overtimeHours, a.custom_text as customText,a.project_audit_time  as projectAuditTime,project_main.name as projectMainName