Bläddra i källkod

Merge remote-tracking branch 'origin/master'

[user3] 4 år sedan
förälder
incheckning
674f443269

+ 7 - 0
src/main/java/com/jeeplus/modules/projectFilingBatch/dao/ProjectFilingBatchDao.java

@@ -18,4 +18,11 @@ public interface ProjectFilingBatchDao extends CrudDao<ProjectFilingBatch> {
 
     void updateProcessIdAndStatus(ProjectFilingBatch projectFilingBatch);
     ProjectFilingBatch findByFilingBatch(@Param("filingBatch") String filingBatch);
+
+    /**
+     * 项目列表查询线下归档信息
+     * @param filingBatch
+     * @return
+     */
+    ProjectFilingBatch findByFilingBatchOnProject(@Param("filingBatch") String filingBatch);
 }

+ 1 - 1
src/main/java/com/jeeplus/modules/projectFilingBatch/entity/ProjectFilingBatch.java

@@ -139,7 +139,7 @@ public class ProjectFilingBatch extends DataEntity<ProjectFilingBatch> {
     }
 
     public void setInformation(String information) {
-        information = information;
+        this.information = information;
     }
 
     public List<ProjectFilingbatchRelation> getProjectFilingbatchRelations() {

+ 10 - 1
src/main/java/com/jeeplus/modules/projectFilingBatch/entity/ProjectFilingbatchRelation.java

@@ -9,7 +9,8 @@ public class ProjectFilingbatchRelation extends DataEntity<ProjectFilingbatchRel
     public static final String SERIAL_COST_BIZCODE ="1004";
     private static final long serialVersionUID = 1L;
     @NotNull(message = "归档编号不能为空")
-    private String filingBatch ;//档次批号
+    private String filingBatch ;//档次批号id
+    private String filingBatchStr ;//档次批号
     private String projectId; //项目id
     private Integer status;//归档状态
     private String boxNum; //盒号
@@ -54,4 +55,12 @@ public class ProjectFilingbatchRelation extends DataEntity<ProjectFilingbatchRel
     public void setReBoxNum(String reBoxNum) {
         this.reBoxNum = reBoxNum;
     }
+
+    public String getFilingBatchStr() {
+        return filingBatchStr;
+    }
+
+    public void setFilingBatchStr(String filingBatchStr) {
+        this.filingBatchStr = filingBatchStr;
+    }
 }

+ 20 - 18
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -274,7 +274,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 projectRecordTreeData.setFilingProjectStatus(relation.getStatus());
                 projectRecordTreeData.setBoxNum(relation.getBoxNum());
                 projectRecordTreeData.setReBoxNum(relation.getReBoxNum());
-                ProjectFilingBatch filingBatch=projectFilingBatchDao.findByFilingBatch(relation.getFilingBatch());
+                ProjectFilingBatch filingBatch=projectFilingBatchDao.findByFilingBatchOnProject(relation.getFilingBatch());
                 if(null != filingBatch){
                     projectRecordTreeData.setFilingBatchId(filingBatch.getId());
                     projectRecordTreeData.setFilingProcessinstanceId(filingBatch.getProcessinstanceId());
@@ -287,26 +287,26 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
             projectRecordTreeDataList.add(projectRecordTreeData);
 
         }
