|
|
@@ -496,7 +496,7 @@ public class ProjectApplicationService extends BaseService<ProjectApplication> {
|
|
|
}
|
|
|
}
|
|
|
//删除原有材料
|
|
|
- List<ProjectMaterial> materials = projectMaterialService.findByContentAndApplyId(null,apply.getId());
|
|
|
+ List<ProjectMaterial> materials = projectMaterialService.findByContentAndApplyId(null, apply.getId());
|
|
|
for (ProjectMaterial material : materials) {
|
|
|
attachmentService.deleteByBusiness(Constant.Attachment.PROJECT, material.getId());
|
|
|
}
|
|
|
@@ -692,7 +692,16 @@ public class ProjectApplicationService extends BaseService<ProjectApplication> {
|
|
|
//今年已经申请过互斥的项目,不能再申请
|
|
|
List<ProjectApplication> mutexApplys = projectApplicationDao.selectMutexApplications(company_id, project);
|
|
|
if (null != mutexApplys && mutexApplys.size() > 0) {
|
|
|
- flag = false;
|
|
|
+ Iterator<ProjectApplication> it = mutexApplys.iterator();
|
|
|
+ while (it.hasNext()) {
|
|
|
+ ProjectApplication projectApplication = it.next();
|
|
|
+ if (Objects.equals(projectApplication.getId() , apply.getId())) {
|
|
|
+ it.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (null != mutexApplys && mutexApplys.size() > 0) {
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
//查找是否申请过本项目
|