Kaynağa Gözat

文件导出

user5 3 yıl önce
ebeveyn
işleme
944e3ee786
19 değiştirilmiş dosya ile 4494 ekleme ve 172 silme
  1. 53 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageAllDao.java
  2. 1815 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/DownloadProjectRecords.java
  3. 1815 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/DownloadProjectReporteds.java
  4. 170 8
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java
  5. 138 10
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageAllService.java
  6. 1 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  7. 5 8
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageAllController.java
  8. 9 8
      src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientInfo.java
  9. 27 5
      src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractInfo.java
  10. 1 1
      src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractListInfo.java
  11. 26 13
      src/main/java/com/jeeplus/modules/workinvoice/entity/WorkInvoice.java
  12. 10 1
      src/main/java/com/jeeplus/modules/workinvoice/web/WorkInvoiceController.java
  13. 24 5
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java
  14. 388 103
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml
  15. 2 2
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  16. 2 1
      src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml
  17. 4 0
      src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml
  18. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/downloadRecordForm.jsp
  19. 3 3
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllList.jsp

+ 53 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageAllDao.java

@@ -5,6 +5,8 @@ package com.jeeplus.modules.ruralprojectrecords.dao;
 
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.ruralprojectrecords.entity.DownloadProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.DownloadProjectReporteds;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import org.apache.ibatis.annotations.Param;
 
@@ -23,7 +25,21 @@ public interface RuralProjectMessageAllDao extends CrudDao<RuralProjectRecords>
      * @param ruralProjectRecords
      * @return
      */
-    List<RuralProjectRecords> findListOnRecordDownload(RuralProjectRecords ruralProjectRecords);
+    List<DownloadProjectRecords> findListOnRecordDownload(RuralProjectRecords ruralProjectRecords);
+
+    /**
+     * 查询超期未归档信息数据
+     * @param ruralProjectRecords
+     * @return
+     */
+    List<DownloadProjectRecords> getElseRecordList(RuralProjectRecords ruralProjectRecords);
+
+    /**
+     * 查询超期归档数据信息
+     * @param ruralProjectRecords
+     * @return
+     */
+    List<DownloadProjectRecords> getExeedRecordList(RuralProjectRecords ruralProjectRecords);
 
     /**
      * 根据项目id查询审核通过的缺失文件流程
@@ -37,5 +53,40 @@ public interface RuralProjectMessageAllDao extends CrudDao<RuralProjectRecords>
      * @param ruralProjectRecords
      * @return
      */
-    List<RuralProjectRecords> findListOnReportedDownload(RuralProjectRecords ruralProjectRecords);
+    List<DownloadProjectReporteds> findListOnReportedDownload(RuralProjectRecords ruralProjectRecords);
+
+    /**
+     * 查询超期未上报信息数据
+     * @param ruralProjectRecords
+     * @return
+     */
+    List<DownloadProjectReporteds> getElseReportedList(RuralProjectRecords ruralProjectRecords);
+
+    /**
+     * 查询超期上报数据信息
+     * @param ruralProjectRecords
+     * @return
+     */
+    List<DownloadProjectReporteds> getExeedReportedList(RuralProjectRecords ruralProjectRecords);
+    /**
+     * 查询超期无需上报数据信息
+     * @param ruralProjectRecords
+     * @return
+     */
+    List<DownloadProjectReporteds> getDispenseReportedList(RuralProjectRecords ruralProjectRecords);
+
+
+    /**
+     * 根据项目id查询项目汇总开票金额
+     * @param ruralProjectRecords
+     * @return
+     */
+    String getSumInvoiceMoney(RuralProjectRecords ruralProjectRecords);
+
+    /**
+     * 根据项目id查询审核通过的缺失文件流程
+     * @param projectIdList
+     * @return
+     */
+    List<DownloadProjectRecords> getProjectMaterialListByDownload(@Param("projectIdList") List<String> projectIdList);
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1815 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/DownloadProjectRecords.java


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1815 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/DownloadProjectReporteds.java


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

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.modules.ruralprojectrecords.entity;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.google.common.collect.Lists;
 import com.jeeplus.common.persistence.ActEntity;
 import com.jeeplus.common.utils.excel.annotation.ExcelField;
@@ -230,6 +231,26 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private String reportedTypeStr;	//上报类型多选
 	private List<String> reportedTypeList;	//上报类型
 
+	private String approvalFee;  //审定价
+	private String reviewFee;  //送审价
+	private String verifyFee;    //核增核减额
+	private String verifyRate;    //核增核减率
+
+	private String projectTypeStr;		//项目类型
+	private String createByName;	// 登记人
+	private String createByOffice;	// 登记人部门
+	private String projectMasterOffice;	// 责任人部门
+	private String projectinvoiceMoney;	// 项目汇总开票金额
+
+	private Date reportAuditDate;	//质量复核审批日期
+	private Date reportTwoAuditDate;	//报告签发审批日期
+	private String projectScale;		//项目规模
+
+
+	private Integer projectRecordElseStatus; //归档状态(未超期、归档导出使用)
+	private Integer projectRecordExceedStatus; //归档状态(超期、归档导出使用)
+	private Integer projectRecordDispenseStatus; //无需上报状态(超期、归档导出使用)
+	private Integer recordState; //是否超期归档状态
 
 	private List<String> civilProjectList = Lists.newArrayList();
 	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
@@ -277,7 +298,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 		this.recodeNum = recodeNum;
 	}
 
-	@ExcelField(title="电子归档状态", align=2, sort=18,dictType = "archive_state")
+	//@ExcelField(title="电子归档状态", align=2, sort=18,dictType = "archive_state")
 	public Integer getProjectReportRecordStatus() {
 		return projectReportRecordStatus;
 	}
@@ -302,6 +323,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 		this.projectReportStatus = projectReportStatus;
 	}
 
+	@ExcelField(title="报告号", align=2, sort=1)
 	public String getProjectReportNumber() {
 		return projectReportNumber;
 	}
@@ -334,7 +356,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 		this.workContractInfo = contract;
 	}
 
-	@ExcelField(title="项目编号", align=2, sort=1)
+	//@ExcelField(title="项目编号", align=2, sort=1)
 	public String getProjectId() {
 		return projectId;
 	}
@@ -379,7 +401,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 		this.scaleQuantity = scaleQuantity;
 	}
 
-	@ExcelField(title="项目所在地", align=2, sort=12)
+	@ExcelField(title="项目所在地", align=2, sort=11)
 	public Area getArea() {
 		return area;
 	}
@@ -413,7 +435,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public String getRemarks() {
 		return remarks;
 	}
-	@ExcelField(title="创建日期", align=2, sort=16)
+	@ExcelField(title="登记日期", align=2, sort=18)
 	public Date getCreateDate() {
 		return createDate;
 	}
@@ -446,7 +468,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 		this.workConstructionLinkmanList = workConstructionLinkmanList;
 	}
 
-    @ExcelField(title="项目状态", align=2, sort=17,dictType = "audit_state")
+    //@ExcelField(title="项目状态", align=2, sort=21,dictType = "audit_state")
 	public Integer getProjectStatus() {
 		return projectStatus;
 	}
@@ -583,7 +605,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 			return "";
 		}
 	}
-	@ExcelField(title="合同金额", align=2, sort=5)
+	//@ExcelField(title="合同金额", align=2, sort=5)
 	public String getContractPrice() {
 		if (workContractInfo!=null) {
 			return workContractInfo.getContractPrice();
@@ -856,7 +878,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 		this.constructionLinkman = constructionLinkman;
 	}
 
-	@ExcelField(title="上报状态", align=2, sort=19,dictType = "reported_state")
+	//@ExcelField(title="上报状态", align=2, sort=19,dictType = "reported_state")
 	public String getReportedState() {
 		return reportedState;
 	}
@@ -1282,7 +1304,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 		this.actType = actType;
 	}
 
-	@ExcelField(title="责任人", align=2, sort=8)
+	@ExcelField(title="责任人", align=2, sort=9)
 	public String getProjectMasterName() {
 		return projectMasterName;
 	}
