Przeglądaj źródła

部门级 报表信息及其点击查看详细

[user3] 3 lat temu
rodzic
commit
3bd537eef9
24 zmienionych plików z 6628 dodań i 39 usunięć
  1. 17 4
      src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectRecordsDao.java
  2. 73 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  3. 411 1
      src/main/java/com/jeeplus/modules/statement/controller/StatementCompanyComprehensiveController.java
  4. 6 2
      src/main/java/com/jeeplus/modules/statement/dao/StatementCompanyComprehensiveDao.java
  5. 9 0
      src/main/java/com/jeeplus/modules/statement/entity/StatementCompanyComprehensiveInfo.java
  6. 145 12
      src/main/java/com/jeeplus/modules/statement/service/StatementCompanyComprehensiveService.java
  7. 18 6
      src/main/java/com/jeeplus/modules/workcontractinfo/dao/WorkContractInfoDao.java
  8. 68 7
      src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java
  9. 12 2
      src/main/java/com/jeeplus/modules/workinvoice/dao/WorkInvoiceDao.java
  10. 35 0
      src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java
  11. 11 2
      src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkReimbursementDao.java
  12. 89 0
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java
  13. 654 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  14. 27 0
      src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml
  15. 423 2
      src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml
  16. 309 0
      src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml
  17. 198 0
      src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml
  18. 4 0
      src/main/webapp/webpage/modules/statement/contractStatementList.jsp
  19. 852 0
      src/main/webapp/webpage/modules/statement/departmentBillingReportList.jsp
  20. 1152 0
      src/main/webapp/webpage/modules/statement/departmentCompanyDataView.jsp
  21. 863 0
      src/main/webapp/webpage/modules/statement/departmentContractStatementList.jsp
  22. 668 0
      src/main/webapp/webpage/modules/statement/departmentProjectReportList.jsp
  23. 583 0
      src/main/webapp/webpage/modules/statement/departmentReimbursementReportList.jsp
  24. 1 0
      src/main/webapp/webpage/modules/statement/projectReportList.jsp

+ 17 - 4
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectRecordsDao.java

@@ -333,14 +333,27 @@ public interface RuralProjectRecordsDao extends CrudDao<RuralProjectRecords> {
      */
     Integer recordSignaturesCount();
 
-    //查询项目报表
+    //公司级 查询项目报表
     List<RuralProjectRecords> selectReportPage(@Param("ruralProjectRecords") RuralProjectRecords ruralProjectRecords,@Param("officeId") String officeId,@Param("grade")String grade,@Param("beginDate")String beginDate,@Param("endDate") String endDate,@Param("recordState")String recordState,@Param("reportedState")String reportedState);
 
-    //查询的符合条件的项目报表总数
+    //公司级 查询的符合条件的项目报表总数
     Integer reportPageCount(@Param("ruralProjectRecords") RuralProjectRecords ruralProjectRecords,@Param("officeId") String officeId,@Param("grade")String grade,@Param("beginDate")String beginDate,@Param("endDate") String endDate,@Param("recordState")String recordState,@Param("reportedState")String reportedState);
 
-    //查询项目超期信息(4种)
+    //公司级 查询项目超期信息(4种)
     List<RuralProjectRecords> selectReportPageOverdue(@Param("ruralProjectRecords") RuralProjectRecords ruralProjectRecords, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("beginDate")String beginDate,@Param("endDate") String endDate);
-    //查询项目超期信息的总条数
+    //公司级 查询项目超期信息的总条数
     Integer selectReportPageOverdueCount(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
+
+
+    //部门级 查询项目报表
+    List<RuralProjectRecords> selectDepartmentReportPage(@Param("ruralProjectRecords") RuralProjectRecords ruralProjectRecords,@Param("statementCompanyComprehensiveInfo") StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("grade")String grade,@Param("beginDate")String beginDate,@Param("endDate") String endDate,@Param("recordState")String recordState,@Param("reportedState")String reportedState);
+
+    //部门级 查询的符合条件的项目报表总数
+    Integer selectDepartmentReportPageCount(@Param("ruralProjectRecords") RuralProjectRecords ruralProjectRecords,@Param("statementCompanyComprehensiveInfo") StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("grade")String grade,@Param("beginDate")String beginDate,@Param("endDate") String endDate,@Param("recordState")String recordState,@Param("reportedState")String reportedState);
+
+
+    //部门级 查询项目超期信息(4种)
+    List<RuralProjectRecords> selectDepartmentReportPageOverdue(@Param("ruralProjectRecords") RuralProjectRecords ruralProjectRecords, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("beginDate")String beginDate,@Param("endDate") String endDate);
+    //部门级 查询项目超期信息的总条数
+    Integer selectDepartmentReportPageOverdueCount(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
 }

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

@@ -3439,7 +3439,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		return page;
 	}
 
-	//公司级:项目报表详细
+	//公司级:chaoqi项目报表详细
 	public Page<RuralProjectRecords> findReportPageOverdue(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords,
 														   StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,
 															String year,String bigDateType,String smallDateType) {
@@ -3475,4 +3475,76 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		page.setList(recordsList);
 		return page;
 	}
+
+	//部门级:项目报表详细
+	public Page<RuralProjectRecords> findDepartmentReportPage(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords,StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,String grade
+			,String recordState,String reportedState) {
+		//将获取的datetype转为需要的具体时间   含年月日
+		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(statementCompanyComprehensiveInfo.getBigDateType()),new Integer(statementCompanyComprehensiveInfo.getSmallDateType()),new Integer(statementCompanyComprehensiveInfo.getYear()));
+		String beginDate = map.get("beginDate");
+		String endDate = map.get("endDate");
+		if(null!= projectRecords.getOffice() && StringUtils.isNotBlank(projectRecords.getOffice().getId())){
+			//查询该选择节点下所有的部门Id
+			List<String> officeIdList = officeService.getChildrenOffice(projectRecords.getOffice().getId());
+			officeIdList.add(projectRecords.getOffice().getId());
+			projectRecords.setOfficeIdList(officeIdList);
+		}
+		//为了方便后台 limit 的显示,将页面传入的page暂存
+		Integer oldPageNo = page.getPageNo();
+		if((page.getPageNo()-1) >= 0) {
+			page.setPageNo((page.getPageNo() - 1) * page.getPageSize());
+		}
+		projectRecords.setPage(page);
+		List<RuralProjectRecords> recordsList = dao.selectDepartmentReportPage(projectRecords,statementCompanyComprehensiveInfo,grade,beginDate,endDate,recordState,reportedState);
+		int count = dao.selectDepartmentReportPageCount(projectRecords,statementCompanyComprehensiveInfo,grade,beginDate,endDate,recordState,reportedState);
+		page.setPageNo(oldPageNo);
+		page.setCount(count);
+		page.setCountFlag(false);
+		//查询负责人信息
+		for (RuralProjectRecords records : recordsList) {
+			this.queryContractInfos(records);
+			List<User> users = workProjectUserDao.queryProjectUsers(records.getId(), "1");
+			records.setProjectLeaders(users);
+			records.setLeaderNameStr(Collections3.extractToString(users, "name", ","));
+			records.setLeaderIds(Collections3.extractToString(users, "id", ","));
+		}
+		page.setList(recordsList);
+		return page;
+	}
+
+	//部门级:chaoqi项目报表详细
+	public Page<RuralProjectRecords> findDepartmentReportPageOverdue(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords,
+														   StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo) {
+		//将获取的datetype转为需要的具体时间   含年月日
+		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(statementCompanyComprehensiveInfo.getBigDateType()),new Integer(statementCompanyComprehensiveInfo.getSmallDateType()),new Integer(statementCompanyComprehensiveInfo.getYear()));
+		String beginDate = map.get("beginDate");
+		String endDate = map.get("endDate");
+		if(null!= projectRecords.getOffice() && StringUtils.isNotBlank(projectRecords.getOffice().getId())){
+			//查询该选择节点下所有的部门Id
+			List<String> officeIdList = officeService.getChildrenOffice(projectRecords.getOffice().getId());
+			officeIdList.add(projectRecords.getOffice().getId());
+			projectRecords.setOfficeIdList(officeIdList);
+		}
+		//为了方便后台 limit 的显示,将页面传入的page暂存
+		Integer oldPageNo = page.getPageNo();
+		if((page.getPageNo()-1) >= 0) {
+			page.setPageNo((page.getPageNo() - 1) * page.getPageSize());
+		}
+		projectRecords.setPage(page);
+		List<RuralProjectRecords> recordsList = dao.selectDepartmentReportPageOverdue(projectRecords,statementCompanyComprehensiveInfo,beginDate,endDate);
+		int count = dao.selectDepartmentReportPageOverdueCount(statementCompanyComprehensiveInfo);
+		page.setPageNo(oldPageNo);
+		page.setCount(count);
+		page.setCountFlag(false);
+		//查询负责人信息
+		for (RuralProjectRecords records : recordsList) {
+			this.queryContractInfos(records);
+			List<User> users = workProjectUserDao.queryProjectUsers(records.getId(), "1");
+			records.setProjectLeaders(users);
+			records.setLeaderNameStr(Collections3.extractToString(users, "name", ","));
+			records.setLeaderIds(Collections3.extractToString(users, "id", ","));
+		}
+		page.setList(recordsList);
+		return page;
+	}
 }

+ 411 - 1
src/main/java/com/jeeplus/modules/statement/controller/StatementCompanyComprehensiveController.java

@@ -56,7 +56,7 @@ public class StatementCompanyComprehensiveController extends BaseController {
     @Autowired
     private WorkContractInfoService workContractInfoService;
 
-    //首页,展示所有报表信息
+    //首页,展示所有公司级报表信息
     @RequestMapping(value = "list")
     public String list(Model model){
 
@@ -453,4 +453,414 @@ public class StatementCompanyComprehensiveController extends BaseController {
         model.addAttribute("page", page);
         return "modules/statement/contractStatementList";
     }
+
+
+    //首页,展示所有部门级报表信息
+    @RequestMapping(value = "departmentList")
+    public String departmentList(Model model){
+
+        //这个会改,由它处传参
+        String year = "2022";//实际是他处传的参数  (0:年;1:季度;2:月份)
+        String bigDateType = "2";//实际是他处传的参数  (0:年;1:季度;2:月份)
+        String smallDateType = "1";//实际是他处传的参数  (0:年;1:季度;2:月份)
+        String officeId = "7f776d072d7b4c839cef4e63ce6dbfa5";
+
+        String nyr = "";
+        //根据传的参数:nyr进行匹配 方便传到前端显示
+        switch (bigDateType){
+            case "0":
+                nyr = "年";
+                break;
+            case "1":
+                nyr ="季";
+                break;
+            case "2":
+                nyr ="月";
+                break;
+            default:break;
+        }
+        Map<String, List<StatementCompanyComprehensiveInfo>> stringListMap = statementCompanyComprehensiveService.departmentViewList(year,bigDateType,smallDateType,officeId);
+        model.addAttribute("reportFormList1",stringListMap.get("reportFormList1"));//项目报表
+        model.addAttribute("reportFormList2",stringListMap.get("reportFormList2"));//开票报表
+        model.addAttribute("reportFormList3",stringListMap.get("reportFormList3"));//报销报表
+        model.addAttribute("reportFormList4",stringListMap.get("reportFormList4"));//合同报表
+        model.addAttribute("nyr",nyr);
+
+        return "modules/statement/departmentCompanyDataView";
+    }
+
+    //部门级:项目报表详细
+    //参数:officeId ,bigDateType,smallDateType
+    // grade:是否为A、B类(1=B,2=A),recordState:不为空则为查询本*电子归档,reportedState:不为空则为查询本*上报
+    @RequestMapping(value = "departmentProjectReportList")
+    public String departmentProjectReportList(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response
+            , Model model
+            , @Param(value = "grade")String grade
+            , @Param(value = "recordState")String recordState
+            , @Param(value = "reportedState")String reportedState
+            ,StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo){
+
+        statementCompanyComprehensiveInfo.setType("1");  //项目
+
+        //每次都必须接收前端传参并放入model
+        model.addAttribute("bigDateType",statementCompanyComprehensiveInfo.getBigDateType());
+        model.addAttribute("smallDateType",statementCompanyComprehensiveInfo.getSmallDateType());
+        model.addAttribute("officeId",statementCompanyComprehensiveInfo.getOfficeId());
+        model.addAttribute("year",statementCompanyComprehensiveInfo.getYear());
+        model.addAttribute("type",statementCompanyComprehensiveInfo.getType());
+        model.addAttribute("grade",grade);
+        model.addAttribute("recordState",recordState);
+        model.addAttribute("reportedState",reportedState);
+        model.addAttribute("userId",statementCompanyComprehensiveInfo.getUserId());
+        model.addAttribute("field5",statementCompanyComprehensiveInfo.getField5());
+        model.addAttribute("field6",statementCompanyComprehensiveInfo.getField6());
+        model.addAttribute("field7",statementCompanyComprehensiveInfo.getField7());
+        model.addAttribute("field8",statementCompanyComprehensiveInfo.getField8());
+
+        //这个是我删除的有需要可以补回,但是得注意projectRecords的submitmoney值
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+//        if (StringUtils.isNotBlank(projectRecords.getToflag())){
+//            if (projectRecords.getToflag().equals("1")){
+//                request.getSession().removeAttribute("searchProjectRecord");
+//                RuralProjectRecords search=projectRecords;
+//                request.getSession().setAttribute("searchProjectRecord",search);
+//            }
+//        }else{
+//            if (request.getSession().getAttribute("searchProjectRecord")!=null){
+//                projectRecords= (RuralProjectRecords) request.getSession().getAttribute("searchProjectRecord");
+//                model.addAttribute("ruralProjectRecords", projectRecords);
+//            }
+//        }
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        //添加查询类型(造价审核)
+        //projectRecords.setProjectType("2");
+        //获取项目信息
+        Page<RuralProjectRecords> page = new Page<RuralProjectRecords>();
+        if(StringUtils.isNotBlank(grade) || StringUtils.isNotBlank(recordState) || StringUtils.isNotBlank(reportedState)) {
+            page = projectRecordsService.findDepartmentReportPage(new Page<RuralProjectRecords>(request, response), projectRecords,statementCompanyComprehensiveInfo, grade, recordState, reportedState);
+        }else {
+            //超期未超期报表信息
+            page = projectRecordsService.findDepartmentReportPageOverdue(new Page<RuralProjectRecords>(request, response), projectRecords,statementCompanyComprehensiveInfo);
+        }
+        //查询工程类型
+        if (projectRecords.getEngineeringType()!=null){
+            ProjectEngineeringInfo engineeringInfo=engineeringService.get(projectRecords.getEngineeringType());
+            model.addAttribute("engineeringInfo", engineeringInfo);
+        }
+        model.addAttribute("page", page);
+        return "modules/statement/departmentProjectReportList";
+    }
+
+    //部门级:开票报表详细
+    //参数:officeId ,bigDateType,smallDateType
+    //newlyAdded:不为空则为查询新增发票,collectionThisMonth:不为空则为查询本*收款发票
+    @RequestMapping("departmentBillingReportList")
+    public String departmentBillingReportList(WorkInvoice workInvoice, HttpServletRequest request, HttpServletResponse response, Model model
+            ,@Param("officeIdd") String officeIdd,@Param("newlyAdded") String newlyAdded,@Param("collectionThisMonth") String collectionThisMonth
+            , @Param(value = "statementCompanyComprehensiveInfo") StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo) {
+
+        statementCompanyComprehensiveInfo.setType("2");  //开票
+        //每次都必须接收前端传参并放入model
+        model.addAttribute("bigDateType",statementCompanyComprehensiveInfo.getBigDateType());
+        model.addAttribute("smallDateType",statementCompanyComprehensiveInfo.getSmallDateType());
+        model.addAttribute("officeIdd",officeIdd);
+        model.addAttribute("userId",statementCompanyComprehensiveInfo.getUserId());
+        model.addAttribute("type",statementCompanyComprehensiveInfo.getType());
+        model.addAttribute("year",statementCompanyComprehensiveInfo.getYear());
+        model.addAttribute("newlyAdded",newlyAdded);
+        model.addAttribute("collectionThisMonth",collectionThisMonth);
+
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(workInvoice.getToflag())){
+            if (workInvoice.getToflag().equals("1")){
+                request.getSession().removeAttribute("searchInvoice");
+                WorkInvoice searchInvoice=workInvoice;
+                request.getSession().setAttribute("searchInvoice",searchInvoice);
+            }
+        }else{
+            if (request.getSession().getAttribute("searchInvoice")!=null){
+                workInvoice= (WorkInvoice) request.getSession().getAttribute("searchInvoice");
+            }
+        }
+        //判断对账人是否为空,为空则赋值为null 防止查找为空的数据
+        if(StringUtils.isBlank(workInvoice.getAccountCheckingUserId())){
+            workInvoice.setAccountCheckingUserId(null);
+        }
+        //获取信息
+        Page<WorkInvoice> page = workInvoiceService.findDepartmentBillingReportPage(new Page<WorkInvoice>(request, response), workInvoice, officeIdd,statementCompanyComprehensiveInfo,newlyAdded,collectionThisMonth);
+
+
+        String getSumMoney = workInvoiceService.getSumMoney(workInvoice);
+        List<WorkInvoice> workInvoiceList = page.getList();
+        for (WorkInvoice invoice: workInvoiceList) {
+
+            invoice.setWorkInvoiceProjectRelationList(workInvoiceService.getProjectRelation(invoice));
+            List<String> projectNameList = workInvoiceService.getProjectNameList(invoice);
+            String projectNameStr = String.join(",", projectNameList);
+            if(projectNameStr.contains("\r")){
+                projectNameStr = projectNameStr.replaceAll("\r"," ");
+            }
+            if(projectNameStr.contains("\n")){
+                projectNameStr = projectNameStr.replaceAll("\n"," ");
+            }
+            invoice.setProjectName(projectNameStr);
+            List<String> reportNumber = Lists.newArrayList();
+            for (WorkInvoiceProjectRelation info : invoice.getWorkInvoiceProjectRelationList()) {
+                if(StringUtils.isNotBlank(info.getReportDataNum()))
+                    reportNumber.add(info.getReportDataNum());
+            }
+            String reportNumberStr = String.join(",", reportNumber);
+            invoice.setReportNumber(reportNumberStr);
+        }
+        model.addAttribute("page", page);
+        model.addAttribute("sumMoney", getSumMoney);
+        model.addAttribute("workInvoiceShow", workInvoice);
+
+        return "modules/statement/departmentBillingReportList";
+    }
+
+    //部门级:报销报表详细
+    //参数:officeId ,bigDateType,smallDateType
+    @RequestMapping("departmentReimbursementReportList")
+    public String departmentReimbursementReportList(WorkReimbursement workReimbursement, HttpServletRequest request, HttpServletResponse response, Model model
+            ,@Param("officeIdd") String officeIdd
+            , @Param(value = "statementCompanyComprehensiveInfo") StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo) {
+
+        statementCompanyComprehensiveInfo.setType("3");  //报销
+        //每次都必须接收前端传参并放入model
+        model.addAttribute("bigDateType",statementCompanyComprehensiveInfo.getBigDateType());
+        model.addAttribute("smallDateType",statementCompanyComprehensiveInfo.getSmallDateType());
+        model.addAttribute("officeIdd",officeIdd);
+        model.addAttribute("year",statementCompanyComprehensiveInfo.getYear());
+        model.addAttribute("type",statementCompanyComprehensiveInfo.getType());
+        model.addAttribute("userId",statementCompanyComprehensiveInfo.getUserId());
+
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(workReimbursement.getToflag())){
+            request.getSession().removeAttribute("searchReimbursement");
+            WorkReimbursement search=workReimbursement;
+            request.getSession().setAttribute("searchReimbursement",search);
+        }else{
+            if (request.getSession().getAttribute("searchReimbursement")!=null){
+                workReimbursement= (WorkReimbursement) request.getSession().getAttribute("searchReimbursement");
+                model.addAttribute("workReimbursement", workReimbursement);
+            }
+        }
+        //workReimbursement.setOfficeId(UserUtils.getSelectOffice().getId());
+        //获取信息
+        Page<WorkReimbursement> page = workReimbursementService.findDepartmentReimbursementReportPage(new Page<WorkReimbursement>(request, response), workReimbursement,officeIdd,statementCompanyComprehensiveInfo);
+        List<WorkReimbursement> list = page.getList();
+
+        //查询所有和当前登陆人有关的项目的审核
+        WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+        workProjectNotify.setUser(UserUtils.getUser());
+        workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
+        workProjectNotify.setRemarks("待审批");
+        //添加发票对应编号
+        workProjectNotify.setType("13");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> notifyList = workProjectNotifyService.findList(workProjectNotify);
+
+        //添加发票对应编号
+        workProjectNotify.setType("102");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> newNotifyList = workProjectNotifyService.findList(workProjectNotify);
+
+        for (WorkReimbursement info: list) {
+            for (WorkProjectNotify notify: notifyList) {
+                if(notify.getNotifyId().equals(info.getId())){
+                    info.setNotifyId(notify.getId());
+                    if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        info.setNotifyFlag(1);
+                    }
+                    if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        info.setNotifyFlag(2);
+                    }
+                    break;
+                }
+            }
+            //报告归档资料缺失说明修改权限处理
+            for (WorkProjectNotify notify: newNotifyList) {
+                if(notify.getNotifyId().equals(info.getId())){
+                    info.setNotifyId(notify.getId());
+                    if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        info.setNotifyFlag(4);
+                    }
+                    if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        info.setNotifyFlag(3);
+                    }
+                    break;
+                }
+            }
+        }
+        model.addAttribute("page", page);
+        return "modules/statement/departmentReimbursementReportList";
+    }
+
+
+    //部门级:合同报表详细
+    //参数:officeId ,bigDateType,smallDateType
+    //contractRecordState:不为空则为查询本*纸质归档信息
+    @RequestMapping(value = "departmentContractStatementList")
+    public String departmentContractStatementList(WorkContractInfo workContractInfo, HttpServletRequest request, HttpServletResponse response, Model model
+            ,@Param("officeIdd") String officeIdd
+            ,@Param("contractRecordState")String contractRecordState
+            ,@Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo) {
+
+        statementCompanyComprehensiveInfo.setType("4");  //合同
+        statementCompanyComprehensiveInfo.setOfficeId(officeIdd);
+        //每次都必须接收前端传参并放入model
+        model.addAttribute("bigDateType",statementCompanyComprehensiveInfo.getBigDateType());
+        model.addAttribute("smallDateType",statementCompanyComprehensiveInfo.getSmallDateType());
+        model.addAttribute("officeIdd",officeIdd);
+        model.addAttribute("year",statementCompanyComprehensiveInfo.getYear());
+        model.addAttribute("userId",statementCompanyComprehensiveInfo.getUserId());
+        model.addAttribute("type",statementCompanyComprehensiveInfo.getType());
+        model.addAttribute("contractRecordState",contractRecordState);
+        model.addAttribute("field3",statementCompanyComprehensiveInfo.getField3());
+        model.addAttribute("field4",statementCompanyComprehensiveInfo.getField4());
+
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(workContractInfo.getToflag())){
+            if (workContractInfo.getToflag().equals("1")){
+                request.getSession().removeAttribute("searchContractInfo");
+                WorkContractInfo search=workContractInfo;
+                request.getSession().setAttribute("searchContractInfo",search);
+            }
+        }else{
+            if (request.getSession().getAttribute("searchContractInfo")!=null){
+                workContractInfo= (WorkContractInfo) request.getSession().getAttribute("searchContractInfo");
+                model.addAttribute("workContractInfo", workContractInfo);
+            }
+        }
+        User user = UserUtils.getUser();
+
+        //查询信息
+        Page<WorkContractInfo> page = new Page<WorkContractInfo>();
+        if(StringUtils.isNotBlank(statementCompanyComprehensiveInfo.getField3()) || StringUtils.isNotBlank(statementCompanyComprehensiveInfo.getField4())) {
+            //超期未超期信息
+            page = workContractInfoService.findContractStatementPageOverdue(new Page<WorkContractInfo>(request, response), workContractInfo, statementCompanyComprehensiveInfo,officeIdd);
+        }else {
+            page = workContractInfoService.findDepartmentContractStatementPage(new Page<WorkContractInfo>(request, response), workContractInfo, officeIdd,statementCompanyComprehensiveInfo, contractRecordState);
+        }
+        List<WorkContractInfo> list = page.getList();
+
+        //查询所有和当前登陆人有关的项目的审核
+        WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+        workProjectNotify.setUser(UserUtils.getUser());
+        workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
+        workProjectNotify.setRemarks("待审批");
+        //添加发票对应编号
+        workProjectNotify.setType("16");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> notifyList = workProjectNotifyService.findList(workProjectNotify);
+
+        //查询所有和当前登陆人有关的项目的审核
+        WorkProjectNotify recordNotify = new WorkProjectNotify();
+        recordNotify.setUser(UserUtils.getUser());
+        recordNotify.setCompanyId(UserUtils.getSelectCompany().getId());
+        recordNotify.setRemarks("待审批");
+        //添加发票对应编号
+        workProjectNotify.setType("42");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> recordNotifyList = workProjectNotifyService.findList(recordNotify);
+
+        //查询所有和当前登陆人有关的项目的审核
+        WorkProjectNotify borrowNotify = new WorkProjectNotify();
+        recordNotify.setUser(UserUtils.getUser());
+        recordNotify.setCompanyId(UserUtils.getSelectCompany().getId());
+        recordNotify.setRemarks("待审批");
+        //添加发票对应编号
+        workProjectNotify.setType("93");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> borrowNotifyList = workProjectNotifyService.findList(recordNotify);
+        //添加新合同信息
+        workProjectNotify.setType("143");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> newContractNotifyList = workProjectNotifyService.findList(workProjectNotify);
+
+        //查询合同借用信息状态
+        if(list.size()>0){
+            for (WorkContractInfo info: list) {
+                WorkCntractBorrow workCntractBorrow = workContractInfoService.getBorrowInfo(info.getId());
+                if(null != workCntractBorrow){
+                    info.setBorrowStatus(workCntractBorrow.getStatus());
+                    info.setGiveStatus(workCntractBorrow.getGiveStatus());
+                    info.setBorrowCreateById(workCntractBorrow.getCreateBy().getId());
+                    info.setBorrowId(workCntractBorrow.getId());
+                }else{
+                    info.setBorrowStatus("0");
+                    info.setGiveStatus("0");
+                    info.setBorrowCreateById("");
+                    info.setBorrowId("");
+                }
+                if(user.getRoleList().size()>0){
+                    //判断是否为归档员
+//                    if ("htgly".equals(user.getRoleList().get(0).getEnname())){
+//                        info.setOpinion("1");
+//                    }else{
+//                        info.setOpinion("0");
+//                    }
+                    //判断是否为admin
+                    if (UserUtils.isManager()){
+                        info.setFlagAdmin("1");
+                    }else{
+                        info.setFlagAdmin("0");
+                    }
+                }else{
+                    info.setFlagAdmin("0");
+                }
+                for (WorkProjectNotify notify: notifyList) {
+                    if(notify.getNotifyId().equals(info.getId())){
+                        info.setNotifyId(notify.getId());
+                        if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                            info.setNotifyFlag(1);
+                        }
+                        break;
+                    }
+                }
+                for (WorkProjectNotify notify: newContractNotifyList) {
+                    if(notify.getNotifyId().equals(info.getId())){
+                        info.setNotifyId(notify.getId());
+                        if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                            info.setNewContractNotifyFlag(1);
+                        }
+                        if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                            info.setNewContractNotifyFlagAudit(1);
+                        }
+                        break;
+                    }
+                }
+                for (WorkProjectNotify notify: recordNotifyList) {
+                    if(notify.getNotifyId().equals(info.getContrractRecordId())){
+                        info.setRecordNotifyId(notify.getId());
+                        if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                            info.setRecordNotifyFlag(1);
+                        }
+                        break;
+                    }
+                }
+                for (WorkProjectNotify notify: borrowNotifyList) {
+                    if(notify.getNotifyId().equals(info.getBorrowId())){
+                        info.setBorrowNotifyId(notify.getId());
+                        if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                            info.setBorrowNotifyFlag(1);
+                        }
+                        break;
+                    }
+                }
+                //查询合同是否被项目调用
+                Integer count=workContractInfoService.findContractBycount(info.getId());
+                if (count>0){
+                    info.setCancelDelFalg(false);
+                }else{
+                    info.setCancelDelFalg(true);
+                }
+            }
+        }
+        model.addAttribute("page", page);
+        return "modules/statement/departmentContractStatementList";
+    }
 }

