Parcourir la source

Merge remote-tracking branch 'origin/master'

[user3] il y a 4 ans
Parent
commit
c5502a5159
16 fichiers modifiés avec 217 ajouts et 70 suppressions
  1. 3 0
      src/main/java/com/jeeplus/modules/projectFilingBatch/dao/ProjectFilingBatchDao.java
  2. 12 0
      src/main/java/com/jeeplus/modules/projectFilingBatch/dao/ProjectFilingbatchRelationDao.java
  3. 34 7
      src/main/java/com/jeeplus/modules/projectFilingBatch/entity/ProjectFilingBatch.java
  4. 6 6
      src/main/java/com/jeeplus/modules/projectFilingBatch/entity/ProjectFilingbatchRelation.java
  5. 47 13
      src/main/java/com/jeeplus/modules/projectFilingBatch/service/ProjectFilingBatchService.java
  6. 15 6
      src/main/java/com/jeeplus/modules/projectFilingBatch/web/ProjectFilingBatchController.java
  7. 6 6
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java
  8. 6 6
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java
  9. 2 1
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  10. 48 12
      src/main/resources/mappings/modules/projectGuidang/ProjectFilingBatchDao.xml
  11. 16 4
      src/main/resources/mappings/modules/projectGuidang/ProjectFilingbatchRelationDao.xml
  12. 1 1
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  13. 4 4
      src/main/webapp/webpage/modules/projectFilingBatch/projectChoiceLink.jsp
  14. 1 0
      src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchAudit.jsp
  15. 1 1
      src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchList.jsp
  16. 15 3
      src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchView.jsp

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

@@ -3,6 +3,7 @@ package com.jeeplus.modules.projectFilingBatch.dao;
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import org.apache.ibatis.annotations.Param;
 
@@ -13,6 +14,8 @@ public interface ProjectFilingBatchDao extends CrudDao<ProjectFilingBatch> {
 
     List<ProjectFilingBatch> findProjectIdByFiling(@Param("id") String id);
 
+    List<ProjectFilingBatch> getProjectFilingBatchRelationList(@Param("id") String id);
+
     void updateProcessIdAndStatus(ProjectFilingBatch projectFilingBatch);
     ProjectFilingBatch findByFilingBatch(@Param("filingBatch") String filingBatch);
 }

+ 12 - 0
src/main/java/com/jeeplus/modules/projectFilingBatch/dao/ProjectFilingbatchRelationDao.java

@@ -12,4 +12,16 @@ public interface ProjectFilingbatchRelationDao extends CrudDao<ProjectFilingbatc
     Integer deleteByprojectId(ProjectFilingbatchRelation relation);
     List<ProjectFilingbatchRelation> getProjectRelation(@Param("filingBatch")String filingBatch);
     ProjectFilingbatchRelation getProjectId(@Param("projectId")String projectId);
+
+    /**
+     * 逻辑删除
+     * @param relation
+     */
+    void updateDelFlag(ProjectFilingbatchRelation relation);
+
+    /**
+     * 修改驳回状态
+     * @param relation
+     */
+    void updateStatus(ProjectFilingbatchRelation relation);
 }

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

