瀏覽代碼

Merge remote-tracking branch 'origin/master'

ysm 9 月之前
父節點
當前提交
b09f7e0b28
共有 14 個文件被更改,包括 249 次插入165 次删除
  1. 1 1
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ClueServiceImpl.java
  2. 1 1
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/CustomServiceImpl.java
  3. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java
  4. 154 135
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportLogController.java
  5. 3 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Report.java
  6. 14 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java
  7. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  8. 58 16
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  9. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java
  10. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/MessageUtils.java
  11. 3 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TimeTypeMapper.xml
  12. 1 1
      fhKeeper/formulahousekeeper/timesheet/index.html
  13. 9 5
      fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue
  14. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/transferWorkingHours.vue

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

@@ -606,7 +606,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
                 }
                 for (Clue bo : importProductList) {
                     ActionLog actionLog = new ActionLog();
-                    actionLog.setName("新增了商机");
+                    actionLog.setName("新增了线索");
                     actionLog.setItemId(bo.getId());
                     actionLog.setCode("clue");
                     actionLog.setUserId(user.getId());

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

@@ -831,7 +831,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
                 }
                 for (Custom bo : importProductList) {
                     ActionLog actionLog = new ActionLog();
-                    actionLog.setName("新增了商机");
+                    actionLog.setName("新增了客户");
                     actionLog.setItemId(bo.getId());
                     actionLog.setCode("custom");
                     actionLog.setUserId(user.getId());

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

@@ -2758,7 +2758,7 @@ public class ReportController {
     * @Date: 2024/7/17
     */
     @RequestMapping("/transferReport")
-    public HttpRespMsg transferReport(String reportIds,@RequestParam Integer projectId,@RequestParam Integer groupId,@RequestParam Integer stageId){
+    public HttpRespMsg transferReport(String reportIds,@RequestParam Integer projectId,@RequestParam Integer groupId,Integer stageId){
         return reportService.transferReport(reportIds,projectId,groupId,stageId);
     }
 }

+ 154 - 135
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportLogController.java

@@ -9,6 +9,8 @@ import com.management.platform.mapper.*;
 import com.management.platform.service.ReportLogDetailService;
 import com.management.platform.service.ReportLogService;
 import com.management.platform.service.ReportService;
+import com.management.platform.service.WxCorpInfoService;
+import com.management.platform.service.impl.WxCorpInfoServiceImpl;
 import com.management.platform.util.ExcelUtil;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
@@ -36,6 +38,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Optional;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 import java.util.stream.Collectors;
 
 /**
@@ -70,6 +74,8 @@ public class ReportLogController {
     private ReportService reportService;
     @Resource
     private ReportLogDetailService reportLogDetailService;
+    @Resource
+    private WxCorpInfoService wxCorpInfoService;
 
     @RequestMapping("/get")
     public HttpRespMsg get(String creatorId, String createDate) {
@@ -183,6 +189,9 @@ public class ReportLogController {
         HttpRespMsg msg=new HttpRespMsg();
         //然后处理文件
         String fileName = multipartFile.getOriginalFilename();
+        User user = userMapper.selectById(request.getHeader("token"));
+        Integer companyId = user.getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         File file = new File(fileName == null ? "file" : fileName);
         InputStream inputStream = null;
@@ -225,154 +234,164 @@ public class ReportLogController {
                 Integer numCellValue = Integer.valueOf(numCell.getStringCellValue());
                 reportLogIds.add(numCellValue);
             }
-            List<ReportLog> reportLogList = reportLogService.list(new LambdaQueryWrapper<ReportLog>().in(ReportLog::getId, reportLogIds));
-            List<String> reportIds = reportLogList.stream().map(ReportLog::getReportIds).collect(Collectors.toList());
-            List<Integer> reportIdList =new ArrayList<>();
-            reportIds.forEach(r->{
-                String[] split = r.split(",");
-                List<Integer> reportSubIds = Arrays.asList(split).stream().map(s -> Integer.valueOf(s)).collect(Collectors.toList());
-                reportIdList.addAll(reportSubIds);
-            });
-            List<Report> reportList = reportMapper.selectList(new LambdaQueryWrapper<Report>().in(Report::getId, reportIdList));
-            StringBuilder sb=new StringBuilder();
-            List<Report> needUpdateReportList=new ArrayList<>();
-            List<ReportLog> needUpdateReportLogList=new ArrayList<>();
-            List<ReportLogDetail> needUpdateReportLogDetailList=new ArrayList<>();
-            for (int rowIndex = 0; rowIndex <= rowNum; rowIndex++) {
-                XSSFRow row = sheet.getRow(rowIndex);
-                if (row == null) {
-                    continue;
-                }
-                //跳过空行
-                if (ExcelUtil.isRowEmpty(row)) {
-                    continue;
-                }
-                XSSFCell numCell = row.getCell(0);
-                XSSFCell nameCell = row.getCell(1);
-                XSSFCell jobNumCell = row.getCell(2);
-                XSSFCell createDateCell = row.getCell(3);
-                XSSFCell createTimeCell = row.getCell(4);
-                XSSFCell projectNameCell = row.getCell(5);
-                XSSFCell projectCodeCell = row.getCell(6);
-                XSSFCell auditDateCell = row.getCell(7);
+            ExecutorService executor = Executors.newFixedThreadPool(1);
+            executor.execute(new Runnable() {
+                @Override
+                public void run() {
+                    List<ReportLog> reportLogList = reportLogService.list(new LambdaQueryWrapper<ReportLog>().select(ReportLog::getReportIds,ReportLog::getId,ReportLog::getMsg).in(ReportLog::getId, reportLogIds));
+                    List<String> reportIds = reportLogList.stream().map(ReportLog::getReportIds).collect(Collectors.toList());
+                    List<Integer> reportIdList =new ArrayList<>();
+                    reportIds.forEach(r->{
+                        String[] split = r.split(",");
+                        List<Integer> reportSubIds = Arrays.asList(split).stream().map(s -> Integer.valueOf(s)).collect(Collectors.toList());
+                        reportIdList.addAll(reportSubIds);
+                    });
+                    List<Report> reportList = reportMapper.selectList(new LambdaQueryWrapper<Report>().in(Report::getId, reportIdList));
+                    List<ReportLogDetail> allReportLogDetails = reportLogDetailService.list(new LambdaQueryWrapper<ReportLogDetail>().select(ReportLogDetail::getMsg,ReportLogDetail::getId).in(ReportLogDetail::getReportId, reportIdList));
+                    StringBuilder sb=new StringBuilder();
+                    List<Report> needUpdateReportList=new ArrayList<>();
+                    List<ReportLog> needUpdateReportLogList=new ArrayList<>();
+                    List<ReportLogDetail> needUpdateReportLogDetailList=new ArrayList<>();
+                    for (int rowIndex = 0; rowIndex <= rowNum; rowIndex++) {
+                        XSSFRow row = sheet.getRow(rowIndex);
+                        if (row == null) {
+                            continue;
+                        }
+                        //跳过空行
+                        if (ExcelUtil.isRowEmpty(row)) {
+                            continue;
+                        }
+                        XSSFCell numCell = row.getCell(0);
+                        XSSFCell nameCell = row.getCell(1);
+                        XSSFCell jobNumCell = row.getCell(2);
+                        XSSFCell createDateCell = row.getCell(3);
+                        XSSFCell createTimeCell = row.getCell(4);
+                        XSSFCell projectNameCell = row.getCell(5);
+                        XSSFCell projectCodeCell = row.getCell(6);
+                        XSSFCell auditDateCell = row.getCell(7);
 
-                if (numCell != null) {
-                    String code = numCell.getStringCellValue().trim().replaceAll("\\u00a0", "");
-                    if ((code.equals("编号(不可随意修改)")||(code.equals("编号(不可随意修改)")) && rowIndex == 0)){
-                        //跳过第一行标题
-                        continue;
-                    }
-                }
+                        if (numCell != null) {
+                            String code = numCell.getStringCellValue().trim().replaceAll("\\u00a0", "");
+                            if ((code.equals("编号(不可随意修改)")||(code.equals("编号(不可随意修改)")) && rowIndex == 0)){
+                                //跳过第一行标题
+                                continue;
+                            }
+                        }
 
-                if (numCell != null)numCell.setCellType(CellType.STRING);
-                if (nameCell != null)nameCell.setCellType(CellType.STRING);
-                if (jobNumCell != null)jobNumCell.setCellType(CellType.STRING);
-                if (createDateCell != null)createDateCell.setCellType(CellType.STRING);
-                if (createTimeCell != null)createTimeCell.setCellType(CellType.STRING);
-                if (projectNameCell != null)projectNameCell.setCellType(CellType.STRING);
-                if (projectCodeCell != null)projectCodeCell.setCellType(CellType.STRING);
-                if (auditDateCell != null)auditDateCell.setCellType(CellType.STRING);
+                        if (numCell != null)numCell.setCellType(CellType.STRING);
+                        if (nameCell != null)nameCell.setCellType(CellType.STRING);
+                        if (jobNumCell != null)jobNumCell.setCellType(CellType.STRING);
+                        if (createDateCell != null)createDateCell.setCellType(CellType.STRING);
+                        if (createTimeCell != null)createTimeCell.setCellType(CellType.STRING);
+                        if (projectNameCell != null)projectNameCell.setCellType(CellType.STRING);
+                        if (projectCodeCell != null)projectCodeCell.setCellType(CellType.STRING);
+                        if (auditDateCell != null)auditDateCell.setCellType(CellType.STRING);
 
-                Integer numCellValue = Integer.valueOf(numCell.getStringCellValue());
-                String nameCellValue = nameCell.getStringCellValue();
-                String jobNumCellValue =jobNumCell.getStringCellValue();
-                String createDateCellValue = createDateCell.getStringCellValue();
-                String createTimeCellValue = createTimeCell.getStringCellValue();
-                String projectNameCellValue = projectNameCell.getStringCellValue();
-                String projectCodeCellValue = projectCodeCell.getStringCellValue();
-                String auditDateCellValue = auditDateCell.getStringCellValue();
+                        Integer numCellValue = Integer.valueOf(numCell.getStringCellValue());
+                        String nameCellValue = nameCell.getStringCellValue();
+                        String jobNumCellValue =jobNumCell.getStringCellValue();
+                        String createDateCellValue = createDateCell.getStringCellValue();
+                        String createTimeCellValue = createTimeCell.getStringCellValue();
+                        String projectNameCellValue = projectNameCell.getStringCellValue();
+                        String projectCodeCellValue = projectCodeCell.getStringCellValue();
+                        String auditDateCellValue = auditDateCell.getStringCellValue();
 
 
-                Optional<ReportLog> first = reportLogList.stream().filter(r -> r.getId().equals(numCellValue)).findFirst();
-                if(first.isPresent()){
-                    ReportLog reportLog = first.get();
-                    String reportIdSplit = reportLog.getReportIds();
-                    List<Integer> ids = Arrays.asList(reportIdSplit.split(",")).stream().map(s -> Integer.valueOf(s)).collect(Collectors.toList());
-                    List<Report> reports = reportList.stream().filter(r -> ids.contains(r.getId())).collect(Collectors.toList());
-                    LocalDateTime auditDateTime = null;
-                    LocalDateTime createTimeTime = null;
-                    if(auditDateCellValue!=null&&!StringUtils.isEmpty(auditDateCellValue)){
-                        try {
-                            auditDateTime = LocalDateTime.parse(auditDateCellValue, df);
-                        }catch (Exception e){
-                            msg.setError("第"+row+"行审核时间格式错误,请检查审核时间数据");
-                            return msg;
-                        }
-                        String creatorId = reports.get(0).getCreatorId();
-                        if(reportLog.getMsg().contains("审核通过了")){
-                            reportLog.setOperateDate(auditDateTime);
-                            needUpdateReportLogList.add(reportLog);
-                        }
-                        LocalDateTime finalAuditDateTime = auditDateTime;
-                        reports.forEach(r->{
-                            r.setProjectAuditTime(finalAuditDateTime);
-                        });
-                        List<Integer> details = reports.stream().map(Report::getId).distinct().collect(Collectors.toList());
-                        List<ReportLogDetail> reportLogDetails = reportLogDetailService.list(new LambdaQueryWrapper<ReportLogDetail>().in(ReportLogDetail::getReportId, details));
-                        reportLogDetails.forEach(r->{
+                        Optional<ReportLog> first = reportLogList.stream().filter(r -> r.getId().equals(numCellValue)).findFirst();
+                        if(first.isPresent()){
+                            ReportLog reportLog = first.get();
+                            String reportIdSplit = reportLog.getReportIds();
+                            List<Integer> ids = Arrays.asList(reportIdSplit.split(",")).stream().map(s -> Integer.valueOf(s)).collect(Collectors.toList());
+                            List<Report> reports = reportList.stream().filter(r -> ids.contains(r.getId())).collect(Collectors.toList());
+                            LocalDateTime auditDateTime = null;
+                            LocalDateTime createTimeTime = null;
+                            if(auditDateCellValue!=null&&!StringUtils.isEmpty(auditDateCellValue)){
+                                try {
+                                    auditDateTime = LocalDateTime.parse(auditDateCellValue, df);
+                                }catch (Exception e){
+                                    new Exception("第"+row+"行审核时间格式错误,请检查审核时间数据");
+                                }
+                                String creatorId = reports.get(0).getCreatorId();
+                                if(reportLog.getMsg().contains("审核通过了")){
+                                    reportLog.setOperateDate(auditDateTime);
+                                    needUpdateReportLogList.add(reportLog);
+                                }
+                                LocalDateTime finalAuditDateTime = auditDateTime;
+                                reports.forEach(r->{
+                                    r.setProjectAuditTime(finalAuditDateTime);
+                                });
+                                List<Integer> details = reports.stream().map(Report::getId).distinct().collect(Collectors.toList());
+                                List<ReportLogDetail> reportLogDetails = allReportLogDetails.stream().filter(a -> details.contains(a.getReportId())).collect(Collectors.toList());
+                                reportLogDetails.forEach(r->{
 //                            if(r.getMsg()!=null&&r.getMsg().contains("审核通过了")&&!r.getOperatorId().equals(creatorId)){
-                            if(r.getMsg()!=null&&r.getMsg().contains("审核通过了")){
-                                r.setOperateDate(finalAuditDateTime);
-                                needUpdateReportLogDetailList.add(r);
+                                    if(r.getMsg()!=null&&r.getMsg().contains("审核通过了")){
+                                        r.setOperateDate(finalAuditDateTime);
+                                        needUpdateReportLogDetailList.add(r);
+                                    }
+                                });
+                                needUpdateReportList.addAll(reports);
                             }
-                        });
-                        needUpdateReportList.addAll(reports);
-                    }
-                    if(createTimeCellValue!=null&&!StringUtils.isEmpty(createTimeCellValue)){
-                        try {
-                            createTimeTime = LocalDateTime.parse(createTimeCellValue, df);
-                        }catch (Exception e){
-                            msg.setError("第"+row+"行填报时间格式错误,请检查审核时间数据");
-                            return msg;
-                        }
-                        String creatorId = reports.get(0).getCreatorId();
-                        Integer id = reports.get(0).getId();
-                        List<ReportLog> list = reportLogService.list(new LambdaQueryWrapper<ReportLog>().apply("FIND_IN_SET(" + id + ",report_ids)"));
-                        List<ReportLog> reportLogs = list.stream().filter(l -> l.getMsg().contains("提交了")).collect(Collectors.toList());
-                        LocalDateTime finalCreateTimeTime1 = createTimeTime;
-                        reportLogs.forEach(r->{
-                            if(creatorId.equals(r.getOperatorId())){
-                                r.setOperateDate(finalCreateTimeTime1);
-                                needUpdateReportLogList.add(r);
-                            }
-                        });
-                        LocalDateTime finalCreateTimeTime = createTimeTime;
-                        reports.forEach(r->{
-                            r.setCreateTime(finalCreateTimeTime);
-                        });
-                        List<Integer> details = reports.stream().map(Report::getId).distinct().collect(Collectors.toList());
-                        List<ReportLogDetail> reportLogDetails = reportLogDetailService.list(new LambdaQueryWrapper<ReportLogDetail>().in(ReportLogDetail::getReportId, details));
-                        reportLogDetails.forEach(r->{
+                            if(createTimeCellValue!=null&&!StringUtils.isEmpty(createTimeCellValue)){
+                                try {
+                                    createTimeTime = LocalDateTime.parse(createTimeCellValue, df);
+                                }catch (Exception e){
+                                    new Exception("第"+row+"行填报时间格式错误,请检查审核时间数据");
+                                }
+                                String creatorId = reports.get(0).getCreatorId();
+                                Integer id = reports.get(0).getId();
+                                List<ReportLog> list = reportLogService.list(new LambdaQueryWrapper<ReportLog>().apply("FIND_IN_SET(" + id + ",report_ids)"));
+                                List<ReportLog> reportLogs = list.stream().filter(l -> l.getMsg().contains("提交了")).collect(Collectors.toList());
+                                LocalDateTime finalCreateTimeTime1 = createTimeTime;
+                                reportLogs.forEach(r->{
+                                    if(creatorId.equals(r.getOperatorId())){
+                                        r.setOperateDate(finalCreateTimeTime1);
+                                        needUpdateReportLogList.add(r);
+                                    }
+                                });
+                                LocalDateTime finalCreateTimeTime = createTimeTime;
+                                reports.forEach(r->{
+                                    r.setCreateTime(finalCreateTimeTime);
+                                });
+                                List<Integer> details = reports.stream().map(Report::getId).distinct().collect(Collectors.toList());
+                                List<ReportLogDetail> reportLogDetails = allReportLogDetails.stream().filter(a -> details.contains(a.getReportId())).collect(Collectors.toList());
+                                reportLogDetails.forEach(r->{
 //                            if(r.getMsg()!=null&&r.getMsg().contains("提交了")&&r.getOperatorId().equals(creatorId)){
-                            if(r.getMsg()!=null&&r.getMsg().contains("提交了")){
-                                r.setOperateDate(finalCreateTimeTime1);
-                                needUpdateReportLogDetailList.add(r);
+                                    if(r.getMsg()!=null&&r.getMsg().contains("提交了")){
+                                        r.setOperateDate(finalCreateTimeTime1);
+                                        needUpdateReportLogDetailList.add(r);
+                                    }
+                                });
+                                needUpdateReportList.addAll(reports);
                             }
-                        });
-                        needUpdateReportList.addAll(reports);
+                        }else {
+                            if(sb.toString().length()==0){
+                                sb.append(numCell);
+                            }else {
+                                sb.append(","+numCell);
+                            }
+                        }
                     }
-                }else {
-                    if(sb.toString().length()==0){
-                        sb.append(numCell);
+                    if(needUpdateReportList.size()>0){
+                        reportService.updateBatchById(needUpdateReportList);
+                    }
+                    if(needUpdateReportLogList.size()>0){
+                        reportLogService.updateBatchById(needUpdateReportLogList);
+                    }
+                    if(needUpdateReportLogDetailList.size()>0){
+                        reportLogDetailService.updateBatchById(needUpdateReportLogDetailList);
+                    }
+                    String msgStr="";
+                    if(sb.length()>0){
+                        msgStr="更新完成,其中编号["+sb.toString()+"]的填报数据不存在";
                     }else {
-                        sb.append(","+numCell);
+                        msgStr="更新完成";
+                    }
+                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                        wxCorpInfoService.sendWXCorpMsg(wxCorpInfo, user.getCorpwxUserid(),msgStr, null, WxCorpInfoServiceImpl.TEXT_CARD_MSG_REPORT_IMPORT);
                     }
                 }
-            }
-            if(needUpdateReportList.size()>0){
-                reportService.updateBatchById(needUpdateReportList);
-            }
-            if(needUpdateReportLogList.size()>0){
-                reportLogService.updateBatchById(needUpdateReportLogList);
-            }
-            if(needUpdateReportLogDetailList.size()>0){
-                reportLogDetailService.updateBatchById(needUpdateReportLogDetailList);
-            }
-            if(sb.length()>0){
-                msg.setMsg("更新完成,其中编号["+sb.toString()+"]的填报数据不存在");
-            }else {
-                msg.setMsg("更新完成");
-            }
+            });
+            msg.setMsg("正在导入审核修改...请稍后查看");
         }catch (FileNotFoundException e) {
             e.printStackTrace();
         } catch (IOException e) {

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Report.java

@@ -1,6 +1,8 @@
 package com.management.platform.entity;
 
 import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import java.time.LocalDate;
@@ -159,7 +161,7 @@ public class Report extends Model<Report> {
     /**
      * 阶段/岗位/工序
      */
-    @TableField("stage")
+    @TableField(value = "stage",updateStrategy = FieldStrategy.IGNORED)
     private String stage;
 
 

+ 14 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Seyason
- * @since 2024-06-22
+ * @since 2024-07-24
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -598,6 +598,19 @@ public class TimeType extends Model<TimeType> {
     @TableField(exist = false)
     private Integer saasSyncContact;
 
+    /**
+     * 日报第二审核人;在reportAuditType5时有效
+     */
+    @TableField("second_auditor")
+    private String secondAuditor;
+
+    /**
+     * 日报第三审核人;在reportAuditType5时有效
+     */
+    @TableField("third_auditor")
+    private String thirdAuditor;
+
+
     @Override
     protected Serializable pkVal() {
         return this.companyId;

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

@@ -13363,6 +13363,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         targetGroupNameList.add("研发部电气调试验收");
         List<TaskGroup> taskGroupList = taskGroupMapper.selectList(new LambdaQueryWrapper<TaskGroup>().in(TaskGroup::getName, targetGroupNameList).inSql(TaskGroup::getProjectId, "select id from project where company_id=" + companyId));
         List<Integer> projectIds = taskGroupList.stream().map(TaskGroup::getProjectId).distinct().collect(Collectors.toList());
+        projectIds.add(-1);
         if(pageIndex==null&&pageSize==null){
             pageIndex=-1;
             pageSize=-1;

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

@@ -2137,6 +2137,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 boolean hasAuditAllPri = sysFunctionService.hasPriviledge(user.getRoleId(), "审核全员日报");
                 List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().select("id, state, group_audit_state, creator_id, create_date, project_id,audit_dept_managerid,department_audit_state, project_auditor_id, is_dept_audit").in("id", ids));
                 Integer onlyAuditOnce = userMapper.selectById(reportList.get(0).getCreatorId()).getOnlyAuditOnce();
+                //5情况下,可能设置了第二和第三审核人
+                String secondAuditor = timeType.getSecondAuditor();
+                String thirdAuditor = timeType.getThirdAuditor();
                 for (Report r : reportList) {
                     //直属领导审核或者部门负责人审核
                     Report newReport = new Report();
@@ -2144,9 +2147,25 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     if (timeType.getReportAuditType() == 5) {
                         if(hasAuditAllPri || ((r.getIsDeptAudit() == 0 &&  user.getId().equals(r.getProjectAuditorId()))
                                 || (r.getIsDeptAudit() == 1 && user.getId().equals(r.getAuditDeptManagerid())))){
-                            newReport.setState(1);
-                            newReport.setDepartmentAuditState(1);
-                            newReport.setProjectAuditState(1);
+                            if (thirdAuditor != null && secondAuditor != null) {
+                                if (user.getId().equals(thirdAuditor)) {
+                                    //当前为第三审核人在审核,直接通过
+                                    newReport.setState(1);
+                                    newReport.setDepartmentAuditState(1);
+                                    newReport.setProjectAuditState(1);
+                                } else if (user.getId().equals(secondAuditor)) {
+                                    newReport.setIsDeptAudit(0);
+                                    newReport.setProjectAuditorId(thirdAuditor);
+                                } else {
+                                    //第一层审核,转给第二审核人
+                                    newReport.setIsDeptAudit(0);
+                                    newReport.setProjectAuditorId(secondAuditor);
+                                }
+                            } else {
+                                newReport.setState(1);
+                                newReport.setDepartmentAuditState(1);
+                                newReport.setProjectAuditState(1);
+                            }
                             newReport.setProjectAuditTime(LocalDateTime.now());
                         }else {
                             httpRespMsg.setError("您无权审核该日报");
@@ -2734,12 +2753,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             Integer roleId = user.getRoleId();
             boolean canAuditAllReport = sysFunctionService.hasPriviledge(roleId, "审核全员日报");
             boolean isDirectAudit = false;
-            String reporterSuperiorId = userMapper.selectById(oneReport.getCreatorId()).getSuperiorId();
-            if(reporterSuperiorId!=null && reporterSuperiorId.equals(user.getId().toString())){
-                isDirectAudit = true;
-            }
-
-            if(!(isDirectAudit  || (reporterSuperiorId == null && user.getId().equals(oneReport.getAuditDeptManagerid())) || canAuditAllReport)){
+            if (!(canAuditAllReport || user.getId().equals(oneReport.getProjectAuditorId()) || user.getId().equals(oneReport.getAuditDeptManagerid()))) {
                 httpRespMsg.setError("您无权操作权限");
                 return httpRespMsg;
             }
@@ -3436,6 +3450,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 //人员所属部门负责人审核或者直属领导审核
                 boolean hasAuditAllPri = sysFunctionService.hasPriviledge(user.getRoleId(), "审核全员日报");
                 List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().select("id, state, group_audit_state, creator_id, create_date, project_id,audit_dept_managerid,department_audit_state, project_auditor_id, is_dept_audit").in("id", ids));
+                String secondAuditor = timeType.getSecondAuditor();
+                String thirdAuditor = timeType.getThirdAuditor();
                 allReports = reportList;
                 for (Report r : reportList) {
                     //直属领导审核或者部门负责人审核
@@ -3444,13 +3460,36 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     if (timeType.getReportAuditType() == 5) {
                         if(hasAuditAllPri || ((r.getIsDeptAudit() == 0 &&  user.getId().equals(r.getProjectAuditorId()))
                                 || (r.getIsDeptAudit() == 1 && user.getId().equals(r.getAuditDeptManagerid())))){
-                            r.setState(1);
-                            r.setDepartmentAuditState(1);
-                            r.setProjectAuditState(1);
+                            if (thirdAuditor != null && secondAuditor != null) {
+                                if (user.getId().equals(thirdAuditor)) {
+                                    //当前为第三审核人在审核,直接通过
+                                    r.setState(1);
+                                    r.setDepartmentAuditState(1);
+                                    r.setProjectAuditState(1);
+                                    newReport.setState(1);
+                                    newReport.setDepartmentAuditState(1);
+                                    newReport.setProjectAuditState(1);
+                                } else if (user.getId().equals(secondAuditor)) {
+                                    r.setIsDeptAudit(0);
+                                    r.setProjectAuditorId(thirdAuditor);
+                                    newReport.setIsDeptAudit(0);
+                                    newReport.setProjectAuditorId(thirdAuditor);
+                                } else {
+                                    //第一层审核,转给第二审核人
+                                    r.setIsDeptAudit(0);
+                                    r.setProjectAuditorId(secondAuditor);
+                                    newReport.setIsDeptAudit(0);
+                                    newReport.setProjectAuditorId(secondAuditor);
+                                }
+                            } else {
+                                r.setState(1);
+                                r.setDepartmentAuditState(1);
+                                r.setProjectAuditState(1);
+                                newReport.setState(1);
+                                newReport.setDepartmentAuditState(1);
+                                newReport.setProjectAuditState(1);
+                            }
                             r.setProjectAuditTime(LocalDateTime.now());
-                            newReport.setState(1);
-                            newReport.setDepartmentAuditState(1);
-                            newReport.setProjectAuditState(1);
                             newReport.setProjectAuditTime(LocalDateTime.now());
                         } else {
                             httpRespMsg.setError("您无权审核该日报");
@@ -9632,7 +9671,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         if(!StringUtils.isEmpty(reportIds)){
             List<String> reportIdList = Arrays.asList(reportIds.split(","));
             List<Report> transferReportList=new ArrayList<>();
-            String stagesName = stagesMapper.selectById(stageId).getStagesName();
+            String stagesName=null;
+            if(stageId!=null){
+                stagesName = stagesMapper.selectById(stageId).getStagesName();
+            }
             for (String reportIdStr : reportIdList) {
                 Integer reportId = Integer.valueOf(reportIdStr);
                 Report report = new Report();

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

@@ -102,6 +102,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
     public static final int TEXT_CARD_MSG_REPORT_DENY = 10;//日报驳回
     public static final int TEXT_CARD_MSG_REPORT_AGREE = 11; //日报审核通过
     public static final int TEXT_CARD_MSG_REPORT_ABNOEMAL = 12;//日报驳回
+    public static final int TEXT_CARD_MSG_REPORT_IMPORT = 13;//日报导入审核
     public static final int TEXT_CARD_MSG_EXPENSE_AGREE = 21;//费用报销审核通过
     public static final int TEXT_CARD_MSG_EXPENSE_DENY = 22;//费用报销审核驳回
 

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/MessageUtils.java

@@ -21,7 +21,7 @@ public class MessageUtils {
     public static String message(String code, Object... args) {
         MessageSource messageSource = SpringUtils.getBean(MessageSource.class);
         Locale locale = LocaleContextHolder.getLocale();
-//        System.out.println("本地为:" +locale.getDisplayName()+", code="+code);
+        System.out.println("本地为:" +locale.getDisplayName()+", code="+code);
         return messageSource.getMessage(code, args, locale);
     }
 

File diff suppressed because it is too large
+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TimeTypeMapper.xml


+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/index.html

@@ -2,7 +2,7 @@
 <html>
   <head>
     <meta charset="utf-8" />
-    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
+    <!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
     <!-- 尝试清除打包缓存 -->
     <!-- <meta http-equiv="pragram" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">

+ 9 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -139,7 +139,7 @@
           </el-option>
         </el-select>
 
-        <el-select v-if="ins == 24 && tabPosition == 1" v-model="groupConsumptionName" placeholder="'请选择任务分组'" clearable filterable size="small" @change="getList(true)" multiple collapse-tags style="margin-left:10px; width: 250px">
+        <el-select v-if="ins == 24 && tabPosition == 1" v-model="groupConsumptionName" placeholder="请选择任务分组" clearable filterable size="small" @change="getList(true)" multiple collapse-tags style="margin-left:10px; width: 250px">
           <el-option v-for="(item, index) in groupConsumptionList" :key="item.id" :label="item" :value="item"> </el-option>
         </el-select>
 
@@ -4306,11 +4306,15 @@ export default {
         })
         this.groupConsumptionLoading = false
         let nameList = data.map(item => (item.groupName || ''))
-        let realHourList = data.map(item => (item.realHour || 0))
-        let actualPlan = data.map(item => (item.planHour || 0))
-        let actualSupplement = data.map(item => (item.afterSetPlanHour || 0))
-        let summary = data.map(item => (item.planHour || 0) + (item.afterSetPlanHour || 0))
+        let realHourList = data.map(item => returnNum((item.realHour || 0)))
+        let actualPlan = data.map(item => returnNum((item.planHour || 0)))
+        let actualSupplement = data.map(item => returnNum((item.afterSetPlanHour || 0)))
+        let summary = data.map(item => returnNum((item.planHour || 0)) + returnNum((item.realHour || 0)))
         this.groupConsumptionOption = getGroupConsumption(nameList, actualPlan, actualSupplement, summary, realHourList)
+
+        function returnNum(num) {
+          return num > 0 ? num : 0
+        }
       }, 500)
     }
   },

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/transferWorkingHours.vue

@@ -115,7 +115,7 @@
                         <el-form-item>
                             <el-button type="primary" :size="'small'" :loading="confirmTransformLoading"
                                 @click="confirmTransform()"
-                                :disabled="!(transform.projectId && transform.taskGroupingId && transform.stageId)">{{
+                                :disabled="!(transform.projectId && transform.taskGroupingId)">{{
                                     $t('queRenZhuanYi') }}</el-button>
                         </el-form-item>
                     </el-form>