+ 6 - 2
src/main/java/com/jeeplus/modules/statement/dao/StatementCompanyComprehensiveDao.java

@@ -382,8 +382,12 @@ public interface StatementCompanyComprehensiveDao  extends CrudDao<StatementComp
     List<String> getOfficeOverDueContractRecordCountByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
 
 
-
-
+    /**
+     * 按照big,small,year,type,office_id查询部门级所有报表信息
+     * @param statementCompanyComprehensiveInfo
+     * @return
+     */
+    List<StatementCompanyComprehensiveInfo> selectAllByOfficeId(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
 
 
 

+ 9 - 0
src/main/java/com/jeeplus/modules/statement/entity/StatementCompanyComprehensiveInfo.java

@@ -27,6 +27,7 @@ public class StatementCompanyComprehensiveInfo extends DataEntity<StatementCompa
 
     private String field7;          //可变字段7(项目:电子归档超期未上报)
     private String field8;          //可变字段8(项目:电子归档超期已上报)
+    private String userName;        //用户名称
 
     public String getYear() {
         return year;
@@ -163,4 +164,12 @@ public class StatementCompanyComprehensiveInfo extends DataEntity<StatementCompa
     public void setUserId(String userId) {
         this.userId = userId;
     }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
 }

+ 145 - 12
src/main/java/com/jeeplus/modules/statement/service/StatementCompanyComprehensiveService.java

@@ -938,7 +938,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
     }
 
     /**
-     * 公司级报销记录月报/季报/年报汇总方法
+     * 部门级报销记录月报/季报/年报汇总方法
      * @param beginDate 开始时间
      * @param endDate 结束时间
      */
@@ -981,7 +981,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
     }
 
     /**
-     * 公司级合同记录月报/季报/年报汇总方法
+     * 部门级合同记录月报/季报/年报汇总方法
      * @param beginDate 开始时间
      * @param endDate 结束时间
      */
@@ -1073,17 +1073,150 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         return list;
     }
 
-    //转换时间,查询所有新增A B,电子归档,上报
-//    public List<RuralProjectRecords> selectAB(String smallDateType,String bigDateType,String officeId,String submitMoney){
-//        Map<String,String> map = getDate(new Integer(bigDateType),new Integer(smallDateType));
-//        String beginDate = map.get("beginDate");
-//        String endDate = map.get("endDate");
-//
-//        List<RuralProjectRecords> list = dao.selectAB(officeId,submitMoney,beginDate,endDate);
-//
-//        return list;
-//    }
 
+    /**
+     * 部门级 所有报表信息
+     * @param year 年份
+     * @param bigDateType 状态1(0:年;1:季度;2:月份)
+     * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
+     * @param officeId 部门id
+     * @return
+     */
+    public Map<String,List<StatementCompanyComprehensiveInfo>> departmentViewList(String year,String bigDateType,String smallDateType,String officeId){
+        Map<String,List<StatementCompanyComprehensiveInfo>> map = new HashMap<>();
+        StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo = new StatementCompanyComprehensiveInfo();
+
+        //状态1  传过来的
+        statementCompanyComprehensiveInfo.setBigDateType(bigDateType);
+        statementCompanyComprehensiveInfo.setSmallDateType(smallDateType);
+        statementCompanyComprehensiveInfo.setYear(year);
+        statementCompanyComprehensiveInfo.setOfficeId(officeId);
+        String nyr = "";
+        //根据传的参数:nyr进行匹配 方便传到前端显示
+        switch (bigDateType){
+            case "0":
+                nyr = "年";
+                break;
+            case "1":
+                nyr ="季";
+                break;
+            case "2":
+                nyr ="月";
+                break;
+            default:break;
+        }
+
+        //公司级:项目报表总览
+        //type:类型(1:项目;2:开票;3:报销;4:合同)
+        statementCompanyComprehensiveInfo.setType("1");
+        List<StatementCompanyComprehensiveInfo> reportFormList1 = dao.selectAllByOfficeId(statementCompanyComprehensiveInfo);
+        //项目表 各列合计
+        String xmnum1 = "0";
+        String xmnum2 = "0";
+        String xmnum3 = "0";
+        String xmnum4 = "0";
+        String xmnum5 = "0";
+        String xmnum6 = "0";
+        String xmnum7 = "0";
+        String xmnum8 = "0";
+        for(StatementCompanyComprehensiveInfo info:reportFormList1){
+            //转BigDecimal 处理   合计
+            xmnum1 = new BigDecimal(info.getField1()).add(new BigDecimal(xmnum1)).toString();
+            xmnum2 = new BigDecimal(info.getField2()).add(new BigDecimal(xmnum2)).toString();
+            xmnum3 = new BigDecimal(info.getField3()).add(new BigDecimal(xmnum3)).toString();
+            xmnum4 = new BigDecimal(info.getField4()).add(new BigDecimal(xmnum4)).toString();
+            xmnum5 = new BigDecimal(info.getField5()).add(new BigDecimal(xmnum5)).toString();
+            xmnum6 = new BigDecimal(info.getField6()).add(new BigDecimal(xmnum6)).toString();
+            xmnum7 = new BigDecimal(info.getField7()).add(new BigDecimal(xmnum7)).toString();
+            xmnum8 = new BigDecimal(info.getField8()).add(new BigDecimal(xmnum8)).toString();
+        }
+        //存放到对应报表的list集合,方便页面集合展示
+        StatementCompanyComprehensiveInfo xminfo = new StatementCompanyComprehensiveInfo();
+        xminfo.setOfficeName("本"+nyr+"合计");
+        xminfo.setField1(xmnum1);
+        xminfo.setField2(xmnum2);
+        xminfo.setField3(xmnum3);
+        xminfo.setField4(xmnum4);
+        xminfo.setField5(xmnum5);
+        xminfo.setField6(xmnum6);
+        xminfo.setField7(xmnum7);
+        xminfo.setField8(xmnum8);
+        reportFormList1.add(xminfo);
+
+        //公司级:开票报表
+        //类型(1:项目;2:开票;3:报销;4:合同)
+        statementCompanyComprehensiveInfo.setType("2");
+        List<StatementCompanyComprehensiveInfo> reportFormList2 = dao.selectAllByOfficeId(statementCompanyComprehensiveInfo);
+        //各列合计
+        String kpnum1 = "0";
+        String kpnum2 = "0";
+        String kpnum3 = "0";
+        String kpnum4 = "0";
+        for(StatementCompanyComprehensiveInfo info:reportFormList2){
+            //转BigDecimal 处理
+            kpnum1 = new BigDecimal(info.getField1()).add(new BigDecimal(kpnum1)).toString();
+            kpnum2 = new BigDecimal(info.getField2()).add(new BigDecimal(kpnum2)).toString();
+            kpnum3 = new BigDecimal(info.getField3()).add(new BigDecimal(kpnum3)).toString();
+            kpnum4 = new BigDecimal(info.getField4()).add(new BigDecimal(kpnum4)).toString();
+        }
+        //存放到对应报表的list集合,方便页面集合展示
+        StatementCompanyComprehensiveInfo kpinfo = new StatementCompanyComprehensiveInfo();
+        kpinfo.setOfficeName("本"+nyr+"合计");
+        kpinfo.setField1(kpnum1);
+        kpinfo.setField2(kpnum2);
+        kpinfo.setField3(kpnum3);
+        kpinfo.setField4(kpnum4);
+        reportFormList2.add(kpinfo);
+
+        //公司级:报销报表
+        //类型(1:项目;2:开票;3:报销;4:合同)
+        statementCompanyComprehensiveInfo.setType("3");
+        List<StatementCompanyComprehensiveInfo> reportFormList3 = dao.selectAllByOfficeId(statementCompanyComprehensiveInfo);
+        //合计
+        String bxnum1 = "0";
+        String bxnum2 = "0";
+        for(StatementCompanyComprehensiveInfo info:reportFormList3){
+            //转BigDecimal 处理
+            bxnum1 = new BigDecimal(info.getField1()).add(new BigDecimal(bxnum1)).toString();
+            bxnum2 = new BigDecimal(info.getField2()).add(new BigDecimal(bxnum2)).toString();
+        }
+        //存放到对应报表的list集合,方便页面集合展示
+        StatementCompanyComprehensiveInfo bxinfo = new StatementCompanyComprehensiveInfo();
+        bxinfo.setOfficeName("本"+nyr+"合计");
+        bxinfo.setField1(bxnum1);
+        bxinfo.setField2(bxnum2);
+        reportFormList3.add(bxinfo);
+
+        //公司级:合同报表
+        //类型(1:项目;2:开票;3:报销;4:合同)
+        statementCompanyComprehensiveInfo.setType("4");
+        List<StatementCompanyComprehensiveInfo> reportFormList4= dao.selectAllByOfficeId(statementCompanyComprehensiveInfo);
+        //合计
+        String htnum1 = "0";
+        String htnum2 = "0";
+        String htnum3 = "0";
+        String htnum4 = "0";
+        for(StatementCompanyComprehensiveInfo info:reportFormList4){
+            //转BigDecimal 处理
+            htnum1 = new BigDecimal(info.getField1()).add(new BigDecimal(htnum1)).toString();
+            htnum2 = new BigDecimal(info.getField2()).add(new BigDecimal(htnum2)).toString();
+            htnum3 = new BigDecimal(info.getField3()).add(new BigDecimal(htnum3)).toString();
+            htnum4 = new BigDecimal(info.getField4()).add(new BigDecimal(htnum4)).toString();
+        }
+        //存放到对应报表的list集合,方便页面集合展示
+        StatementCompanyComprehensiveInfo htinfo = new StatementCompanyComprehensiveInfo();
+        htinfo.setOfficeName("本"+nyr+"合计");
+        htinfo.setField1(htnum1);
+        htinfo.setField2(htnum2);
+        htinfo.setField3(htnum3);
+        htinfo.setField4(htnum4);
+        reportFormList4.add(htinfo);
+        map.put("reportFormList1",reportFormList1);
+        map.put("reportFormList2",reportFormList2);
+        map.put("reportFormList3",reportFormList3);
+        map.put("reportFormList4",reportFormList4);
+        return map;
+    }
 
 
 

+ 18 - 6
src/main/java/com/jeeplus/modules/workcontractinfo/dao/WorkContractInfoDao.java

@@ -107,15 +107,27 @@ public interface WorkContractInfoDao extends CrudDao<WorkContractInfo> {
      */
     WorkContractInfo getByContractNum(String contractNum);
 
-    //查询合同信息
-    List<WorkContractInfo> findContractStatementPage(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("officeId") String officeId, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
-    //查询合同信息的条数
-    Integer findContractStatementPageCount(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("officeId") String officeId, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
+    //公司级 查询合同信息
+    List<WorkContractInfo> findContractStatementPage(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
+    //公司级 查询合同信息的条数
+    Integer findContractStatementPageCount(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
 
     void updateContractRecordStatus(WorkContractInfo workContractInfo);
 
-    //查询超期合同信息
+    //公司级 查询超期合同信息
     List<WorkContractInfo> findContractStatementPageOverdue(@Param("workContractInfo")WorkContractInfo workContractInfo, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("beginDate")String beginDate,@Param("endDate") String endDate);
-    //查询超期合同信息的条数
+    //公司级 查询超期合同信息的条数
     Integer findContractStatementPageOverdueCount(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
+
+
+    //部门级 查询合同信息
+    List<WorkContractInfo> findDepartmentContractStatementPage(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
+    //部门级 查询合同信息的条数
+    Integer findDepartmentContractStatementPageCount(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
+
+
+    //部门级 查询超期合同信息
+    List<WorkContractInfo> findDepartmentContractStatementPageOverdue(@Param("workContractInfo")WorkContractInfo workContractInfo, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("officeIdd")String officeIdd,@Param("beginDate")String beginDate,@Param("endDate") String endDate);
+    //部门级 查询超期合同信息的条数
+    Integer findDepartmentContractStatementPageOverdueCount(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
 }

+ 68 - 7
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java

@@ -3981,7 +3981,7 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 		return workContractInfo;
 	}
 
-	//公司级:报销报表详细
+	//公司级:合同报表详细
 	public Page<WorkContractInfo> findContractStatementPage(Page<WorkContractInfo> page, WorkContractInfo workContractInfo,String officeId,String bigDateType,String smallDateType,String contractRecordState,String year) {
 		//将获取的datetype转为需要的具体时间
 		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(bigDateType),new Integer(smallDateType),new Integer(year));
@@ -4011,11 +4011,10 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 		return page;
 	}
 
-	//公司级:报销报表详细
-	public Page<WorkContractInfo> findContractStatementPageOverdue(Page<WorkContractInfo> page, WorkContractInfo workContractInfo, StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo
-																	, String bigDateType, String smallDateType, String year) {
+	//公司级:超期合同报表详细
+	public Page<WorkContractInfo> findContractStatementPageOverdue(Page<WorkContractInfo> page, WorkContractInfo workContractInfo, StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,String officeIdd) {
 		//将获取的datetype转为需要的具体时间
-		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(bigDateType),new Integer(smallDateType),new Integer(year));
+		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(statementCompanyComprehensiveInfo.getBigDateType()),new Integer(statementCompanyComprehensiveInfo.getSmallDateType()),new Integer(statementCompanyComprehensiveInfo.getYear()));
 		String beginDate = map.get("beginDate");
 		String endDate = map.get("endDate");
 
@@ -4032,8 +4031,8 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 			page.setPageNo((page.getPageNo() - 1) * page.getPageSize());
 		}
 		workContractInfo.setPage(page);
-		int count = dao.findContractStatementPageOverdueCount(statementCompanyComprehensiveInfo);
-		List<WorkContractInfo> list = dao.findContractStatementPageOverdue(workContractInfo,statementCompanyComprehensiveInfo,beginDate,endDate);
+		int count = dao.findDepartmentContractStatementPageOverdueCount(statementCompanyComprehensiveInfo);
+		List<WorkContractInfo> list = dao.findDepartmentContractStatementPageOverdue(workContractInfo,statementCompanyComprehensiveInfo,beginDate,endDate,officeIdd);
 		page.setCount(count);
 		page.setCountFlag(false);
 		page.setPageNo(oldPageNo);
@@ -4050,4 +4049,66 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 	public void updateContractRecordStatus(WorkContractInfo workContractInfo){
 		workContractInfoDao.updateContractRecordStatus(workContractInfo);
 	}
+
+
+	//部门级:合同报表详细
+	public Page<WorkContractInfo> findDepartmentContractStatementPage(Page<WorkContractInfo> page, WorkContractInfo workContractInfo,String officeIdd,StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,String contractRecordState) {
+		//将获取的datetype转为需要的具体时间
+		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(statementCompanyComprehensiveInfo.getBigDateType()),new Integer(statementCompanyComprehensiveInfo.getSmallDateType()),new Integer(statementCompanyComprehensiveInfo.getYear()));
+		String beginDate = map.get("beginDate");
+		String endDate = map.get("endDate");
+
+		if (StringUtils.isNotBlank(workContractInfo.getTotalContractIds())){
+			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
+		}
+		String companyId = UserUtils.getUser().getComId();
+		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
+		//workContractInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
+
+		//为了方便后台 limit 的显示,将页面传入的page暂存
+		Integer oldPageNo = page.getPageNo();
+		if((page.getPageNo()-1) >= 0) {
+			page.setPageNo((page.getPageNo() - 1) * page.getPageSize());
+		}
+		workContractInfo.setPage(page);
+		int count = dao.findDepartmentContractStatementPageCount(workContractInfo,statementCompanyComprehensiveInfo,officeIdd,beginDate,endDate,contractRecordState);
+		List<WorkContractInfo> list = dao.findDepartmentContractStatementPage(workContractInfo,statementCompanyComprehensiveInfo,officeIdd,beginDate,endDate,contractRecordState);
+		page.setCount(count);
+		page.setCountFlag(false);
+		page.setPageNo(oldPageNo);
+
+		page.setList(list);
+		return page;
+	}
+
+	//部门级:超期合同报表详细
+	public Page<WorkContractInfo> findContractStatementPageOverdue(Page<WorkContractInfo> page, WorkContractInfo workContractInfo, StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo
+			, String bigDateType, String smallDateType, String year) {
+		//将获取的datetype转为需要的具体时间
+		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(bigDateType),new Integer(smallDateType),new Integer(year));
+		String beginDate = map.get("beginDate");
+		String endDate = map.get("endDate");
+
+		if (StringUtils.isNotBlank(workContractInfo.getTotalContractIds())){
+			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
+		}
+		String companyId = UserUtils.getUser().getComId();
+		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
+		//workContractInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
+
+		//为了方便后台 limit 的显示,将页面传入的page暂存
+		Integer oldPageNo = page.getPageNo();
+		if((page.getPageNo()-1) >= 0) {
+			page.setPageNo((page.getPageNo() - 1) * page.getPageSize());
+		}
+		workContractInfo.setPage(page);
+		int count = dao.findContractStatementPageOverdueCount(statementCompanyComprehensiveInfo);
+		List<WorkContractInfo> list = dao.findContractStatementPageOverdue(workContractInfo,statementCompanyComprehensiveInfo,beginDate,endDate);
+		page.setCount(count);
+		page.setCountFlag(false);
+		page.setPageNo(oldPageNo);
+
+		page.setList(list);
+		return page;
+	}
 }

+ 12 - 2
src/main/java/com/jeeplus/modules/workinvoice/dao/WorkInvoiceDao.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.modules.workinvoice.dao;
 
+import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.workbidproject.entity.WorkBidProject;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
 import java.util.List;
@@ -97,9 +98,18 @@ public interface WorkInvoiceDao extends CrudDao<WorkInvoice> {
 	 */
 	Integer getProjectRelationListByProjectId(String projectId);
 
-	//查询开票报表
+	//公司级 查询开票报表
 	List<WorkInvoice> findBillingReportPage(@Param("WorkInvoice") WorkInvoice workInvoice,@Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("newlyAdded")String newlyAdded,@Param("collectionThisMonth")String collectionThisMonth);
 
-	//查询开票报表的条数
+	//公司级 查询开票报表的条数
 	Integer findBillingReportPageCount(@Param("WorkInvoice") WorkInvoice workInvoice,@Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("newlyAdded")String newlyAdded,@Param("collectionThisMonth")String collectionThisMonth);
+
+
+	//部门级 查询开票报表
+	List<WorkInvoice> findDepartmentBillingReportPage(@Param("WorkInvoice") WorkInvoice workInvoice, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo, @Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate, @Param("newlyAdded")String newlyAdded, @Param("collectionThisMonth")String collectionThisMonth);
+
+	//部门级 查询开票报表的条数
+	Integer findDepartmentBillingReportPageCount(@Param("WorkInvoice") WorkInvoice workInvoice, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo, @Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate, @Param("newlyAdded")String newlyAdded, @Param("collectionThisMonth")String collectionThisMonth);
+
+
 }

+ 35 - 0
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java

@@ -20,6 +20,7 @@ import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.statement.service.StatementCompanyComprehensiveService;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.Role;
@@ -2833,4 +2834,38 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 
 	}
 
+
+	//部门级:开票报表详细
+	public Page<WorkInvoice> findDepartmentBillingReportPage(Page<WorkInvoice> page, WorkInvoice workInvoice, String officeIdd, StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo, String newlyAdded, String collectionThisMonth) {
+		//将获取的datetype转为需要的具体时间
+		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(statementCompanyComprehensiveInfo.getBigDateType()),new Integer(statementCompanyComprehensiveInfo.getSmallDateType()),new Integer(statementCompanyComprehensiveInfo.getYear()));
+		String beginDate = map.get("beginDate");
+		String endDate = map.get("endDate");
+
+		workInvoice.getSqlMap().put("dsf", dataScopeFilter(workInvoice.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_INVOICE.getValue()));
+		if(StringUtils.isNotBlank(workInvoice.getOfficeId())){
+			//查询该选择节点下所有的部门Id
+			List<String> officeIdList = officeService.getChildrenOffice(workInvoice.getOfficeId());
+			officeIdList.add(workInvoice.getOfficeId());
+			workInvoice.setOfficeIdList(officeIdList);
+		}
+
+		//为了方便后台 limit 的显示,将页面传入的page暂存
+		Integer oldPageNo = page.getPageNo();
+		if((page.getPageNo()-1) >= 0) {
+			page.setPageNo((page.getPageNo() - 1) * page.getPageSize());
+		}
+		workInvoice.setPage(page);
+
+		int count = dao.findDepartmentBillingReportPageCount(workInvoice,statementCompanyComprehensiveInfo,officeIdd,beginDate,endDate,newlyAdded,collectionThisMonth);
+		List<WorkInvoice> list = dao.findDepartmentBillingReportPage(workInvoice,statementCompanyComprehensiveInfo,officeIdd,beginDate,endDate,newlyAdded,collectionThisMonth);
+		page.setPageNo(oldPageNo);
+		page.setCount(count);
+		page.setCountFlag(false);
+		page.setList(list);
+
+		return page;
+
+	}
+
 }

+ 11 - 2
src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkReimbursementDao.java

@@ -7,6 +7,7 @@ import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.oa_evection.entity.oa_evection.OaEvection;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.workbidproject.entity.WorkBidProject;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
 import com.jeeplus.modules.workproject.entity.WorkProject;
@@ -41,9 +42,17 @@ public interface WorkReimbursementDao extends CrudDao<WorkReimbursement> {
      */
     public WorkReimbursement getByProcessInstanceId(String processInstanceId);
 
-    //报销报表、
+    //公司级 报销报表、
 	List<WorkReimbursement> findReimbursementReportPage(@Param("workReimbursement")WorkReimbursement workReimbursement,@Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
 
-	//报销表条数
+	//公司级 报销表条数
 	Integer findReimbursementReportPageCount(@Param("workReimbursement")WorkReimbursement workReimbursement,@Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+
+	//部门级 报销报表、
+	List<WorkReimbursement> findDepartmentReimbursementReportPage(@Param("workReimbursement")WorkReimbursement workReimbursement, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo, @Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+	//部门级 报销表条数
+	Integer findDepartmentReimbursementReportPageCount(@Param("workReimbursement")WorkReimbursement workReimbursement, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo, @Param("officeIdd") String officeIdd, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
 }

+ 89 - 0
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java

@@ -22,6 +22,7 @@ import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.statement.service.StatementCompanyComprehensiveService;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
@@ -1617,4 +1618,92 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
         }
         return page;
     }
+
+
+    //部门级:报销报表详细
+    public Page<WorkReimbursement> findDepartmentReimbursementReportPage(Page<WorkReimbursement> page, WorkReimbursement workReimbursement, String officeIdd, StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo) {
+        //将获取的datetype转为需要的具体时间
+        Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(statementCompanyComprehensiveInfo.getBigDateType()),new Integer(statementCompanyComprehensiveInfo.getSmallDateType()),new Integer(statementCompanyComprehensiveInfo.getYear()));
+        String beginDate = map.get("beginDate");
+        String endDate = map.get("endDate");
+
+        workReimbursement.setCreateBy(UserUtils.getUser());
+        if(StringUtils.isNotBlank(workReimbursement.getOfficeId())){
+            //查询该选择节点下所有的部门Id
+            List<String> officeIdList = officeService.getChildrenOffice(workReimbursement.getOfficeId());
+            officeIdList.add(workReimbursement.getOfficeId());
+            workReimbursement.setOfficeIdList(officeIdList);
+        }
+        if(StringUtils.isNotBlank(workReimbursement.getBusinessType())){
+            //查询报销类型parentIds
+            workReimbursement.setBusinessTypeParentIds(workReimbursement.getBusinessType()+",");
+        }
+
+        //为了方便后台 limit 的显示,将页面传入的page暂存
+        Integer oldPageNo = page.getPageNo();
+        if((page.getPageNo()-1) >= 0) {
+            page.setPageNo((page.getPageNo() - 1) * page.getPageSize());
+        }
+        workReimbursement.setPage(page);
+        int count = dao.findDepartmentReimbursementReportPageCount(workReimbursement,statementCompanyComprehensiveInfo,officeIdd,beginDate,endDate);
+        List<WorkReimbursement> listWorkReimbursement = dao.findDepartmentReimbursementReportPage(workReimbursement,statementCompanyComprehensiveInfo,officeIdd,beginDate,endDate);
+        page.setPageNo(oldPageNo);
+        page.setCount(count);
+        page.setCountFlag(false);
+        page.setList(listWorkReimbursement);
+
+
+
+        List<WorkReimbursement> list = page.getList();
+        for (WorkReimbursement info: list) {
+            WorkAccount workAccount = info.getWorkAccount();
+            if(null != workAccount){
+                if (null == workAccount.getType()){
+                    ProjectRecords project = new ProjectRecords();
+                    project.setProjectName(workAccount.getReimburseRemarks());
+                    info.setProject(project);
+                    info.getWorkAccount().setProjectRadio(2);
+                }else if (null != workAccount.getType()){
+                    WorkReimbursementTypeInfo workReimbursementTypeInfo= workReimbursementTypeService.get(workAccount.getType());
+                    if (null != workReimbursementTypeInfo){
+                        String [] pidlen=workReimbursementTypeInfo.getParentIds().split(",");
+                        String pid=null;
+                        if (pidlen.length!=1){
+                            pid=pidlen[1];
+                        }else{
+                            pid="2";
+                        }
+//                        String pid=workReimbursementTypeInfo.getParentIds().split(",")[1];
+                        if("1".equals(pid) ){
+                            //查询项目报告信息
+                            if (StringUtils.isNotBlank(info.getWorkAccount().getProject().getId())){
+                                ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(info.getWorkAccount().getProject().getId());
+                                if(null != projectReportData){
+                                    info.setProjectName(projectReportData.getNumber());
+                                }
+                            }else{
+                                ProjectRecords project = new ProjectRecords();
+                                project.setProjectName(workAccount.getReimburseRemarks());
+                                info.setProject(project);
+                            }
+                            info.getWorkAccount().setProjectRadio(1);
+                        }else{
+                            ProjectRecords project = new ProjectRecords();
+                            project.setProjectName(workAccount.getReimburseRemarks());
+                            info.setProject(project);
+                            info.getWorkAccount().setProjectRadio(2);
+                        }
+                    }
+
+                }
+
+                info.setBusinessTypeName(workAccount.getTypeName());
+            }
+            /*if(StringUtils.isNotBlank(info.getProcessInstanceId())){
+                String taskName = histoicFlowUtil.histoicFlow(info.getProcessInstanceId());
+                info.setTaskName(taskName);
+            }*/
+        }
+        return page;
+    }
 }

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