@@ -1666,4 +1688,144 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public void setProInfos(List<ProjectFilingBatchProInfo> proInfos) {
 		this.proInfos = proInfos;
 	}
+
+	@ExcelField(title="审定价(元)", align=2, sort=13)
+	public String getApprovalFee() {
+		return approvalFee;
+	}
+
+	public void setApprovalFee(String approvalFee) {
+		this.approvalFee = approvalFee;
+	}
+	@ExcelField(title="送审价(元)", align=2, sort=12)
+	public String getReviewFee() {
+		return reviewFee;
+	}
+
+	public void setReviewFee(String reviewFee) {
+		this.reviewFee = reviewFee;
+	}
+
+	@ExcelField(title="核增核减额(元)", align=2, sort=14)
+	public String getVerifyFee() {
+		return verifyFee;
+	}
+
+	public void setVerifyFee(String verifyFee) {
+		this.verifyFee = verifyFee;
+	}
+
+	@ExcelField(title="核减率(%)", align=2, sort=15)
+	public String getVerifyRate() {
+		return verifyRate;
+	}
+
+	public void setVerifyRate(String verifyRate) {
+		this.verifyRate = verifyRate;
+	}
+
+	public String getProjectTypeStr() {
+		return projectTypeStr;
+	}
+
+	public void setProjectTypeStr(String projectTypeStr) {
+		this.projectTypeStr = projectTypeStr;
+	}
+
+	@ExcelField(title="登记人", align=2, sort=7)
+	public String getCreateByName() {
+		return createByName;
+	}
+
+	public void setCreateByName(String createByName) {
+		this.createByName = createByName;
+	}
+
+	@ExcelField(title="登记人部门", align=2, sort=8)
+	public String getCreateByOffice() {
+		return createByOffice;
+	}
+
+	public void setCreateByOffice(String createByOffice) {
+		this.createByOffice = createByOffice;
+	}
+
+	@ExcelField(title="责任人部门", align=2, sort=10)
+	public String getProjectMasterOffice() {
+		return projectMasterOffice;
+	}
+
+	public void setProjectMasterOffice(String projectMasterOffice) {
+		this.projectMasterOffice = projectMasterOffice;
+	}
+
+	@ExcelField(title="项目汇总开票金额", align=2, sort=16)
+	public String getProjectinvoiceMoney() {
+		return projectinvoiceMoney;
+	}
+
+	public void setProjectinvoiceMoney(String projectinvoiceMoney) {
+		this.projectinvoiceMoney = projectinvoiceMoney;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@ExcelField(title="质量复核日期", align=2, sort=19)
+	public Date getReportAuditDate() {
+		return reportAuditDate;
+	}
+
+	public void setReportAuditDate(Date reportAuditDate) {
+		this.reportAuditDate = reportAuditDate;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@ExcelField(title="报告签发日期", align=2, sort=20)
+	public Date getReportTwoAuditDate() {
+		return reportTwoAuditDate;
+	}
+
+	public void setReportTwoAuditDate(Date reportTwoAuditDate) {
+		this.reportTwoAuditDate = reportTwoAuditDate;
+	}
+
+	@ExcelField(title="项目规模", align=2, sort=11)
+	public String getProjectScale() {
+		return projectScale;
+	}
+
+	public void setProjectScale(String projectScale) {
+		this.projectScale = projectScale;
+	}
+
+	public Integer getProjectRecordElseStatus() {
+		return projectRecordElseStatus;
+	}
+
+	public void setProjectRecordElseStatus(Integer projectRecordElseStatus) {
+		this.projectRecordElseStatus = projectRecordElseStatus;
+	}
+
+	public Integer getProjectRecordExceedStatus() {
+		return projectRecordExceedStatus;
+	}
+
+	public void setProjectRecordExceedStatus(Integer projectRecordExceedStatus) {
+		this.projectRecordExceedStatus = projectRecordExceedStatus;
+	}
+
+	public Integer getProjectRecordDispenseStatus() {
+		return projectRecordDispenseStatus;
+	}
+
+	public void setProjectRecordDispenseStatus(Integer projectRecordDispenseStatus) {
+		this.projectRecordDispenseStatus = projectRecordDispenseStatus;
+	}
+
+	public Integer getRecordState() {
+		return recordState;
+	}
+
+	public void setRecordState(Integer recordState) {
+		this.recordState = recordState;
+	}
 }

+ 138 - 10
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageAllService.java

@@ -137,6 +137,9 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
 
         //查询负责人信息
         for (RuralProjectRecords records : recordsList) {
+            if(null != records.getRecordState() && 0 == records.getProjectReportRecordStatus()){
+                records.setProjectReportRecordStatus(records.getRecordState());
+            }
             this.queryContractInfos(records);
             //获取项目负责人
             List<User> users = workProjectUserDao.getProjectprincipalList(records.getId());
@@ -583,7 +586,7 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
      * @param projectRecords
      * @return
      */
-    public Page<RuralProjectRecords> findPageRecordDownload(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords) {
+    public Page<DownloadProjectRecords> findPageRecordDownload(Page<DownloadProjectRecords> page, RuralProjectRecords projectRecords) {
         //添加查询类型
         List<String> typeList = Lists.newArrayList();
         typeList.add("1");
@@ -606,26 +609,76 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
             }else{
                 projectRecords.setProjectRecordStatus(1);
             }
+            Iterator<String> iterator = list.iterator();
+            while(iterator.hasNext()){
+                String result = iterator.next();
+                if("6".equals(result)){ //判断如果归档状态选择了未超期
+                    iterator.remove();
+                    projectRecords.setProjectRecordElseStatus(1);
+                }else if("7".equals(result)){ //判断如果归档状态选择了超期
+                    iterator.remove();
+                    projectRecords.setProjectRecordExceedStatus(1);
+                }
+            }
             projectRecords.setRecordTypeList(list);
         }
         //查询项目信息
-        List<RuralProjectRecords> recordsList = dao.findListOnRecordDownload(projectRecords);
+        List<DownloadProjectRecords> recordsList = Lists.newArrayList();
+        //查询正常的筛选项项目信息
+        if(projectRecords.getRecordTypeList().size()>0){
+            recordsList = dao.findListOnRecordDownload(projectRecords);
+        }
+        //查询归档超期时间天数
+        List<MainDictDetail> adventCount = DictUtils.getMainDictListOnProjectAdvent("advent_record_count");
+        if(adventCount.size()>0){
+            //获取超期时间天数转int
+            Integer endingCount = Integer.parseInt(adventCount.get(0).getLabel());
+            projectRecords.setEndingCount(endingCount);
+        }
+        //查询未超期的筛选项项目信息
+        if(null != projectRecords.getProjectRecordElseStatus() && 1 == projectRecords.getProjectRecordElseStatus()){
+            List<DownloadProjectRecords> elseRecordsList = dao.getElseRecordList(projectRecords);
+            if(elseRecordsList.size()>0){
+                recordsList.addAll(elseRecordsList);
+            }
+            //B类紧急项目
+            projectRecords.setEmergencyProject("1");
+            elseRecordsList = dao.getElseRecordList(projectRecords);
+            if(elseRecordsList.size()>0){
+                recordsList.addAll(elseRecordsList);
+            }
+        }
+        //查询超期的筛选项项目信息
+        if(null != projectRecords.getProjectRecordExceedStatus() && 1 == projectRecords.getProjectRecordExceedStatus()){
+            projectRecords.setEmergencyProject("0");
+            List<DownloadProjectRecords> exceedRecordsList = dao.getExeedRecordList(projectRecords);
+            if(exceedRecordsList.size()>0){
+                recordsList.addAll(exceedRecordsList);
+            }
+            //B类紧急项目
+            projectRecords.setEmergencyProject("1");
+            exceedRecordsList = dao.getExeedRecordList(projectRecords);
+            if(exceedRecordsList.size()>0){
+                recordsList.addAll(exceedRecordsList);
+            }
+        }
+
         //查询资料缺失审批完成信息
         List projectIdList = Lists.newArrayList();
-        for (RuralProjectRecords records: recordsList) {
+        for (DownloadProjectRecords records: recordsList) {
             projectIdList.add(records.getId());
         }
         //根据已查询的项目id查询资料缺失流程信息
         if(projectIdList.size()>0){
-            List<RuralProjectRecords> projectMaterialList = dao.getProjectMaterialList(projectIdList);
+            List<DownloadProjectRecords> projectMaterialList = dao.getProjectMaterialListByDownload(projectIdList);
 
-            Iterator<RuralProjectRecords> iterator = recordsList.iterator();
+            Iterator<DownloadProjectRecords> iterator = recordsList.iterator();
             //将获取的数据和项目数据进行比对,对已提交资料缺失申请并通过的并且项目归档已经延期的从列表中删除
-            for (RuralProjectRecords info : projectMaterialList) {
+            for (DownloadProjectRecords info : projectMaterialList) {
                 while (iterator.hasNext()) {
-                    RuralProjectRecords s = iterator.next();
+                    DownloadProjectRecords s = iterator.next();
                     if (info.getId().equals(s.getId()) && 1 == s.getOverRecordStatus()) {
-                        iterator.remove();//使用迭代器的删除方法删除
+                        s.setDataDeficiency("是");
                         break;
                     }
                 }
@@ -641,7 +694,7 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
      * @param projectRecords
      * @return
      */
-    public Page<RuralProjectRecords> findPageReportedDownload(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords) {
+    public Page<DownloadProjectReporteds> findPageReportedDownload(Page<DownloadProjectReporteds> page, RuralProjectRecords projectRecords) {
         //添加查询类型
         List<String> typeList = Lists.newArrayList();
         typeList.add("1");
@@ -665,10 +718,79 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
             if(!"0".equals(projectRecords.getReportedState())){
                 projectRecords.setReportedState("1");
             }
+            Iterator<String> iterator = list.iterator();
+            while(iterator.hasNext()){
+                String result = iterator.next();
+                if("6".equals(result)){ //判断如果归档状态选择了未超期
+                    iterator.remove();
+                    projectRecords.setProjectRecordElseStatus(1);
+                }else if("7".equals(result)){ //判断如果归档状态选择了超期
+                    iterator.remove();
+                    projectRecords.setProjectRecordExceedStatus(1);
+                }else if("11".equals(result)){ //判断如果归档状态选择了超期
+                    iterator.remove();
+                    projectRecords.setProjectRecordDispenseStatus(1);
+                }
+            }
             projectRecords.setReportedTypeList(list);
         }
+
+        //查询归档超期时间天数
+        List<MainDictDetail> adventCount = DictUtils.getMainDictListOnProjectAdvent("advent_count");
+        if(adventCount.size()>0){
+            //获取超期时间天数转int
+            Integer endingCount = Integer.parseInt(adventCount.get(0).getLabel());
+            projectRecords.setEndingCount(endingCount);
+        }
+
         //查询项目信息
-        List<RuralProjectRecords> recordsList = dao.findListOnReportedDownload(projectRecords);
+        List<DownloadProjectReporteds> recordsList = Lists.newArrayList();
+        if(projectRecords.getReportedTypeList().size()>0){
+            recordsList = dao.findListOnReportedDownload(projectRecords);
+        }
+
+        //查询未超期的筛选项项目信息
+        if(null != projectRecords.getProjectRecordElseStatus() && 1 == projectRecords.getProjectRecordElseStatus()){
+            List<DownloadProjectReporteds> elseRecordsList = dao.getElseReportedList(projectRecords);
+            if(elseRecordsList.size()>0){
+                recordsList.addAll(elseRecordsList);
+            }
+            //B类紧急项目
+            projectRecords.setEmergencyProject("1");
+            elseRecordsList = dao.getElseReportedList(projectRecords);
+            if(elseRecordsList.size()>0){
+                recordsList.addAll(elseRecordsList);
+            }
+        }
+        //查询超期的筛选项项目信息
+        if(null != projectRecords.getProjectRecordExceedStatus() && 1 == projectRecords.getProjectRecordExceedStatus()){
+            projectRecords.setEmergencyProject("0");
+            List<DownloadProjectReporteds> exceedRecordsList = dao.getExeedReportedList(projectRecords);
+            if(exceedRecordsList.size()>0){
+                recordsList.addAll(exceedRecordsList);
+            }
+            //B类紧急项目
+            projectRecords.setEmergencyProject("1");
+            exceedRecordsList = dao.getExeedReportedList(projectRecords);
+            if(exceedRecordsList.size()>0){
+                recordsList.addAll(exceedRecordsList);
+            }
+        }
+        //查询超期的无需上报项目信息
+        if(null != projectRecords.getProjectRecordDispenseStatus() && 1 == projectRecords.getProjectRecordDispenseStatus()){
+            projectRecords.setEmergencyProject("0");
+            List<DownloadProjectReporteds> exceedRecordsList = dao.getDispenseReportedList(projectRecords);
+            if(exceedRecordsList.size()>0){
+                recordsList.addAll(exceedRecordsList);
+            }
+            //B类紧急项目
+            projectRecords.setEmergencyProject("1");
+            exceedRecordsList = dao.getDispenseReportedList(projectRecords);
+            if(exceedRecordsList.size()>0){
+                recordsList.addAll(exceedRecordsList);
+            }
+        }
+
         page.setList(recordsList);
         return page;
     }
@@ -692,6 +814,12 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
         page.setCountFlag(false);
         projectRecords.setPage(page);
         List<RuralProjectRecords> recordsList = findList(projectRecords);
+        for (RuralProjectRecords info: recordsList) {
+            String sumInvoiceMoney = dao.getSumInvoiceMoney(info);
+            if(StringUtils.isNotBlank(sumInvoiceMoney)){
+                info.setProjectinvoiceMoney(sumInvoiceMoney);
+            }
+        }
         page.setList(recordsList);
         return page;
     }

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

@@ -2271,7 +2271,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 			for (RuralProjectRecords info : projectNotReportList){
 				idList.add(info.getId());
 			}
-			dao.updateProjectReportedState(idList);
+			dao.updateProjectRecordState(idList);
 		}
 	}
 

+ 5 - 8
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageAllController.java

@@ -17,10 +17,7 @@ import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
-import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
-import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsReported;
-import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
-import com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant;
+import com.jeeplus.modules.ruralprojectrecords.entity.*;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageAllService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
@@ -496,8 +493,8 @@ public class RuralProjectMessageAllController extends BaseController {
     public String recordDownload(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
         try {
             String fileName = "项目"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
-            Page<RuralProjectRecords> page = ruralProjectMessageAllService.findPageRecordDownload(new Page<RuralProjectRecords>(request, response, -1), projectRecords);
-            new ExportExcel("项目", RuralProjectRecords.class).setDataList(page.getList()).write(response, fileName).dispose();
+            Page<DownloadProjectRecords> page = ruralProjectMessageAllService.findPageRecordDownload(new Page<DownloadProjectRecords>(request, response, -1), projectRecords);
+            new ExportExcel("项目", DownloadProjectRecords.class).setDataList(page.getList()).write(response, fileName).dispose();
             return null;
         } catch (Exception e) {
             addMessage(redirectAttributes, "导出项目记录失败!失败信息:"+e.getMessage());
@@ -524,8 +521,8 @@ public class RuralProjectMessageAllController extends BaseController {
     public String reportedDownload(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
         try {
             String fileName = "项目"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
-            Page<RuralProjectRecords> page = ruralProjectMessageAllService.findPageReportedDownload(new Page<RuralProjectRecords>(request, response, -1), projectRecords);
-            new ExportExcel("项目", RuralProjectRecords.class).setDataList(page.getList()).write(response, fileName).dispose();
+            Page<DownloadProjectReporteds> page = ruralProjectMessageAllService.findPageReportedDownload(new Page<DownloadProjectReporteds>(request, response, -1), projectRecords);
+            new ExportExcel("项目", DownloadProjectReporteds.class).setDataList(page.getList()).write(response, fileName).dispose();
             return null;
         } catch (Exception e) {
             addMessage(redirectAttributes, "导出项目记录失败!失败信息:"+e.getMessage());

+ 9 - 8
src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientInfo.java

@@ -206,7 +206,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 		this.fax = fax;
 	}
 
-	@ExcelField(title="开户银行", align=2, sort=12)
+	@ExcelField(title="开户银行", align=2, sort=13)
 	public String getOurBank() {
 	    if(StringUtils.isNotBlank(ourBank))
 		return ourBank;
@@ -217,7 +217,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 		this.ourBank = ourBank;
 	}
 
-	@ExcelField(title="开户账号", align=2, sort=13)
+	@ExcelField(title="开户账号", align=2, sort=14)
 	public String getBankNumber() {
         if(StringUtils.isNotBlank(bankNumber))
 		return bankNumber;
@@ -244,7 +244,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 		this.email = email;
 	}
 
-	@ExcelField(title="详细地址", align=2, sort=10)
+	@ExcelField(title="详细地址", align=2, sort=11)
 	public String getAddress() {
 		return address;
 	}
@@ -253,7 +253,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 		this.address = address;
 	}
 
-	@ExcelField(title="注册地址", align=2, sort=11)
+	@ExcelField(title="注册地址", align=2, sort=12)
 	public String getRegisterAddress() {
 		return registerAddress;
 	}
@@ -394,7 +394,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 		this.qq = qq;
 	}
 
-	@ExcelField(title="联系人电话", align=2, sort=15)
+	@ExcelField(title="联系人电话", align=2, sort=16)
 	public String getLinkPhone() {
         if(StringUtils.isNotBlank(linkPhone))
             return linkPhone;
@@ -416,7 +416,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 		this.linkMobile = linkMobile;
 	}
 
-	@ExcelField(title="联系人姓名", align=2, sort=14)
+	@ExcelField(title="联系人姓名", align=2, sort=15)
 	public String getLinkname() {
         if(StringUtils.isNotBlank(linkname))
             return linkname;
@@ -470,7 +470,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 		this.hasUscc = hasUscc;
 	}
 
-	@ExcelField(title="统一社会信用代码", align=2, sort=9)
+	@ExcelField(title="统一社会信用代码", align=2, sort=10)
 	public String getUscCode() {
 		return uscCode;
 	}
@@ -564,6 +564,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 		this.createOffice = createOffice;
 	}
 
+	@ExcelField(title="创建人部门", align=2, sort=8)
 	public String getOfficeName() {
 		return officeName;
 	}
@@ -574,7 +575,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	@Override
-	@ExcelField(title="创建时间", align=2, sort=8)
+	@ExcelField(title="创建时间", align=2, sort=9)
 	public Date getCreateDate() {
 		return super.getCreateDate();
 	}

+ 27 - 5
src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractInfo.java

@@ -136,6 +136,7 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 	private String opinion;   //判断
 	private String flagAdmin;   //判断admin
 	private String createUser;   //创建者信息
+	private String createUserOfficeName;   //创建者部门
 	private List<String> chargeCriterionList;   //收费标准
 	private String chargeCriterion;   //收费标准Str
 	private String otherDetails;   //其他详情
@@ -381,7 +382,7 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 	}
 
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	@ExcelField(title="签订日期", align=2, sort=9)
+	@ExcelField(title="签订日期", align=2, sort=10)
 	public Date getContractDate() {
 		return contractDate;
 	}
@@ -453,7 +454,7 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 		this.contractSpecial = contractSpecial;
 	}
 
-	@ExcelField(title="合同状态", dictType="audit_state", align=2, sort=12)
+	@ExcelField(title="合同状态", dictType="audit_state", align=2, sort=14)
 	public String getContractState() {
 		return contractState;
 	}
@@ -875,7 +876,7 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 		this.signatureStatus = signatureStatus;
 	}
 
-	@ExcelField(title="归档状态", dictType="archive_state", align=2, sort=13)
+	@ExcelField(title="归档状态", dictType="archive_state", align=2, sort=15)
 	public String getContrractRecordStatus() {
 		return contrractRecordStatus;
 	}
@@ -975,7 +976,7 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 		this.chargeCriterionList = chargeCriterionList;
 	}
 
-	@ExcelField(title="收费标准", align=2, sort=11)
+	@ExcelField(title="收费标准", align=2, sort=13)
 	public String getOtherDetails() {
 		return otherDetails;
 	}
@@ -1065,7 +1066,7 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 		this.contractInformation = contractInformation;
 	}
 