@@ -24,16 +24,19 @@ public class ProjectFilingBatch extends DataEntity<ProjectFilingBatch> {
     private String processinstanceId;// 审批流程id
     private Integer filingStatus;//归档审批状态
     private String projectId; //项目id
-    private Integer status=null;//归档状态
-    private Integer boxNum=null; //案卷号
-    private Integer reBoxNum=null;//确认案卷号
+    private Integer status;//归档状态
+    private String boxNum; //案卷号
+    private String reBoxNum;//确认案卷号
     private String number;//报告号
     private List<RuralProjectRecords> project= Lists.newArrayList();;
     private Office office;
+    private Office company;
     private String home;
     private Act act;//工作流对象
     private String information; //归档批次信息
     private List<ProjectFilingbatchRelation> projectFilingbatchRelations;
+    private String relationId;
+    private Integer relationdelFlag;
 
     public String getProcessinstanceId() {
         return processinstanceId;
@@ -91,19 +94,19 @@ public class ProjectFilingBatch extends DataEntity<ProjectFilingBatch> {
         this.filingBatch = filingBatch;
     }
 
-    public Integer getBoxNum() {
+    public String getBoxNum() {
         return boxNum;
     }
 
-    public void setBoxNum(Integer boxNum) {
+    public void setBoxNum(String boxNum) {
         this.boxNum = boxNum;
     }
 
-    public Integer getReBoxNum() {
+    public String getReBoxNum() {
         return reBoxNum;
     }
 
-    public void setReBoxNum(Integer reBoxNum) {
+    public void setReBoxNum(String reBoxNum) {
         this.reBoxNum = reBoxNum;
     }
 
@@ -146,4 +149,28 @@ public class ProjectFilingBatch extends DataEntity<ProjectFilingBatch> {
     public void setProjectFilingbatchRelations(List<ProjectFilingbatchRelation> projectFilingbatchRelations) {
         this.projectFilingbatchRelations = projectFilingbatchRelations;
     }
+
+    public Office getCompany() {
+        return company;
+    }
+
+    public void setCompany(Office company) {
+        this.company = company;
+    }
+
+    public String getRelationId() {
+        return relationId;
+    }
+
+    public void setRelationId(String relationId) {
+        this.relationId = relationId;
+    }
+
+    public Integer getRelationdelFlag() {
+        return relationdelFlag;
+    }
+
+    public void setRelationdelFlag(Integer relationdelFlag) {
+        this.relationdelFlag = relationdelFlag;
+    }
 }

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

@@ -12,8 +12,8 @@ public class ProjectFilingbatchRelation extends DataEntity<ProjectFilingbatchRel
     private String filingBatch ;//档次批号
     private String projectId; //项目id
     private Integer status;//归档状态
-    private Integer boxNum; //盒号
-    private Integer reBoxNum;//确认盒号
+    private String boxNum; //盒号
+    private String reBoxNum;//确认盒号
 
     public String getFilingBatch() {
         return filingBatch;
@@ -39,19 +39,19 @@ public class ProjectFilingbatchRelation extends DataEntity<ProjectFilingbatchRel
         this.status = status;
     }
 
-    public Integer getBoxNum() {
+    public String getBoxNum() {
         return boxNum;
     }
 
-    public void setBoxNum(Integer boxNum) {
+    public void setBoxNum(String boxNum) {
         this.boxNum = boxNum;
     }
 
-    public Integer getReBoxNum() {
+    public String getReBoxNum() {
         return reBoxNum;
     }
 
-    public void setReBoxNum(Integer reBoxNum) {
+    public void setReBoxNum(String reBoxNum) {
         this.reBoxNum = reBoxNum;
     }
 }

+ 47 - 13
src/main/java/com/jeeplus/modules/projectFilingBatch/service/ProjectFilingBatchService.java

@@ -84,9 +84,9 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
     public Page<ProjectFilingBatch> findPage(Page<ProjectFilingBatch> page, ProjectFilingBatch projectFilingBatch) {
         //设置数据权限
         if(!UserUtils.getUser().isAdmin()) {
-            String dataScopeSql = dataScopeFilterOR(projectFilingBatch.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_RECORDS.getValue());
+            String dataScopeSql = dataScopeFilter(projectFilingBatch.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_RECORDS.getValue());
             if(StringUtils.isBlank(dataScopeSql)){
-                dataScopeSql = dataScopeFilterOR(projectFilingBatch.getCurrentUser(), "o", "u", "s", MenuStatusEnum.OVERALL_WORK_RECORDS.getValue());
+                dataScopeSql = dataScopeFilter(projectFilingBatch.getCurrentUser(), "o", "u", "s", MenuStatusEnum.OVERALL_WORK_RECORDS.getValue());
             }
             projectFilingBatch.getSqlMap().put("dsf", dataScopeSql);
         }
@@ -106,6 +106,10 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
         return projectFilingBatchDao.findProjectIdByFiling(id);
     }
 
+    public List<ProjectFilingBatch> getProjectFilingBatchRelationList(String id){
+        return projectFilingBatchDao.getProjectFilingBatchRelationList(id);
+    }
+
     /**
      * 送审归档批次
      * @param projectFilingBatch
@@ -126,22 +130,22 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
         }
         Office office=new Office();
         office.setId(createBy.getOffice().getId());
-        projectFilingBatch.setOffice(office);
+        projectFilingBatch.setOffice(createBy.getOffice());
+        projectFilingBatch.setCompany(createBy.getCompany());
         //归档批次表添加操作
         if(projectFilingBatch.getFilingStatus()== ProjectStatusEnum.INVALID.getValue()){
-            projectFilingBatch.setId(IdGen.uuid());
-            dao.insert(projectFilingBatch);
+            super.save(projectFilingBatch);
         }else if (oldStatus== ProjectStatusEnum.RECALL.getValue() || oldStatus== ProjectStatusEnum.REJECTED.getValue()) {
             //获取归档批次的项目信息
             List<ProjectFilingBatch> filingBatches=this.findProjectIdByFiling(projectFilingBatch.getId());
+            //通过批次归档id和项目id删除之前的信息
             for (ProjectFilingBatch filingBatch:filingBatches){
-                RuralProjectRecords ruralProjectRecords = ruralProjectRecordsDao.get(filingBatch.getProjectId());
                 ProjectFilingbatchRelation filingbatchRelation=new ProjectFilingbatchRelation();
-                filingbatchRelation.setFilingBatch(filingBatch.getFilingBatch());
-                filingbatchRelation.setProjectId(ruralProjectRecords.getId());
+                filingbatchRelation.setFilingBatch(filingBatch.getId());
+                filingbatchRelation.setProjectId(filingBatch.getProjectId());
                 projectFilingbatchRelationDao.deleteByprojectId(filingbatchRelation);
             }
-            dao.update(projectFilingBatch);
+            super.save(projectFilingBatch);
         }else{
             synchronized (SYN_BYTE) {
                 projectFilingBatch.setFilingBatch(serialNumTplService.genSerialNum(createBy.getCompany(), ProjectFilingBatch.ARCHIVE_BATCH_TEMPLATE));
@@ -153,7 +157,7 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
         for (int i=0;i<proId.length;i++){
             String id=proId[i].split("/")[0];
             ProjectFilingbatchRelation filingbatchRelation=new ProjectFilingbatchRelation();
-            filingbatchRelation.setFilingBatch(projectFilingBatch.getFilingBatch());
+            filingbatchRelation.setFilingBatch(projectFilingBatch.getId());
             filingbatchRelation.setProjectId(id);
             filingbatchRelation.setStatus(2);
             filingbatchRelation.preInsert();
@@ -356,10 +360,18 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
         //项目信息
         projectFilingBatch.setProject(ruralProjectRecordsList);
     }
+
+    /**
+     * 审核
+     * @param projectFilingBatch
+     * @param auditUsers
+     * @return
+     * @throws Exception
+     */
     @Transactional(readOnly = false)
     public String auditSave(ProjectFilingBatch projectFilingBatch, List<User> auditUsers) throws Exception {
         this.queryInfo(projectFilingBatch);
-        int filingStatus = projectFilingBatch.getFilingStatus();
+        Integer filingStatus = projectFilingBatch.getFilingStatus();
         String taskDefKey = projectFilingBatch.getAct().getTaskDefKey();
         if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit") ) {
             actTaskService.claim(projectFilingBatch.getAct().getTaskId(), UserUtils.getUser().getId());
@@ -380,14 +392,26 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
             comment = ("yes".equals(projectFilingBatch.getAct().getFlag())?"[同意] ":"[驳回] ");
         }
 
+        /**
+         * 流程驳回修改所有项目归档状态
+         */
         if (!"yes".equals(projectFilingBatch.getAct().getFlag())) {
             projectFilingBatch.setFilingStatus(ProjectStatusEnum.REJECTED.getValue());
             for (RuralProjectRecords projectRecords:projectFilingBatch.getProject()){
                 ProjectFilingbatchRelation relation=projectFilingbatchRelationDao.getProjectId(projectRecords.getId());
                 relation.setStatus(ProjectStatusEnum.IN_APRL.getValue());
-                this.updateByid(relation);
+                relation.setFilingBatch(projectFilingBatch.getId());
+                projectFilingbatchRelationDao.updateStatus(relation);
+            }
+        //如果流程通过
+        }else if(!"modifyApply".equals(taskDefKey)){
+            for (RuralProjectRecords projectRecords:projectFilingBatch.getProject()){
+                ProjectFilingbatchRelation relation=projectFilingbatchRelationDao.getProjectId(projectRecords.getId());
+                //查询已存在项目归档信息,将被驳回(4)的状态的项目的del_status改为1(逻辑删除)
+                if(4 ==relation.getStatus()){
+                    this.updateDelFlag(relation);
+                }
             }
-
         }
 
         User createUser = UserUtils.get(projectFilingBatch.getCreateBy().getId());
@@ -706,4 +730,14 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
         return "保存审核意见成功!";
     }
 
+
+    /**
+     * 项目归档表逻辑删除
+     * @param filingbatchRelation
+     */
+    @Transactional(readOnly = false)
+    public void updateDelFlag(ProjectFilingbatchRelation filingbatchRelation){
+        projectFilingbatchRelationDao.updateDelFlag(filingbatchRelation);
+    }
+
 }

+ 15 - 6
src/main/java/com/jeeplus/modules/projectFilingBatch/web/ProjectFilingBatchController.java

@@ -92,15 +92,24 @@ public class ProjectFilingBatchController extends BaseController {
     @RequiresPermissions(value = {"projectFilingBatch:projectFilingBatchInfo:view"})
     @RequestMapping(value = "view")
     public String view(ProjectFilingBatch projectFilingBatch, Model model) {
-        projectFilingBatch=projectFilingBatchService.get(projectFilingBatch.getId());
-        if (projectFilingBatch != null && StringUtils.isNotBlank(projectFilingBatch.getId())) {
+        if (StringUtils.isNotBlank(projectFilingBatch.getId())) {
             List<RuralProjectRecords> ruralProjectRecordsList = new ArrayList<>();
             //获取详细信息
             projectFilingBatch = projectFilingBatchService.get(projectFilingBatch.getId());
-            List<ProjectFilingBatch> projectFilingBatches = projectFilingBatchService.findProjectIdByFiling(projectFilingBatch.getId());
+            //查询归档项目信息
+            List<ProjectFilingBatch> projectFilingBatches = projectFilingBatchService.getProjectFilingBatchRelationList(projectFilingBatch.getId());
             for (ProjectFilingBatch filingBatch : projectFilingBatches) {
                 RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(filingBatch.getProjectId());
                 ruralProjectRecords.setProjectReportNumber(filingBatch.getNumber());
+                if(1 == filingBatch.getRelationdelFlag()){
+                    ruralProjectRecords.setBoxNum("——");
+                    ruralProjectRecords.setReBoxNum("——");
+                    ruralProjectRecords.setDelFlag("驳回");
+                }else{
+                    ruralProjectRecords.setBoxNum(filingBatch.getBoxNum());
+                    ruralProjectRecords.setReBoxNum(filingBatch.getReBoxNum());
+                    ruralProjectRecords.setDelFlag("通过");
+                }
                 ruralProjectRecordsList.add(ruralProjectRecords);
             }
             //获取归档人
@@ -278,7 +287,7 @@ public class ProjectFilingBatchController extends BaseController {
         return "redirect:" + Global.getAdminPath() + "/projectFilingBatch/projectFilingBatchInfo/?repage";
     }
     /**
-     * 撤回
+     * 删除
      * @param projectFilingBatch
      * @param redirectAttributes
      * @return
@@ -304,9 +313,9 @@ public class ProjectFilingBatchController extends BaseController {
      */
     @RequestMapping("updateProjectPass")
     @ResponseBody
-    public String updateProjectPass(@RequestParam("status") Integer status,@RequestParam("proId") String proId,@RequestParam("boxNum") Integer boxNum,@RequestParam("reboxNum") Integer reboxNum) {
+    public String updateProjectPass(@RequestParam("status") Integer status,@RequestParam("proId") String proId,@RequestParam("boxNum") String boxNum,@RequestParam("reboxNum") String reboxNum) {
         ProjectFilingbatchRelation filingbatchRelation=new ProjectFilingbatchRelation();
-        filingbatchRelation.setProjectId(proId);
+        filingbatchRelation.setId(proId);
         filingbatchRelation.setStatus(status);
         filingbatchRelation.setBoxNum(boxNum);
         filingbatchRelation.setReBoxNum(reboxNum);

+ 6 - 6
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java

@@ -62,8 +62,8 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     private String filingProcessinstanceId;// 审批流程id
     private Integer filingStatus;//归档审批状态
     private Integer filingProjectStatus;//归档批次项目状态
-    private Integer boxNum; //案卷号
-    private Integer reBoxNum;//确认案卷号
+    private String boxNum; //案卷号
+    private String reBoxNum;//确认案卷号
     private String information; //归档批次信息
 
 
@@ -468,19 +468,19 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
         this.filingProjectStatus = filingProjectStatus;
     }
 
-    public Integer getBoxNum() {
+    public String getBoxNum() {
         return boxNum;
     }
 
-    public void setBoxNum(Integer boxNum) {
+    public void setBoxNum(String boxNum) {
         this.boxNum = boxNum;
     }
 
-    public Integer getReBoxNum() {
+    public String getReBoxNum() {
         return reBoxNum;
     }
 
-    public void setReBoxNum(Integer reBoxNum) {
+    public void setReBoxNum(String reBoxNum) {
         this.reBoxNum = reBoxNum;
     }
 

+ 6 - 6
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java

@@ -155,8 +155,8 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private String filingProcessinstanceId;// 审批流程id
 	private Integer filingStatus;//归档审批状态
 	private Integer filingProjectStatus;//归档批次项目状态
-	private Integer boxNum; //案卷号
-	private Integer reBoxNum;//确认案卷号
+	private String boxNum; //案卷号
+	private String reBoxNum;//确认案卷号
 	private String information; //归档批次信息
 
 	private List<String> civilProjectList = Lists.newArrayList();
@@ -1038,19 +1038,19 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 		this.filingProjectStatus = filingProjectStatus;
 	}
 
-	public Integer getBoxNum() {
+	public String getBoxNum() {
 		return boxNum;
 	}
 
-	public void setBoxNum(Integer boxNum) {
+	public void setBoxNum(String boxNum) {
 		this.boxNum = boxNum;
 	}
 
-	public Integer getReBoxNum() {
+	public String getReBoxNum() {
 		return reBoxNum;
 	}
 
-	public void setReBoxNum(Integer reBoxNum) {
+	public void setReBoxNum(String reBoxNum) {
 		this.reBoxNum = reBoxNum;
 	}
 

+ 2 - 1
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -2706,9 +2706,10 @@ public class WorkProjectNotifyController extends BaseController {
 					for (ProjectFilingBatch filingBatch : projectFilingBatches) {
 						RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(filingBatch.getProjectId());
 						ruralProjectRecords.setProjectReportNumber(filingBatch.getNumber());
+						ruralProjectRecords.setId(filingBatch.getRelationId());
 						ruralProjectRecordsList.add(ruralProjectRecords);
 					}
-					List<ProjectFilingbatchRelation> projectFilingbatchRelations=projectFilingbatchRelationDao.getProjectRelation(projectFilingBatch.getFilingBatch());
+					List<ProjectFilingbatchRelation> projectFilingbatchRelations=projectFilingbatchRelationDao.getProjectRelation(projectFilingBatch.getId());
 					projectFilingBatch.setProjectFilingbatchRelations(projectFilingbatchRelations);
 					//获取归档人
 					projectFilingBatch.setCreateBy(UserUtils.get(projectFilingBatch.getCreateBy().getId()));

+ 48 - 12
src/main/resources/mappings/modules/projectGuidang/ProjectFilingBatchDao.xml

@@ -44,9 +44,34 @@
 	</sql>
 	<insert id="insert">
 		insert into project_filingbatch
-		(id,create_by,create_date,update_by,update_date,del_flag,filing_batch,process_instance_id,information,filing_status)
+		(id,
+		create_by,
+		create_date,
+		update_by,
+		update_date,
+		del_flag,
+		filing_batch,
+		process_instance_id,
+		information,
+		filing_status,
+		company_id,
+		office_id
+		)
 		VALUES
-		(#{id},#{createBy.id},#{createDate},#{updateBy.id},#{updateDate},#{delFlag},#{filingBatch},#{processinstanceId},#{information},#{filingStatus})
+		(
+		#{id},
+		#{createBy.id},
+		#{createDate},
+		#{updateBy.id},
+		#{updateDate},
+		#{delFlag},
+		#{filingBatch},
+		#{processinstanceId},
+		#{information},
+		#{filingStatus},
+		#{company.id},
+		#{office.id}
+		)
 	</insert>
 	<update id="update">
 		update project_filingbatch
@@ -80,7 +105,6 @@
 	</update>
 	<select id="queryCount" resultType="int">
 		SELECT count(DISTINCT a.id) FROM project_filingbatch a
-		LEFT JOIN project_flingbatch_relation g on(a.filing_batch=g.filing_batch)
 		<where>
 			<if test="filingBatch!=null and filingBatch!=''">
 				and a.filing_batch like concat('%',#{filingBatch},'%')
@@ -88,15 +112,14 @@
 			<if test="filingStatus!=null">
 				and a.filing_status = #{filingStatus}
 			</if>
+			AND a.del_flag='0'
 			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
-				 AND a.del_flag='0'
+				${sqlMap.dsf}
 			</if>
 		</where>
 	</select>
 	<select id="findList" resultType="projectFilingBatch" >
 		SELECT <include refid="projectFilingBatchColumns"/>  FROM project_filingbatch a
-		LEFT JOIN project_flingbatch_relation g on(a.filing_batch=g.filing_batch)
-		LEFT JOIN rural_project_records r on(g.project_id=r.id)
 		<where>
 			<if test="filingBatch!=null and filingBatch!=''">
 				and a.filing_batch like concat('%',#{filingBatch},'%')
@@ -104,10 +127,10 @@
 			<if test="filingStatus!=null">
 				and a.filing_status = #{filingStatus}
 			</if>
-<!--			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">-->
-<!--				AND g.del_flag='0'-->
-<!--			</if>-->
-			AND a.del_flag='0' and r.project_type in(1,2)
+			AND a.del_flag='0'
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				${sqlMap.dsf}
+			</if>
 		</where>
 		order by a.create_date desc
 	</select>
@@ -115,15 +138,28 @@
 		SELECT
 		<include refid="projectFilingBatchColumns"/>
 		FROM project_filingbatch a
-		LEFT JOIN project_flingbatch_relation g on(a.filing_batch=g.filing_batch)
+		LEFT JOIN project_flingbatch_relation g on(a.id=g.filing_batch)
 		LEFT JOIN rural_project_records r on(g.project_id=r.project_id)
 		WHERE a.id = #{id}
 	</select>
 	<select id="findProjectIdByFiling" resultType="com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch">
 		SELECT
 		<include refid="filingBatchRelationColumns"/>
+		,g.id as "relationId"
+		FROM project_filingbatch a
+		LEFT JOIN project_flingbatch_relation g on(a.id=g.filing_batch)
+		LEFT JOIN rural_project_records r on(g.project_id=r.id)
+		LEFT JOIN project_report_data d on(d.project_id=r.id)
+		WHERE a.id = #{id} and g.del_flag = 0
+		order by a.create_date desc
+	</select>
+
+	<select id="getProjectFilingBatchRelationList" resultType="com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch">
+		SELECT
+		<include refid="filingBatchRelationColumns"/>
+		,g.del_flag as "relationdelFlag"
 		FROM project_filingbatch a
-		LEFT JOIN project_flingbatch_relation g on(a.filing_batch=g.filing_batch)
+		LEFT JOIN project_flingbatch_relation g on(a.id=g.filing_batch)
 		LEFT JOIN rural_project_records r on(g.project_id=r.id)
 		LEFT JOIN project_report_data d on(d.project_id=r.id)
 		WHERE a.id = #{id}

+ 16 - 4
src/main/resources/mappings/modules/projectGuidang/ProjectFilingbatchRelationDao.xml

@@ -45,13 +45,13 @@
 				re_box_num=#{reBoxNum}
 			</if>
 		</set>
-		where project_id=#{projectId}
+		where id=#{id}
 	</update>
 	<select id="getProjectRelation"  resultType="com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation">
 		SELECT
 		<include refid="filingBatchRelationColumns"/>
 		FROM project_filingbatch a
-		LEFT JOIN project_flingbatch_relation g on(a.filing_batch=g.filing_batch)
+		LEFT JOIN project_flingbatch_relation g on(a.id=g.filing_batch)
 		LEFT JOIN rural_project_records r on(g.project_id=r.project_id)
 		WHERE g.filing_batch = #{filingBatch}
 		order by a.create_date desc
@@ -60,8 +60,20 @@
 		SELECT
 		<include refid="filingBatchRelationColumns"/>
 		FROM project_filingbatch a
-		LEFT JOIN project_flingbatch_relation g on(a.filing_batch=g.filing_batch)
+		LEFT JOIN project_flingbatch_relation g on(a.id=g.filing_batch)
 		LEFT JOIN rural_project_records r on(g.project_id=r.project_id)
-		WHERE g.project_id = #{projectId}
+		WHERE g.project_id = #{projectId} and g.del_flag = 0
 	</select>
+
+	<update id="updateDelFlag">
+		update project_flingbatch_relation
+		set del_flag = 1
+		where id =#{id}
+	</update>
+
+	<update id="updateStatus">
+		update project_flingbatch_relation
+		set status = #{status}
+		where id = #{id}
+	</update>
 </mapper>

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

@@ -1412,7 +1412,7 @@
 			</if>
 
 			and a.del_flag = 0 and a.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 = 4 )
+			/*不捞取已经发起审批并审批状态为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!=''">
 				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )

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

@@ -86,10 +86,10 @@
 				<table id="contentTable" class="table details table-bordered table-condensed">
 					<thead>
 					<tr>
-						<th width="25%"><input type="checkbox" class="i-checks"></th>
-						<th width="25%">归档项目编号</th>
-						<th width="25%">归档项目名称</th>
-						<th width="25%">报告号</th>
+						<th width="5%"><input type="checkbox" class="i-checks"></th>
+						<th width="30%">归档项目编号</th>
+						<th width="30%">归档项目名称</th>
+						<th width="30%">报告号</th>
 					</tr>
 				</thead>
 				<tbody>

+ 1 - 0
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchAudit.jsp

@@ -255,6 +255,7 @@
 		if (boxNum!=""){
 			if (reboxNum!=""){
 				if(boxNum!=reboxNum){
+					jQuery(tr).find("#reboxNum").val("");
 					layer.msg("确认案卷号与案卷号不匹配", { icon: 2, offset: "error", time:2000 });
 				}
 			}else{

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

@@ -192,7 +192,7 @@
                             <div class="layui-input-block">
                                 <form:select path="filingStatus" class=" form-control  simple-select">
                                     <form:option value="" label=""/>
-                                    <form:options items="${fns:getRuralDictList('rural_project_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                    <form:options items="${fns:getRuralDictList('rural_report_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                                 </form:select>
                             </div>
                         </div>

+ 15 - 3
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchView.jsp

@@ -248,9 +248,12 @@
                         <thead>
                         <tr>
                             <th class="hide"></th>
-                            <th style="text-align: center" width="20%">归档项目编号</th>
-                            <th style="text-align: center" width="20%">归档项目名称</th>
-                            <th style="text-align: center" width="20%">报告号</th>
+                            <th style="text-align: center" width="16%">归档项目编号</th>
+                            <th style="text-align: center" width="16%">归档项目名称</th>
+                            <th style="text-align: center" width="16%">报告号</th>
+                            <th style="text-align: center" width="16%">案卷号</th>
+                            <th style="text-align: center" width="16%">确认案卷号</th>
+                            <th style="text-align: center" width="16%">状态</th>
 <%--                            <th width="20%">操作</th>--%>
                         </tr>
                         </thead>
@@ -268,6 +271,15 @@
                                         <td>
                                                 ${project.projectReportNumber}
                                         </td>
+                                        <td>
+                                                ${project.boxNum}
+                                        </td>
+                                        <td>
+                                                ${project.reBoxNum}
+                                        </td>
+                                        <td>
+                                                ${project.delFlag}
+                                        </td>
                                     </tr>
                                 </c:forEach>
                             </c:when>