@@ -2808,4 +2808,658 @@
 		</where>
 	</select>
 
+
+	<select id="selectDepartmentReportPage" resultType="RuralProjectRecords">
+		SELECT
+		<include refid="projectRecordsColumnss"/>
+		,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
+		,(case
+		when a.submit_money = '1' and prd.status = '5' then
+		'已完成'
+		when a.submit_money = '2' and prdt.status = '5' then
+		'已完成' else '未完成'
+		end) as completionStatus
+		,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"
+		,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
+		,if(date_add(prd.audit_pass_date,interval #{ruralProjectRecords.endingCount} day) >now(),"0","1") as reportedType
+		,ifnull(rprr.report_status,0) as "reportStatus"
+		,ifnull(rprr.sync_status,0) as "syncStatus"
+		,ifnull(pas.status,0) as "approvalSignatureStatus"
+		,ifnull(pas.process_instance_id,"") as "approvalSignatureProcessInstanceId"
+		,ifnull(prs.status,0) as "reportSignatureStatus"
+		,ifnull(prs.process_instance_id,"") as "reportSignatureProcessInstanceId"
+		,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
+		,ifnull(ppf.status,0) as "paperFilingStatus"
+		,ppf.process_instance_id as "ppfProcessInstanceId"
+		,ppf.id as "ppfId"
+		,pfb.process_instance_id AS "filingProcessinstanceId"
+		,ifnull(pfp.status,0) as "filingProjectStatus"
+		,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"
+		/*,SUM(wi.money) as "money"*/
+		,prd.ZiXunShouRu as "money"
+		,prd.signature_flag as "signatureFlag"
+		,prd.signature_contract_id as "signatureContractId"
+		,prd.signature_url as "signatureUrl"
+		,a.report_signature_flag as "reportSignatureFlag"
+		,a.report_signature_url as "reportSignatureUrl"
+		,a.report_signature_contract_id as "reportSignatureContractId"
+		,prsi.id as "prsiId"
+		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 project_filingbatch pfb on pfb.id=pfp.filing_batch
+		LEFT JOIN sys_user sua on a.create_by = sua.id
+		<if test="ruralProjectRecords.leaderNameStr !=null and ruralProjectRecords.leaderNameStr !=''">
+			LEFT JOIN work_project_user w on a.id = w.project_id
+			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
+		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
+		left join project_paper_filing ppf on ppf.project_id = a.id
+		left join project_approval_signature pas on pas.project_id = a.id
+		left join project_report_signature prs on prs.project_id = a.id
+		left join project_report_signature_info prsi on prsi.project_report_id = prd.number
+		<where>
+			a.del_flag=0
+			and a.status = 5
+			and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+		    and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+			<if test="grade != null and grade != ''">
+				and a.submit_money = #{grade}
+				and a.create_date >= #{beginDate}
+				and a.create_date &lt;= #{endDate}
+			</if>
+			<if test="recordState != null and recordState != ''">
+				and a.record_state = 5
+				and a.over_record_status = 0
+				and prr.status = 5
+				and prr.del_flag = 0
+				and prr.accomplish_date >= #{beginDate}
+				and prr.accomplish_date &lt;= #{endDate}
+			</if>
+			<if test="reportedState != null and reportedState != ''">
+				and a.reported_state = 5
+				and a.over_due_status = 0
+				and rprr.report_status = 5
+				and rprr.del_flag = 0
+				and rprr.accomplish_date >= #{beginDate}
+				and rprr.accomplish_date &lt;= #{endDate}
+			</if>
+
+
+			<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
+				AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
+			</if>
+			<if test="ruralProjectRecords.projectName != null and ruralProjectRecords.projectName != ''">
+				AND a.project_name like concat(concat('%',#{ruralProjectRecords.projectName}),'%')
+			</if>
+			<if test="ruralProjectRecords.scaleType != null and ruralProjectRecords.scaleType != ''">
+				AND a.scale_type = #{ruralProjectRecords.scaleType}
+			</if>
+			<if test="ruralProjectRecords.scaleUnit != null and ruralProjectRecords.scaleUnit != ''">
+				AND a.scale_unit = #{ruralProjectRecords.scaleUnit}
+			</if>
+			<if test="ruralProjectRecords.scaleQuantity != null and ruralProjectRecords.scaleQuantity != ''">
+				AND a.scale_quantity = #{ruralProjectRecords.scaleQuantity}
+			</if>
+			<if test="ruralProjectRecords.projectSite != null and ruralProjectRecords.projectSite != ''">
+				AND a.project_site LIKE concat('%',#{ruralProjectRecords.projectSite},'%')
+			</if>
+			<if test="ruralProjectRecords.remarks != null and ruralProjectRecords.remarks != ''">
+				AND a.remarks LIKE concat('%',#{ruralProjectRecords.remarks},'%')
+			</if>
+			<if test="ruralProjectRecords.projectDesc != null and ruralProjectRecords.projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{ruralProjectRecords.projectDesc},'%')
+			</if>
+			<if test="ruralProjectRecords.area != null and ruralProjectRecords.area.id != null and ruralProjectRecords.area.id != ''">
+				AND a.area_id = #{ruralProjectRecords.area.id}
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.name !=null and ruralProjectRecords.workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{ruralProjectRecords.workContractInfo.name}),'%')
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractNum !=null and ruralProjectRecords.workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{ruralProjectRecords.workContractInfo.contractNum}),'%')
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractPrice !=null and ruralProjectRecords.workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{ruralProjectRecords.workContractInfo.contractPrice}
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractType !=null and ruralProjectRecords.workContractInfo.contractType !=''">
+				AND wci.contract_type = #{ruralProjectRecords.workContractInfo.contractType}
+			</if>
+			<if test="ruralProjectRecords.workContractInfo!=null and ruralProjectRecords.workContractInfo.client !=null and ruralProjectRecords.workContractInfo.client.name !=null and ruralProjectRecords.workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{ruralProjectRecords.workContractInfo.client.name}),'%')
+			</if>
+			<if test="ruralProjectRecords.leaderNameStr !=null and ruralProjectRecords.leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{ruralProjectRecords.leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+			</if>
+			<if test="ruralProjectRecords.projectStatus !=null">
+				AND a.status = #{ruralProjectRecords.projectStatus}
+			</if>
+			<if test="ruralProjectRecords.beginDate !=null">
+				AND a.create_date >= #{ruralProjectRecords.beginDate}
+			</if>
+			<if test="ruralProjectRecords.endDate !=null">
+				AND a.create_date &lt; #{ruralProjectRecords.endDate}
+			</if>
+			<if test="ruralProjectRecords.projectType !=null and ruralProjectRecords.projectType !=''">
+				and project_type= #{ruralProjectRecords.projectType}
+			</if>
+			<if test="ruralProjectRecords.engineeringType !=null and ruralProjectRecords.engineeringType !=''">
+				and a.engineering_type= #{ruralProjectRecords.engineeringType}
+			</if>
+			<!--<if test="office!=null and office.id!=null and office.id!=''">
+				and  a.office_id = #{office.id}
+			</if>-->
+			<if test="ruralProjectRecords.officeIdList!=null and ruralProjectRecords.officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{ruralProjectRecords.officeId}
+				</foreach>
+			</if>
+
+			<if test="ruralProjectRecords.reportData!=null and ruralProjectRecords.reportData.number !=null and ruralProjectRecords.reportData.number !=''">
+				and prd.number like concat('%',#{ruralProjectRecords.reportData.number},'%')
+			</if>
+			<if test="ruralProjectRecords.filingProjectStatus!=null and ruralProjectRecords.filingProjectStatus !=''">
+				and pfp.status =${ruralProjectRecords.filingProjectStatus}
+			</if>
+			<if test="ruralProjectRecords.submitMoney!=null and ruralProjectRecords.submitMoney !=''">
+				and a.submit_money =#{ruralProjectRecords.submitMoney}
+			</if>
+			<if test="ruralProjectRecords.createBy !=null and ruralProjectRecords.createBy !=''">
+				<if test="ruralProjectRecords.createBy.name !=null and ruralProjectRecords.createBy.name !=''">
+					AND sua.name like concat(concat('%',#{ruralProjectRecords.createBy.name}),'%')
+				</if>
+			</if>
+			<if test="ruralProjectRecords.office!=null and ruralProjectRecords.office.name!=null and ruralProjectRecords.office.name!=''">
+				AND o.name like concat(concat('%',#{ruralProjectRecords.office.name}),'%')
+			</if>
+			<if test="ruralProjectRecords.sqlMap.delFlag !=null and ruralProjectRecords.sqlMap.delFlag!=''">
+				${ruralProjectRecords.sqlMap.delFlag}
+			</if>
+			<if test="ruralProjectRecords.sqlMap.dsf !=null and ruralProjectRecords.sqlMap.dsf!=''">
+				AND ((w1.user_id = #{ruralProjectRecords.currentUser.id} AND w1.del_flag='0' AND a.company_id = #{ruralProjectRecords.currentUser.company.id} )${ruralProjectRecords.sqlMap.dsf} )
+			</if>
+		</where>
+		GROUP BY a.id
+		<choose>
+			<when test="ruralProjectRecords.page !=null and ruralProjectRecords.page.orderBy != null and ruralProjectRecords.page.orderBy != ''">
+				ORDER BY ${ruralProjectRecords.page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+		limit ${ruralProjectRecords.page.pageNo},${ruralProjectRecords.page.pageSize}
+	</select>
+
+	<select id="selectDepartmentReportPageCount" resultType="integer">
+		SELECT
+		count(DISTINCT a.id)
+		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 project_filingbatch pfb on pfb.id=pfp.filing_batch
+		LEFT JOIN sys_user sua on a.create_by = sua.id
+		<if test="ruralProjectRecords.leaderNameStr !=null and ruralProjectRecords.leaderNameStr !=''">
+			LEFT JOIN work_project_user w on a.id = w.project_id
+			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
+		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
+		left join project_paper_filing ppf on ppf.project_id = a.id
+		left join project_approval_signature pas on pas.project_id = a.id
+		left join project_report_signature prs on prs.project_id = a.id
+		left join project_report_signature_info prsi on prsi.project_report_id = prd.number
+		<where>
+			a.del_flag=0
+			and a.status = 5
+			and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+			and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+			<if test="grade != null and grade != ''">
+				and a.submit_money = #{grade}
+				and a.create_date >= #{beginDate}
+				and a.create_date &lt;= #{endDate}
+			</if>
+			<if test="recordState != null and recordState != ''">
+				and a.record_state = 5
+				and a.over_record_status = 0
+				and prr.status = 5
+				and prr.del_flag = 0
+				and prr.accomplish_date >= #{beginDate}
+				and prr.accomplish_date &lt;= #{endDate}
+			</if>
+			<if test="reportedState != null and reportedState != ''">
+				and a.reported_state = 5
+				and a.over_due_status = 0
+				and rprr.report_status = 5
+				and rprr.del_flag = 0
+				and rprr.accomplish_date >= #{beginDate}
+				and rprr.accomplish_date &lt;= #{endDate}
+			</if>
+
+
+			<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
+				AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
+			</if>
+			<if test="ruralProjectRecords.projectName != null and ruralProjectRecords.projectName != ''">
+				AND a.project_name like concat(concat('%',#{ruralProjectRecords.projectName}),'%')
+			</if>
+			<if test="ruralProjectRecords.scaleType != null and ruralProjectRecords.scaleType != ''">
+				AND a.scale_type = #{ruralProjectRecords.scaleType}
+			</if>
+			<if test="ruralProjectRecords.scaleUnit != null and ruralProjectRecords.scaleUnit != ''">
+				AND a.scale_unit = #{ruralProjectRecords.scaleUnit}
+			</if>
+			<if test="ruralProjectRecords.scaleQuantity != null and ruralProjectRecords.scaleQuantity != ''">
+				AND a.scale_quantity = #{ruralProjectRecords.scaleQuantity}
+			</if>
+			<if test="ruralProjectRecords.projectSite != null and ruralProjectRecords.projectSite != ''">
+				AND a.project_site LIKE concat('%',#{ruralProjectRecords.projectSite},'%')
+			</if>
+			<if test="ruralProjectRecords.remarks != null and ruralProjectRecords.remarks != ''">
+				AND a.remarks LIKE concat('%',#{ruralProjectRecords.remarks},'%')
+			</if>
+			<if test="ruralProjectRecords.projectDesc != null and ruralProjectRecords.projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{ruralProjectRecords.projectDesc},'%')
+			</if>
+			<if test="ruralProjectRecords.area != null and ruralProjectRecords.area.id != null and ruralProjectRecords.area.id != ''">
+				AND a.area_id = #{ruralProjectRecords.area.id}
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.name !=null and ruralProjectRecords.workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{ruralProjectRecords.workContractInfo.name}),'%')
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractNum !=null and ruralProjectRecords.workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{ruralProjectRecords.workContractInfo.contractNum}),'%')
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractPrice !=null and ruralProjectRecords.workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{ruralProjectRecords.workContractInfo.contractPrice}
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractType !=null and ruralProjectRecords.workContractInfo.contractType !=''">
+				AND wci.contract_type = #{ruralProjectRecords.workContractInfo.contractType}
+			</if>
+			<if test="ruralProjectRecords.workContractInfo!=null and ruralProjectRecords.workContractInfo.client !=null and ruralProjectRecords.workContractInfo.client.name !=null and ruralProjectRecords.workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{ruralProjectRecords.workContractInfo.client.name}),'%')
+			</if>
+			<if test="ruralProjectRecords.leaderNameStr !=null and ruralProjectRecords.leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{ruralProjectRecords.leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+			</if>
+			<if test="ruralProjectRecords.projectStatus !=null">
+				AND a.status = #{ruralProjectRecords.projectStatus}
+			</if>
+			<if test="ruralProjectRecords.beginDate !=null">
+				AND a.create_date >= #{ruralProjectRecords.beginDate}
+			</if>
+			<if test="ruralProjectRecords.endDate !=null">
+				AND a.create_date &lt; #{ruralProjectRecords.endDate}
+			</if>
+			<if test="ruralProjectRecords.projectType !=null and ruralProjectRecords.projectType !=''">
+				and project_type= #{ruralProjectRecords.projectType}
+			</if>
+			<if test="ruralProjectRecords.engineeringType !=null and ruralProjectRecords.engineeringType !=''">
+				and a.engineering_type= #{ruralProjectRecords.engineeringType}
+			</if>
+			<!--<if test="office!=null and office.id!=null and office.id!=''">
+				and  a.office_id = #{office.id}
+			</if>-->
+			<if test="ruralProjectRecords.officeIdList!=null and ruralProjectRecords.officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{ruralProjectRecords.officeId}
+				</foreach>
+			</if>
+
+			<if test="ruralProjectRecords.reportData!=null and ruralProjectRecords.reportData.number !=null and ruralProjectRecords.reportData.number !=''">
+				and prd.number like concat('%',#{ruralProjectRecords.reportData.number},'%')
+			</if>
+			<if test="ruralProjectRecords.filingProjectStatus!=null and ruralProjectRecords.filingProjectStatus !=''">
+				and pfp.status =${ruralProjectRecords.filingProjectStatus}
+			</if>
+			<if test="ruralProjectRecords.submitMoney!=null and ruralProjectRecords.submitMoney !=''">
+				and a.submit_money =#{ruralProjectRecords.submitMoney}
+			</if>
+			<if test="ruralProjectRecords.createBy !=null and ruralProjectRecords.createBy !=''">
+				<if test="ruralProjectRecords.createBy.name !=null and ruralProjectRecords.createBy.name !=''">
+					AND sua.name like concat(concat('%',#{ruralProjectRecords.createBy.name}),'%')
+				</if>
+			</if>
+			<if test="ruralProjectRecords.office!=null and ruralProjectRecords.office.name!=null and ruralProjectRecords.office.name!=''">
+				AND o.name like concat(concat('%',#{ruralProjectRecords.office.name}),'%')
+			</if>
+			<if test="ruralProjectRecords.sqlMap.delFlag !=null and ruralProjectRecords.sqlMap.delFlag!=''">
+				${ruralProjectRecords.sqlMap.delFlag}
+			</if>
+			<if test="ruralProjectRecords.sqlMap.dsf !=null and ruralProjectRecords.sqlMap.dsf!=''">
+				AND ((w1.user_id = #{ruralProjectRecords.currentUser.id} AND w1.del_flag='0' AND a.company_id = #{ruralProjectRecords.currentUser.company.id} )${ruralProjectRecords.sqlMap.dsf} )
+			</if>
+		</where>
+	</select>
+
+	<select id="selectDepartmentReportPageOverdue" resultType="RuralProjectRecords">
+		SELECT
+		<include refid="projectRecordsColumnss"/>
+		,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
+		,(case
+		when a.submit_money = '1' and prd.status = '5' then
+		'已完成'
+		when a.submit_money = '2' and prdt.status = '5' then
+		'已完成' else '未完成'
+		end) as completionStatus
+		,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"
+		,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
+		,if(date_add(prd.audit_pass_date,interval #{ruralProjectRecords.endingCount} day) >now(),"0","1") as reportedType
+		,ifnull(rprr.report_status,0) as "reportStatus"
+		,ifnull(rprr.sync_status,0) as "syncStatus"
+		,ifnull(pas.status,0) as "approvalSignatureStatus"
+		,ifnull(pas.process_instance_id,"") as "approvalSignatureProcessInstanceId"
+		,ifnull(prs.status,0) as "reportSignatureStatus"
+		,ifnull(prs.process_instance_id,"") as "reportSignatureProcessInstanceId"
+		,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
+		,ifnull(ppf.status,0) as "paperFilingStatus"
+		,ppf.process_instance_id as "ppfProcessInstanceId"
+		,ppf.id as "ppfId"
+		,pfb.process_instance_id AS "filingProcessinstanceId"
+		,ifnull(pfp.status,0) as "filingProjectStatus"
+		,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"
+		/*,SUM(wi.money) as "money"*/
+		,prd.ZiXunShouRu as "money"
+		,prd.signature_flag as "signatureFlag"
+		,prd.signature_contract_id as "signatureContractId"
+		,prd.signature_url as "signatureUrl"
+		,a.report_signature_flag as "reportSignatureFlag"
+		,a.report_signature_url as "reportSignatureUrl"
+		,a.report_signature_contract_id as "reportSignatureContractId"
+		,prsi.id as "prsiId"
+		FROM statement_office_data_info sodi
+
+		<if test="statementCompanyComprehensiveInfo.field5 != null and statementCompanyComprehensiveInfo.field5 != ''">
+			LEFT JOIN rural_project_records a ON sodi.field1 = a.id
+		</if>
+		<if test="statementCompanyComprehensiveInfo.field6 != null and statementCompanyComprehensiveInfo.field6 != ''">
+			LEFT JOIN rural_project_records a ON sodi.field2 = a.id
+		</if>
+		<if test="statementCompanyComprehensiveInfo.field7 != null and statementCompanyComprehensiveInfo.field7 != ''">
+			LEFT JOIN rural_project_records a ON sodi.field3 = a.id
+		</if>
+		<if test="statementCompanyComprehensiveInfo.field8 != null and statementCompanyComprehensiveInfo.field8 != ''">
+			LEFT JOIN rural_project_records a ON sodi.field4 = a.id
+		</if>
+
+		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 project_filingbatch pfb on pfb.id=pfp.filing_batch
+		LEFT JOIN sys_user sua on a.create_by = sua.id
+		<if test="ruralProjectRecords.leaderNameStr !=null and ruralProjectRecords.leaderNameStr !=''">
+			LEFT JOIN work_project_user w on a.id = w.project_id
+			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
+		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
+		left join project_paper_filing ppf on ppf.project_id = a.id
+		left join project_approval_signature pas on pas.project_id = a.id
+		left join project_report_signature prs on prs.project_id = a.id
+		left join project_report_signature_info prsi on prsi.project_report_id = prd.number
+		<where>
+			sodi.year = #{statementCompanyComprehensiveInfo.year}
+			and sodi.type = #{statementCompanyComprehensiveInfo.type}
+			and sodi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
+			and sodi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
+			and sodi.office_id = #{statementCompanyComprehensiveInfo.officeId}
+			and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+			<if test="statementCompanyComprehensiveInfo.field5 != null and statementCompanyComprehensiveInfo.field5 != ''">
+				and a.record_state = 6
+				and a.over_record_status = 1
+				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+			</if>
+			<if test="statementCompanyComprehensiveInfo.field6 != null and statementCompanyComprehensiveInfo.field6 != ''">
+				and a.record_state = 7
+				and a.over_record_status = 1
+				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+				and rprr.status = 5
+				and rprr.del_flag = 0
+				and rprr.accomplish_date >= #{beginDate}
+				and rprr.accomplish_date &lt;= #{endDate}
+			</if>
+			<if test="statementCompanyComprehensiveInfo.field7 != null and statementCompanyComprehensiveInfo.field7 != ''">
+				and a.reported_state = 6
+				and a.over_due_status = 1
+				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+			</if>
+			<if test="statementCompanyComprehensiveInfo.field8 != null and statementCompanyComprehensiveInfo.field8 != ''">
+				and a.reported_state = 7
+				and a.over_due_status = 1
+				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+				and rprr.report_status = 5
+				and rprr.del_flag = 0
+				and rprr.accomplish_date >= #{beginDate}
+				and rprr.accomplish_date &lt;= #{endDate}
+			</if>
+
+			<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
+				AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
+			</if>
+			<if test="ruralProjectRecords.projectName != null and ruralProjectRecords.projectName != ''">
+				AND a.project_name like concat(concat('%',#{ruralProjectRecords.projectName}),'%')
+			</if>
+			<if test="ruralProjectRecords.scaleType != null and ruralProjectRecords.scaleType != ''">
+				AND a.scale_type = #{ruralProjectRecords.scaleType}
+			</if>
+			<if test="ruralProjectRecords.scaleUnit != null and ruralProjectRecords.scaleUnit != ''">
+				AND a.scale_unit = #{ruralProjectRecords.scaleUnit}
+			</if>
+			<if test="ruralProjectRecords.scaleQuantity != null and ruralProjectRecords.scaleQuantity != ''">
+				AND a.scale_quantity = #{ruralProjectRecords.scaleQuantity}
+			</if>
+			<if test="ruralProjectRecords.projectSite != null and ruralProjectRecords.projectSite != ''">
+				AND a.project_site LIKE concat('%',#{ruralProjectRecords.projectSite},'%')
+			</if>
+			<if test="ruralProjectRecords.remarks != null and ruralProjectRecords.remarks != ''">
+				AND a.remarks LIKE concat('%',#{ruralProjectRecords.remarks},'%')
+			</if>
+			<if test="ruralProjectRecords.projectDesc != null and ruralProjectRecords.projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{ruralProjectRecords.projectDesc},'%')
+			</if>
+			<if test="ruralProjectRecords.area != null and ruralProjectRecords.area.id != null and ruralProjectRecords.area.id != ''">
+				AND a.area_id = #{ruralProjectRecords.area.id}
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.name !=null and ruralProjectRecords.workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{ruralProjectRecords.workContractInfo.name}),'%')
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractNum !=null and ruralProjectRecords.workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{ruralProjectRecords.workContractInfo.contractNum}),'%')
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractPrice !=null and ruralProjectRecords.workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{ruralProjectRecords.workContractInfo.contractPrice}
+			</if>
+			<if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractType !=null and ruralProjectRecords.workContractInfo.contractType !=''">
+				AND wci.contract_type = #{ruralProjectRecords.workContractInfo.contractType}
+			</if>
+			<if test="ruralProjectRecords.workContractInfo!=null and ruralProjectRecords.workContractInfo.client !=null and ruralProjectRecords.workContractInfo.client.name !=null and ruralProjectRecords.workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{ruralProjectRecords.workContractInfo.client.name}),'%')
+			</if>
+			<if test="ruralProjectRecords.leaderNameStr !=null and ruralProjectRecords.leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{ruralProjectRecords.leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+			</if>
+			<if test="ruralProjectRecords.projectStatus !=null">
+				AND a.status = #{ruralProjectRecords.projectStatus}
+			</if>
+			<if test="ruralProjectRecords.beginDate !=null">
+				AND a.create_date >= #{ruralProjectRecords.beginDate}
+			</if>
+			<if test="ruralProjectRecords.endDate !=null">
+				AND a.create_date &lt; #{ruralProjectRecords.endDate}
+			</if>
+			<if test="ruralProjectRecords.projectType !=null and ruralProjectRecords.projectType !=''">
+				and project_type= #{ruralProjectRecords.projectType}
+			</if>
+			<if test="ruralProjectRecords.engineeringType !=null and ruralProjectRecords.engineeringType !=''">
+				and a.engineering_type= #{ruralProjectRecords.engineeringType}
+			</if>
+			<!--<if test="office!=null and office.id!=null and office.id!=''">
+				and  a.office_id = #{office.id}
+			</if>-->
+			<if test="ruralProjectRecords.officeIdList!=null and ruralProjectRecords.officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{ruralProjectRecords.officeId}
+				</foreach>
+			</if>
+
+			<if test="ruralProjectRecords.reportData!=null and ruralProjectRecords.reportData.number !=null and ruralProjectRecords.reportData.number !=''">
+				and prd.number like concat('%',#{ruralProjectRecords.reportData.number},'%')
+			</if>
+			<if test="ruralProjectRecords.filingProjectStatus!=null and ruralProjectRecords.filingProjectStatus !=''">
+				and pfp.status =${ruralProjectRecords.filingProjectStatus}
+			</if>
+			<if test="ruralProjectRecords.submitMoney!=null and ruralProjectRecords.submitMoney !=''">
+				and a.submit_money =#{ruralProjectRecords.submitMoney}
+			</if>
+			<if test="ruralProjectRecords.createBy !=null and ruralProjectRecords.createBy !=''">
+				<if test="ruralProjectRecords.createBy.name !=null and ruralProjectRecords.createBy.name !=''">
+					AND sua.name like concat(concat('%',#{ruralProjectRecords.createBy.name}),'%')
+				</if>
+			</if>
+			<if test="ruralProjectRecords.office!=null and ruralProjectRecords.office.name!=null and ruralProjectRecords.office.name!=''">
+				AND o.name like concat(concat('%',#{ruralProjectRecords.office.name}),'%')
+			</if>
+			<if test="ruralProjectRecords.sqlMap.delFlag !=null and ruralProjectRecords.sqlMap.delFlag!=''">
+				${ruralProjectRecords.sqlMap.delFlag}
+			</if>
+			<if test="ruralProjectRecords.sqlMap.dsf !=null and ruralProjectRecords.sqlMap.dsf!=''">
+				AND ((w1.user_id = #{ruralProjectRecords.currentUser.id} AND w1.del_flag='0' AND a.company_id = #{ruralProjectRecords.currentUser.company.id} )${ruralProjectRecords.sqlMap.dsf} )
+			</if>
+		</where>
+		GROUP BY a.id
+		<choose>
+			<when test="ruralProjectRecords.page !=null and ruralProjectRecords.page.orderBy != null and ruralProjectRecords.page.orderBy != ''">
+				ORDER BY ${ruralProjectRecords.page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+		limit ${ruralProjectRecords.page.pageNo},${ruralProjectRecords.page.pageSize}
+	</select>
+
+	<select id="selectDepartmentReportPageOverdueCount" resultType="integer">
+		select
+		count(DISTINCT id)
+		from statement_office_data_info
+		<where>
+			year = #{year}
+			and type = #{type}
+			and big_date_type = #{bigDateType}
+			and small_date_type = #{smallDateType}
+			and office_id = #{officeId}
+			and user_id = #{userId}
+			<if test="field5 != null and field5 != ''">
+				and field1 IS NOT NULL and field1 != ''
+			</if>
+			<if test="field6 != null and field6 != ''">
+				and field2 IS NOT NULL and field2 != ''
+			</if>
+			<if test="field7 != null and field7 != ''">
+				and field3 IS NOT NULL and field3 != ''
+			</if>
+			<if test="field8 != null and field8 != ''">
+				and field4 IS NOT NULL and field4 != ''
+			</if>
+		</where>
+	</select>
 </mapper>

+ 27 - 0
src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml

@@ -717,4 +717,31 @@
 		and year = #{year}
 		and small_date_type = #{smallDateType}
 	</select>
+
+	<select id="selectAllByOfficeId" parameterType="StatementCompanyComprehensiveInfo" resultType="StatementCompanyComprehensiveInfo">
+		SELECT
+			su.NAME userName,
+			so.NAME officeName,
+			a.*
+		FROM
+				statement_office_comprehensive_info a
+				LEFT JOIN sys_user su ON su.id = a.user_id
+				LEFT JOIN sys_office so ON a.office_id = so.id
+				<if test="type == '1'.toString()">
+					left join statement_office_info soi on a.office_id = soi.office_id
+				</if>
+		WHERE
+			a.type = #{type}
+		  and big_date_type =#{bigDateType}
+		  and small_date_type = #{smallDateType}
+		  and a.year = #{year}
+		  and a.del_flag = 0
+		  AND (
+				a.office_id = #{officeId}
+				OR a.office_parent_ids LIKE concat( '%', #{officeId}, '%' )
+		      )
+		ORDER BY
+			a.office_id,
+			a.user_id
+	</select>
 </mapper>

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

@@ -1513,7 +1513,7 @@
 		<where>
 			a.del_flag=0
 			and a.contract_state = 5
-			and a.office_id in(select id  from sys_office where id = #{officeId} or parent_ids like concat('%',#{officeId},'%'))
+			and a.office_id in(select id  from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
 			and a.accomplish_date >= #{beginDate}
 			and a.accomplish_date &lt;= #{endDate}
 
@@ -1600,7 +1600,7 @@
 		<where>
 			a.del_flag=0
 			and a.contract_state = 5
-			and a.office_id in(select id  from sys_office where id = #{officeId} or parent_ids like concat('%',#{officeId},'%'))
+			and a.office_id in(select id  from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
 			and a.accomplish_date >= #{beginDate}
 			and a.accomplish_date &lt;= #{endDate}
 
@@ -1854,4 +1854,425 @@
 			</if>
 		</where>
 	</select>
+
+	<select id="findDepartmentContractStatementPage" resultType="WorkContractInfo">
+		SELECT
+		a.id AS "id",
+		u.name AS "createBy.name",
+		u.name AS "createUser",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.remarks AS "remarks",
+		a.client_id AS "client.id",
+		a.contract_date AS "contractDate",
+		a.effective_date AS "effectiveDate",
+		a.closing_date AS "closingDate",
+		a.name AS "name",
+		a.contract_num_path AS "contractNumPath",
+		a.create_name AS "createName",
+		a.contract_category AS "contractCategory",
+		a.contract_num AS "contractNum",
+		a.contract_price AS "contractPrice",
+		a.contract_opposite AS "contractOpposite",
+		a.contract_type AS "contractType",
+		a.contract_fee AS "contractFee",
+		a.contract_special AS "contractSpecial",
+		a.contract_state AS "contractState",
+		a.office_id AS "chargeCompany",
+		a.charge_company_name AS "chargeCompanyName",
+		a.contract_file_id AS "contractFileId",
+		a.contract_role AS "contractRole",
+		a.apply_view AS "applyView",
+		a.process_instance_id AS "processInstanceId",
+		a.company_id as companyId,
+		a.contractFeeDoc AS "contractFeeDoc",
+		a.contractTypeDoc AS "contractTypeDoc",
+		a.another_contract_num AS "anotherContractNum",
+		client.name AS "client.name",
+		client.name as "clientName",
+		a.is_total AS "isTotal",
+		a.total_contract_id AS "totalContractId",
+		a.status AS "status",
+		a.investment_scale AS "investmentScale",
+		a.summary_payment AS "summaryPayment",
+		a.investment_amount AS "investmentAmount",
+		a.create_bys AS "createBys",
+		a.construction_project_type AS "constructionProjectType",
+		a.invalidate_process_instance_id AS "invalidateProcessInstanceId",
+		a.alter_process_instance_id AS "alterProcessInstanceId",
+		a.invalidate_status AS "invalidateStatus",
+		a.invalidate_user AS "invalidateUserId",
+		a.alter_state AS "alterState",
+		a.alter_sign AS "alterSign",
+		a.record_state AS "recordState",
+		a.alterbefore_id AS "alterBeforeId",
+		a.completion_status AS "completionStatus",
+		a.common_flag AS "commonFlag",
+		a.signature_status as "signatureStatus",
+		a.charge_criterion as "chargeCriterion",
+		a.other_details as "otherDetails",
+		a.contract_information AS "contractInformation",
+		(CASE a.contract_information
+		WHEN '0' THEN '金额合同'
+		WHEN '1' THEN '费率合同'
+		ELSE '' END) as "contractInformationStr",
+		ifnull(wcr.status,0) as "contrractRecordStatus",
+		ifnull(wcr.file_num,"") as "recordNum",
+		wcr.id as "contrractRecordId",
+		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
+		<where>
+			a.del_flag=0
+			and a.contract_state = 5
+			and a.office_id in(select id  from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
+			and a.accomplish_date >= #{beginDate}
+			and a.accomplish_date &lt;= #{endDate}
+			and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+
+			<if test="contractRecordState != null and contractRecordState != ''">
+				and a.contract_record_state = 5
+				and a.over_due_status = 0
+			</if>
+
+			and (a.alter_state is null or a.alter_state ="")
+			<if test="workContractInfo.id != null and workContractInfo.id != ''">
+				AND a.id = #{workContractInfo.id}
+			</if>
+			<if test="workContractInfo.client != null and workContractInfo.client.id != null and workContractInfo.client.id != ''">
+				AND a.client_id = #{workContractInfo.client.id}
+			</if>
+			<if test="workContractInfo.client != null and workContractInfo.client.name != null and workContractInfo.client.name != ''">
+				AND client.name LIKE concat('%',#{workContractInfo.client.name},'%')
+			</if>
+			<if test="workContractInfo.beginContractDate != null and workContractInfo.endContractDate != null and workContractInfo.beginContractDate != '' and workContractInfo.endContractDate != ''">
+				AND a.contract_date BETWEEN #{workContractInfo.beginContractDate} AND #{workContractInfo.endContractDate}
+			</if>
+			<if test="workContractInfo.name != null and workContractInfo.name != ''">
+				AND a.name LIKE
+				<if test="workContractInfo.dbName == 'oracle'">'%'||#{workContractInfo.name}||'%'</if>
+				<if test="workContractInfo.dbName == 'mssql'">'%'+#{workContractInfo.name}+'%'</if>
+				<if test="workContractInfo.dbName == 'mysql'">concat('%',#{workContractInfo.name},'%')</if>
+			</if>
+			<if test="workContractInfo.totalContractIds != null and workContractInfo.totalContractIds != ''">
+				AND a.total_contract_ids LIKE
+				<if test="workContractInfo.dbName == 'oracle'">'%'||#{workContractInfo.totalContractIds}||'%'</if>
+				<if test="workContractInfo.dbName == 'mssql'">'%'+#{workContractInfo.totalContractIds}+'%'</if>
+				<if test="workContractInfo.dbName == 'mysql'">concat('%',#{workContractInfo.totalContractIds},'%')</if>
+			</if>
+			<!--<if test="totalContractId != null and totalContractId != ''">
+				AND a.total_contract_id =#{totalContractId}
+			</if>-->
+			<if test="workContractInfo.beginInvestmentAmount != null and workContractInfo.endInvestmentAmount != null and workContractInfo.beginInvestmentAmount != '' and workContractInfo.endInvestmentAmount != ''">
+				AND a.investment_amount &gt;= #{workContractInfo.beginInvestmentAmount} AND a.investment_amount &lt;= #{workContractInfo.endInvestmentAmount}
+			</if>
+			<if test="workContractInfo.beginContractPrice != null and workContractInfo.endContractPrice != null and workContractInfo.beginContractPrice != '' and workContractInfo.endContractPrice != ''">
+				AND a.contract_price &gt;= #{workContractInfo.beginContractPrice} AND a.contract_price &lt;= #{workContractInfo.endContractPrice}
+			</if>
+			<!--			<if test="contractPrice != '' and contractPrice != null">-->
+			<!--				AND a.contract_price like concat('%',#{contractPrice},'%')-->
+			<!--			</if>-->
+			<if test="workContractInfo.contractState != null and workContractInfo.contractState != ''">
+				AND a.contract_state = #{workContractInfo.contractState}
+			</if>
+			<if test="workContractInfo.contractNum != null and workContractInfo.contractNum!= ''">
+				AND a.contract_num like  concat('%',#{workContractInfo.contractNum},'%')
+			</if>
+			<if test="workContractInfo.isTotal != null and workContractInfo.isTotal != ''">
+				AND a.is_total = #{workContractInfo.isTotal}
+			</if>
+			<if test="workContractInfo.contrractRecordStatus != null and workContractInfo.contrractRecordStatus != ''">
+				<choose>
+					<when test="workContractInfo.contrractRecordStatus == 0">
+						AND wcr.status is null
+					</when>
+					<otherwise>
+						AND wcr.status = #{workContractInfo.contrractRecordStatus}
+					</otherwise>
+				</choose>
+			</if>
+			AND a.company_id = #{workContractInfo.currentUser.company.id} ${workContractInfo.sqlMap.dsf}
+		</where>
+		<choose>
+			<when test="workContractInfo.page !=null and workContractInfo.page.orderBy != null and workContractInfo.page.orderBy != ''">
+				ORDER BY ${workContractInfo.page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.create_date DESC
+			</otherwise>
+		</choose>
+		limit ${workContractInfo.page.pageNo},${workContractInfo.page.pageSize}
+	</select>
+
+	<select id="findDepartmentContractStatementPageCount" resultType="integer">
+		SELECT
+		count(DISTINCT a.id)
+		FROM work_contract_info a
+		<include refid="workContractInfoJoins"/>
+		left join work_contract_record wcr on wcr.contract_info_id = a.id
+		<where>
+			a.del_flag=0
+			and a.contract_state = 5
+			and a.office_id in(select id  from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
+			and a.accomplish_date >= #{beginDate}
+			and a.accomplish_date &lt;= #{endDate}
+			and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+
+			<if test="contractRecordState != null and contractRecordState != ''">
+				and a.contract_record_state = 5
+				and a.over_due_status = 0
+			</if>
+
+			and (a.alter_state is null or a.alter_state ="")
+			<if test="workContractInfo.id != null and workContractInfo.id != ''">
+				AND a.id = #{workContractInfo.id}
+			</if>
+			<if test="workContractInfo.client != null and workContractInfo.client.id != null and workContractInfo.client.id != ''">
+				AND a.client_id = #{workContractInfo.client.id}
+			</if>
+			<if test="workContractInfo.client != null and workContractInfo.client.name != null and workContractInfo.client.name != ''">
+				AND client.name LIKE concat('%',#{workContractInfo.client.name},'%')
+			</if>
+			<if test="workContractInfo.beginContractDate != null and workContractInfo.endContractDate != null and workContractInfo.beginContractDate != '' and workContractInfo.endContractDate != ''">
+				AND a.contract_date BETWEEN #{workContractInfo.beginContractDate} AND #{workContractInfo.endContractDate}
+			</if>
+			<if test="workContractInfo.name != null and workContractInfo.name != ''">
+				AND a.name LIKE
+				<if test="workContractInfo.dbName == 'oracle'">'%'||#{workContractInfo.name}||'%'</if>
+				<if test="workContractInfo.dbName == 'mssql'">'%'+#{workContractInfo.name}+'%'</if>
+				<if test="workContractInfo.dbName == 'mysql'">concat('%',#{workContractInfo.name},'%')</if>
+			</if>
+			<if test="workContractInfo.totalContractIds != null and workContractInfo.totalContractIds != ''">
+				AND a.total_contract_ids LIKE
+				<if test="workContractInfo.dbName == 'oracle'">'%'||#{workContractInfo.totalContractIds}||'%'</if>
+				<if test="workContractInfo.dbName == 'mssql'">'%'+#{workContractInfo.totalContractIds}+'%'</if>
+				<if test="workContractInfo.dbName == 'mysql'">concat('%',#{workContractInfo.totalContractIds},'%')</if>
+			</if>
+			<!--<if test="totalContractId != null and totalContractId != ''">
+				AND a.total_contract_id =#{totalContractId}
+			</if>-->
+			<if test="workContractInfo.beginInvestmentAmount != null and workContractInfo.endInvestmentAmount != null and workContractInfo.beginInvestmentAmount != '' and workContractInfo.endInvestmentAmount != ''">
+				AND a.investment_amount &gt;= #{workContractInfo.beginInvestmentAmount} AND a.investment_amount &lt;= #{workContractInfo.endInvestmentAmount}
+			</if>
+			<if test="workContractInfo.beginContractPrice != null and workContractInfo.endContractPrice != null and workContractInfo.beginContractPrice != '' and workContractInfo.endContractPrice != ''">
+				AND a.contract_price &gt;= #{workContractInfo.beginContractPrice} AND a.contract_price &lt;= #{workContractInfo.endContractPrice}
+			</if>
+			<!--			<if test="contractPrice != '' and contractPrice != null">-->
+			<!--				AND a.contract_price like concat('%',#{contractPrice},'%')-->
+			<!--			</if>-->
+			<if test="workContractInfo.contractState != null and workContractInfo.contractState != ''">
+				AND a.contract_state = #{workContractInfo.contractState}
+			</if>
+			<if test="workContractInfo.contractNum != null and workContractInfo.contractNum!= ''">
+				AND a.contract_num like  concat('%',#{workContractInfo.contractNum},'%')
+			</if>
+			<if test="workContractInfo.isTotal != null and workContractInfo.isTotal != ''">
+				AND a.is_total = #{workContractInfo.isTotal}
+			</if>
+			<if test="workContractInfo.contrractRecordStatus != null and workContractInfo.contrractRecordStatus != ''">
+				<choose>
+					<when test="workContractInfo.contrractRecordStatus == 0">
+						AND wcr.status is null
+					</when>
+					<otherwise>
+						AND wcr.status = #{workContractInfo.contrractRecordStatus}
+					</otherwise>
+				</choose>
+			</if>
+			AND a.company_id = #{workContractInfo.currentUser.company.id} ${workContractInfo.sqlMap.dsf}
+		</where>
+	</select>
+
+	<select id="findDepartmentContractStatementPageOverdue" resultType="WorkContractInfo">
+		SELECT
+		a.id AS "id",
+		u.name AS "createBy.name",
+		u.name AS "createUser",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.remarks AS "remarks",
+		a.client_id AS "client.id",
+		a.contract_date AS "contractDate",
+		a.effective_date AS "effectiveDate",
+		a.closing_date AS "closingDate",
+		a.name AS "name",
+		a.contract_num_path AS "contractNumPath",
+		a.create_name AS "createName",
+		a.contract_category AS "contractCategory",
+		a.contract_num AS "contractNum",
+		a.contract_price AS "contractPrice",
+		a.contract_opposite AS "contractOpposite",
+		a.contract_type AS "contractType",
+		a.contract_fee AS "contractFee",
+		a.contract_special AS "contractSpecial",
+		a.contract_state AS "contractState",
+		a.office_id AS "chargeCompany",
+		a.charge_company_name AS "chargeCompanyName",
+		a.contract_file_id AS "contractFileId",
+		a.contract_role AS "contractRole",
+		a.apply_view AS "applyView",
+		a.process_instance_id AS "processInstanceId",
+		a.company_id as companyId,
+		a.contractFeeDoc AS "contractFeeDoc",
+		a.contractTypeDoc AS "contractTypeDoc",
+		a.another_contract_num AS "anotherContractNum",
+		client.name AS "client.name",
+		client.name as "clientName",
+		a.is_total AS "isTotal",
+		a.total_contract_id AS "totalContractId",
+		a.status AS "status",
+		a.investment_scale AS "investmentScale",
+		a.summary_payment AS "summaryPayment",
+		a.investment_amount AS "investmentAmount",
+		a.create_bys AS "createBys",
+		a.construction_project_type AS "constructionProjectType",
+		a.invalidate_process_instance_id AS "invalidateProcessInstanceId",
+		a.alter_process_instance_id AS "alterProcessInstanceId",
+		a.invalidate_status AS "invalidateStatus",
+		a.invalidate_user AS "invalidateUserId",
+		a.alter_state AS "alterState",
+		a.alter_sign AS "alterSign",
+		a.record_state AS "recordState",
+		a.alterbefore_id AS "alterBeforeId",
+		a.completion_status AS "completionStatus",
+		a.common_flag AS "commonFlag",
+		a.signature_status as "signatureStatus",
+		a.charge_criterion as "chargeCriterion",
+		a.other_details as "otherDetails",
+		a.contract_information AS "contractInformation",
+		(CASE a.contract_information
+		WHEN '0' THEN '金额合同'
+		WHEN '1' THEN '费率合同'
+		ELSE '' END) as "contractInformationStr",
+		ifnull(wcr.status,0) as "contrractRecordStatus",
+		ifnull(wcr.file_num,"") as "recordNum",
+		wcr.id as "contrractRecordId",
+		a.describe_content AS "describeContent",
+		o.name as "createUserOfficeName"
+		FROM statement_office_data_info sodi
+		<if test="statementCompanyComprehensiveInfo.field3 != null and statementCompanyComprehensiveInfo.field3 != ''">
+			left join work_contract_info a on a.id = sodi.field1
+		</if>
+		<if test="statementCompanyComprehensiveInfo.field4 != null and statementCompanyComprehensiveInfo.field4 != ''">
+			left join work_contract_info a on a.id = sodi.field2
+		</if>
+		<include refid="workContractInfoJoins"/>
+		left join work_contract_record wcr on wcr.contract_info_id = a.id
+		<where>
+			sodi.year = #{statementCompanyComprehensiveInfo.year}
+			and sodi.type = #{statementCompanyComprehensiveInfo.type}
+			and sodi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
+			and sodi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
+			and sodi.office_id = #{officeIdd}
+			and a.contract_state = 5
+			and a.office_id in(select id  from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
+			and a.over_due_status = 1
+			and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+
+			<if test="statementCompanyComprehensiveInfo.field3 != null and statementCompanyComprehensiveInfo.field3 != ''">
+				and a.contract_record_state = 6
+			</if>
+
+			<if test="statementCompanyComprehensiveInfo.field4 != null and statementCompanyComprehensiveInfo.field4 != ''">
+				and a.contract_record_state = 7
+				and a.accomplish_date >= #{beginDate}
+				and a.accomplish_date &lt;= #{endDate}
+			</if>
+
+			and (a.alter_state is null or a.alter_state ="")
+			<if test="workContractInfo.id != null and workContractInfo.id != ''">
+				AND a.id = #{workContractInfo.id}
+			</if>
+			<if test="workContractInfo.client != null and workContractInfo.client.id != null and workContractInfo.client.id != ''">
+				AND a.client_id = #{workContractInfo.client.id}
+			</if>
+			<if test="workContractInfo.client != null and workContractInfo.client.name != null and workContractInfo.client.name != ''">
+				AND client.name LIKE concat('%',#{workContractInfo.client.name},'%')
+			</if>
+			<if test="workContractInfo.beginContractDate != null and workContractInfo.endContractDate != null and workContractInfo.beginContractDate != '' and workContractInfo.endContractDate != ''">
+				AND a.contract_date BETWEEN #{workContractInfo.beginContractDate} AND #{workContractInfo.endContractDate}
+			</if>
+			<if test="workContractInfo.name != null and workContractInfo.name != ''">
+				AND a.name LIKE
+				<if test="workContractInfo.dbName == 'oracle'">'%'||#{workContractInfo.name}||'%'</if>
+				<if test="workContractInfo.dbName == 'mssql'">'%'+#{workContractInfo.name}+'%'</if>
+				<if test="workContractInfo.dbName == 'mysql'">concat('%',#{workContractInfo.name},'%')</if>
+			</if>
+			<if test="workContractInfo.totalContractIds != null and workContractInfo.totalContractIds != ''">
+				AND a.total_contract_ids LIKE
+				<if test="workContractInfo.dbName == 'oracle'">'%'||#{workContractInfo.totalContractIds}||'%'</if>
+				<if test="workContractInfo.dbName == 'mssql'">'%'+#{workContractInfo.totalContractIds}+'%'</if>
+				<if test="workContractInfo.dbName == 'mysql'">concat('%',#{workContractInfo.totalContractIds},'%')</if>
+			</if>
+			<!--<if test="totalContractId != null and totalContractId != ''">
+				AND a.total_contract_id =#{totalContractId}
+			</if>-->
+			<if test="workContractInfo.beginInvestmentAmount != null and workContractInfo.endInvestmentAmount != null and workContractInfo.beginInvestmentAmount != '' and workContractInfo.endInvestmentAmount != ''">
+				AND a.investment_amount &gt;= #{workContractInfo.beginInvestmentAmount} AND a.investment_amount &lt;= #{workContractInfo.endInvestmentAmount}
+			</if>
+			<if test="workContractInfo.beginContractPrice != null and workContractInfo.endContractPrice != null and workContractInfo.beginContractPrice != '' and workContractInfo.endContractPrice != ''">
+				AND a.contract_price &gt;= #{workContractInfo.beginContractPrice} AND a.contract_price &lt;= #{workContractInfo.endContractPrice}
+			</if>
+			<!--			<if test="contractPrice != '' and contractPrice != null">-->
+			<!--				AND a.contract_price like concat('%',#{contractPrice},'%')-->
+			<!--			</if>-->
+			<if test="workContractInfo.contractState != null and workContractInfo.contractState != ''">
+				AND a.contract_state = #{workContractInfo.contractState}
+			</if>
+			<if test="workContractInfo.contractNum != null and workContractInfo.contractNum!= ''">
+				AND a.contract_num like  concat('%',#{workContractInfo.contractNum},'%')
+			</if>
+			<if test="workContractInfo.isTotal != null and workContractInfo.isTotal != ''">
+				AND a.is_total = #{workContractInfo.isTotal}
+			</if>
+			<if test="workContractInfo.contrractRecordStatus != null and workContractInfo.contrractRecordStatus != ''">
+				<choose>
+					<when test="workContractInfo.contrractRecordStatus == 0">
+						AND wcr.status is null
+					</when>
+					<otherwise>
+						AND wcr.status = #{workContractInfo.contrractRecordStatus}
+					</otherwise>
+				</choose>
+			</if>
+			AND a.company_id = #{workContractInfo.currentUser.company.id} ${workContractInfo.sqlMap.dsf}
+		</where>
+		<choose>
+			<when test="workContractInfo.page !=null and workContractInfo.page.orderBy != null and workContractInfo.page.orderBy != ''">
+				ORDER BY ${workContractInfo.page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.create_date DESC
+			</otherwise>
+		</choose>
+		limit ${workContractInfo.page.pageNo},${workContractInfo.page.pageSize}
+	</select>
+
+	<select id="findDepartmentContractStatementPageOverdueCount" resultType="integer">
+		select
+		count(DISTINCT id)
+		from statement_office_data_info
+		<where>
+			year = #{year}
+			and type = #{type}
+			and big_date_type = #{bigDateType}
+			and small_date_type = #{smallDateType}
+			and office_id = #{officeId}
+			and user_id = #{userId}
+			<if test="field3 != null and field3 != ''">
+				and field1 IS NOT NULL and field1 != ''
+			</if>
+			<if test="field4 != null and field4 != ''">
+				and field2 IS NOT NULL and field2 != ''
+			</if>
+		</where>
+	</select>
 </mapper>

+ 309 - 0
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -1750,4 +1750,313 @@
 			${WorkInvoice.sqlMap.dsf}
 		</where>
 	</select>
+
+	<select id="findDepartmentBillingReportPage" resultType="WorkInvoice" >
+		SELECT
+		<include refid="workInvoiceColumns"/>
+		,wid.number as "widNumber"
+		,wid.total_money as "widTotalMoney"
+		FROM work_invoice a
+		<include refid="workInvoiceJoins"/>
+		left join work_invoice_detail wid on a.id = wid.invoice_id
+		LEFT JOIN sys_user sua ON sua.id = a.account_checking_user_id
+		<where>
+			a.del_flag=0
+			and a.invoice_state = 5
+			and a.office_id in(select id  from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
+			and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+			<if test="newlyAdded != null and newlyAdded != ''">
+				and a.invoice_date >= #{beginDate}
+				and a.invoice_date &lt;= #{endDate}
+			</if>
+			<if test="collectionThisMonth != null and collectionThisMonth != ''">
+				and wid.del_flag=0
+				and a.receipt_money = '1'
+				and a.receipt_money_date >= #{beginDate}
+				and a.receipt_money_date &lt;= #{endDate}
+			</if>
+
+			<if test="WorkInvoice.number != null and WorkInvoice.number != ''">
+				AND a.number LIKE
+				<if test="WorkInvoice.dbName == 'oracle'">'%'||#{WorkInvoice.number}||'%'</if>
+				<if test="WorkInvoice.dbName == 'mssql'">'%'+#{WorkInvoice.number}+'%'</if>
+				<if test="WorkInvoice.dbName == 'mysql'">concat('%',#{WorkInvoice.number},'%')</if>
+			</if>
+			<if test="WorkInvoice.invoiceState != null and WorkInvoice.invoiceState != ''">
+				AND a.invoice_state = #{WorkInvoice.invoiceState}
+			</if>
+			<if test="WorkInvoice.beginContractDate != null and WorkInvoice.endContractDate != null and WorkInvoice.beginContractDate != '' and WorkInvoice.endContractDate != ''">
+				AND a.create_date BETWEEN #{WorkInvoice.beginContractDate} AND #{WorkInvoice.endContractDate}
+			</if>
+
+			<if test="WorkInvoice.receiptBeginDate != null and WorkInvoice.receiptBeginDate != ''">
+				AND date_format(a.receipt_money_date,'%Y-%m-%d') &gt;= date_format(#{WorkInvoice.receiptBeginDate},'%Y-%m-%d')
+			</if>
+			<if test="WorkInvoice.receiptEndDate != null and WorkInvoice.receiptEndDate != ''">
+				AND date_format(a.receipt_money_date,'%Y-%m-%d') &lt;= date_format(#{WorkInvoice.receiptEndDate},'%Y-%m-%d')
+			</if>
+
+			<if test="WorkInvoice.client != null and WorkInvoice.client.id != null and WorkInvoice.client.id != ''">
+				AND a.client_id = #{WorkInvoice.client.id}
+			</if>
+			<if test="WorkInvoice.project != null and WorkInvoice.project.id != null and WorkInvoice.project.id != ''">
+				AND a.project_id = #{WorkInvoice.project.id}
+			</if>
+			<if test="WorkInvoice.project != null and WorkInvoice.project.projectId != null and WorkInvoice.project.projectId != ''">
+				AND p.project_id LIKE
+				<if test="dbName == 'oracle'">'%'||#{WorkInvoice.project.projectId}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{WorkInvoice.project.projectId}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{WorkInvoice.project.projectId},'%')</if>
+			</if>
+			<if test="WorkInvoice.project != null and WorkInvoice.project.projectName != null and WorkInvoice.project.projectName != ''">
+				AND p.project_name LIKE
+				<if test="dbName == 'oracle'">'%'||#{WorkInvoice.project.projectName}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{WorkInvoice.project.projectName}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{WorkInvoice.project.projectName},'%')</if>
+			</if>
+			<if test="WorkInvoice.project != null and WorkInvoice.project.reportData != null and WorkInvoice.project.reportData.number != null and WorkInvoice.project.reportData.number != ''">
+				AND prd.number LIKE
+				<if test="dbName == 'oracle'">'%'||#{WorkInvoice.project.reportData.number}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{WorkInvoice.project.reportData.number}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{WorkInvoice.project.reportData.number},'%')</if>
+			</if>
+			<if test="WorkInvoice.client != null and WorkInvoice.client.name != null and WorkInvoice.client.name != ''">
+				AND w.name LIKE
+				<if test="dbName == 'oracle'">'%'||#{WorkInvoice.client.name}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{WorkInvoice.client.name}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{WorkInvoice.client.name},'%')</if>
+			</if>
+			<!--<if test="officeId != null and officeId != ''">
+				AND so.id  = #{officeId}
+			</if>-->
+			<if test="WorkInvoice.money != null and WorkInvoice.money != ''">
+				AND a.money = #{WorkInvoice.money}
+			</if>
+			<!--<if test="submitterId != null and submitterId != ''">
+				AND a.create_by = #{submitterId}
+			</if>-->
+			<if test="(WorkInvoice.submitterId != null and WorkInvoice.submitterId != '') or (WorkInvoice.submitterName != null and WorkInvoice.submitterName != '')">
+				AND (a.create_by = #{WorkInvoice.submitterId} or su.name like concat('%',#{WorkInvoice.submitterName},'%'))
+			</if>
+			<if test="WorkInvoice.receiptMoney != null and WorkInvoice.receiptMoney != ''">
+				AND a.receipt_money = #{WorkInvoice.receiptMoney}
+			</if>
+			<if test="WorkInvoice.invoiceType != null and WorkInvoice.invoiceType != ''">
+				AND a.invoice_type = #{WorkInvoice.invoiceType}
+			</if>
+			<if test="WorkInvoice.chargeType != null and WorkInvoice.chargeType != ''">
+				AND a.charge_type = #{WorkInvoice.chargeType}
+			</if>
+			<if test="WorkInvoice.content != null and WorkInvoice.content != ''">
+				AND a.content = #{WorkInvoice.content}
+			</if>
+			<if test="WorkInvoice.drawer != null and WorkInvoice.drawer.id != null and WorkInvoice.drawer.id != ''">
+				AND a.drawer_id = #{WorkInvoice.drawer.id}
+			</if>
+			<if test="WorkInvoice.companyId != null and WorkInvoice.companyId != ''">
+				AND a.company_id = #{WorkInvoice.companyId}
+			</if>
+			<!--<if test="office != null and office.id != null and office.id != ''">
+				AND a.office_id = #{office.id}
+			</if>-->
+			<!--			<if test="WorkInvoice.officeIdList!=null and WorkInvoice.officeIdList.size!=0">-->
+			<!--				and a.office_id in-->
+			<!--				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">-->
+			<!--					#{WorkInvoice.officeId}-->
+			<!--				</foreach>-->
+			<!--			</if>-->
+			<if test="WorkInvoice.invoiceNumber != null and WorkInvoice.invoiceNumber != ''">
+				AND a.invoice_number LIKE
+				<if test="WorkInvoice.dbName == 'oracle'">'%'||#{WorkInvoice.invoiceNumber}||'%'</if>
+				<if test="WorkInvoice.dbName == 'mssql'">'%'+#{WorkInvoice.invoiceNumber}+'%'</if>
+				<if test="WorkInvoice.dbName == 'mysql'">concat('%',#{WorkInvoice.invoiceNumber},'%')</if>
+			</if>
+			<if test="WorkInvoice.invoiceDate != null and WorkInvoice.invoiceDate != ''">
+				AND a.invoice_date = #{WorkInvoice.invoiceDate}
+			</if>
+			<if test="WorkInvoice.isInvoice != null and WorkInvoice.isInvoice != ''">
+				AND a.is_invoice = #{WorkInvoice.isInvoice}
+			</if>
+			<if test="WorkInvoice.isCharge != null and WorkInvoice.isCharge != ''">
+				AND a.is_charge = #{WorkInvoice.isCharge}
+			</if>
+			<if test="WorkInvoice.isInvalid != null and WorkInvoice.isInvalid != ''">
+				AND a.is_invalid = #{WorkInvoice.isInvalid}
+			</if>
+			<if test="WorkInvoice.area != null and WorkInvoice.area.id != null and WorkInvoice.area.id != ''">
+				AND a.area_parent_id LIKE
+				<if test="WorkInvoice.dbName == 'oracle'">'%'||#{WorkInvoice.area.id}||'%'</if>
+				<if test="WorkInvoice.dbName == 'mssql'">'%'+#{WorkInvoice.area.id}+'%'</if>
+				<if test="WorkInvoice.dbName == 'mysql'">concat('%',#{WorkInvoice.area.id},'%')</if>
+			</if>
+			<if test="(WorkInvoice.accountCheckingUserId != null and WorkInvoice.accountCheckingUserId != '') or (WorkInvoice.accountCheckingUserName != null and WorkInvoice.accountCheckingUserName != '')">
+				AND (a.account_checking_user_id = #{WorkInvoice.accountCheckingUserId} or sua.name like concat('%',#{WorkInvoice.accountCheckingUserName},'%'))
+			</if>
+			<if test="WorkInvoice.widNumber != null and WorkInvoice.widNumber != ''">
+				AND wid.number LIKE
+				<if test="WorkInvoice.dbName == 'oracle'">'%'||#{WorkInvoice.widNumber}||'%'</if>
+				<if test="WorkInvoice.dbName == 'mssql'">'%'+#{WorkInvoice.widNumber}+'%'</if>
+				<if test="WorkInvoice.dbName == 'mysql'">concat('%',#{WorkInvoice.widNumber},'%')</if>
+			</if>
+			${WorkInvoice.sqlMap.dsf}
+		</where>
+		<choose>
+			<when test="WorkInvoice.page !=null and WorkInvoice.page.orderBy != null and WorkInvoice.page.orderBy != ''">
+				ORDER BY ${WorkInvoice.page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.create_date DESC
+			</otherwise>
+		</choose>
+		limit ${WorkInvoice.page.pageNo},${WorkInvoice.page.pageSize}
+	</select>
+
+	<select id="findDepartmentBillingReportPageCount" resultType="integer" >
+		SELECT
+		count(DISTINCT a.id)
+		FROM work_invoice a
+		<include refid="workInvoiceJoins"/>
+		left join work_invoice_detail wid on a.id = wid.invoice_id
+		LEFT JOIN sys_user sua ON sua.id = a.account_checking_user_id
+		<where>
+			a.del_flag=0
+			and a.invoice_state = 5
+			and a.office_id in(select id  from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
+			and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+			<if test="newlyAdded != null and newlyAdded != ''">
+				and a.invoice_date >= #{beginDate}
+				and a.invoice_date &lt;= #{endDate}
+			</if>
+			<if test="collectionThisMonth != null and collectionThisMonth != ''">
+				and wid.del_flag=0
+				and a.receipt_money = '1'
+				and a.receipt_money_date >= #{beginDate}
+				and a.receipt_money_date &lt;= #{endDate}
+			</if>
+
+			<if test="WorkInvoice.number != null and WorkInvoice.number != ''">
+				AND a.number LIKE
+				<if test="WorkInvoice.dbName == 'oracle'">'%'||#{WorkInvoice.number}||'%'</if>
+				<if test="WorkInvoice.dbName == 'mssql'">'%'+#{WorkInvoice.number}+'%'</if>
+				<if test="WorkInvoice.dbName == 'mysql'">concat('%',#{WorkInvoice.number},'%')</if>
+			</if>
+			<if test="WorkInvoice.invoiceState != null and WorkInvoice.invoiceState != ''">
+				AND a.invoice_state = #{WorkInvoice.invoiceState}
+			</if>
+			<if test="WorkInvoice.beginContractDate != null and WorkInvoice.endContractDate != null and WorkInvoice.beginContractDate != '' and WorkInvoice.endContractDate != ''">
+				AND a.create_date BETWEEN #{WorkInvoice.beginContractDate} AND #{WorkInvoice.endContractDate}
+			</if>
+
+			<if test="WorkInvoice.receiptBeginDate != null and WorkInvoice.receiptBeginDate != ''">
+				AND date_format(a.receipt_money_date,'%Y-%m-%d') &gt;= date_format(#{WorkInvoice.receiptBeginDate},'%Y-%m-%d')
+			</if>
+			<if test="WorkInvoice.receiptEndDate != null and WorkInvoice.receiptEndDate != ''">
+				AND date_format(a.receipt_money_date,'%Y-%m-%d') &lt;= date_format(#{WorkInvoice.receiptEndDate},'%Y-%m-%d')
+			</if>
+
+			<if test="WorkInvoice.client != null and WorkInvoice.client.id != null and WorkInvoice.client.id != ''">
+				AND a.client_id = #{WorkInvoice.client.id}
+			</if>
+			<if test="WorkInvoice.project != null and WorkInvoice.project.id != null and WorkInvoice.project.id != ''">
+				AND a.project_id = #{WorkInvoice.project.id}
+			</if>
+			<if test="WorkInvoice.project != null and WorkInvoice.project.projectId != null and WorkInvoice.project.projectId != ''">
+				AND p.project_id LIKE
+				<if test="dbName == 'oracle'">'%'||#{WorkInvoice.project.projectId}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{WorkInvoice.project.projectId}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{WorkInvoice.project.projectId},'%')</if>
+			</if>
+			<if test="WorkInvoice.project != null and WorkInvoice.project.projectName != null and WorkInvoice.project.projectName != ''">
+				AND p.project_name LIKE
+				<if test="dbName == 'oracle'">'%'||#{WorkInvoice.project.projectName}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{WorkInvoice.project.projectName}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{WorkInvoice.project.projectName},'%')</if>
+			</if>
+			<if test="WorkInvoice.project != null and WorkInvoice.project.reportData != null and WorkInvoice.project.reportData.number != null and WorkInvoice.project.reportData.number != ''">
+				AND prd.number LIKE
+				<if test="dbName == 'oracle'">'%'||#{WorkInvoice.project.reportData.number}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{WorkInvoice.project.reportData.number}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{WorkInvoice.project.reportData.number},'%')</if>
+			</if>
+			<if test="WorkInvoice.client != null and WorkInvoice.client.name != null and WorkInvoice.client.name != ''">
+				AND w.name LIKE
+				<if test="dbName == 'oracle'">'%'||#{WorkInvoice.client.name}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{WorkInvoice.client.name}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{WorkInvoice.client.name},'%')</if>
+			</if>
+			<!--<if test="officeId != null and officeId != ''">
+				AND so.id  = #{officeId}
+			</if>-->
+			<if test="WorkInvoice.money != null and WorkInvoice.money != ''">
+				AND a.money = #{WorkInvoice.money}
+			</if>
+			<!--<if test="submitterId != null and submitterId != ''">
+				AND a.create_by = #{submitterId}
+			</if>-->
+			<if test="(WorkInvoice.submitterId != null and WorkInvoice.submitterId != '') or (WorkInvoice.submitterName != null and WorkInvoice.submitterName != '')">
+				AND (a.create_by = #{WorkInvoice.submitterId} or su.name like concat('%',#{WorkInvoice.submitterName},'%'))
+			</if>
+			<if test="WorkInvoice.receiptMoney != null and WorkInvoice.receiptMoney != ''">
+				AND a.receipt_money = #{WorkInvoice.receiptMoney}
+			</if>
+			<if test="WorkInvoice.invoiceType != null and WorkInvoice.invoiceType != ''">
+				AND a.invoice_type = #{WorkInvoice.invoiceType}
+			</if>
+			<if test="WorkInvoice.chargeType != null and WorkInvoice.chargeType != ''">
+				AND a.charge_type = #{WorkInvoice.chargeType}
+			</if>
+			<if test="WorkInvoice.content != null and WorkInvoice.content != ''">
+				AND a.content = #{WorkInvoice.content}
+			</if>
+			<if test="WorkInvoice.drawer != null and WorkInvoice.drawer.id != null and WorkInvoice.drawer.id != ''">
+				AND a.drawer_id = #{WorkInvoice.drawer.id}
+			</if>
+			<if test="WorkInvoice.companyId != null and WorkInvoice.companyId != ''">
+				AND a.company_id = #{WorkInvoice.companyId}
+			</if>
+			<!--<if test="office != null and office.id != null and office.id != ''">
+				AND a.office_id = #{office.id}
+			</if>-->
+			<!--			<if test="WorkInvoice.officeIdList!=null and WorkInvoice.officeIdList.size!=0">-->
+			<!--				and a.office_id in-->
+			<!--				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">-->
+			<!--					#{WorkInvoice.officeId}-->
+			<!--				</foreach>-->
+			<!--			</if>-->
+			<if test="WorkInvoice.invoiceNumber != null and WorkInvoice.invoiceNumber != ''">
+				AND a.invoice_number LIKE
+				<if test="WorkInvoice.dbName == 'oracle'">'%'||#{WorkInvoice.invoiceNumber}||'%'</if>
+				<if test="WorkInvoice.dbName == 'mssql'">'%'+#{WorkInvoice.invoiceNumber}+'%'</if>
+				<if test="WorkInvoice.dbName == 'mysql'">concat('%',#{WorkInvoice.invoiceNumber},'%')</if>
+			</if>
+			<if test="WorkInvoice.invoiceDate != null and WorkInvoice.invoiceDate != ''">
+				AND a.invoice_date = #{WorkInvoice.invoiceDate}
+			</if>
+			<if test="WorkInvoice.isInvoice != null and WorkInvoice.isInvoice != ''">
+				AND a.is_invoice = #{WorkInvoice.isInvoice}
+			</if>
+			<if test="WorkInvoice.isCharge != null and WorkInvoice.isCharge != ''">
+				AND a.is_charge = #{WorkInvoice.isCharge}
+			</if>
+			<if test="WorkInvoice.isInvalid != null and WorkInvoice.isInvalid != ''">
+				AND a.is_invalid = #{WorkInvoice.isInvalid}
+			</if>
+			<if test="WorkInvoice.area != null and WorkInvoice.area.id != null and WorkInvoice.area.id != ''">
+				AND a.area_parent_id LIKE
+				<if test="WorkInvoice.dbName == 'oracle'">'%'||#{WorkInvoice.area.id}||'%'</if>
+				<if test="WorkInvoice.dbName == 'mssql'">'%'+#{WorkInvoice.area.id}+'%'</if>
+				<if test="WorkInvoice.dbName == 'mysql'">concat('%',#{WorkInvoice.area.id},'%')</if>
+			</if>
+			<if test="(WorkInvoice.accountCheckingUserId != null and WorkInvoice.accountCheckingUserId != '') or (WorkInvoice.accountCheckingUserName != null and WorkInvoice.accountCheckingUserName != '')">
+				AND (a.account_checking_user_id = #{WorkInvoice.accountCheckingUserId} or sua.name like concat('%',#{WorkInvoice.accountCheckingUserName},'%'))
+			</if>
+			<if test="WorkInvoice.widNumber != null and WorkInvoice.widNumber != ''">
+				AND wid.number LIKE
+				<if test="WorkInvoice.dbName == 'oracle'">'%'||#{WorkInvoice.widNumber}||'%'</if>
+				<if test="WorkInvoice.dbName == 'mssql'">'%'+#{WorkInvoice.widNumber}+'%'</if>
+				<if test="WorkInvoice.dbName == 'mysql'">concat('%',#{WorkInvoice.widNumber},'%')</if>
+			</if>
+			${WorkInvoice.sqlMap.dsf}
+		</where>
+	</select>
 </mapper>

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

@@ -704,5 +704,203 @@
 
 	</select>
 
+	<select id="findDepartmentReimbursementReportPage" resultType="WorkReimbursement">
+		SELECT
+		<include refid="workReimbursementColumns"/>
+		,wa.reimbursement_name AS "submitterId"
+		,wa.money as "money"
+		,wa.project_radio as "workAccount.projectRadio"
+		,wa.reimburse_remarks as "workAccount.reimburseRemarks"
+		,wa.project_id as "workAccount.project.id"
+		,wrt.standard_detail as "workAccount.typeName"
+		,(select office_id from sys_user where id = wa.reimbursement_name) AS "officeId"
+		,(select soy.name from sys_user sux left join sys_office soy on soy.id = sux.office_id where sux.id = wa.reimbursement_name) AS "officeName"
+		,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=0
+			and a.status = 5
+			and a.office_id in(select id  from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
+			and a.accomplish_date >= #{beginDate}
+			and a.accomplish_date &lt;= #{endDate}
+			and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+
+			<if test="workReimbursement.id != null and workReimbursement.id != ''">
+				AND a.id = #{workReimbursement.id}
+			</if>
+			<if test="workReimbursement.project != null and workReimbursement.project.id != null and workReimbursement.project.id != ''">
+				AND wa.project_id = #{workReimbursement.project.id}
+			</if>
+			<if test="workReimbursement.project != null and workReimbursement.project.projectName != null and workReimbursement.project.projectName != ''">
+				AND (p.project_name  like concat('%',#{workReimbursement.project.projectName},'%') or wa.reimburse_remarks  like concat('%',#{workReimbursement.project.projectName},'%'))
+			</if>
+			<if test="workReimbursement.status != '' and workReimbursement.status != null">
+				AND a.status = #{workReimbursement.status}
+			</if>
+			<!--<if test="officeId != '' and officeId != null">
+                AND wa.office_id = #{officeId}
+            </if>-->
+			<!--				<if test="workReimbursement.officeIdList!=null and workReimbursement.officeIdList.size!=0">-->
+			<!--					and wa.office_id in-->
+			<!--					<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">-->
+			<!--						#{officeId}-->
+			<!--					</foreach>-->
+			<!--				</if>-->
+			<if test="workReimbursement.officeId == '' and workReimbursement.officeName!=null and workReimbursement.officeName!=''">
+				AND sob.name like concat('%',#{workReimbursement.officeName},'%')
+			</if>
+			<if test="workReimbursement.submitterDate != '' and workReimbursement.submitterDate != null">
+				AND a.submitter_date = #{workReimbursement.submitterDate}
+			</if>
+			<if test="workReimbursement.startDate != null and workReimbursement.startDate != ''">
+				AND a.submitter_date &gt;= #{workReimbursement.startDate}
+			</if>
+			<if test="workReimbursement.endDate != null and workReimbursement.endDate != ''">
+				AND a.submitter_date &lt;= #{workReimbursement.endDate}
+			</if>
+			<if test="workReimbursement.handleId != null and workReimbursement.handleId != ''">
+				AND a.submitter_id = #{workReimbursement.handleId}
+			</if>
+			<if test="workReimbursement.handleId == '' and workReimbursement.handleName != null and workReimbursement.handleName != ''">
+				AND su.name like concat('%',#{workReimbursement.handleName},'%')
+			</if>
+			<if test="workReimbursement.submitterId != null and workReimbursement.submitterId != ''">
+				AND wa.reimbursement_name = #{workReimbursement.submitterId}
+			</if>
+			<if test="workReimbursement.submitterId == '' and workReimbursement.submitterName != null and workReimbursement.submitterName != ''">
+				AND sub.name like concat('%',#{workReimbursement.submitterName},'%')
+			</if>
+			<if test="workReimbursement.businessType != null and workReimbursement.businessType != ''">
+				AND (wa.type = #{workReimbursement.businessType} or wa.type in (select id from work_reimbursement_type_info where parent_ids like concat('%',#{workReimbursement.businessTypeParentIds},'%')))
+			</if>
+			<if test="workReimbursement.businessType == '' and workReimbursement.businessTypeName!=null and workReimbursement.businessTypeName !=''">
+				AND wrt.standard_detail like concat('%',#{workReimbursement.businessTypeName},'%')
+			</if>
+			<if test="workReimbursement.projectName != null and workReimbursement.projectName != ''">
+				AND pd.number like concat('%',#{workReimbursement.projectName},'%')
+			</if>
+			<if test="workReimbursement.beginReimbursementPrice != '' and workReimbursement.beginReimbursementPrice != null">
+				AND a.money >= #{workReimbursement.beginReimbursementPrice}
+			</if>
+			<if test="workReimbursement.endReimbursementPrice != '' and workReimbursement.endReimbursementPrice != null">
+				AND a.money &lt;= #{workReimbursement.endReimbursementPrice}
+			</if>
+			<if test="workReimbursement.sqlMap.dsf !=null and workReimbursement.sqlMap.dsf!=''">
+				and (${workReimbursement.sqlMap.dsf}
+				or wa.reimbursement_name = #{workReimbursement.createBy.id})
+			</if>
+		</where>
+		<choose>
+			<when test="workReimbursement.page !=null and workReimbursement.page.orderBy != null and workReimbursement.page.orderBy != ''">
+				ORDER BY ${workReimbursement.page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+		limit ${workReimbursement.page.pageNo},${workReimbursement.page.pageSize}
+	</select>
+
+	<select id="findDepartmentReimbursementReportPageCount" resultType="integer">
+		SELECT
+		count(DISTINCT a.id)
+		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=0
+			and a.status = 5
+			and a.office_id in(select id  from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
+			and a.accomplish_date >= #{beginDate}
+			and a.accomplish_date &lt;= #{endDate}
+			and a.create_by = #{statementCompanyComprehensiveInfo.userId}
+
+			<if test="workReimbursement.id != null and workReimbursement.id != ''">
+				AND a.id = #{workReimbursement.id}
+			</if>
+			<if test="workReimbursement.project != null and workReimbursement.project.id != null and workReimbursement.project.id != ''">
+				AND wa.project_id = #{workReimbursement.project.id}
+			</if>
+			<if test="workReimbursement.project != null and workReimbursement.project.projectName != null and workReimbursement.project.projectName != ''">
+				AND (p.project_name  like concat('%',#{workReimbursement.project.projectName},'%') or wa.reimburse_remarks  like concat('%',#{workReimbursement.project.projectName},'%'))
+			</if>
+			<if test="workReimbursement.status != '' and workReimbursement.status != null">
+				AND a.status = #{workReimbursement.status}
+			</if>
+			<!--<if test="officeId != '' and officeId != null">
+                AND wa.office_id = #{officeId}
+            </if>-->
+			<!--				<if test="workReimbursement.officeIdList!=null and workReimbursement.officeIdList.size!=0">-->
+			<!--					and wa.office_id in-->
+			<!--					<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">-->
+			<!--						#{officeId}-->
+			<!--					</foreach>-->
+			<!--				</if>-->
+			<if test="workReimbursement.officeId == '' and workReimbursement.officeName!=null and workReimbursement.officeName!=''">
+				AND sob.name like concat('%',#{workReimbursement.officeName},'%')
+			</if>
+			<if test="workReimbursement.submitterDate != '' and workReimbursement.submitterDate != null">
+				AND a.submitter_date = #{workReimbursement.submitterDate}
+			</if>
+			<if test="workReimbursement.startDate != null and workReimbursement.startDate != ''">
+				AND a.submitter_date &gt;= #{workReimbursement.startDate}
+			</if>
+			<if test="workReimbursement.endDate != null and workReimbursement.endDate != ''">
+				AND a.submitter_date &lt;= #{workReimbursement.endDate}
+			</if>
+			<if test="workReimbursement.handleId != null and workReimbursement.handleId != ''">
+				AND a.submitter_id = #{workReimbursement.handleId}
+			</if>
+			<if test="workReimbursement.handleId == '' and workReimbursement.handleName != null and workReimbursement.handleName != ''">
+				AND su.name like concat('%',#{workReimbursement.handleName},'%')
+			</if>
+			<if test="workReimbursement.submitterId != null and workReimbursement.submitterId != ''">
+				AND wa.reimbursement_name = #{workReimbursement.submitterId}
+			</if>
+			<if test="workReimbursement.submitterId == '' and workReimbursement.submitterName != null and workReimbursement.submitterName != ''">
+				AND sub.name like concat('%',#{workReimbursement.submitterName},'%')
+			</if>
+			<if test="workReimbursement.businessType != null and workReimbursement.businessType != ''">
+				AND (wa.type = #{workReimbursement.businessType} or wa.type in (select id from work_reimbursement_type_info where parent_ids like concat('%',#{workReimbursement.businessTypeParentIds},'%')))
+			</if>
+			<if test="workReimbursement.businessType == '' and workReimbursement.businessTypeName!=null and workReimbursement.businessTypeName !=''">
+				AND wrt.standard_detail like concat('%',#{workReimbursement.businessTypeName},'%')
+			</if>
+			<if test="workReimbursement.projectName != null and workReimbursement.projectName != ''">
+				AND pd.number like concat('%',#{workReimbursement.projectName},'%')
+			</if>
+			<if test="workReimbursement.beginReimbursementPrice != '' and workReimbursement.beginReimbursementPrice != null">
+				AND a.money >= #{workReimbursement.beginReimbursementPrice}
+			</if>
+			<if test="workReimbursement.endReimbursementPrice != '' and workReimbursement.endReimbursementPrice != null">
+				AND a.money &lt;= #{workReimbursement.endReimbursementPrice}
+			</if>
+			<if test="workReimbursement.sqlMap.dsf !=null and workReimbursement.sqlMap.dsf!=''">
+				and (${workReimbursement.sqlMap.dsf}
+				or wa.reimbursement_name = #{workReimbursement.createBy.id})
+			</if>
+		</where>
+	</select>
 
 </mapper>

+ 4 - 0
src/main/webapp/webpage/modules/statement/contractStatementList.jsp

@@ -547,9 +547,13 @@
 				<input id="toflag" name="toflag" type="hidden" value="1"/>
 
 				<input id="officeIdd" name="officeIdd" type="hidden" value="${officeIdd}"/>
+					<input id="type" name="type" type="hidden" value="${type}"/>
 					<input id="year" name="year" type="hidden" value="${year}"/>
 				<input id="bigDateType" name="bigDateType" type="hidden" value="${bigDateType}"/>
 				<input id="smallDateType" name="smallDateType" type="hidden" value="${smallDateType}"/>
+					<input id="contractRecordState" name="contractRecordState" type="hidden" value="${contractRecordState}"/>
+					<input id="field3" name="field3" type="hidden" value="${field3}"/>
+					<input id="field4" name="field4" type="hidden" value="${field4}"/>
 
 				<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
 				<div class="commonQuery lw7">

+ 852 - 0
src/main/webapp/webpage/modules/statement/departmentBillingReportList.jsp

@@ -0,0 +1,852 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+
+	<title>发票管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        <%--var Srole = "<%= UserUtils.getSelectRole().getName()%>";--%>
+
+        $(document).ready(function() {
+            // laydate.render({
+            //     elem: '#invoiceDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            //     event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+				// ,type:'datetime'
+            // });
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#receiptBeginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#receiptEndDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+        });
+        function openDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                skin:"three-btns",
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+
+        function openDialogreplay(title,url,width,height,target){
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                skin:"two-btns",
+                btn: ['送审','关闭'],
+                yes: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                    if(iframeWin.contentWindow.doSubmit() ){
+                        top.layer.close(index);//关闭对话框。
+                        //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+
+                },
+                cancel: function(index){
+                }
+            });
+        }
+
+        function receiptInvoice(title,url,width,height,target){
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				skin:"three-btns",
+				btn: ['保留','确认收款','关闭'],
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+					return false;
+				},
+				btn3: function(index){
+				}
+			});
+        }
+
+        function contractOpenDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+
+		function openDialogreModify(title,url,id,width,height,target) {
+
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
+
+			}
+
+			$.ajax({
+				async: false,
+				url: "${ctx}/workinvoiceTwo/workinvoiceTwo/getInvoiceExist?id="+id,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+                        top.layer.open({
+                            type: 2,
+                            area: [width, height],
+                            title: title,
+                            maxmin: true, //开启最大化最小化按钮
+                            content: url ,
+                            skin:"two-btns",
+                            btn: ['送审','关闭'],
+                            yes: function(index, layero){
+                                var body = top.layer.getChildFrame('body', index);
+                                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                                var inputForm = body.find('#inputForm');
+                                var top_iframe;
+                                if(target){
+                                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                                }else{
+                                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                                }
+                                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                                if(iframeWin.contentWindow.doSubmit() ){
+                                    top.layer.close(index);//关闭对话框。
+                                    //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                                }
+
+                            },
+                            cancel: function(index){
+                            }
+                        });
+					}else{
+						top.layer.msg("该发票信息已删除!", {icon: 0});
+						window.location.reload();
+					}
+				}
+			});
+
+
+		}
+
+
+		//打开对话框(查看)
+		function openDialogListView(title,url,id,width,height){
+
+
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			$.ajax({
+				async: false,
+				url: "${ctx}/workinvoiceTwo/workinvoiceTwo/getInvoiceExist?id="+id,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						top.layer.open({
+							type: 2,
+							skin: 'one-btn',
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							content: url ,
+							btn: ['关闭'],
+							cancel: function(index){
+							}
+						});
+					}else{
+						top.layer.msg("该发票信息已删除!", {icon: 0});
+						window.location.reload();
+					}
+				}
+			});
+
+		}
+
+	</script>
+	<script>
+
+		function notifyDialogre(title,url,width,height,target){
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				skin:"three-btns",
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				btn: ['通过','驳回','关闭'],
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+					return false;
+				},
+				btn3: function(index){
+				}
+			});
+
+		}
+		function cBlur(obj) {
+			var id = $("#accountCheckingUserId").val();
+			if(undefined != obj.value && null != obj.value && '' != obj.value){
+				$.ajax({
+					url:'${ctx}/sys/user/getUserByName?name='+obj.value,
+					type:"post",
+					success:function(data){
+						var user = data.body.data;
+						if(undefined == user || null == user || '' == user){
+							$("#accountCheckingUserId").val("");
+						}else{
+							if(data.body.data.id != id){
+								if(undefined != id && null != id && '' != id){
+									$("#accountCheckingUserId").val("");
+								}
+							}
+						}
+					}
+				});
+			}else{
+				$("#accountCheckingUserId").val("");
+			}
+
+		}
+		function blurSubmitterId(obj) {
+			var id = $("#submitterId").val();
+			if(undefined != obj.value && null != obj.value && '' != obj.value){
+				$.ajax({
+					url:'${ctx}/sys/user/getUserByName?name='+obj.value,
+					type:"post",
+					success:function(data){
+						var user = data.body.data;
+						if(undefined == user || null == user || '' == user){
+							$("#submitterId").val("");
+						}else{
+							if(data.body.data.id != id){
+								if(undefined != id && null != id && '' != id){
+									$("#submitterId").val("");
+								}
+							}
+						}
+					}
+				});
+			}else{
+				$("#submitterId").val("");
+			}
+
+		}
+		function readDetailInfo(obj,numbers) {
+			if(numbers!=undefined && numbers!=""){
+				var vals=numbers.split(",");
+				var value="";
+				for (var i=0;i<vals.length;i++){
+					value+=vals[i]+"</br>"
+				}
+				if (vals.length>0){
+					layer.tips(value, obj, {
+						tips: [3, '#000'],
+						area: ['250px', 'auto'],
+						time: 3000
+					});
+				}
+			}
+		}
+		function readProjectInfo(obj,numbers) {
+			if(numbers!=undefined && numbers!=""){
+				var vals=numbers.split(",");
+				var value="";
+				for (var i=0;i<vals.length;i++){
+					value+=vals[i]+";</br>"
+				}
+				if (vals.length>0){
+					layer.tips(value, obj, {
+						tips: [3, '#000'],
+						area: ['250px', 'auto'],
+						time: 3000
+					});
+				}
+			}
+		}
+
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row ">
+		<%--<div class="full-width fl">
+			<div class=" contentShadow shadowLTR list-form-tab" id="tabDiv">
+				<ul class="list-tabs" >
+					<li class="active"><a href="${ctx}/workinvoice/workInvoice/list">发票管理</a></li>
+					<li><a href="${ctx}/workinvoicealter/workInvoiceAlter/list">发票变更</a></li>
+				</ul>
+			</div>
+		</div>--%>
+		<div class="full-width fl">
+			<div class=" layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="workInvoiceShow" action="${ctx}/statement/StatementCompanyComprehensive/departmentBillingReportList" method="post" class="form-inline">
+				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+				<input id="toflag" name="toflag" type="hidden" value="1"/>
+
+					<input id="userId" name="userId" type="hidden" value="${userId}"/>
+					<input id="type" name="type" type="hidden" value="${type}"/>
+					<input id="officeIdd" name="officeIdd" type="hidden" value="${officeIdd}"/>
+					<input id="year" name="year" type="hidden" value="${year}"/>
+					<input id="bigDateType" name="bigDateType" type="hidden" value="${bigDateType}"/>
+					<input id="smallDateType" name="smallDateType" type="hidden" value="${smallDateType}"/>
+					<input id="newlyAdded" name="newlyAdded" type="hidden" value="${newlyAdded}"/>
+					<input id="collectionThisMonth" name="collectionThisMonth" type="hidden" value="${collectionThisMonth}"/>
+
+				<%--<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->--%>
+
+					<div class="commonQuery lw9">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">发票号:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="widNumber" htmlEscape="false"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">开票总金额:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="money" htmlEscape="false"  class=" form-control layui-input"/>
+							</div>
+						</div>
+
+						<%--<div class="layui-item query athird">
+							<label class="layui-form-label">项目编号:</label>
+							<div class="layui-input-block">
+								<form:input path="project.projectId" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="project.projectName" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>--%>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<div class="layui-btn-group search-spacing">
+									<button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+									<button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
+								</div>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" class="lw9" style="clear:both;display:none;">
+						<%--<div class="layui-item query athird">
+							<label class="layui-form-label">报告号名称:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="project.reportData.number" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>--%>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">对账人:</label>
+								<div class="layui-input-block with-icon">
+									<sys:inquireselectUserNotReadolny id="accountCheckingUser" name="accountCheckingUserId" value="${workInvoice.accountCheckingUserId}" labelName="accountCheckingUserName" labelValue="${workInvoice.accountCheckingUserName}" cssStyle="background-color: #fff"
+																	  title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+								</div>
+							</div>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">对账地区:</label>
+								<div class="layui-input-block  with-icon">
+									<sys:treeselectArae id="area" name="area.id" value="${workInvoice.area.id}" labelName="area.name" labelValue="${workInvoice.area.name}"
+														cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false" isAll="true"/>
+								</div>
+							</div>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">发票申请编号:</label>
+								<div class="layui-input-block">
+									<form:input path="number" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+								</div>
+							</div>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">开票日期:</label>
+								<div class="layui-input-block">
+									<input id="beginContractDate" name="beginContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
+										   value="<fmt:formatDate value="${workInvoice.beginContractDate}" pattern="yyyy-MM-dd"/>"/>
+									</input>
+									<span class="group-sep">-</span>
+									<input id="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
+										   value="<fmt:formatDate value="${workInvoice.endContractDate}" pattern="yyyy-MM-dd"/>"/>
+									</input>
+								</div>
+							</div>
+<%--							<div class="layui-item query athird">--%>
+<%--								<label class="layui-form-label">经办人部门:</label>--%>
+<%--								<div class="layui-input-block with-icon">--%>
+<%--									<sys:treeselect id="officeId" name="officeId" value="${workInvoice.officeId}" labelName="officeName" labelValue="${workInvoice.officeName}" cssStyle="background-color: #fff"--%>
+<%--													title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>--%>
+<%--								</div>--%>
+<%--							</div>--%>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">经办人:</label>
+								<div class="layui-input-block with-icon">
+									<sys:inquireselectUserNotReadolnyTow id="submitter" name="submitterId" value="${workInvoice.submitterId}" labelName="submitterName" labelValue="${workInvoice.submitterName}" cssStyle="background-color: #fff"
+																		 title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+								</div>
+							</div>
+
+							<div class="layui-item query athird">
+								<label class="layui-form-label">收款日期:</label>
+								<div class="layui-input-block">
+									<input id="receiptBeginDate" name="receiptBeginDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
+										   value="<fmt:formatDate value="${workInvoice.receiptBeginDate}" pattern="yyyy-MM-dd"/>"/>
+									</input>
+									<span class="group-sep">-</span>
+									<input id="receiptEndDate" name="receiptEndDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
+										   value="<fmt:formatDate value="${workInvoice.receiptEndDate}" pattern="yyyy-MM-dd"/>"/>
+									</input>
+								</div>
+							</div>
+
+							<div class="layui-item query athird">
+								<label class="layui-form-label">开票单位:</label>
+								<div class="layui-input-block with-icon">
+									<form:input path="client.name" htmlEscape="false"  class=" form-control layui-input"/>
+								</div>
+							</div>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">是否收款:</label>
+								<div class="layui-input-block with-icon">
+									<select id="receiptMoney" name="receiptMoney" class="form-control simple-select">
+										<option value=""></option>
+										<option value="0" <c:if test="${workInvoiceShow.receiptMoney=='0'}">selected</c:if>>否</option>
+										<option value="1" <c:if test="${workInvoiceShow.receiptMoney=='1'}">selected</c:if>>是</option>
+									</select>
+								</div>
+							</div>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">发票类型:</label>
+								<div class="layui-input-block with-icon">
+									<form:select path="invoiceType" class="form-control simple-select">
+										<form:option value="" label=""/>
+										<form:options items="${fns:getMainDictList('invoice_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									</form:select>
+								</div>
+							</div>
+
+							<div class="layui-item query athird">
+								<label class="layui-form-label">收款类型:</label>
+								<div class="layui-input-block with-icon">
+									<form:select path="chargeType" class="form-control simple-select">
+										<form:option value="" label=""/>
+										<form:options items="${fns:getMainDictList('receipt_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									</form:select>
+								</div>
+							</div>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">开票内容:</label>
+								<div class="layui-input-block with-icon">
+									<form:select path="billingContent" class="form-control simple-select">
+										<form:option value="" label=""/>
+										<form:options items="${fns:getMainDictList('billing_content')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									</form:select>
+								</div>
+							</div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class=" contentShadow shadowLBR layui-form contentDetails">
+				<div class="nav-btns">
+					<div class="layui-btn-group" style="float: left">
+<%--						<shiro:hasPermission name="workinvoice:workInvoice:add">--%>
+<%--							<button class="layui-btn layui-btn-sm layui-bg-blue" title="发票管理" onclick="openDialogre('发票管理','${ctx}//workinvoiceTwo/workinvoiceTwo/form','95%','95%')">&nbsp;添加</button>--%>
+<%--						</shiro:hasPermission>--%>
+<%--						<shiro:hasPermission name="workinvoiceTwo:workinvoiceTwo:export">--%>
+<%--							<table:exportExcel url="${ctx}/workinvoiceTwo/workinvoiceTwo/export"></table:exportExcel><!-- 导出按钮 -->--%>
+<%--						</shiro:hasPermission>--%>
+						<button class="layui-btn layui-btn-sm layui-bg-green" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+<%--						<div class=" layui-btn-sm" style="float: right;width: 300px">--%>
+<%--							<span style="color: red">金额汇总(开票金额):${sumMoney}(元)</span>--%>
+<%--						</div>--%>
+					</div>
+
+
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+    <div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+				{field:'index',align:'center', title: '序号',width:40}
+				,{field:'projName',align:'center', title: '项目名称', minWidth:160,templet:function(d){
+						if(1 == d.showView && d.showView != undefined){
+							return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/workinvoiceAll/workInvoiceAll/projectview?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
+						}else{
+							return "<span title='"+ d.projName +"'>" +d.projName+ "</span>";
+						}
+						<%--return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectRecords/view?id=" + d.projectId +"','95%', '95%')\">" + d.projName + "</a>";--%>
+					}}
+				,{field:'invoiceNum',align:'center', sort:true,title: '发票申请编号', minWidth:130,templet:function(d){
+						return "<a class=\"attention-info\" title=\""+ d.invoiceNum +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票管理', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.id + "&tabId=1','"+ d.id +"','95%', '95%')\">" + d.invoiceNum + "</a>";
+					}}
+				,{field:'widNumber',align:'center', title: '发票号',  width:90,templet:function(d){
+						return "<span title='"+ d.widNumber +"'>" + d.widNumber + "</span>";
+					}}
+				,{field:'clientName', align:'center',title: '开票单位', minWidth:160,templet:function(d){
+						return "<span title='"+ d.clientName +"'>" + d.clientName + "</span>";
+					}}
+				,{field:'responsibleName', align:'center',title: '经办人', minWidth:80,templet:function(d){
+						return "<span title='"+ d.responsibleName +"'>" + d.responsibleName + "</span>";
+					}}
+				,{field:'officeName', align:'center',title: '经办单位',width:80,templet:function(d){
+						return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+					}}
+				,{field:'money',align:'center', title: '开票总金额(元)',  width:130,templet:function(d){
+						return "<span title='"+ d.money +"'>" + d.money + "</span>";
+					}}
+				,{field:'widTotalMoney',align:'center', title: '发票金额(元)',  width:120,templet:function(d){
+						return "<span title='"+ d.widTotalMoney +"'>" + d.widTotalMoney + "</span>";
+					}}
+				,{field:'billingContent',align:'center', title: '开票内容',  width:90,templet:function(d){
+						return "<span title='"+ d.billingContent +"'>" + d.billingContent + "</span>";
+					}}
+				,{field:'chargeType',align:'center', title: '收款类型',  width:90,templet:function(d){
+						return "<span title='"+ d.chargeType +"'>" + d.chargeType + "</span>";
+					}}
+				,{field:'invoiceType',align:'center', title: '发票类型',  width:90,templet:function(d){
+						return "<span title='"+ d.invoiceType +"'>" + d.invoiceType + "</span>";
+					}}
+
+				,{field:'invoiceDate',align:'center', sort:true,title: '开票日期',  width:90}
+				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:90}
+				,{field:'receiptMoney',align:'center', title: '是否收款',  width:80}
+				,{field:'cancellation',align:'center', title: '是否作废',  width:80}
+
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workInvoice" varStatus="index"><c:set var="Srole" scope="session" value="<%= UserUtils.getSelectRole().get(0).getEnname()%>"/>
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workInvoice.id}"
+                    ,"invoiceNum":"${workInvoice.number}"
+                    ,"chargeType":"${fns:getMainDictLabels(workInvoice.chargeType,',','receipt_type', '')}"
+                    ,"billingContent":"${fns:getMainDictLabels(workInvoice.billingContent,',','billing_content', '')}"
+                    ,"invoiceType":"${workInvoice.invoiceTypeStr}"
+                    ,"projNum":"${workInvoice.project.projectId}"
+                    ,"projectId":"${workInvoice.project.id}"
+                    ,"areaName":"${workInvoice.project.county}"
+                    ,"reportNumber":"${workInvoice.reportNumber}"
+                    ,"projName":"${workInvoice.projectName}"
+                    ,"clientName":"${workInvoice.client.name}"
+                    ,"officeName":"${workInvoice.office.name}"
+                    ,"responsibleName":"${workInvoice.createBy.name}"
+                    ,"receiptMoney":"${workInvoice.receiptMoney}"
+                    ,"status":"${workInvoice.invoiceState}"
+					,"notifyFlag":"${workInvoice.notifyFlag}"
+					,"notifyId":"${workInvoice.notifyId}"
+					,"widNumber":"${workInvoice.widNumber}"
+					,"widTotalMoney":"${workInvoice.widTotalMoney}"
+					,"workAccountList":"${workInvoice.workAccountList}"
+					,"workAccountListStr":${fns:toJson(workInvoice.workAccountList)}
+                    ,"money":"<fmt:formatNumber value="${workInvoice.money}" pattern="##0.00"/>"
+                    ,"invoiceDate":"<fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>"
+                    ,"receiptMoneyDate":"<fmt:formatDate value="${workInvoice.receiptMoneyDate}" pattern="yyyy-MM-dd"/>"
+                    <c:if test="${workInvoice.invoiceState == 1 && fns:getUser().id == workInvoice.createBy.id}"><shiro:hasPermission name="workinvoice:workInvoice:edit">,"canedit1":"1"</shiro:hasPermission></c:if><%--暂存-修改--%>
+                    <c:if test="${workInvoice.invoiceState == '4' && fns:getUser().id == workInvoice.createBy.id}">,"canedit2":"1"</c:if><%--驳回--修改--%>
+                    <c:if test="${workInvoice.invoiceState == '9' && fns:getUser().id == workInvoice.createBy.id}">,"conditionCanedit":"1"</c:if><%--驳回--修改--%>
+                    <c:if test="${workInvoice.invoiceState == '11' && fns:getUser().id == workInvoice.createBy.id}">,"conditionCanedit3":"1"</c:if><%--作废撤回--修改--%>
+                    <c:if test="${workInvoice.invoiceState == '3' && fns:getUser().id == workInvoice.createBy.id}">,"canedit3":"1"</c:if><%--撤回--修改--%>
+                    <c:if test="${fns:getUser().id == workInvoice.createBy.id}"><c:if test="${workInvoice.invoiceState == '1' or workInvoice.invoiceState == '3' or workInvoice.invoiceState == '4'}"><shiro:hasPermission name="workinvoice:workInvoice:del">,"candelete":"1"</shiro:hasPermission></c:if></c:if>
+                    <c:if test="${fns:getUser().id == workInvoice.createBy.id}"><c:if test="${workInvoice.invoiceState == '9' || workInvoice.invoiceState == '11' }">,"conditionCandelete":"1"</c:if></c:if>
+                    <c:if test="${workInvoice.invoiceState == '2' && fns:getUser().id == workInvoice.createBy.id}">,"cancancel":"1"</c:if>
+                    <c:if test="${workInvoice.invoiceState == '6' && fns:getUser().id == workInvoice.createBy.id}">,"conditionCancancel":"1"</c:if>
+					<c:if test="${workInvoice.invoiceState == '5' && fns:getUser().id == workInvoice.createBy.id}">,"cancellationFlag":"1"</c:if>
+
+
+					<shiro:hasPermission name="workinvoice:workInvoice:alteredit">
+                    <c:if test="${workInvoice.invoiceState == '5'}">,"canalter":"1"</c:if>
+                    </shiro:hasPermission>
+					,"cancellation":<c:choose>
+							<c:when test="${workInvoice.invoiceState == '7'}">"是"</c:when>
+					<c:otherwise>"否"</c:otherwise>
+					</c:choose>
+					<shiro:hasPermission name="ruralProject:ruralProjectView:workInvoiceView">
+					,"showView":1
+					</shiro:hasPermission>
+<%--					<shiro:hasPermission name="workinvoice:workInvoice:receipt">--%>
+<%--						,"financeFlag":--%>
+<%--							<c:choose>--%>
+<%--								<c:when test="${workInvoice.invoiceState == 5 && workInvoice.receiptMoney == '否'}">"1"</c:when>--%>
+<%--								<c:otherwise>"0"</c:otherwise>--%>
+<%--						</c:choose>--%>
+<%--					</shiro:hasPermission>--%>
+<%--					<shiro:hasPermission name="workinvoice:workInvoice:invalid">--%>
+<%--						,"cancellationFlag":--%>
+<%--							<c:choose>--%>
+<%--								<c:when test="${workInvoice.invoiceState == 5}">"1"</c:when>--%>
+<%--								<c:otherwise>"0"</c:otherwise>--%>
+<%--						</c:choose>--%>
+<%--					</shiro:hasPermission>--%>
+<%--					<shiro:hasPermission name="workinvoice:workInvoice:adminDel">--%>
+<%--						,"adminFlag":--%>
+<%--							<c:choose>--%>
+<%--								<c:when test="${workInvoice.invoiceState == 5}">"1"</c:when>--%>
+<%--								<c:otherwise>"0"</c:otherwise>--%>
+<%--						</c:choose>--%>
+<%--					</shiro:hasPermission>--%>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();/*消除由于有竖向滚动条造成table出现横向滚动条*/
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+
+</body>
+</html>

Plik diff jest za duży
+ 1152 - 0
src/main/webapp/webpage/modules/statement/departmentCompanyDataView.jsp


+ 863 - 0
src/main/webapp/webpage/modules/statement/departmentContractStatementList.jsp

@@ -0,0 +1,863 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同管理</title>
+	<meta name="decorator" content="default"/>
+	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+	<style>
+	</style>
+	<%@include file="/webpage/include/treetable.jsp" %>
+	<%--<style>--%>
+	<%--.shows .input-group{--%>
+	<%--width: 78%!important;--%>
+	<%--}--%>
+	<%--.form-group shows{--%>
+	<%--width: auto;--%>
+	<%--}--%>
+	<%--#beginContractDate{--%>
+	<%--width:200px;--%>
+	<%--}--%>
+	<%--#endContractDate{--%>
+	<%--width:200px;--%>
+	<%--}--%>
+	<%--</style>--%>
+	<script type="text/javascript">
+        var validateForm;
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                    number:{
+                        required:true
+                    },
+                    businessType:{
+                        required:true
+                    }
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            // $("#treeTable").treeTable({expandLevel : 1,column:1}).show();
+
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+
+            laydate.render({
+                elem: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+        });
+
+
+        function contractOpenDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+        function contractOpenDialogres(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['送审','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+
+        function contractAdminUpdate(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+        function openDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                content: url ,
+                skin:"three-btns",
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(3) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+	</script>
+	<script type="text/javascript">
+
+        function openDialogreReapply(title,url,width,height,target) {
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin:"two-btns",
+                content: url,
+                btn: ['送审', /*'撤回',*/ '关闭'],
+                btn1: function (index, layero) {
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if (target) {
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    } else {
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var formId = inputForm.attr("id");
+                    if(formId){
+                        var $document = iframeWin.contentWindow.document;
+                        $document.getElementById(formId).setAttribute("action","${ctx}/workcontractinfo/workContractInfo/invalidateContractSaveAudit?reapply=yes");
+                        formSubmit($document,formId,index);
+                    }
+                },
+                /*btn2: function (index, layero) {
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if (target) {
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    } else {
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var formId = inputForm.attr("id");
+                    if(formId){
+                        var $document = iframeWin.contentWindow.document;
+                        $document.getElementById(formId).setAttribute("action","${ctx}/workcontractinfo/workContractInfo/invalidateContractSaveAudit?reapply=no");
+                        formSubmit($document,formId,index);
+                    }
+                    return false;
+                },*/
+                btn3: function (index) {
+                }
+            });
+        }
+        function formSubmit($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        top.layer.close(index);
+                        parent.layer.msg("保存成功!!!",{icon:6});
+                        parent.layer.close(loadingMessage);
+                        window.location.reload();
+                    }
+                });
+            }
+        }
+
+	</script>
+	<script type="text/javascript">
+       /* function contractInvalidateForm(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin:"two-btns",
+                content: url ,
+                btn: ['送审','关闭'],
+                yes: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var formId = inputForm.attr("id");
+                    if(formId){
+                        var $document = iframeWin.contentWindow.document;
+                        formSubmit($document,formId,index);
+                    }
+                },
+                cancel: function(index){
+                }
+            });
+        }*/
+
+        function contractInvalidateForm(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['送审','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+	   function openDialogreplay(title,url,width,height,target){
+
+		   if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			   width='auto';
+			   height='auto';
+		   }else{//如果是PC端,根据用户设置的width和height显示。
+
+		   }
+		   top.layer.open({
+			   type: 2,
+			   area: [width, height],
+			   title: title,
+			   maxmin: false, //开启最大化最小化按钮
+			   skin: 'two-btns',
+			   content: url ,
+			   btn: ['送审','关闭'],
+			   yes: function(index, layero){
+				   var body = top.layer.getChildFrame('body', index);
+				   var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				   var inputForm = body.find('#inputForm');
+				   var top_iframe;
+				   if(target){
+					   top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				   }else{
+					   top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				   }
+				   inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+				   if(iframeWin.contentWindow.doSubmit() ){
+					   top.layer.close(index);//关闭对话框。
+					   //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				   }
+
+			   },
+			   cancel: function(index){
+			   }
+		   });
+	   }
+	</script>
+	<script>
+
+		function notifyDialogre(title,url,width,height,target){
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				skin:"three-btns",
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				btn: ['通过','驳回','关闭'],
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+					return false;
+				},
+				btn3: function(index){
+				}
+			});
+
+		}
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<%--<div class="full-width fl">
+			<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
+				<ul class="list-tabs" >
+					<li class="active"><a href="${ctx}/workcontractinfo/workContractInfo/list">合同管理</a></li>
+					<li><a href="${ctx}/workcontractinfoalter/workContractInfoAlter/alterLists">合同变更</a></li>
+					<li><a href="${ctx}/workcontractinfoi/workContractInfoI/ilist">合同作废</a></li>
+					<li><a href="${ctx}/workcontractsignature/workContractSignature/list">合同签章</a></li>
+					<li><a href="${ctx}/workcontractrecord/workContractRecord/list">合同归档</a></li>
+				</ul>
+			</div>
+		</div>--%>
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="workContractInfo" action="${ctx}/statement/StatementCompanyComprehensive/departmentContractStatementList" method="post" class="form-inline">
+				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+				<input id="toflag" name="toflag" type="hidden" value="1"/>
+
+					<input id="userId" name="userId" type="hidden" value="${userId}"/>
+					<input id="type" name="type" type="hidden" value="${type}"/>
+				<input id="officeIdd" name="officeIdd" type="hidden" value="${officeIdd}"/>
+					<input id="year" name="year" type="hidden" value="${year}"/>
+				<input id="bigDateType" name="bigDateType" type="hidden" value="${bigDateType}"/>
+				<input id="smallDateType" name="smallDateType" type="hidden" value="${smallDateType}"/>
+					<input id="contractRecordState" name="contractRecordState" type="hidden" value="${contractRecordState}"/>
+					<input id="field3" name="field3" type="hidden" value="${field3}"/>
+					<input id="field4" name="field4" type="hidden" value="${field4}"/>
+
+				<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+				<div class="commonQuery lw7">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">客户名称:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="client.name" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">合同名称:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="name" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+						</div>
+					</div>
+					<div class="layui-item athird">
+						<div class="input-group">
+							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+							<div class="layui-btn-group search-spacing">
+								<button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+								<button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
+							</div>
+<%--							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>--%>
+<%--							<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>--%>
+<%--							<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>--%>
+						</div>
+					</div>
+					<div style="    clear:both;"></div>
+				</div>
+				<div id="moresees" class="lw7" style="clear:both;display:none;height: 70px;">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">签订日期:</label>
+						<div class="layui-input-block readOnlyFFF">
+							<input id="beginContractDate" name="beginContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+								   value="<fmt:formatDate value="${workContractInfo.beginContractDate}" pattern="yyyy-MM-dd"/>"/>
+							</input>
+							<span class="group-sep">-</span>
+							<input id="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+								   value="<fmt:formatDate value="${workContractInfo.endContractDate}" pattern="yyyy-MM-dd"/>"/>
+							</input>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">合同状态:</label>
+						<div class="layui-input-block with-icon">
+							<form:select path="contractState"  class="form-control simple-select">
+								<form:option value="" label=""/>
+								<form:options items="${fns:getDictList('audit_contract_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">归档状态:</label>
+						<div class="layui-input-block with-icon">
+							<form:select path="contrractRecordStatus"  class="form-control simple-select">
+								<form:option value="" label=""/>
+								<form:options items="${fns:getDictList('archive_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label  double-line">合同金额(元):</label>
+						<div class="layui-input-block">
+							<input id="beginContractPrice" name="beginContractPrice" type="text" value="${workContractInfo.beginContractPrice}" maxlength="20" class="form-control layui-input query-group"/>
+							</input>
+							<span class="group-sep">-</span>
+							<input id="endContractPrice" name="endContractPrice" type="text" value="${workContractInfo.endContractPrice}"  maxlength="20" class="form-control layui-input query-group"/>
+							</input>
+						</div>
+					</div>
+				</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<%--此处按钮样式包括 nav-btn-add nav-btn-refresh nav-btn-import nav-btn-export nav-btn-query nav-btn-reset--%>
+					<div class="layui-btn-group">
+<%--						<shiro:hasPermission name="workcontractinfo:workContractInfo:add">--%>
+<%--							<button class="layui-btn layui-btn-sm layui-bg-blue" title="合同登记" onclick="openDialogre('合同登记','${ctx}/workcontractinfo/workContractInfo/newForm','95%','95%')">添加</button>--%>
+<%--						</shiro:hasPermission>--%>
+<%--						<shiro:hasPermission name="workcontractinfo:workContractInfo:import">--%>
+<%--							<table:importExcel url="${ctx}/workcontractinfo/workContractInfo/import"></table:importExcel><!-- 导入按钮 -->--%>
+<%--						</shiro:hasPermission>--%>
+<%--						&lt;%&ndash;<shiro:hasPermission name="workcontractinfo:workContractInfo:export">--%>
+<%--                        </shiro:hasPermission>&ndash;%&gt;--%>
+<%--						<shiro:hasPermission name="workcontractinfo:workContractInfo:export">--%>
+<%--							<table:exportExcel url="${ctx}/workcontractinfo/workContractInfo/export"></table:exportExcel><!-- 导出按钮 -->--%>
+<%--						</shiro:hasPermission>--%>
+
+						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新">刷新</button>
+					</div>
+<%--					<shiro:hasPermission name="workcontractinfo:workContractInfo:add">--%>
+<%--						<button class="nav-btn nav-btn-add" title="合同登记" onclick="openDialogre('合同登记','${ctx}/workcontractinfo/workContractInfo/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>--%>
+<%--					</shiro:hasPermission>--%>
+<%--					<shiro:hasPermission name="workcontractinfo:workContractInfo:import">--%>
+<%--						<table:importExcel url="${ctx}/workcontractinfo/workContractInfo/import"></table:importExcel><!-- 导入按钮 -->--%>
+<%--					</shiro:hasPermission>--%>
+<%--					&lt;%&ndash;<shiro:hasPermission name="workcontractinfo:workContractInfo:export">--%>
+<%--					</shiro:hasPermission>&ndash;%&gt;--%>
+<%--					<shiro:hasPermission name="workcontractinfo:workContractInfo:export">--%>
+<%--						<table:exportExcel url="${ctx}/workcontractinfo/workContractInfo/export"></table:exportExcel><!-- 导出按钮 -->--%>
+<%--					</shiro:hasPermission>--%>
+<%--					&lt;%&ndash;<table:importInfoErr url="${ctx}/workcontractinfo/workContractInfo/importInfoErr" title="导入日志"></table:importInfoErr>&ndash;%&gt;--%>
+
+<%--					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>--%>
+
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable1"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable1'
+            ,page: false
+            ,cols: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'contractNum',align:'center', sort:true,title: '合同编号',minWidth:200,templet:function(d){
+                        return "<span title='"+ d.contractNum +"'>" + d.contractNum + "</span>";
+                    }}
+                ,{field:'contractName',align:'center', title: '合同名称',minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\""+d.contractName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同管理', '${ctx}/workcontractinfo/workContractInfo/lookForm?id=" + d.id + "','95%', '95%')\">" + d.contractName + "</a>";
+                    }}
+                ,{field:'recordNum',align:'center', title: '案卷号',minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\""+d.recordNum+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同归档信息', '${ctx}/workcontractrecord/workContractRecord/form?id=" + d.contrractRecordId + "&tabId=1','95%', '95%')\">" + d.recordNum + "</a>";
+                    }}
+                ,{field:'clientName',align:'center', title: '客户名称',minWidth:160,templet:function(d){
+                        return "<a class=\"attention-info\" title=\""+d.clientName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看客户管理', '${ctx}/workclientinfo/workClientInfo/detail?id=" + d.clientId +"','95%', '95%')\">" + d.clientName + "</a>";
+                    }}
+                ,{field:'contractPrice', align:'center',title: '合同金额(元)',width:100,templet:function(d){
+                        return "<span title='"+ d.contractPrice2 +"'>" + d.contractPrice2 + "</span>";
+                    }}
+                ,{field:'createBy',align:'center', title: '创建人',  width:80,templet:function(d){
+                        return "<span title='"+ d.createBy +"'>" + d.createBy + "</span>";
+                    }}
+                ,{field:'signDate',align:'center', title: '签订日期',  width:80}
+                ,{align:'center', title: '状态',  width:70,templet:function(d){
+                        <%--var st = getAuditState(d.status);--%>
+                        <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractinfo/workContractInfo/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
+                        <%--return xml;--%>
+                        var st = getAuditContractState(d.status);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractinfo/workContractInfo/getProcess?id=" + d.id + "','95%','95%')\" class=\"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>";
+                        return xml;
+                    }}
+                ,{align:'center', title: '归档状态',  width:70,templet:function(d){
+                        var st = getRuralProjectArchiveState(d.contrractRecordStatus);
+                        if(st.action)
+							var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractrecord/workContractRecord/getProcessOne?id=" + d.contrractRecordId + "','95%','95%')\" class=\"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>";
+                        return xml;
+                    }}
+                ,{align:'center', title: '借用状态',  width:70,templet:function(d){
+						var result = '';
+						if(d.borrowStatus == "0" || d.borrowStatus == "4" || d.giveStatus == "5"){
+							result = "0";
+						}else if(d.borrowStatus != "5"){
+							result = "2";
+						}else if(d.borrowStatus == "5"){
+							result = "5";
+						}
+                        var st = getBorrowState(result);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogView('借用详情列表', '${ctx}/workContractBorrow/workContractBorrow/getWorkCntractBorrowList?contractId=" + d.id + "','95%','95%')\" class=\"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>";
+                        return xml;
+                    }}
+
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workContractInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"contractNum":"${workContractInfo.contractNum}"
+                    ,"id":"${workContractInfo.id}"
+                    ,"contractName":"${workContractInfo.name}"
+					,"clientId":"${workContractInfo.client.id}"
+                    ,"clientName":"${workContractInfo.client.name}"
+                    ,"clientType":"${fns:getMainDictLabel(workContractInfo.contractType, 'contract_type', '')}"
+                    ,"contractPrice":"${workContractInfo.contractPrice}"
+                    ,"contractPrice2":"<fmt:formatNumber value="${workContractInfo.contractPrice}" pattern="#,#00.00"/>"
+                    ,"signDate":"<fmt:formatDate value="${workContractInfo.contractDate}" pattern="yyyy-MM-dd"/>"
+                    ,"createBy":"${workContractInfo.createName}"
+                    ,"status":"${workContractInfo.contractState}"
+                    ,"contrractRecordStatus":"${workContractInfo.contrractRecordStatus}"
+                    ,"contrractRecordId":"${workContractInfo.contrractRecordId}"
+                    ,"recordNum":"${workContractInfo.recordNum}"
+                    ,"borrowStatus":"${workContractInfo.borrowStatus}"
+                    ,"giveStatus":"${workContractInfo.giveStatus}"
+                    ,"borrowId":"${workContractInfo.borrowId}"
+                    ,"flagAdmin":"${workContractInfo.flagAdmin}"
+					,"notifyFlag":"${workContractInfo.notifyFlag}"
+					,"newContractNotifyFlagAudit":"${workContractInfo.newContractNotifyFlagAudit}"
+					,"newContractNotifyFlag":"${workContractInfo.newContractNotifyFlag}"
+					,"notifyId":"${workContractInfo.notifyId}"
+					,"recordNotifyFlag":"${workContractInfo.recordNotifyFlag}"
+					,"recordNotifyId":"${workContractInfo.recordNotifyId}"
+					,"borrowNotifyFlag":"${workContractInfo.borrowNotifyFlag}"
+					,"borrowNotifyId":"${workContractInfo.borrowNotifyId}"
+					,"contractState":"${workContractInfo.contractState}"
+                    <%--<c:if test="${workContractInfo.contractState == 5 && fns:getUser().id == workContractInfo.createBy.id && workContractInfo.signatureStatus == 1   }">,"signature":"1"</c:if>/*签章*/--%>
+                    <%--<c:if test="${workContractInfo.contractState == 5 && fns:getUser().id == workContractInfo.createBy.id}">,"canalter":"1"</c:if>/*变更*/--%>
+					<%--<c:if test="${workContractInfo.contractState == 5 && fns:getUser().id == workContractInfo.createBy.id}">,"caninvalid":"1"</c:if>/*作废*/--%>
+                    <%--<c:if test="${(workContractInfo.contractState == 5 ||workContractInfo.contractState == 7)&& workContractInfo.recordState != 3 && workContractInfo.signatureStatus == 2 && fns:getUser().id == workContractInfo.createBy.id}">,"back":"1"</c:if>--%>
+                    <c:if test="${workContractInfo.contractState == 5 && workContractInfo.contrractRecordStatus == 0 && fns:getUser().id == workContractInfo.createBy.id}">,"back":"1"</c:if>
+					<c:if test="${(workContractInfo.contractState == 1) && fns:getUser().id == workContractInfo.createBy.id}">,"canedit":"1"</c:if>
+                    <c:if test="${(workContractInfo.contractState == 3 or workContractInfo.contractState == 4) && fns:getUser().id == workContractInfo.createBy.id}">,"canedits":"1"</c:if>
+					<c:if test="${(workContractInfo.contractState == 3 or workContractInfo.contractState == 1 or workContractInfo.contractState == 4)&& ( workContractInfo.createBy.id == fns:getUser().id or flag == true )}">,"candelete":"1"</c:if>
+					<c:if test="${workContractInfo.contractState == 2 && fns:getUser().id == workContractInfo.createBy.id}">,"cancancel":"1","processInstanceId":"${workContractInfo.processInstanceId}"</c:if>
+					<c:if test="${((workContractInfo.contractState == 7 && workContractInfo.signatureStatus == 1)||((workContractInfo.contractState == 7 || workContractInfo.contractState == 5)&& workContractInfo.recordState==3)) && fns:getUser().office.id eq workContractInfo.chargeCompany}">,"canalterCom":"1"</c:if>
+					<c:if test="${workContractInfo.contractState == 9 && fns:getUser().id eq workContractInfo.createBy.id && workContractInfo.completionStatus == 2 }">,"canalterComRevoke":"1"</c:if>
+					<c:if test="${workContractInfo.contractState == 9 && fns:getUser().id eq workContractInfo.createBy.id && (workContractInfo.completionStatus == 3 ||workContractInfo.completionStatus == 4)  }">,"canalterComDel":"1"</c:if>
+
+					<c:if test="${fns:getUser().id == workContractInfo.createBy.id}">
+						<c:if test="${workContractInfo.contrractRecordStatus == '2' }">,"cancancelRecord":"1"</c:if>
+						<shiro:hasPermission name="workcontractrecord:workContractRecord:edit">
+							<c:choose>
+								<c:when test="${workContractInfo.contrractRecordStatus == '1' }">,"caneditRecord1":"1"</c:when>
+								<c:when test="${workContractInfo.contrractRecordStatus == '4'}">,"caneditRecord2":"1"</c:when>
+								<c:when test="${workContractInfo.contrractRecordStatus == '3'}">,"caneditRecord3":"1"</c:when>
+							</c:choose>
+						</shiro:hasPermission>
+						<shiro:hasPermission name="workcontractrecord:workContractRecord:del">
+							<c:choose>
+								<c:when test="${(workContractInfo.contrractRecordStatus == '1' or workContractInfo.contrractRecordStatus == '3' or workContractInfo.contrractRecordStatus == '4')}">,"candeleteRecord":"1"</c:when>
+							</c:choose>
+						</shiro:hasPermission>
+					</c:if>
+					//借用状态处理
+					<c:if test="${fns:getUser().id == workContractInfo.borrowCreateById}">
+						<c:if test="${workContractInfo.borrowStatus == '2' }">,"cancancelBorrow":"1"</c:if>
+						<c:choose>
+							<c:when test="${workContractInfo.borrowStatus == '1'}">,"caneditBorrow1":"1"</c:when>
+							<c:when test="${workContractInfo.borrowStatus == '4'}">,"caneditBorrow2":"1"</c:when>
+							<c:when test="${workContractInfo.borrowStatus == '3'}">,"caneditBorrow3":"1"</c:when>
+						</c:choose>
+						<c:choose>
+							<c:when test="${(workContractInfo.borrowStatus == '1' or workContractInfo.borrowStatus == '3' or workContractInfo.borrowStatus == '4')}">,"candeleteBorrow":"1"</c:when>
+						</c:choose>
+					</c:if>
+					<shiro:hasPermission name="workcontractinfo:workContractInfo:adminDel">
+						<c:choose>
+							<c:when test="${workContractInfo.contractState == 5 }">,"updateAdmin":"1"</c:when>
+						</c:choose>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="workcontractrecord:workContractRecord:revert">,"giveBorrow":	<c:choose><c:when test="${workContractInfo.borrowStatus == '5' && workContractInfo.giveStatus != '5'}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+					<c:choose>
+						<c:when test="${fns:getUser().id == workContractInfo.createBy.id}">
+							<c:if test="${workContractInfo.cancelDelFalg && workContractInfo.contrractRecordStatus !=2 && workContractInfo.contrractRecordStatus !=5}">
+								<c:if test="${workContractInfo.contractState != 7 && workContractInfo.contractState !=4}">
+									,"cancel":"1"
+								</c:if>
+								// ,"cancelDel":"1"
+							</c:if>
+						</c:when>
+						<c:otherwise>
+							<shiro:hasPermission name="workcontractinfo:workContractInfo:adminCancelDel">
+								<c:if test="${workContractInfo.cancelDelFalg && workContractInfo.contrractRecordStatus !=2 && workContractInfo.contrractRecordStatus !=5}">
+									<c:if test="${workContractInfo.contractState != 7 && workContractInfo.contractState !=4}">
+									,"cancel":"1"
+									</c:if>
+								,"cancelDel":"1"
+								</c:if>
+							</shiro:hasPermission>
+						</c:otherwise>
+					</c:choose>
+                }
+                </c:forEach>
+                </c:if>
+
+				]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+</body>
+</html>

+ 668 - 0
src/main/webapp/webpage/modules/statement/departmentProjectReportList.jsp

@@ -0,0 +1,668 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>开票报表</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			layui.use(['dropdown', 'util', 'layer'], function () {
+				var form = layui.form;
+				$.ajax({
+					type : "POST",
+					url : "${ctx}/ruralProject/ruralProjectRecords/engineeringTreeMenu",
+					//请求成功
+					success : function(result) {
+						var str=jQuery.parseJSON(result);
+						//工程类型树形菜单
+						layui.dropdown.render({
+							elem: '#demo100'
+							,style: 'width: 320px;'
+							,data:str
+							,click: function(item){
+								$("#demo100").val(item.title)
+								$("#demo101").val(item.id)
+							}
+						});
+					}
+				});
+			})
+
+			//搜索框收放
+			$('#moresee').click(function(){
+				if($('#moresees').is(':visible'))
+				{
+					$('#moresees').slideUp(0,resizeListWindow2);
+					$('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+				}else{
+					$('#moresees').slideDown(0,resizeListWindow2);
+					$('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+				}
+			});
+			laydate.render({
+				elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+				type : 'date'
+				, trigger: 'click'
+			});
+			laydate.render({
+				elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+				type : 'date'
+				, trigger: 'click'
+			});
+		});
+
+		function reset() {
+			$("#searchForm").resetForm();
+		}
+
+		function openDialog(title,url,width,height,target) {
+
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
+
+			}
+
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				content: url,
+				skin: 'three-btns',
+				btn: ['提交', '关闭'],
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2: function (index) {
+				}
+			});
+		}
+		//打开对话框(查看)
+		function openDialogReportView(title,url,id,width,height){
+
+
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			$.ajax({
+				async: false,
+				url: "${ctx}/ruralProject/ruralCostProjectMessage/getReportExist?id="+id,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						top.layer.open({
+							type: 2,
+							skin: 'one-btn',
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							content: url ,
+							btn: ['关闭'],
+							cancel: function(index){
+							}
+						});
+					}else{
+						top.layer.msg("该项目报告信息已删除!", {icon: 0});
+						window.location.reload();
+					}
+				}
+			});
+
+		}
+		function openDialogre(title,url,width,height,target,buttons) {
+
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			var split = buttons.split(",");
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				skin: 'three-btns',
+				content: url,
+				btn: split,
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					if(split.length==2){return}
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}else {
+						return false;
+					}
+				},
+				btn3: function (index) {
+				}
+			});
+		}
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+
+	<script>
+		function notifyDialogres(title,url,deleteUrl,width,height,target) {
+			parent.index = "";
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				skin: 'three-btns',
+				btn: ['重新申请','作废', '关闭'],
+				btn1: function (index, layero) {
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if (target) {
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					} else {
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if (iframeWin.contentWindow.doSubmit(3)) {
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function () {
+							top.layer.close(index)
+						}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					top.layer.confirm("项目作废", {icon: 3, title:'系统提示'}, function(index){
+						$.ajax({
+							type:'post',
+							url:deleteUrl,
+							success:function(data){
+								top.layer.closeAll();//关闭所有对话框。
+								if(data.code == 1){
+									top.layer.msg(data.msg, {icon: 1});
+								}else{
+									top.layer.msg(data.msg, {icon: 0});
+								}
+								window.location.reload();
+							}
+						})
+					});
+					return false;
+				},cancel: function(index){
+				}
+			});
+		}
+
+		function notifyDialogre(title,url,width,height,target){
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				skin:"three-btns",
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				btn: ['通过','驳回','关闭'],
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+					return false;
+				},
+				btn3: function(index){
+				}
+			});
+
+		}
+
+
+
+		function btnImport(id){
+			top.layer.open({
+				type: 2,
+				area: ['25%', '50%'],
+				title: "上传文件",
+				content: "${ctx}/ruralProject/ruralCostProjectRecords/importFile?id="+id+"&projectType=2",
+				//  btn: ['确定', '关闭'],
+				yes: function (index, layero) {
+					var body = top.layer.getChildFrame('body', index);
+					var inputForm = body.find('#inputForm');
+					var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					inputForm.validate();
+					if (inputForm.valid()) {
+						loading("正在提交,请稍等...");
+						inputForm.submit();
+					} else {
+						return;
+					}
+					top.layer.close(index);//关闭对话框。
+				},
+				cancel: function (index) {
+				}
+				,end: function () {
+					location.reload();
+				}
+			});
+		}
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<%--<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
+				<ul class="list-tabs" >
+					<li class="active"><a href="${ctx}/ruralProject/ruralProjectRecords/list">项目登记列表</a></li>
+					<li><a href="${ctx}/ruralProject/ruralProjectRecordsAlter/list">项目变更列表</a></li>
+				</ul>
+			</div>--%>
+
+		</div>
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="ruralProjectRecords" action="${ctx}/statement/StatementCompanyComprehensive/departmentProjectReportList" method="post" class="form-inline">
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<input id="toflag" name="toflag" type="hidden" value="1"/>
+
+					<input id="userId" name="userId" type="hidden" value="${userId}"/>
+					<input id="type" name="type" type="hidden" value="${type}"/>
+					<input id="officeId" name="officeId" type="hidden" value="${officeId}"/>
+					<input id="year" name="year" type="hidden" value="${year}"/>
+					<input id="bigDateType" name="bigDateType" type="hidden" value="${bigDateType}"/>
+					<input id="smallDateType" name="smallDateType" type="hidden" value="${smallDateType}"/>
+					<input id="grade" name="grade" type="hidden" value="${grade}"/>
+					<input id="recordState" name="recordState" type="hidden" value="${recordState}"/>
+					<input id="reportedState" name="reportedState" type="hidden" value="${reportedState}"/>
+					<input id="field5" name="field5" type="hidden" value="${field5}"/>
+					<input id="field6" name="field6" type="hidden" value="${field6}"/>
+					<input id="field7" name="field7" type="hidden" value="${field7}"/>
+					<input id="field8" name="field8" type="hidden" value="${field8}"/>
+
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery lw6">
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">报告号:</label>
+							<div class="layui-input-block">
+								<form:input path="reportData.number" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<div class="layui-btn-group search-spacing">
+									<button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+									<button id="searchReset" class="layui-btn layui-btn-sm" onclick="resetSearch()">重置</button>
+								</div>
+									<%--								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>--%>
+									<%--								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>--%>
+									<%--								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>--%>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" style="clear:both;display:none;" class="lw6">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目编号:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="projectId" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+<%--						<div class="layui-item query athird ">--%>
+<%--							<label class="layui-form-label">登记人:</label>--%>
+<%--							<div class="layui-input-block with-icon">--%>
+<%--								<sys:inquireselectUserNotReadolny id="createBy" name="createBy.id" value="${ruralProjectRecords.createBy.id}" labelName="createBy.name" labelValue="${ruralProjectRecords.createBy.name}" cssStyle="background-color: #fff"--%>
+<%--																  title="登记人" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>--%>
+<%--							</div>--%>
+<%--						</div>--%>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">项目责任人:</label>
+							<div class="layui-input-block">
+								<form:input path="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+<%--						<div class="layui-item query athird">--%>
+<%--							<label class="layui-form-label">工程类别:</label>--%>
+<%--							<div class="layui-input-block">--%>
+<%--								<input id="demo100" value="${engineeringInfo.engineeringName}" readonly="true" style="background-color: #fff" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>--%>
+<%--								<form:input id="demo101" path="engineeringType" readonly="true" cssStyle="background-color: #fff;display: none"  htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>--%>
+<%--									&lt;%&ndash;								<button type="button" class="layui-btn layui-btn-primary" style="width: 100%;text-align: left" id="demo100">&ndash;%&gt;--%>
+<%--									&lt;%&ndash;									<span>${engineeringInfo.engineeringName}</span>&ndash;%&gt;--%>
+<%--									&lt;%&ndash;									<input type="hidden" name="engineeringType" id="engineeringType" value="${engineeringInfo.engineeringName}"/>&ndash;%&gt;--%>
+<%--									&lt;%&ndash;									<i class="layui-icon layui-icon-down layui-font-12" style="float: right"></i>&ndash;%&gt;--%>
+<%--									&lt;%&ndash;								</button>&ndash;%&gt;--%>
+<%--							</div>--%>
+<%--						</div>--%>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">合同名称:</label>
+							<div class="layui-input-block">
+								<form:input path="workContractInfo.name" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">创建时间:</label>
+							<div class="layui-input-block readOnlyFFF">
+								<input id="beginDate" name="beginDate" placeholder="开始时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${projectRecords.beginDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endDate" name="endDate" placeholder="结束时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${projectRecords.endDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+							</div>
+						</div>
+
+						<div class="layui-item query athird ">
+							<label class="layui-form-label double-line">项目等级:</label>
+							<div class="layui-input-block">
+								<form:select path="submitMoney" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:option value="2" label="A级"/>
+									<form:option value="1" label="B级"/>
+									<%--<form:option value="3" label="B级紧急"/>
+									<form:option value="1" label="B级非紧急"/>--%>
+								</form:select>
+							</div>
+						</div>
+
+
+						<div style="clear:both;"></div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="layui-form contentDetails contentShadow shadowLBR">
+				<div class="nav-btns">
+					<div class="layui-btn-group">
+<%--						<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:add">--%>
+<%--							<table:addRow url="${ctx}/ruralProject/ruralCostProjectRecords/form" title="项目"></table:addRow><!-- 增加按钮 -->--%>
+<%--						</shiro:hasPermission>--%>
+<%--						<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:del">--%>
+<%--							&lt;%&ndash;<table:delRow url="${ctx}/project/projectRecords/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->&ndash;%&gt;--%>
+<%--						</shiro:hasPermission>--%>
+<%--						<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:importB">--%>
+<%--							<table:importExcel url="${ctx}/ruralProject/ruralCostProjectRecords/importB"></table:importExcel><!-- 导入按钮 -->--%>
+<%--						</shiro:hasPermission>--%>
+<%--						<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:export">--%>
+<%--							<table:exportExcel url="${ctx}/ruralProject/ruralCostProjectRecords/export"></table:exportExcel><!-- 导出按钮 -->--%>
+<%--						</shiro:hasPermission>--%>
+<%--						<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:exportAll">--%>
+<%--							<button type="button" data-toggle="tooltip" data-placement="top" class="layui-btn layui-btn-sm layui-bg-blue" id="delUser"> 批量下载</button>--%>
+<%--						</shiro:hasPermission>--%>
+						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+					</div>
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable1"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+
+<%--<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>--%>
+<script>
+
+	layui.use('table', function(){
+		layui.table.render({
+			limit:${ page.pageSize }
+			,id:"checkboxTable"
+			,elem: '#contentTable1'
+			,page: false
+			,cols: [[
+				{field:'index',align:'center', title: '序号',width:60}
+				,{field:'projName',align:'center', title: '项目名称',minWidth:200,templet:function(d){
+						if(1 == d.showView && d.showView != undefined){
+							return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectView/view?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
+						}else{
+							return "<span title='"+ d.projName +"'>" +d.projName+ "</span>";
+						}
+					}}
+				,{field:'projId',align:'center', title: '项目编号',  width:150}
+				/*,{field:'projId',align:'center', title: '项目编号',minWidth:150,templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.projId + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralCostProjectRecords/view?id=" + d.id + "','95%', '95%')\">" + d.projId + "</a>";
+                    }}*/
+				,{field: 'clientName', align:'center', title: '报告号',width:170,templet: function(d){
+						if(""!= d.projectReportNumber){
+							<%--return "<a class=\"attention-info pid\" title=\"" + d.projectReportNumber + "\" href=\"javascript:void(0);\" onclick=\"openDialogReportView('查看报告信息', '${ctx}/ruralProject/ruralProjectMessage/modify?projectId=" + d.id + "&view=view&reportedId="+d.id+"','"+ d.id +"','95%', '95%')\">" + d.projectReportNumber + "</a>";--%>
+							return  d.projectReportNumber;
+						}else{
+							return "<span title='暂无报告'  style='color: #009688'>暂无报告</span>";
+						}
+					}}
+				,{field:'contract', align:'center',title: '合同名称',minWidth:200,templet:function(d){
+						if(""!= d.contract){
+							return "<a class=\"attention-info\" title=\""+d.contract+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同管理', '${ctx}/workcontractinfo/workContractInfo/lookForm?id=" + d.conId + "','95%', '95%')\">" + d.contract + "</a>";
+						}else{
+							return "<span title='暂无合同'  style='color: #FF5722'>暂无合同</span>";
+						}
+					}}
+				,{field:'projMaster', align:'center',title: '责任人', width:100,templet:function(d){
+						return "<span title=\"" + d.projMaster + "\">" + d.projMaster + "</span>";
+					}}
+				,{field:'createDate',align:'center', title: '创建日期',  width:80}
+				,{field: 'submitMoneyStr', align:'center', title: '项目等级',width:100,templet: function(d){
+						return "<font style = 'font-size:14px;'>"+d.submitMoneyStr+"</font>";
+					}}
+			]]
+			,data: [
+				<c:if test="${ not empty page.list}">
+				<c:forEach items="${page.list}" var="projectRecords" varStatus="index">
+				<c:if test="${index.index != 0}">,</c:if>
+				{
+					"index":"${index.index+1}"
+					,"id":"${projectRecords.id}"
+					,"projId":"${projectRecords.projectId}"
+					,"projName":"<c:out value="${projectRecords.projectName}" escapeXml="true"/>"
+					,"projMaster":"<c:forEach items="${projectRecords.projectLeaders}" var="leader" varStatus="status"><c:choose><c:when test="${status.last}">${leader.name}</c:when><c:otherwise>${leader.name},</c:otherwise></c:choose></c:forEach>"
+					,"contract":"${projectRecords.workContractInfo.name}"
+					,"conId":"${projectRecords.workContractInfo.id}"
+					,"client":"${projectRecords.workContractInfo.client.name}"
+					,"projectReportNumber":"${projectRecords.projectReportNumber}"
+					,"createDate":"<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>"
+					,"projectStatus":"${projectRecords.projectStatus}"
+					,"projectReportRecordStatus":"${projectRecords.projectReportRecordStatus}"
+					,"procId":"${projectRecords.processInstanceId}"
+					,"flagAdmin":"${projectRecords.flagAdmin}"
+					,"notifyFlag":"${projectRecords.notifyFlag}"
+					,"notifyId":"${projectRecords.notifyId}"
+					<c:choose><c:when test="${flag == '1' or fns:getUser().id == projectRecords.createBy.id}">
+					<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:del">,"candel":	<c:choose><c:when test="${(projectRecords.projectStatus == 1 or projectRecords.projectStatus == 3 or projectRecords.projectStatus == 4) && fns:getUser().id == projectRecords.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+					<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:edit">,"canedit1":	<c:choose><c:when test="${projectRecords.projectStatus == 1 && fns:getUser().id == projectRecords.createBy.id }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					,"canedit2":<c:choose><c:when test="${projectRecords.projectStatus == 4 && fns:getUser().id == projectRecords.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					,"canrecall":<c:choose><c:when test="${projectRecords.projectStatus == 3 && fns:getUser().id == projectRecords.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					</shiro:hasPermission>
+					,"cancancel":<c:choose><c:when test="${projectRecords.projectStatus == 2 && fns:getUser().id == projectRecords.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					,"deleteAdmin":<c:choose><c:when test="${'1' == projectRecords.flagAdmin && projectRecords.projectStatus == 5}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					,"modifyRecords":<c:choose><c:when test="${fns:getUser().id == projectRecords.createBy.id && '2' != projectRecords.projectReportStatus && '5' != projectRecords.projectReportStatus && projectRecords.projectStatus == 5}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					<c:if test="${'1' == projectRecords.flagAdmin}">
+					,"reportDataFlag":<c:choose><c:when test="${'0' == projectRecords.reportDataFlag && projectRecords.projectStatus == 5}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					</c:if>
+					<c:if test="${'0' == projectRecords.flagAdmin}">
+					,"reportDataFlag":<c:choose><c:when test="${fns:getUser().id == projectRecords.createBy.id && '0' == projectRecords.reportDataFlag && projectRecords.projectStatus == 5}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					</c:if>
+					</c:when>
+					<c:otherwise>
+					,"candel":"0"
+					,"canedit1":"0"
+					,"canedit2":"0"
+					,"canrecall":"0"
+					,"cancancel":"0"
+					,"deleteAdmin":"0"
+					,"recordStatus":"0"
+					</c:otherwise>
+					</c:choose>
+					,"submitMoneyStr":
+							<c:choose>
+							<c:when test="${'2'==projectRecords.submitMoney}">
+							"A级"
+					</c:when>
+					<c:otherwise>
+					"B级"
+					<%--<c:choose>
+                        <c:when test="${'1'==projectRecords.emergencyProject}">
+                            "B级紧急"
+                        </c:when>
+                        <c:otherwise>
+                            "B级非紧急"
+                        </c:otherwise>
+                    </c:choose>--%>
+					</c:otherwise>
+					</c:choose>
+					<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:edit">,"canedit3":<c:choose><c:when test="${projectRecords.projectStatus == 5 && fn:contains(projectRecords.leaderIds,fns:getUser().id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+					<shiro:hasPermission name="ruralProject:ruralCostProjectRecords:accessory">
+					,"recordStatus":
+							<c:choose>
+							<c:when test="${0 ==projectRecords.projectReportRecordStatus && projectRecords.projectStatus != 7}">"1"</c:when>
+					<c:otherwise>"0"</c:otherwise>
+					</c:choose>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="ruralProject:ruralProjectView:costView">
+					,"showView":1
+					</shiro:hasPermission>
+				}
+				</c:forEach>
+				</c:if>
+			]
+			// ,even: true
+			// ,height: 315
+		});
+		$("#delUser").bind("click",function () {
+			//获得表格CheckBox已经选中的行的信息
+			var checkList = layui.table.checkStatus('checkboxTable').data;
+			//定义数组存放批量删除的行的id
+			var listId = [];
+			//进行遍历所有选中行数据,拿出每一行的id存储到数组中
+			$.each(checkList, function (i, data) {
+				listId.push(data.id);
+			});
+			if (listId.length <= 0) {
+				layer.msg("请选择需要下载的项目信息", {icon: 2})
+			} else {
+				$("#searchForm").attr("action","${ctx}/ruralProject/ruralProjectRecords/exportAll?listId="+ listId);
+				$("#searchForm").submit();
+				return true;
+			}
+		});
+	})
+
+	resizeListTable();
+	$("a").on("click",addLinkVisied);
+</script>
+<script>
+	resizeListWindow2();
+	$(window).resize(function(){
+		resizeListWindow2();
+	});
+</script>
+</body>
+</html>

+ 583 - 0
src/main/webapp/webpage/modules/statement/departmentReimbursementReportList.jsp

@@ -0,0 +1,583 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>报销单管理</title>
+    <meta name="decorator" content="default"/>
+
+
+    <style>
+        .widthClass{
+            display: inline-block;
+        }
+        .shows .input-group{
+            width: 48%!important;
+        }
+    </style>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+    <script>
+
+        function notifyDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin:"three-btns",
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['通过','驳回','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+    </script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="contentShadow layui-row" id="queryDiv">
+                <form:form id="searchForm" modelAttribute="workReimbursement" action="${ctx}/statement/StatementCompanyComprehensive/departmentReimbursementReportList" method="post" class="form-inline">
+                    <%--以下三行照抄--%>
+                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+                    <input id="toflag" name="toflag" type="hidden" value="1"/>
+
+                    <input id="userId" name="userId" type="hidden" value="${userId}"/>
+                    <input id="type" name="type" type="hidden" value="${type}"/>
+                    <input id="officeIdd" name="officeIdd" type="hidden" value="${officeIdd}"/>
+                    <input id="year" name="year" type="hidden" value="${year}"/>
+                    <input id="bigDateType" name="bigDateType" type="hidden" value="${bigDateType}"/>
+                    <input id="smallDateType" name="smallDateType" type="hidden" value="${smallDateType}"/>
+
+                    <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+                    <div class="commonQuery">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销项目:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:gridselectcallprojectt url="${ctx}/workreimbursement/workReimbursement/selectprojectOnList" id="project" name="project.id"  value="${workReimbursement.project.id}"  title="选择报销项目" labelName="project.projectName" cssStyle="background-color:#fff"
+                                                           labelValue="${workReimbursement.project.projectName}" cssClass="form-control required layui-input"  fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+                            </div>
+                        </div>
+                        <%--<div class="layui-item query athird">
+                            <label class="layui-form-label">报销时间:</label>
+                            <div class="layui-input-block">
+                                <input id="startDate" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                                       value="<fmt:formatDate value="${workReimbursement.startDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">——&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+                            <div class="layui-input-block">
+                                <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                                       value="<fmt:formatDate value="${workReimbursement.endDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>--%>
+
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销时间:</label>
+                            <div class="layui-input-block readOnlyFFF">
+                                <input id="startDate" placeholder="开始时间" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group bg-white"
+                                       value="<fmt:formatDate value="${workReimbursement.startDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endDate" placeholder="结束时间" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group  bg-white"
+                                       value="<fmt:formatDate value="${workReimbursement.endDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>
+
+                        <div class="layui-item athird">
+                            <div class="input-group">
+                                <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+                                <div class="layui-btn-group search-spacing">
+                                    <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+                                    <button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
+                                </div>
+                            </div>
+                        </div>
+                        <div style="    clear:both;"></div>
+                    </div>
+                    <div id="moresees" style="clear:both;display:none;">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">经办人:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:inquireselectUser id="handleId" name="handleId" value="${workReimbursement.handleId}" labelName="handleName" labelValue="${workReimbursement.handleName}"
+                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true" allowInput="true" cssStyle="background-color:#fff"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销人:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:inquireselectUser id="submitterId" name="submitterId" value="${workReimbursement.submitterId}" labelName="submitterName" labelValue="${workReimbursement.submitterName}"
+                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  cssStyle="background-color:#fff" allowInput="true"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销状态:</label>
+                            <div class="layui-input-block">
+                                <form:select path="status" class="form-control simple-select">
+                                    <form:option value="" label=""/>
+                                    <form:options items="${fns:getDictList('reimburse_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                        </div>
+<%--                        <div class="layui-item query athird">--%>
+<%--                            <label class="layui-form-label">报销部门:</label>--%>
+<%--                            <div class="layui-input-block with-icon">--%>
+<%--                                <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"--%>
+<%--                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  allowInput="true" cssStyle="background-color:#fff"/>--%>
+<%--                            </div>--%>
+<%--                        </div>--%>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销类别:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:treeselectAccessory id="type" name="businessType" value="${workReimbursement.businessType}" labelName="businessTypeName" labelValue="${workReimbursement.businessTypeName}"
+                                                         cssStyle="background-color:#fff" title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId=""  cssClass="form-control  layui-input" allowInput="true" allowClear="true" notAllowSelectParent="true"/>
+
+<%--                                <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"--%>
+<%--                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  cssStyle="background-color:#fff"/>--%>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label double-line">报销金额:</label>
+                            <div class="layui-input-block with-icon">
+                                <input id="beginReimbursementPrice" placeholder="(元)" name="beginReimbursementPrice" type="text" value="${workReimbursement.beginReimbursementPrice}" maxlength="10" class="form-control layui-input query-group" onkeyup="value=value.replace(/[^\d]/g,'')"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endReimbursementPrice"  placeholder="(元)" name="endReimbursementPrice" type="text" value="${workReimbursement.endReimbursementPrice}"  maxlength="10" class="form-control layui-input query-group" onkeyup="value=value.replace(/[^\d]/g,'')"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报告号:</label>
+                            <div class="layui-input-block with-icon">
+                                <input id="projectName" placeholder="请输入报告号" name="projectName" type="text" maxlength="20" class="form-control layui-input" value="${workReimbursement.projectName}"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div style="clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <%--此处按钮样式包括 nav-btn-add nav-btn-refresh nav-btn-import nav-btn-export nav-btn-query nav-btn-reset--%>
+                    <div class="layui-btn-group">
+<%--                        <shiro:hasPermission name="workreimbursement:workReimbursement:add">--%>
+<%--                            <button onclick="openDialogre('新增报销单', '${ctx}/workreimbursement/workReimbursement/form?tabId=0','95%','95%')" class="layui-btn layui-btn-sm layui-bg-blue" >&nbsp;添加</button>--%>
+<%--                        </shiro:hasPermission>--%>
+<%--                        <shiro:hasPermission name="workreimbursement:workReimbursement:export">--%>
+<%--                            <table:exportExcel url="${ctx}/workreimbursement/workReimbursement/export"></table:exportExcel><!-- 导出按钮 -->--%>
+<%--                        </shiro:hasPermission>--%>
+
+                        <button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+                    </div>
+                    <div style="clear: both;"></div>
+                </div>
+                <table class="oa-table layui-table" id="contentTable"></table>
+
+                <!-- 分页代码 -->
+                <table:page page="${page}"></table:page>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+    <div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                // {checkbox: true, fixed: true},
+                {field:'submitterId',align:'center',  width:40,title: '序号'}
+                ,{field:'number',align:'center', title: '报销编号', width:150,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogListView('查看报销单', '${ctx}/workreimbursement/workReimbursement/form?id=" + d.id + "&tabId=1','"+ d.id +"','95%','95%')\">" +
+                            "<span title=" + d.realnumber + ">" + d.number + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'businessTypeName',align:'center', title: '报销类别', width:100,templet:function(d){
+                        return "<span title='"+ d.businessTypeName +"'>" + d.businessTypeName + "</span>";
+                    }}
+                ,{field:'projectId', align:'center',title: '报销项目', minWidth:150,templet:function(d){
+                        if(1 == d.showView && d.showView != undefined){
+                            return "<a class=\"attention-info\" title=\"" + d.projectId + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectView/view?id=" + d.proId +"','95%', '95%')\">" + d.projectId + "</a>";
+                        }else{
+                            return "<span title='"+ d.projectId +"'>" +d.projectId+ "</span>";
+                        }
+                    // return "<span title='"+ d.projectId +"'>" + d.projectId + "</span>";
+                    }}
+                ,{field:'projectNumber',align:'center', title: '报告号', width:100,templet:function(d){
+                        return "<span title='"+ d.projectNumber +"'>" + d.projectNumber + "</span>";
+                    }}
+                ,{field:'handleName',align:'center', title: '经办人', width:100,templet:function(d){
+                        return "<span title='"+ d.handleName +"'>" + d.handleName + "</span>";
+                    }}
+                ,{field:'submitterName',align:'center', title: '报销人', width:100,templet:function(d){
+                        return "<span title='"+ d.submitterName +"'>" + d.submitterName + "</span>";
+                    }}
+
+                ,/*{field:'projectLeader', align:'center',title: '项目负责人', width:80,templet:function(d){
+                        return "<span title='"+ d.projectLeader +"'>" + d.projectLeader + "</span>";
+                    }}
+                ,*/{field:'submitterDate', align:'center',title: '报销日期',width:80}
+                ,{field:'money',align:'center', title: '报销金额(元)', width:150,templet:function(d){
+                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                    }}
+                /*,{field:'taskName', align:'center',title: '审批状态',width:120}*/
+
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workReimbursement" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workReimbursement.id}"
+                    ,"submitterId":"${index.index+1}"
+                    ,"realnumber":"${workReimbursement.number}"
+                    ,"number":"${workReimbursement.number}"
+                    ,"taskName":"${workReimbursement.taskName}"
+                    ,"notifyFlag":"${workReimbursement.notifyFlag}"
+                    ,"notifyId":"${workReimbursement.notifyId}"
+                    ,"submitterName":"<c:out value="${fns:getUserById(workReimbursement.submitterId).name}" escapeXml="true"/>"
+                    ,"handleName":"<c:out value="${fns:getUserById(workReimbursement.handleId).name}" escapeXml="true"/>"
+                    ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).name}"
+                    ,"proId":"${workReimbursement.project.projectId}"
+                    ,"projectId":
+                        <c:if test="${workReimbursement.ext == 1}">
+                            "<c:out value="${workReimbursement.projectName}" escapeXml="true"/>"
+                        </c:if>
+                        <c:if test="${workReimbursement.ext != 1}">
+                            "<c:out value="${workReimbursement.project.projectName}" escapeXml="true"/>"
+                        </c:if>
+                    ,"projectLeader":
+                        <c:if test="${not empty workReimbursement.project && not empty workReimbursement.project.leaderNameStr}">
+                            "<c:out value="${workReimbursement.project.leaderNameStr}" escapeXml="true"/>"
+                    </c:if>
+                    <c:if test="${empty workReimbursement.project || empty workReimbursement.project.leaderNameStr}">
+                    ""
+                    </c:if>
+                    ,"submitterDate":"<fmt:formatDate value="${workReimbursement.submitterDate}" pattern="yyyy-MM-dd"/>"
+                    ,"money":"<fmt:formatNumber value="${workReimbursement.money}" pattern="#,##0.00"/>"
+                    ,"status":"${workReimbursement.status}"
+                    <shiro:hasPermission name="workreimbursement:workReimbursement:del">
+                    ,"candelete":
+                        <c:if test="${fns:getUser().id == workReimbursement.createBy.id && (workReimbursement.status == '1' or workReimbursement.status == '3' or workReimbursement.status == '4')}">"1"</c:if>
+                    <c:if test="${fns:getUser().id != workReimbursement.createBy.id || (workReimbursement.status != '1' and workReimbursement.status != '3' and workReimbursement.status != '4')}">"0"</c:if>
+                    </shiro:hasPermission>
+                    ,"cancancel":
+                        <c:if test="${workReimbursement.status == '2' && fns:getUser().id == workReimbursement.createBy.id}">"1"</c:if>
+                    <c:if test="${workReimbursement.status != '2' || fns:getUser().id != workReimbursement.createBy.id}">"0"</c:if>
+                    <shiro:hasPermission name="workreimbursement:workReimbursement:edit">
+                    ,"canedit1":
+                        <c:if test="${fns:getUser().id == workReimbursement.createBy.id && workReimbursement.status == '1' }">"1"</c:if>
+                    <c:if test="${fns:getUser().id != workReimbursement.createBy.id || workReimbursement.status != '1' }">"0"</c:if>
+                    ,"canedit2":
+                        <c:if test="${fns:getUser().id == workReimbursement.createBy.id && workReimbursement.status == '4' && fns:getUser().id == workReimbursement.createBy.id}">"1"</c:if>
+                    <c:if test="${fns:getUser().id != workReimbursement.createBy.id || workReimbursement.status != '4' || fns:getUser().id != workReimbursement.createBy.id}">"0"</c:if>
+                    ,"canedit3":
+                        <c:if test="${workReimbursement.status == '3' && fns:getUser().id == workReimbursement.createBy.id}">"1"</c:if>
+                    <c:if test="${workReimbursement.status != '3' || fns:getUser().id != workReimbursement.createBy.id}">"0"</c:if>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="ruralProject:ruralProjectView:reimbursementView">
+                    ,"showView":1
+                    </shiro:hasPermission>
+                    ,"businessTypeName":"${workReimbursement.businessTypeName}"
+                    ,"projectNumber":"${workReimbursement.projectName}"
+
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+    })
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        //搜索框收放
+        $('#moresee').click(function(){
+            if($('#moresees').is(':visible'))
+            {
+                $('#moresees').slideUp(0,resizeListWindow1);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+            }else{
+                $('#moresees').slideDown(0,resizeListWindow1);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+            }
+        });
+
+        laydate.render({
+            elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+, trigger: 'click'
+        });
+        laydate.render({
+            elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+, trigger: 'click'
+        });
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+    function openDialogre(title,url,width,height,target){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: 'three-btns',
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            btn: ['送审','暂存','关闭'],
+            btn1: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                if(iframeWin.contentWindow.doSubmit(1) ){
+                    //top.layer.close(index);//关闭对话框。
+                    setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+            },
+            btn2:function(index,layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                if(iframeWin.contentWindow.doSubmit(2) ){
+                   // top.layer.close(index);//关闭对话框。
+                       setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+                return false;
+            },
+            btn3: function(index){
+            }
+        });
+    }
+    function openDialogreplay(title,url,width,height,target){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: 'two-btns',
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            btn: ['重新申请','关闭'],
+            yes: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                if(iframeWin.contentWindow.doSubmit() ){
+                    top.layer.close(index);//关闭对话框。
+                    //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+
+            },
+            cancel: function(index){
+            }
+        });
+    }
+
+
+    function openDialogreModify(title,url,id,width,height,target) {
+
+        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+            width = 'auto';
+            height = 'auto';
+        } else {//如果是PC端,根据用户设置的width和height显示。
+
+        }
+
+        $.ajax({
+            async: false,
+            url: "${ctx}/workreimbursement/workReimbursement/getExist?id="+id,
+            dataType: "json",
+            success: function (data) {
+                if(data.success){
+                    top.layer.open({
+                        type: 2,
+                        area: [width, height],
+                        title: title,
+                        skin: 'two-btns',
+                        maxmin: true, //开启最大化最小化按钮
+                        content: url ,
+                        btn: ['重新申请','关闭'],
+                        yes: function(index, layero){
+                            var body = top.layer.getChildFrame('body', index);
+                            var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                            var inputForm = body.find('#inputForm');
+                            var top_iframe;
+                            if(target){
+                                top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                            }else{
+                                top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                            }
+                            inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                            if(iframeWin.contentWindow.doSubmit() ){
+                                top.layer.close(index);//关闭对话框。
+                                //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                            }
+
+                        },
+                        cancel: function(index){
+                        }
+                    });
+                }else{
+                    top.layer.msg("该报销信息已删除!", {icon: 0});
+                    window.location.reload();
+                }
+            }
+        });
+
+
+    }
+
+
+    //打开对话框(查看)
+    function openDialogListView(title,url,id,width,height){
+
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        $.ajax({
+            async: false,
+            url: "${ctx}/workreimbursement/workReimbursement/getExist?id="+id,
+            dataType: "json",
+            success: function (data) {
+                if(data.success){
+                    top.layer.open({
+                        type: 2,
+                        skin: 'one-btn',
+                        area: [width, height],
+                        title: title,
+                        maxmin: true, //开启最大化最小化按钮
+                        content: url ,
+                        btn: ['关闭'],
+                        cancel: function(index){
+                        }
+                    });
+                }else{
+                    top.layer.msg("该报销信息已删除!", {icon: 0});
+                    window.location.reload();
+                }
+            }
+        });
+
+    }
+</script>
+</body>
+</html>

+ 1 - 0
src/main/webapp/webpage/modules/statement/projectReportList.jsp

@@ -364,6 +364,7 @@
 
 					<input id="officeId" name="officeId" type="hidden" value="${officeId}"/>
 					<input id="year" name="year" type="hidden" value="${year}"/>
+					<input id="type" name="type" type="hidden" value="${type}"/>
 					<input id="bigDateType" name="bigDateType" type="hidden" value="${bigDateType}"/>
 					<input id="smallDateType" name="smallDateType" type="hidden" value="${smallDateType}"/>
 					<input id="grade" name="grade" type="hidden" value="${grade}"/>