-	@ExcelField(title="合同金额类别", align=2, sort=10)
+	@ExcelField(title="合同金额类别", align=2, sort=12)
 	public String getContractInformationStr() {
 		return contractInformationStr;
 	}
@@ -1105,4 +1106,25 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 	public void setCancelDelFalg(boolean cancelDelFalg) {
 		this.cancelDelFalg = cancelDelFalg;
 	}
+
+	@Override
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@ExcelField(title="登记日期", align=2, sort=11)
+	public Date getCreateDate() {
+		return super.getCreateDate();
+	}
+
+	@Override
+	public void setCreateDate(Date createDate) {
+		super.setCreateDate(createDate);
+	}
+
+	@ExcelField(title="创建人部门", align=2, sort=9)
+	public String getCreateUserOfficeName() {
+		return createUserOfficeName;
+	}
+
+	public void setCreateUserOfficeName(String createUserOfficeName) {
+		this.createUserOfficeName = createUserOfficeName;
+	}
 }

+ 1 - 1
src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractListInfo.java

@@ -412,4 +412,4 @@ public class WorkContractListInfo extends ActEntity<WorkContractListInfo> {
 	public void setGiveStatus(String giveStatus) {
 		this.giveStatus = giveStatus;
 	}
-}
+}

+ 26 - 13
src/main/java/com/jeeplus/modules/workinvoice/entity/WorkInvoice.java

