Browse Source

Merge remote-tracking branch 'origin/master'

[user3] 4 năm trước cách đây
mục cha
commit
ed86c6caec

+ 43 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -135,6 +135,21 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	@Autowired
 	private ProjectTemplateDao projectTemplateDao;
 
+	/**
+	 * 获取咨询项目类别
+	 * @return
+	 */
+	public static List<MainDictDetail> projectSortList(){
+		return  DictUtils.getMainDictList("attachment_project_sort");
+	}
+
+	/**
+	 * 获取造价项目类别
+	 * @return
+	 */
+	public static List<MainDictDetail> projectSortCostList(){
+		return  DictUtils.getMainDictList("attachment_project_sort_cost");
+	}
 
 	/**
 	 * 获取项目附件模板类型
@@ -1802,6 +1817,34 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 			records.setProjectLeaders(users);
 			records.setLeaderNameStr(Collections3.extractToString(users, "name", ","));
 			records.setLeaderIds(Collections3.extractToString(users, "id", ","));
+
+			List<MainDictDetail> mainDictDetails = Lists.newArrayList();
+			if(StringUtils.isNotBlank(records.getProjectType())){
+				switch (records.getProjectType()){
+					case "1":
+						mainDictDetails = projectSortList();
+						if(StringUtils.isNotBlank(records.getAttachmentProjectSort())){
+							for (MainDictDetail info: mainDictDetails) {
+								if(records.getAttachmentProjectSort().equals(info.getValue())){
+									records.setAttachmentProjectSort(info.getLabel());
+									break;
+								}
+							}
+						}
+						break;
+					case "2":
+						mainDictDetails = projectSortCostList();
+						if(StringUtils.isNotBlank(records.getAttachmentProjectSort())){
+							for (MainDictDetail info: mainDictDetails) {
+								if(records.getAttachmentProjectSort().equals(info.getValue())){
+									records.setAttachmentProjectSort(info.getLabel());
+									break;
+								}
+							}
+						}
+						break;
+				}
+			}
 		}
 		page.setList(recordsList);
 		return page;

+ 4 - 2
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -1378,7 +1378,7 @@
 		left join sys_user su on su.id = w1.user_id
 		left join sys_office so on so.id = su.office_id
 		<where>
-			and a.del_flag = 0 and project_type in (1,2) and prr.`status`=5
+			and a.del_flag = 0 and project_type in (1,2) and prd.`status`=5
 			and a.id not in (select project_id	FROM project_flingbatch_relation r left join project_filingbatch f on f.filing_batch=r.filing_batch	where f.filing_status in(2,3,5) )
 		    and a.id not in (select project_id	FROM project_flingbatch_relation where status in(2,3,5) )
 			<if test="projectName != null and projectName != ''">
@@ -1397,6 +1397,7 @@
 		,prr.process_instance_id as prrProcessInstanceId
 		,a.project_type as "projectType"
 		,prd.number as"projectReportNumber"
+		,sur.name as "createBy.name"
 		FROM rural_project_records a
 		left join work_contract_info wci on a.contract_id = wci.id
 		left join project_report_data prd on prd.project_id = a.id
@@ -1406,13 +1407,14 @@
 		LEFT JOIN sys_area area ON area.id = a.area_id
 		LEFT JOIN work_project_user w1 on a.id = w1.project_id
 		left join sys_user su on su.id = w1.user_id
+		left join sys_user sur on sur.id = a.create_by
 		left join sys_office so on so.id = su.office_id
 		<where>
 			<if test="projectName != null and projectName != ''">
 				AND a.project_name like concat(concat('%',#{projectName}),'%')
 			</if>
 
-			and a.del_flag = 0 and a.project_type in (1,2) and prr.`status`=5
+			and a.del_flag = 0 and a.project_type in (1,2) and prd.`status`=5
 			/*不捞取已经发起审批并审批状态为2、3、5的项目信息*/
 			and a.id not in (select project_id	FROM project_flingbatch_relation where status in(2,3,5) )
 			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">

+ 7 - 1
src/main/webapp/webpage/modules/projectFilingBatch/projectChoiceLink.jsp

@@ -90,6 +90,9 @@
 						<th width="30%">归档项目编号</th>
 						<th width="30%">归档项目名称</th>
 						<th width="30%">报告号</th>
+						<th width="30%">项目类别</th>
+						<th width="30%">项目负责人</th>
+						<th width="30%">项目登记人</th>
 					</tr>
 				</thead>
 				<tbody>
@@ -101,12 +104,15 @@
 							<td title="${obj.projectId}" class="codelabel">${obj.projectId}</td>
 							<td title="${obj.projectName}" class="codelabel4">${obj.projectName}</td>
 							<td title="${obj.projectReportNumber}" class="codelabel5">${obj.projectReportNumber}</td>
+							<td title="${obj.attachmentProjectSort}" class="codelabel7">${obj.attachmentProjectSort}</td>
+							<td title="${obj.leaderNameStr}" class="codelabel8">${obj.leaderNameStr}</td>
+							<td title="${obj.createBy.name}" class="codelabel9">${obj.createBy.name}</td>
 						</tr>
 					</c:forEach>
 				</c:when>
 					<c:otherwise>
 						<tr>
-							<td colspan="15" align="center">
+							<td colspan="4" align="center">
 								暂无数据
 							</td>
 						</tr>