From d37a3ee6a7439b376b260177f3fb318a94833b5e Mon Sep 17 00:00:00 2001
From: heheng <heheng@123456>
Date: 星期二, 07 一月 2025 15:24:39 +0800
Subject: [PATCH] fix

---
 assess-system/src/main/java/com/gkhy/assess/system/service/impl/AssWorkNotificationServiceImpl.java |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/assess-system/src/main/java/com/gkhy/assess/system/service/impl/AssWorkNotificationServiceImpl.java b/assess-system/src/main/java/com/gkhy/assess/system/service/impl/AssWorkNotificationServiceImpl.java
index 13d47b4..a3ba2d6 100644
--- a/assess-system/src/main/java/com/gkhy/assess/system/service/impl/AssWorkNotificationServiceImpl.java
+++ b/assess-system/src/main/java/com/gkhy/assess/system/service/impl/AssWorkNotificationServiceImpl.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gkhy.assess.common.exception.ApiException;
+import com.gkhy.assess.system.domain.AssProject;
 import com.gkhy.assess.system.domain.AssWorkNotification;
 import com.gkhy.assess.system.enums.AccessoryFileTypeEnum;
 import com.gkhy.assess.system.enums.ReportProgressEnum;
@@ -34,10 +35,17 @@
         Long projectId=workNotification.getProjectId();
         projectService.checkUserAllowed(projectId);
         checkWorkNotificationCount(projectId);
-        Integer fileCount=accessoryFileService.getAccessoryFileCountByProjectId(projectId,null, AccessoryFileTypeEnum.EMPLOYMENT_NOTICE.getCode());
-        if(fileCount==0){
-            throw new ApiException("未上传从业告知书");
+        AssProject projectById = projectService.getProjectById(projectId);
+        if (projectById==null){
+            throw new ApiException("项目不存在");
         }
+        if(projectById.getEstimateType() != 33){
+            Integer fileCount=accessoryFileService.getAccessoryFileCountByProjectId(projectId,null, AccessoryFileTypeEnum.EMPLOYMENT_NOTICE.getCode());
+            if(fileCount==0){
+                throw new ApiException("未上传从业告知书");
+            }
+        }
+
         //校验项目状态
         projectService.checkReportProgress(projectId, ReportProgressEnum.ESTIMATE_PLAN);
         workNotification.setCreateBy(ShiroUtils.getSysUser().getUsername());

--
Gitblit v1.9.2