@@ -39,6 +39,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	private WorkClientInfo client;		// 实际开票单位
 	private ProjectRecords project;		// 开票项目(来源项目登记)
 	private String projectName;		// 项目名称
+	private String reportNumber;		// 报告号
 	private Double money;		// 价税合计
 	private String moneyStr;		// 价税合计(String)
 	private String invoiceType;		// 发票类型
@@ -95,7 +96,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 
 
 	@Override
-	@ExcelField(title="经办人", fieldType=User.class, value="createBy.name", align=2, sort=5)
+	@ExcelField(title="经办人", fieldType=User.class, value="createBy.name", align=2, sort=7)
 	public User getCreateBy() {
 		return createBy;
 	}
@@ -145,7 +146,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.bankNumber = bankNumber;
 	}
 
-	@ExcelField(title="发票状态", align=2, sort=13 ,dictType = "invoice_audit_state")
+	@ExcelField(title="发票状态", align=2, sort=16 ,dictType = "invoice_audit_state")
 	public String getInvoiceState() {
 		return invoiceState;
 	}
@@ -195,6 +196,8 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.takeDate = takeDate;
 	}
 
+
+	@ExcelField(title="开票人", align=2, sort=9)
 	public String getDrawerName() {
 		return drawerName;
 	}
@@ -211,7 +214,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		super(id);
 	}
 
-	@ExcelField(title="开票号", align=2, sort=2)
+	@ExcelField(title="开票号", align=2, sort=3)
 	public String getNumber() {
 		return number;
 	}
@@ -228,7 +231,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.number = number;
 	}
 
-	@ExcelField(title="开票单位", fieldType=WorkClientInfo.class, value="client.name",align=2, sort=4)
+	@ExcelField(title="开票单位", fieldType=WorkClientInfo.class, value="client.name",align=2, sort=5)
 	public WorkClientInfo getClient() {
 		return client;
 	}
@@ -262,6 +265,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.workAccountList = workAccountList;
 	}
 
+	@ExcelField(title="纳税人识别号",align=2, sort=6)
 	public String getOrUnicode() {
 		return orUnicode;
 	}
@@ -303,7 +307,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.money = money;
 	}
 
-	@ExcelField(title="开票金额", align=2, sort=7)
+	@ExcelField(title="开票金额", align=2, sort=10)
 	public String getMoneyStr() {
 		return moneyStr;
 	}
@@ -312,7 +316,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.moneyStr = moneyStr;
 	}
 
