Forráskód Böngészése

项目列表导出功能调整

user5 2 éve
szülő
commit
c0a895d3d6

+ 1 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecordsExport.java

@@ -1109,6 +1109,7 @@ public class RuralProjectRecordsExport extends ActEntity<RuralProjectRecordsExpo
 		this.flagArchive = flagArchive;
 	}
 
+	@ExcelField(title="项目类别", align=2, sort=4)
 	public String getAttachmentProjectSort() {
 		return attachmentProjectSort;
 	}

+ 48 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageAllService.java

@@ -108,6 +108,25 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
     @Autowired
     private RuralProjectMessageAllConfigService ruralProjectMessageAllConfigService;
 
+
+    /**
+     * 获取造价项目类别
+     * @return
+     */
+    public static List<MainDictDetail> projectSortCostList(){
+        return  DictUtils.getMainDictList("attachment_project_sort_cost");
+    }
+
+    /**
+     * 获取项目附件模板类型
+     * @return
+     */
+    public static List<MainDictDetail> projectSortList(){
+        return  DictUtils.getMainDictList("attachment_project_sort");
+    }
+
+
+
     public RuralProjectRecords get(String id) {
         return super.get(id);
     }
@@ -1140,6 +1159,35 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
         page.setCountFlag(false);
         projectRecords.setPage(page);
         List<RuralProjectRecordsExport> recordsList = dao.findExportList(projectRecords);
+       if(null != recordsList && recordsList.size()>0){
+
+            //查询报告文件、依据性文件、其他文件必填列表以及数据
+            List<MainDictDetail> projectSortCostList = projectSortCostList();
+
+            //查询报告文件、依据性文件、其他文件必填列表以及数据
+            List<MainDictDetail> projectSortList = projectSortList();
+
+            for (RuralProjectRecordsExport info : recordsList) {
+                if("1".equals(info.getProjectType())){  //工程咨询
+
+                    for (MainDictDetail infoDetail: projectSortList) {
+                        if(info.getAttachmentProjectSort().equals(infoDetail.getValue())){
+                            info.setAttachmentProjectSort(infoDetail.getLabel());
+                            break;
+                        }
+                    }
+
+                }else if("2".equals(info.getProjectType())){    //造价审核
+
+                    for (MainDictDetail infoDetail: projectSortCostList) {
+                        if(info.getAttachmentProjectSort().equals(infoDetail.getValue())){
+                            info.setAttachmentProjectSort(infoDetail.getLabel());
+                            break;
+                        }
+                    }
+                }
+            }
+        }
         return recordsList;
     }
 

+ 10 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageAllController.java

@@ -607,9 +607,16 @@ public class RuralProjectMessageAllController extends BaseController {
         try {
 
             //添加查询类型(工程咨询)
+            //添加查询类型(工程咨询)
             List<String> typeList = Lists.newArrayList();
-            typeList.add("1");
-            typeList.add("2");
+            if (StringUtils.isBlank(projectRecords.getAttachmentProjectSort())){
+                typeList.add("1");
+                typeList.add("2");
+            }else {
+                String attachmentProjectSort=projectRecords.getAttachmentProjectSort();
+                typeList.add(attachmentProjectSort.split("-")[0]);
+                projectRecords.setAttachmentProjectSort(attachmentProjectSort.split("-")[1]);
+            }
             //添加查询类型list
             projectRecords.setTypeList(typeList);
             String fileName = "项目"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
@@ -620,7 +627,7 @@ public class RuralProjectMessageAllController extends BaseController {
             addMessage(redirectAttributes, "导出项目记录失败!失败信息:"+e.getMessage());
             logger.error("Exception e:"+e);
         }
-        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectRecords/?repage";
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessageAll/?repage";
     }
 
 

+ 13 - 1
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml

@@ -412,6 +412,7 @@ END) as projectScale*/
 		,rprr.ZiXunBDE as "ziXunBDE"
 		,rprr.accomplish_date as "projectRecordsReportedAuditPassDate"
 		,a.project_material_storage_status as "projectMaterialStorageStatus"
+		,a.attachment_project_sort as "attachmentProjectSort"
 		FROM rural_project_records a
 		left join case_base cb on a.id = cb.project_id
 		LEFT JOIN sys_area area ON area.id = a.area_id
@@ -679,7 +680,7 @@ END) as projectScale*/
 		</choose>
 	</select>
 
-    <select id="findExportList" resultType="RuralProjectRecordsExport" >
+	<select id="findExportList" resultType="RuralProjectRecordsExport" >
 		SELECT
 		<include refid="projectRecordsColumns"/>
 		,a.record_state as "recordState"
@@ -706,12 +707,14 @@ END) as projectScale*/
 		,ifnull(prd.status,0) as "projectReportStatus"
 		,ifnull(prd.name,"") as "projectReportName"
 		,ifnull(prr.status,0) as "projectReportRecordStatus"
+		,prr.accomplish_date as "projectReportRecordAuditDate"
 		,(case
 		when a.submit_money = '1' then
 		ifnull(pfp.status,0)
 		when a.submit_money = '2' then
 		ifnull(prrd.status,0) else 0
 		end) as downProjectReportRecordStatus,
+		pfp.audit_pass_date as "projectFlingbatchRelationAuditPassDate",
 		(case
 		when a.submit_money = '1' and pfp.status = '5' then
 		'已归档'
@@ -741,6 +744,7 @@ END) as projectScale*/
 		,pmdr.process_instance_id as "pmdrProcessInstanceId"
 		,pmdr.id as pmdrId
 		,ifnull(ppf.status,0) as "paperFilingStatus"
+		,ppf.audit_pass_date as "projectPaperAuditPassDate"
 		,ppf.process_instance_id as "ppfProcessInstanceId"
 		,ppf.id as "ppfId"
 		,pfp.filing_batch as "filingBatch"
@@ -772,6 +776,9 @@ END) as projectScale*/
 		,cb.case_create_by as "caseCreateBy"
 		,if(case_status > 0 ,case_status,"0") as "caseStatus"
 		,rprr.ZiXunBDE as "ziXunBDE"
+		,rprr.accomplish_date as "projectRecordsReportedAuditPassDate"
+		,a.project_material_storage_status as "projectMaterialStorageStatus"
+		,a.attachment_project_sort as "attachmentProjectSort"
 		FROM rural_project_records a
 		left join case_base cb on a.id = cb.project_id
 		LEFT JOIN sys_area area ON area.id = a.area_id
@@ -973,6 +980,7 @@ END) as projectScale*/
 					</choose>
 				</otherwise>
 			</choose>
+
 			<if test="submitMoney != null and submitMoney != ''">
 				AND a.submit_money = #{submitMoney}
 			</if>
@@ -1024,6 +1032,9 @@ END) as projectScale*/
 			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
 				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )
 			</if>
+			<if test="projectMaterialStorageStatus !=null and projectMaterialStorageStatus!=''">
+				AND a.project_material_storage_status= #{projectMaterialStorageStatus}
+			</if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -1035,6 +1046,7 @@ END) as projectScale*/
 		</choose>
 	</select>
 
+
     <select id="queryCount" resultType="int" >
 		SELECT count(DISTINCT a.id)
 		FROM rural_project_records a