Ver Fonte

项目申报修改附件不变的问题

huZhiHao há 5 anos atrás
pai
commit
67a4290887

+ 1 - 1
src/main/java/platform/modules/company/service/ProjectApplicationService.java

@@ -496,7 +496,7 @@ public class ProjectApplicationService extends BaseService<ProjectApplication> {
                 }
             }
             //删除原有材料
-            List<ProjectMaterial> materials = projectMaterialService.findByContentAndApplyId(apply.getId());
+            List<ProjectMaterial> materials = projectMaterialService.findByContentAndApplyId(null,apply.getId());
             for (ProjectMaterial material : materials) {
                 attachmentService.deleteByBusiness(Constant.Attachment.PROJECT, material.getId());
             }

+ 6 - 2
src/main/java/platform/modules/company/service/ProjectMaterialService.java

@@ -159,8 +159,12 @@ public class ProjectMaterialService extends BaseService<ProjectMaterial> {
         return materials;
     }
 
-    public  List<ProjectMaterial> findByContentAndApplyId(Integer applyId){
-        return projectMaterialDao.findByContentAndApplyId("annex_template", applyId);
+    public List<ProjectMaterial> findByContentAndApplyId(String content, Integer applyId) {
+        ProjectMaterial p =  new ProjectMaterial();
+        p.setDel_flag(false);
+        p.setApply_id(applyId);
+        p.setContent(content);
+        return this.findListByWhere(p);
     }
 
     /**