-	@ExcelField(title="发票类型", dictType="invoice_type", align=2, sort=10)
+	@ExcelField(title="发票类型", dictType="invoice_type", align=2, sort=13)
 	public String getInvoiceType() {
 		return invoiceType;
 	}
@@ -321,7 +325,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.invoiceType = invoiceType;
 	}
 
-	@ExcelField(title="收款类型", dictType="charge_type", align=2, sort=9)
+	@ExcelField(title="收款类型", dictType="charge_type", align=2, sort=12)
 	public String getChargeType() {
 		return chargeType;
 	}
@@ -348,7 +352,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.drawer = drawer;
 	}
 
-	@ExcelField(title="经办人部门", fieldType=Office.class, value="office.name", align=2, sort=6)
+	@ExcelField(title="经办人部门", fieldType=Office.class, value="office.name", align=2, sort=8)
 	public Office getOffice() {
 		return office;
 	}
@@ -367,7 +371,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	}
 
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	@ExcelField(title="开票日期", align=2, sort=11)
+	@ExcelField(title="开票日期", align=2, sort=14)
 	public Date getInvoiceDate() {
 		return invoiceDate;
 	}
@@ -468,7 +472,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.ext = ext;
 	}
 
-	@ExcelField(title="开票内容", mainDictType="billing_content", align=2, sort=8)
+	@ExcelField(title="开票内容", mainDictType="billing_content", align=2, sort=11)
 	public String getBillingContent() {
 		return billingContent;
 	}
@@ -486,7 +490,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	}
 
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	@ExcelField(title="收款日期", align=2, sort=12)
+	@ExcelField(title="收款日期", align=2, sort=15)
 	public Date getReceiptMoneyDate() {
 		return receiptMoneyDate;
 	}
@@ -495,7 +499,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.receiptMoneyDate = receiptMoneyDate;
 	}
 
-	@ExcelField(title="是否收款", align=2, sort=14)
+	@ExcelField(title="是否收款", align=2, sort=17)
 	public String getReceiptMoney() {
 		return receiptMoney;
 	}
@@ -600,7 +604,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 		this.accountCheckingUserName = accountCheckingUserName;
 	}
 
-	@ExcelField(title="发票编号", align=2, sort=3)
+	@ExcelField(title="发票编号", align=2, sort=4)
 	public String getWidNumber() {
 		return widNumber;
 	}
@@ -632,4 +636,13 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	public void setWorkAttachments(List<Workattachment> workAttachments) {
 		this.workAttachments = workAttachments;
 	}
+
+	@ExcelField(title="报告号", align=2, sort=2)
+	public String getReportNumber() {
+		return reportNumber;
+	}
+
+	public void setReportNumber(String reportNumber) {
+		this.reportNumber = reportNumber;
+	}
 }

+ 10 - 1
src/main/java/com/jeeplus/modules/workinvoice/web/WorkInvoiceController.java

@@ -43,6 +43,7 @@ import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
 import com.jeeplus.modules.workinvoice.entity.WorkInvoice;
+import com.jeeplus.modules.workinvoice.entity.WorkInvoiceProjectRelation;
 import com.jeeplus.modules.workinvoice.service.WorkInvoiceService;
 import com.jeeplus.modules.workinvoicealter.entity.WorkInvoiceAlter;
 import com.jeeplus.modules.workinvoicealter.service.WorkInvoiceAlterService;
@@ -675,10 +676,18 @@ public class WorkInvoiceController extends BaseController {
             Page<WorkInvoice> page = workInvoiceService.findPage(new Page<WorkInvoice>(request, response, -1), workInvoice);
 			List<WorkInvoice> workInvoiceList = page.getList();
 			for (WorkInvoice invoice: workInvoiceList) {
-				invoice.setWorkInvoiceProjectRelationList(workInvoiceService.getProjectRelation(invoice));
+				List<WorkInvoiceProjectRelation> projectRelation = workInvoiceService.getProjectRelation(invoice);
+				invoice.setWorkInvoiceProjectRelationList(projectRelation);
 				List<String> projectNameList = workInvoiceService.getProjectNameList(invoice);
+				List<String> reportNumber = Lists.newArrayList();
+				for (WorkInvoiceProjectRelation info : projectRelation) {
+					if(StringUtils.isNotBlank(info.getReportDataNum()))
+						reportNumber.add(info.getReportDataNum());
+				}
 				String projectNameStr = String.join(",", projectNameList);
+				String reportNumberStr = String.join(",", reportNumber);
 				invoice.setProjectName(projectNameStr);
+				invoice.setReportNumber(reportNumberStr);
 			}
     		new ExportExcel("发票管理", WorkInvoice.class).setDataList(page.getList()).write(response, fileName).dispose();
     		return null;

+ 24 - 5
src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java

@@ -39,7 +39,9 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	private String submitterId;		// 报销人 项目登记人
 	private String handleId;		// 经办人
 	private String handleName;		// 经办人名称
+	private String handleOfficeName;		// 经办人部门
 	private String submitterName;		// 报销人 项目登记人
+	private String submitterOfficeName;		// 报销人部门
 	private Date submitterDate;		// 报销日期
 	private ProjectRecords project;		// 报销项目
 	private BigDecimal money;		// 报销金额
@@ -224,7 +226,7 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-	@ExcelField(title="报销日期", align=2, sort=8)
+	@ExcelField(title="报销日期", align=2, sort=9)
 	public Date getSubmitterDate() {
 		return submitterDate;
 	}
@@ -234,7 +236,7 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	}
 
 
-	@ExcelField(title="报销金额", align=2, sort=9)
+	@ExcelField(title="报销金额", align=2, sort=10)
 	public BigDecimal getMoney() {
 		return money;
 	}
@@ -243,7 +245,7 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 		this.money = money;
 	}
 
-	@ExcelField(title="报销状态", align=2, dictType = "reimbursement_status" ,sort=10)
+	@ExcelField(title="报销状态", align=2, dictType = "reimbursement_status" ,sort=11)
 	public String getStatus() {
 		return status;
 	}
@@ -409,7 +411,7 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 		this.ext = ext;
 	}
 
-	@ExcelField(title="报销部门", align=2, sort=7)
+	@ExcelField(title="报销部门", align=2, sort=8)
 	public String getOfficeName() {
 		return officeName;
 	}
@@ -443,7 +445,7 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 		this.businessTypeName = businessTypeName;
 	}
 
-	@ExcelField(title="报销人", align=2, sort=6)
+	@ExcelField(title="报销人", align=2, sort=7)
 	public String getSubmitterName() {
 		return submitterName;
 	}
@@ -556,4 +558,21 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	public void setNotifyId(String notifyId) {
 		this.notifyId = notifyId;
 	}
+
+	@ExcelField(title="经办人部门", align=2, sort=6)
+	public String getHandleOfficeName() {
+		return handleOfficeName;
+	}
+
+	public void setHandleOfficeName(String handleOfficeName) {
+		this.handleOfficeName = handleOfficeName;
+	}
+
+	public String getSubmitterOfficeName() {
+		return submitterOfficeName;
+	}
+
+	public void setSubmitterOfficeName(String submitterOfficeName) {
+		this.submitterOfficeName = submitterOfficeName;
+	}
 }

+ 388 - 103
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml

@@ -7,6 +7,7 @@
 		a.create_by AS "createBy.id",
 		a.create_date AS "createDate",
 		(select name from sys_user user where user.id=a.create_by) AS "createBy.name",
+		(select name from sys_user user where user.id=a.create_by) AS "createByName",
 		a.update_by AS "updateBy.id",
 		a.update_date AS "updateDate",
 		a.del_flag AS "delFlag",
@@ -50,6 +51,111 @@
 		a.emergency_project as "emergencyProject"
 	</sql>
 
