Forráskód Böngészése

撤回增加检查,只要有项目或者部门节点审核通过就不能撤回

QuYueTing 7 hónapja
szülő
commit
eb8ddcb35a

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

@@ -4347,6 +4347,16 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         int cnt = 0;
         List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "审核全员日报");
         List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().in("id", ids));
+        //检查是否有项目或者部门审核通过的
+        if (functionList.size() == 0) {
+            for (Report report : reportList) {
+                if (report.getProjectAuditState() == 1 || report.getGroupAuditState() == 1 || report.getDepartmentAuditState() == 1) {
+                    //msg.setError("已存在审核人审核通过,无法撤回");
+                    msg.setError(MessageUtils.message("finance.hasApprovedReport"));
+                    return msg;
+                }
+            }
+        }
         for (Integer reportId : ids) {
             Report report = new Report();
             report.setState(3);//待提交,即草稿状态

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

@@ -158,6 +158,7 @@ finance.skipData=跳过以下已审核数据:{0}。
 finance.importErrorByAllAdopt=本次数据全部已审核通过,无法导入。
 finance.review=专业审核
 finance.dept=部门审核
+finance.hasApprovedReport=已存在审核人审核通过,无法撤回。请联系管理员操作。
 # pdf相关
 pdf.previewError=该格式不支持在线预览
 # 日报相关

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

@@ -158,6 +158,7 @@ finance.skipData=Skipping the following audited data: '{0}'.
 finance.importErrorByAllAdopt=This data has been approved and cannot be imported.
 finance.review=Professional review
 finance.dept=Department review
+finance.hasApprovedReport=Some daily reports have been approved, unable to operate. Please contact your system manager.
 # pdf相关
 pdf.previewError=This format does not support online preview.
 # 日报相关

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

@@ -8095,7 +8095,7 @@
                                 });
                             } else if (this.user.companyId == 469) {
                                 //试点,针对赛元微电子校验考勤工时
-                                if (this.workForm.time.workHours) {
+                                if (this.workForm.time && this.workForm.time.workHours) {
                                     if (this.totalReportHours > this.workForm.time.workHours) {
                                         this.$message({
                                             message: '填报工时不得超过考勤时长',
@@ -8113,6 +8113,11 @@
                                     } else {
                                         this.submitReportSon();
                                     }
+                                } else {
+                                    this.$message({
+                                            message: '暂无考勤数据,无法填报。请尝试刷新考勤记录。',
+                                            type: "error"
+                                        });
                                 }
                             } else {
                                 if(this.totalReportHours < this.user.timeType.allday){