Quellcode durchsuchen

附件展示报告和归档全部信息

user5 vor 4 Jahren
Ursprung
Commit
aca321f73a

+ 10 - 1
src/main/java/com/jeeplus/modules/projectAccessory/entity/ProjectTemplateInfo.java

@@ -30,7 +30,8 @@ public class ProjectTemplateInfo extends TreeEntity<ProjectTemplateInfo>{
 	private List<WorkClientAttachment> workAttachments;
 	private String projectId;
 	private String attachId;
-	private Integer mustFlag;   ////判断是否是必填项(1:必填,0:非必填)
+	private Integer mustFlag;   //判断是否是必填项(1:必填,0:非必填)
+	private Integer requiredStage;   //必填阶段(1.上传报告,2.归档)
 
 	public ProjectTemplateInfo() {
 		super();
@@ -160,4 +161,12 @@ public class ProjectTemplateInfo extends TreeEntity<ProjectTemplateInfo>{
 	public void setMustFlag(Integer mustFlag) {
 		this.mustFlag = mustFlag;
 	}
+
+	public Integer getRequiredStage() {
+		return requiredStage;
+	}
+
+	public void setRequiredStage(Integer requiredStage) {
+		this.requiredStage = requiredStage;
+	}
 }

+ 7 - 2
src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java

@@ -234,7 +234,7 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
 
 
     public List<ProjectTemplateInfo> getProjectTemplateList(ProjectAccessoryRelationInfo projectTemplateInfo){
-        //查询必填项展示列,并查询附件信息
+        //查询所有被选择为必填项展示列,并查询附件信息
         List<ProjectTemplateInfo> projectTemplateList = dao.getProjectTemplateList(projectTemplateInfo);
         for (ProjectTemplateInfo info: projectTemplateList) {
             WorkClientAttachment attchment = new WorkClientAttachment();
@@ -242,7 +242,12 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
             attchment.setAttachmentId(info.getId());
             List<WorkClientAttachment> attachments = workClientAttachmentDao.getList(attchment);
             info.setWorkAttachments(attachments);
-            info.setMustFlag(1);
+            //判断是否为必填项,若为必填项则添加必填判定字段
+            if(info.getRequiredStage() == projectTemplateInfo.getRequiredStage()){
+                info.setMustFlag(1);
+            } else {
+                info.setMustFlag(0);
+            }
         }
         //查询没有被选择必填项的数据并查询是否已经上传附件,若有则添加到展示列中
         List<ProjectTemplateInfo> otherProjectTemplateList = dao.projectAccessoryListByParentId(projectTemplateInfo.getAttachType(),projectTemplateInfo.getProjectType());

+ 2 - 2
src/main/java/com/jeeplus/modules/projectAccessory/web/ProjectAccessoryRelationController.java

@@ -113,7 +113,7 @@ public class ProjectAccessoryRelationController extends BaseController {
 			}
 			projectAccessoryRelationInfo.setProjectTemplateList(projectTemplateService.getProjectTemplateList(projectAccessoryRelationInfo.getAttachType(), projectAccessoryRelationInfo.getProjectType()));
 			//获取项目阶段 并进行处理展示数据信息
-			List<MainDictDetail> mainDictDetails = projectAccessoryRelationService.attachmentProjectList();
+			/*List<MainDictDetail> mainDictDetails = projectAccessoryRelationService.attachmentProjectList();
 			if (mainDictDetails.size() > 0) {
 				for (MainDictDetail info : mainDictDetails) {
 					if (info.getValue().equals(projectAccessoryRelationInfo.getProjectType())) {
@@ -122,7 +122,7 @@ public class ProjectAccessoryRelationController extends BaseController {
 						break;
 					}
 				}
-			}
+			}*/
 		}
 		model.addAttribute("projectAccessoryRelationInfo", projectAccessoryRelationInfo);
 		return "modules/projectAccessory/projectAccessoryRelation/projectAccessoryRelationForm";

+ 10 - 1
src/main/resources/mappings/modules/projectAccessory/ProjectTemplateDao.xml

@@ -252,9 +252,18 @@
 	<select id="getProjectTemplateList" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo">
 		SELECT
 		<include refid="workReviewStandardColumns"/>
+		,b.required_stage as "requiredStage"
 		from project_template_structure_info a
 		left join project_accessory_relation_info b on b.attach_id = a.id
-		WHERE b.project_type = #{projectType} and b.required_stage = #{requiredStage}
+		WHERE b.project_type = #{projectType}
 		and b.attach_type = #{attachType}
+		<choose>
+			<when test="requiredStage!=null and requiredStage != '' and requiredStage == 1">
+				order by b.required_stage asc , a.index_num asc
+			</when>
+			<otherwise>
+				order by b.required_stage desc , a.index_num asc
+			</otherwise>
+		</choose>
 	</select>
 </mapper>

+ 1 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp

@@ -21,6 +21,7 @@
 				for(var i=0; i<leng; i++) {
 					var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
 					var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+					var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
 					if(second == 1){
 					if(numberStr != undefined && numberStr !=null && numberStr !=''){
 						$.ajax({