+	<sql id="recordDownloadSql">
+		distinct(a.id) AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		(select name from sys_user user where user.id=a.create_by) AS "createBy.name",
+		(select name from sys_user user where user.id=a.create_by) AS "createByName",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.contract_id AS "workContractInfo.id",
+		a.project_id AS "projectId",
+		a.project_name AS "projectName",
+		a.scale_type AS "scaleType",
+		a.scale_unit AS "scaleUnit",
+		a.scale_quantity AS "scaleQuantity",
+		a.area_id AS "area.id",
+		a.project_site AS "projectSite",
+		a.project_desc AS "projectDesc",
+		a.remarks AS "remarks",
+		a.status AS "projectStatus",
+		a.process_instance_id AS "processInstanceId",
+		a.company_id AS "company.id",
+		a.office_id AS "office.id",
+		a.alter_process_id AS "alterProcessId",
+		area.name AS "area.name",
+		a.province,
+		a.city,
+		a.area_name AS "county",
+		a.project_structure AS "projectStructure",
+		a.on_ground_num AS "onGroundNum",
+		a.under_ground_num AS "underGroundNum",
+		a.building_scale AS "buildingScale",
+		a.measuring_unit AS "measuringUnit",
+		a.project_use AS "projectUse",
+		a.install_fees AS "installFees",
+		a.building_fees AS "buildingFees",
+		a.building_percent AS "buildingPercent",
+		a.install_percent AS "installPercent",
+		a.unit_fees AS "unitFees",
+		a.building_unit_fees AS "buildingUnitFees",
+		a.install_unit_fees AS "installUnitFees",
+		a.total_fees AS "totalFees",
+		ifnull(a.reported_state,0) as "reportedState",
+		a.over_due_status as "overDueStatus",
+		ifnull(a.record_state,0) as "projectRecordStatus",
+		a.over_record_status as "overRecordStatus",
+		a.emergency_project as "emergencyProject"
+		,ifnull(a.reported_state,0) as "reportedState"
+		,a.project_master_id as "projectMasterId"
+		,sub.name as "projectMasterName"
+		,sob.name as "projectMasterOffice"
+		,a.submit_money as "submitMoney"
+		,(case when a.submit_money = '1' then 'B级' when a.submit_money = '2' then 'A级' else '' end) as projectScale
+		,a.project_type as projectType,
+		wci.name AS "workContractInfo.name",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.top_company AS "office.name",
+		o.name AS "createByOffice",
+		ifnull(prd.number ,"") as "projectReportNumber"
+		,ifnull(prd.status,0) as "projectReportStatus"
+		,ifnull(prd.name,"") as "projectReportName"
+		,ifnull(prrd.status,0) as "downProjectReportRecordStatus",
+		prrd.file_num as recodeNum,
+		prr.process_instance_id as prrProcessInstanceId,
+		prrd.process_instance_id as prrdProcessInstanceId
+		,prd.id as prdId
+		,prr.id as prrId
+		,prrd.id as prrdId
+		,prd.audit_pass_date as auditPassDate
+		,ifnull(rprr.report_status,0) as "reportStatus"
+		,ifnull(rprr.sync_status,0) as "syncStatus"
+		,rprr.process_instance_id as "reportedProcessInstanceId"
+		,ifnull(prdt.status,0) as "projectReportStatusTwo"
+		,prdt.id as prdtId
+		,prdt.process_instance_id as prdtProcessinstanceId
+		,ifnull(pmdr.status,0) as "defectRecordStatus"
+		,pmdr.process_instance_id as "pmdrProcessInstanceId"
+		,pmdr.id as pmdrId
+		,wci.contract_num as "workContractInfo.contractNum"
+		,wci.contract_price as "workContractInfo.contractPrice"
+		,prd.audit_pass_date as "reportAuditDate"
+		,prdt.audit_pass_date as "reportTwoAuditDate"
+	</sql>
+
+	<sql id="recordDownloadLeftSql">
+		LEFT JOIN sys_area area ON area.id = a.area_id
+		left join rural_project_records_reported rprr on rprr.id = a.id
+		LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
+		LEFT JOIN sys_user sua on a.create_by = sua.id
+		LEFT JOIN sys_user sub on a.project_master_id = sub.id
+		LEFT JOIN sys_office sob ON sob.id = sub.office_id
+		LEFT JOIN work_project_user w on a.id = w.project_id
+		LEFT JOIN sys_user su on w.user_id = su.id
+		LEFT JOIN work_project_user w1 on a.id = w1.project_id
+		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		left join project_report_data prd on prd.project_id = a.id
+		left join project_report_data_two prdt on prdt.project_id = a.id
+		left join rural_project_report_record prr on prr.report_id = prd.id
+		LEFT JOIN project_material_defect_record pmdr on prd.id = pmdr.report_id
+		left join rural_project_report_record_down prrd on prrd.report_id = prd.id
+	</sql>
+
 
 	<select id="get" resultType="RuralProjectRecords" >
 		SELECT
@@ -96,15 +202,19 @@
 	<select id="findList" resultType="RuralProjectRecords" >
 		SELECT
 		<include refid="projectRecordsColumns"/>
+		,a.record_state as "recordState"
 		,a.submit_money as "submitMoney"
+		,(case when a.submit_money = '1' then 'B级' when a.submit_money = '2' then 'A级' else '' end) as projectScale
 		,a.project_type as projectType,
 		wci.name AS "workContractInfo.name",
 		wci.contract_num as "workContractInfo.contractNum",
 		wci.contract_price as "workContractInfo.contractPrice",
 		sub.name as "projectMasterName",
+		sob.name as "projectMasterOffice",
 		wct.id AS "workContractInfo.client.id",
 		wct.name AS "workContractInfo.client.name",
 		o.top_company AS "office.name",
+		o.name AS "createByOffice",
 		ifnull(prd.number ,"") as "projectReportNumber"
 		,ifnull(prd.status,0) as "projectReportStatus"
 		,ifnull(prd.name,"") as "projectReportName"
@@ -127,6 +237,12 @@
 		,ifnull(pmdr.status,0) as "defectRecordStatus"
 		,pmdr.process_instance_id as "pmdrProcessInstanceId"
 		,pmdr.id as pmdrId
+		,ifnull(prd.approval_fee ,"") as "approvalFee"
+		,ifnull(prd.review_fee ,"") as "reviewFee"
+		,ifnull(prd.verify_fee ,"") as "verifyFee"
+		,ifnull(prd.verify_rate ,"") as "verifyRate"
+		,prd.audit_pass_date as "reportAuditDate"
+		,prdt.audit_pass_date as "reportTwoAuditDate"
 		FROM rural_project_records a
 		LEFT JOIN sys_area area ON area.id = a.area_id
 		left join rural_project_records_reported rprr on rprr.id = a.id
@@ -137,6 +253,7 @@
 			LEFT JOIN sys_user su on w.user_id = su.id
 		</if>
 		LEFT JOIN sys_user sub on a.project_master_id = sub.id
+		LEFT JOIN sys_office sob ON sob.id = sub.office_id
 		LEFT JOIN work_project_user w1 on a.id = w1.project_id
 		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
 		LEFT JOIN work_client_info wct on wci.client_id = wct.id
@@ -268,7 +385,14 @@
 			</if>
 			<choose>
 				<when test="projectReportRecordStatus != null and projectReportRecordStatus != '' and projectReportRecordStatus != 0">
-					AND prr.status = #{projectReportRecordStatus}
+					<choose>
+						<when test="projectReportRecordStatus == 6 or projectReportRecordStatus == 7">
+							AND a.record_state= #{projectReportRecordStatus}
+						</when>
+						<otherwise>
+							AND prr.status = #{projectReportRecordStatus}
+						</otherwise>
+					</choose>
 				</when>
 				<otherwise>
 					<choose>
@@ -453,7 +577,14 @@
 			</if>
 			<choose>
 				<when test="projectReportRecordStatus != null and projectReportRecordStatus != '' and projectReportRecordStatus != 0">
-					AND prr.status = #{projectReportRecordStatus}
+					<choose>
+						<when test="projectReportRecordStatus == 6 or projectReportRecordStatus == 7">
+							AND a.record_state= #{projectReportRecordStatus}
+						</when>
+						<otherwise>
+							AND prr.status = #{projectReportRecordStatus}
+						</otherwise>
+					</choose>
 				</when>
 				<otherwise>
 					<choose>
@@ -488,59 +619,12 @@
 
 
 