-
-        //获取子项目信息
-        SubProjectInfo subProjectInfo = new SubProjectInfo();
-        subProjectInfo.setProjectName(projectRecords.getProjectName());
-        //查询所有子项目数据
-        Page<SubProjectInfo> subProjectList = subProjectInfoService.findPage(new Page<SubProjectInfo>(request, response), subProjectInfo);
-        List<SubProjectInfo> reportDataList = subProjectList.getList();
+        if(StringUtils.isNotBlank(projectRecords.getProjectName())){
+            //获取子项目信息
+            SubProjectInfo subProjectInfo = new SubProjectInfo();
+            subProjectInfo.setProjectName(projectRecords.getProjectName());
+            //查询所有子项目数据
+            Page<SubProjectInfo> subProjectList = subProjectInfoService.findPage(new Page<SubProjectInfo>(request, response), subProjectInfo);
+            List<SubProjectInfo> reportDataList = subProjectList.getList();
 
         /*for (SubProjectInfo subProject: reportDataList) {
                 ProjectRecordTreeData treeData = getSubInfo(subProject);
                 projectRecordTreeDataList.add(treeData);
             }*/
 
-        //降所有已查询到的项目数据id放到list中
-        Set parentIdSet = new HashSet();
-        for (ProjectRecordTreeData treeData:projectRecordTreeDataList) {
-            parentIdSet.add(treeData.getId());
-        }
-        //Set转List
-        List<String> parentIdList = new ArrayList<>(parentIdSet);
+            //降所有已查询到的项目数据id放到list中
+            Set parentIdSet = new HashSet();
+            for (ProjectRecordTreeData treeData:projectRecordTreeDataList) {
+                parentIdSet.add(treeData.getId());
+            }
+            //Set转List
+            List<String> parentIdList = new ArrayList<>(parentIdSet);
 
         /*Iterator<SubProjectInfo> iterator = reportDataList.iterator();
         while(iterator.hasNext()){
@@ -319,8 +319,8 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
             }
         }*/
 
-        //项目名称不为空则进行所有项目的查询和处理
-        //if(StringUtils.isNotBlank(projectRecords.getProjectName())){
+            //项目名称不为空则进行所有项目的查询和处理
+            //if(StringUtils.isNotBlank(projectRecords.getProjectName())){
             for (SubProjectInfo subProject: reportDataList) {
                 //如果子项目的父项目id不存在于已查找的父项目中则在总list中添加父项目
                 if(!parentIdList.contains(subProject.getParentProId())) {
@@ -336,7 +336,9 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 projectRecordTreeDataList.add(treeData);
                 parentIdList.add(subProject.getId());
             }
-        //}
+            //}
+
+        }
 
         map.put("data",projectRecordTreeDataList);
         return map;

+ 5 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -1586,18 +1586,20 @@ public class RuralProjectMessageController extends BaseController {
     @RequestMapping(value = "getProcess")
     public String getProcess(RuralProjectRecords ruralProjectRecords, Model model) {
         model.addAttribute("processInstanceId", ruralProjectRecords.getFilingProcessinstanceId());
+        //查询线下归档数据信息
         ProjectFilingbatchRelation relation=projectFilingbatchRelationDao.getProjectId(ruralProjectRecords.getId());
-        if(relation!=null && org.apache.commons.lang3.StringUtils.isNotBlank(relation.getId())){
-            ruralProjectRecords.setFilingBatch(relation.getFilingBatch());
+        if(relation!=null && StringUtils.isNotBlank(relation.getId())){
             ruralProjectRecords.setFilingProjectStatus(relation.getStatus());
             ruralProjectRecords.setBoxNum(relation.getBoxNum());
             ruralProjectRecords.setReBoxNum(relation.getReBoxNum());
-            ProjectFilingBatch filingBatch=projectFilingBatchDao.findByFilingBatch(relation.getFilingBatch());
+            ProjectFilingBatch filingBatch=projectFilingBatchDao.findByFilingBatchOnProject(relation.getFilingBatch());
+            ruralProjectRecords.setFilingBatch(filingBatch.getFilingBatch());
             User uu=UserUtils.get(filingBatch.getCreateBy().getId());
             ruralProjectRecords.setFilingName(uu.getName());
             ruralProjectRecords.setFilingBatchId(filingBatch.getId());
             ruralProjectRecords.setFilingProcessinstanceId(filingBatch.getProcessinstanceId());
             ruralProjectRecords.setFilingStatus(filingBatch.getFilingStatus());
+            ruralProjectRecords.setInformation(filingBatch.getInformation());
         }
         model.addAttribute("ruralProjectRecords", ruralProjectRecords);
         return "modules/projectFilingBatch/projectFilingBacthTaskTwo";

+ 7 - 0
src/main/resources/mappings/modules/projectGuidang/ProjectFilingBatchDao.xml

@@ -172,6 +172,13 @@
 		FROM project_filingbatch a
 		WHERE a.filing_batch = #{filingBatch} and a.del_flag=0
 	</select>
+
+	<select id="findByFilingBatchOnProject" resultType="com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch">
+		SELECT
+		<include refid="aa"/>
+		FROM project_filingbatch a
+		WHERE a.id = #{filingBatch} and a.del_flag=0
+	</select>
 <!--	<select id="findByFilingBatch"-->
 <!--			resultType="com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch">-->
 <!--		SELECT-->

+ 0 - 12
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml

@@ -226,14 +226,6 @@
 		SELECT
 			<include refid="projectRecordsColumns"/>
 		,
-		pfr.filing_batch AS "filingBatch",
-		pfr.box_num AS "boxNum",
-		pfr.re_box_num AS "reBoxNum",
-		pfr.status AS "filingProjectStatus",
-		pf.id AS "filingBatchId",
-		pf.process_instance_id AS "filingProcessinstanceId",
-		pf.information AS "information",
-		pf.filing_status AS "filingStatus",
 		a.project_type as projectType,
 		wci.name AS "workContractInfo.name",
 		wct.id AS "workContractInfo.client.id",
@@ -270,8 +262,6 @@
 		left join project_report_data prd on prd.project_id = a.id
 		left join rural_project_report_record prr on prr.report_id = prd.id
 		left join rural_project_report_record_down prrd on prrd.report_id = prd.id
-		left join project_flingbatch_relation pfr on pfr.project_id=a.id
-		left join project_filingbatch pf on pfr.filing_batch=pf.filing_batch
 		<where>
 			a.status = 5
 			<if test="projectId != null and projectId != ''">
@@ -395,8 +385,6 @@
 		left join project_report_data prd on prd.project_id = a.id
 		left join rural_project_report_record prr on prr.report_id = prd.id
 		left join rural_project_report_record_down prrd on prrd.report_id = prd.id
-		left join project_flingbatch_relation pfr on pfr.project_id=a.id
-		left join project_filingbatch pf on pfr.filing_batch=pf.filing_batch
         <where>
             a.status = 5
             <if test="projectId != null and projectId != ''">

+ 2 - 2
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBacthTaskTwo.jsp

@@ -73,10 +73,10 @@
 									<form:input path="reBoxNum" id="reBoxNum"  readonly="true" class="form-control layui-input" />
 								</div>
 							</div>
-							<div class="layui-item layui-col-sm12 lw7">
+							<div class="layui-item layui-col-sm12 lw6 with-textarea">
 								<label class="layui-form-label">归档信息:</label>
 								<div class="layui-input-block">
-									<form:textarea path="information" htmlEscape="false" readonly="true" rows="4" maxlength="200" class="form-control"/>
+									<form:textarea path="information" readonly="true" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
 								</div>
 							</div>
 						</div>

+ 5 - 0
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchForm.jsp

@@ -39,6 +39,11 @@
         var clientCount = 0;
         function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+                var length = $("#projectList tr").length
+                if(length ==0){
+                    parent.layer.msg("请添加归档项目!", {icon: 5});
+                    return false
+                }
                 $("#inputForm").submit();
                 return true;
             }else{