-	<select id="findListOnRecordDownload" resultType="RuralProjectRecords" >
+	<select id="findListOnRecordDownload" resultType="DownloadProjectRecords" >
 		SELECT
-		<include refid="projectRecordsColumns"/>
-		,ifnull(a.reported_state,0) as "reportedState"
-		,a.project_master_id as "projectMasterId"
-		,sub.name as "projectMasterName"
-		,a.submit_money as "submitMoney"
-		,a.project_type as projectType,
-		wci.name AS "workContractInfo.name",
-		wct.id AS "workContractInfo.client.id",
-		wct.name AS "workContractInfo.client.name",
-		o.top_company AS "office.name",
-		ifnull(prd.number ,"") as "projectReportNumber"
-		,ifnull(prd.status,0) as "projectReportStatus"
-		,ifnull(prd.name,"") as "projectReportName"
+		<include refid="recordDownloadSql"/>
 		,ifnull(prr.status,0) as "projectReportRecordStatus"
-		,ifnull(prrd.status,0) as "downProjectReportRecordStatus",
-		prrd.file_num as recodeNum,
-		prr.process_instance_id as prrProcessInstanceId,
-		prrd.process_instance_id as prrdProcessInstanceId
-		,prd.id as prdId
-		,prr.id as prrId
-		,prrd.id as prrdId
-		,prd.audit_pass_date as auditPassDate
-		,ifnull(rprr.report_status,0) as "reportStatus"
-		,ifnull(rprr.sync_status,0) as "syncStatus"
-		,rprr.process_instance_id as "reportedProcessInstanceId"
-		,ifnull(prdt.status,0) as "projectReportStatusTwo"
-		,prdt.id as prdtId
-		,prdt.process_instance_id as prdtProcessinstanceId
-		,ifnull(pmdr.status,0) as "defectRecordStatus"
-		,pmdr.process_instance_id as "pmdrProcessInstanceId"
-		,pmdr.id as pmdrId
-		,wci.contract_num as "workContractInfo.contractNum"
-		,wci.contract_price as "workContractInfo.contractPrice"
 		FROM rural_project_records a
-		LEFT JOIN sys_area area ON area.id = a.area_id
-		left join rural_project_records_reported rprr on rprr.id = a.id
-		LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
-		LEFT JOIN sys_user sua on a.create_by = sua.id
-		LEFT JOIN sys_user sub on a.project_master_id = sub.id
-		LEFT JOIN work_project_user w on a.id = w.project_id
-		LEFT JOIN sys_user su on w.user_id = su.id
-		LEFT JOIN work_project_user w1 on a.id = w1.project_id
-		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
-		LEFT JOIN work_client_info wct on wci.client_id = wct.id
-		LEFT JOIN sys_office o ON o.id = a.office_id
-		left join project_report_data prd on prd.project_id = a.id
-		left join project_report_data_two prdt on prdt.project_id = a.id
-		left join rural_project_report_record prr on prr.report_id = prd.id
-		LEFT JOIN project_material_defect_record pmdr on prd.id = pmdr.report_id
-		left join rural_project_report_record_down prrd on prrd.report_id = prd.id
-
+		<include refid="recordDownloadLeftSql"/>
 		<where>
 			a.status = 5
 			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
@@ -566,6 +650,86 @@
 		</where>
 	</select>
 
+	<select id="getElseRecordList" resultType="DownloadProjectRecords" >
+		SELECT
+		<include refid="recordDownloadSql"/>
+		,"6" as  "projectReportRecordStatus"
+		,prr.record_date as  "recordStartAuditDate"
+		<choose>
+			<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+				/*B类紧急*/
+				,timestampdiff(day,prd.audit_pass_date,now()) as "elseRecordDay"
+			</when>
+			<otherwise>
+				,timestampdiff(day,prdt.audit_pass_date,now()) as "elseRecordDay"
+			</otherwise>
+		</choose>
+		FROM rural_project_records a
+		<include refid="recordDownloadLeftSql"/>
+		<where>
+			a.status = 5
+			and prd.status = 5
+			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+			and prr.status is null
+			<choose>
+				<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+				/*B类紧急*/
+					and timestampdiff(day,prd.audit_pass_date,now())>#{endingCount}
+				</when>
+				<otherwise>
+					and timestampdiff(day,prdt.audit_pass_date,now())>#{endingCount}
+				</otherwise>
+			</choose>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+		</where>
+	</select>
+
+	<select id="getExeedRecordList" resultType="DownloadProjectRecords" >
+		SELECT
+		<include refid="recordDownloadSql"/>
+		,"7" as  "projectReportRecordStatus"
+		,prr.record_date as  "recordStartAuditDate"
+		<choose>
+			<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+				/*B类紧急*/
+				,timestampdiff(day,prd.audit_pass_date,prr.record_date) as "exeedRecordDay"
+			</when>
+			<otherwise>
+				,timestampdiff(day,prdt.audit_pass_date,prr.record_date) as "exeedRecordDay"
+			</otherwise>
+		</choose>
+		FROM rural_project_records a
+		<include refid="recordDownloadLeftSql"/>
+		<where>
+			a.status = 5
+			and prd.status = 5
+			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+			and prr.status is not null
+			<choose>
+				<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+				/*B类紧急*/
+					and timestampdiff(day,prd.audit_pass_date,prr.record_date)>#{endingCount}
+				</when>
+				<otherwise>
+					and timestampdiff(day,prdt.audit_pass_date,prr.record_date)>#{endingCount}
+				</otherwise>
+			</choose>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+		</where>
+	</select>
+
 	<select id="getProjectMaterialList" resultType="RuralProjectRecords" >
 		select a.id,a.project_name as "projectName"
 		from rural_project_records a
@@ -584,59 +748,12 @@
 
 
 
-	<select id="findListOnReportedDownload" resultType="RuralProjectRecords" >
+	<select id="findListOnReportedDownload" resultType="DownloadProjectReporteds" >
 		SELECT
-		<include refid="projectRecordsColumns"/>
-		,ifnull(a.reported_state,0) as "reportedState"
-		,a.project_master_id as "projectMasterId"
-		,sub.name as "projectMasterName"
-		,a.submit_money as "submitMoney"
-		,a.project_type as projectType,
-		wci.name AS "workContractInfo.name",
-		wct.id AS "workContractInfo.client.id",
-		wct.name AS "workContractInfo.client.name",
-		o.top_company AS "office.name",
-		ifnull(prd.number ,"") as "projectReportNumber"
-		,ifnull(prd.status,0) as "projectReportStatus"
-		,ifnull(prd.name,"") as "projectReportName"
-		,ifnull(prr.status,0) as "projectReportRecordStatus"
-		,ifnull(prrd.status,0) as "downProjectReportRecordStatus",
-		prrd.file_num as recodeNum,
-		prr.process_instance_id as prrProcessInstanceId,
-		prrd.process_instance_id as prrdProcessInstanceId
-		,prd.id as prdId
-		,prr.id as prrId
-		,prrd.id as prrdId
-		,prd.audit_pass_date as auditPassDate
-		,ifnull(rprr.report_status,0) as "reportStatus"
-		,ifnull(rprr.sync_status,0) as "syncStatus"
-		,rprr.process_instance_id as "reportedProcessInstanceId"
-		,ifnull(prdt.status,0) as "projectReportStatusTwo"
-		,prdt.id as prdtId
-		,prdt.process_instance_id as prdtProcessinstanceId
-		,ifnull(pmdr.status,0) as "defectRecordStatus"
-		,pmdr.process_instance_id as "pmdrProcessInstanceId"
-		,pmdr.id as pmdrId
-		,wci.contract_num as "workContractInfo.contractNum"
-		,wci.contract_price as "workContractInfo.contractPrice"
+		<include refid="recordDownloadSql"/>
+		,ifnull(rprr.report_status,0) as "projectReportRecordStatus"
 		FROM rural_project_records a
-		LEFT JOIN sys_area area ON area.id = a.area_id
-		left join rural_project_records_reported rprr on rprr.id = a.id
-		LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
-		LEFT JOIN sys_user sua on a.create_by = sua.id
-		LEFT JOIN sys_user sub on a.project_master_id = sub.id
-		LEFT JOIN work_project_user w on a.id = w.project_id
-		LEFT JOIN sys_user su on w.user_id = su.id
-		LEFT JOIN work_project_user w1 on a.id = w1.project_id
-		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
-		LEFT JOIN work_client_info wct on wci.client_id = wct.id
-		LEFT JOIN sys_office o ON o.id = a.office_id
-		left join project_report_data prd on prd.project_id = a.id
-		left join project_report_data_two prdt on prdt.project_id = a.id
-		left join rural_project_report_record prr on prr.report_id = prd.id
-		LEFT JOIN project_material_defect_record pmdr on prd.id = pmdr.report_id
-		left join rural_project_report_record_down prrd on prrd.report_id = prd.id
-
+		<include refid="recordDownloadLeftSql"/>
 		<where>
 			a.status = 5
 			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
@@ -661,4 +778,172 @@
 
 		</where>
 	</select>
+
+	<select id="getElseReportedList" resultType="DownloadProjectRecords" >
+		SELECT
+		<include refid="recordDownloadSql"/>
+		,"6" as  "projectReportRecordStatus"
+		,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+		order by create_date
+		limit 1) as "recordStartAuditDate"
+		<choose>
+			<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+				/*B类紧急*/
+				,timestampdiff(day,prd.audit_pass_date,now()) as "elseRecordDay"
+			</when>
+			<otherwise>
+				,timestampdiff(day,prdt.audit_pass_date,now()) as "elseRecordDay"
+			</otherwise>
+		</choose>
+		FROM rural_project_records a
+		<include refid="recordDownloadLeftSql"/>
+		<where>
+			a.status = 5
+			and prd.status = 5
+			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+			and rprr.report_status is null
+			<choose>
+				<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+					/*B类紧急*/
+					and timestampdiff(day,prd.audit_pass_date,now())>#{endingCount}
+				</when>
+				<otherwise>
+					and timestampdiff(day,prdt.audit_pass_date,now())>#{endingCount}
+				</otherwise>
+			</choose>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+		</where>
+	</select>
+
+	<select id="getExeedReportedList" resultType="DownloadProjectRecords" >
+		SELECT
+		<include refid="recordDownloadSql"/>
+		,"7" as  "projectReportRecordStatus"
+		,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+		order by create_date
+		limit 1) as "recordStartAuditDate"
+		<choose>
+			<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+				/*B类紧急*/
+				,timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+				order by create_date
+				limit 1)) as "exeedRecordDay"
+			</when>
+			<otherwise>
+				,timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+				order by create_date
+				limit 1)) as "exeedRecordDay"
+			</otherwise>
+		</choose>
+		FROM rural_project_records a
+		<include refid="recordDownloadLeftSql"/>
+		<where>
+			a.status = 5
+			and prd.status = 5
+			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+			and rprr.report_status is not null
+			<choose>
+				<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+					/*B类紧急*/
+					and timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+					order by create_date
+					limit 1))>#{endingCount}
+				</when>
+				<otherwise>
+					and timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+					order by create_date
+					limit 1))>#{endingCount}
+				</otherwise>
+			</choose>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+		</where>
+	</select>
+
+	<select id="getDispenseReportedList" resultType="DownloadProjectRecords" >
+		SELECT
+		<include refid="recordDownloadSql"/>
+		,"11" as  "projectReportRecordStatus"
+		,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+		order by create_date
+		limit 1) as "recordStartAuditDate"
+		<choose>
+			<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+				/*B类紧急*/
+				,timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+				order by create_date
+				limit 1)) as "exeedRecordDay"
+			</when>
+			<otherwise>
+				,timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+				order by create_date
+				limit 1)) as "exeedRecordDay"
+			</otherwise>
+		</choose>
+		FROM rural_project_records a
+		<include refid="recordDownloadLeftSql"/>
+		<where>
+			a.status = 5
+			and prd.status = 5
+			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+			and rprr.report_status is not null
+			and rprr.JingHeJianLv>30
+			<choose>
+				<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
+					/*B类紧急*/
+					and timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+					order by create_date
+					limit 1))>#{endingCount}
+				</when>
+				<otherwise>
+					and timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
+					order by create_date
+					limit 1))>#{endingCount}
+				</otherwise>
+			</choose>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+		</where>
+	</select>
+
+
+
+	<select id="getSumInvoiceMoney" resultType="java.lang.String">
+		select sum(wi.money) from work_invoice_project_relation a
+		left join work_invoice wi on wi.id = a.invoice_id
+		where a.project_id = #{id}
+	</select>
+
+
+	<select id="getProjectMaterialListByDownload" resultType="DownloadProjectRecords" >
+		select a.id,a.project_name as "projectName"
+		from rural_project_records a
+		left join project_report_data prd on a.id = prd.project_id
+		left join project_material_defect_record pmdr on prd.id = pmdr.report_id
+		<where>
+			<if test="projectIdList!=null and projectIdList.size!=0">
+				and a.id in
+				<foreach collection="projectIdList" item="id" separator="," open="(" close=")">
+					#{id}
+				</foreach>
+			</if>
+			and pmdr.status = 5
+		</where>
+	</select>
 </mapper>

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

@@ -1725,7 +1725,7 @@
 			and prd.status = 5
 			and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
 			and prd.audit_pass_date is not null
-			and a.reported_state is null
+			and a.record_state is null
 		</where>
 	</select>
 
@@ -1752,7 +1752,7 @@
 			and prd.status = 5
 			and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
 			and prd.audit_pass_date is not null
-			and a.reported_state is null
+			and a.record_state is null
 		</where>
 	</select>
 

+ 2 - 1
src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml

@@ -268,7 +268,8 @@
 		ifnull(wcr.status,0) as "contrractRecordStatus",
 		ifnull(wcr.file_num,"") as "recordNum",
 		wcr.id as "contrractRecordId",
-		a.describe_content AS "describeContent"
+		a.describe_content AS "describeContent",
+		o.name as "createUserOfficeName"
 		FROM work_contract_info a
 		<include refid="workContractInfoJoins"/>
 		left join work_contract_record wcr on wcr.contract_info_id = a.id

+ 4 - 0
src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml

@@ -67,14 +67,18 @@
 		,p.id AS "project.projectId"
 		,wa.type as "workAccount.type"
 		,su.name as "handleName"
+		,so.name as "handleOfficeName"
 		,sub.name as "submitterName"
+		,sob.name as "submitterOfficeName"
 		FROM work_reimbursement a
 		left join work_account wa on wa.work_reimbursement_id =a.id
 		left join work_reimbursement_type_info wrt on wrt.id =wa.type
 		left join project_report_data pd on pd.project_id =wa.project_id
 		left join rural_project_records p on p.id = wa.project_id
 		left join sys_user su on su.id = a.submitter_id
+		left join sys_office so on su.office_id = so.id
 		left join sys_user sub on sub.id = wa.reimbursement_name
+		left join sys_office sob on sub.office_id = sob.id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="id != null and id != ''">

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/downloadRecordForm.jsp

@@ -106,7 +106,7 @@
 			success:function(data){
 				if(data.success) {
 					var data = data.body.list;
-					$("#recordTypeStr").val(data);
+					$("#recordType").val(data);
 					xmSelect.render({
 						el: '#recordType',
 						language: 'zn',

+ 3 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllList.jsp

@@ -813,12 +813,12 @@
 							var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
 						return xml;
 					}}
-                ,{align:'center', title: '电子',  width:70,templet:function(d){
+                ,{align:'center', title: '电子',  width:90,templet:function(d){
                         var st = getRuralProjectArchiveState(d.projectReportRecordStatus);
                         if(st.action)
-                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getReportRecordProcessOne?processInstanceId=" + d.prrProcessInstanceId + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getReportRecordProcessOne?processInstanceId=" + d.prrProcessInstanceId + "','95%','95%')\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         else
-                            var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                            var xml = "<span style=\"cursor:default;\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         return xml;
                     }}
 				,{align:'center', title: '资料缺失',  width:90,templet:function(d){