guoxu 2 роки тому
батько
коміт
48847aa143

+ 5 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectRecordsDao.java

@@ -420,4 +420,9 @@ public interface RuralProjectRecordsDao extends CrudDao<RuralProjectRecords> {
     //公司级 查询的符合条件的项目报表总数(发送张静)
     Integer reportZJPageCount(@Param("ruralProjectRecords") RuralProjectRecords ruralProjectRecords,@Param("officeId") String officeId,@Param("projectPaperFiling")String projectPaperFiling,@Param("beginDate")String beginDate,@Param("endDate") String endDate,@Param("recordState")String recordState,@Param("projectFlingBatchRelation")String projectFlingBatchRelation);
 
+    //部门级 查询项目超期信息(4种)
+    List<RuralProjectRecords> selectDepartmentReportPageOverdueByYear(@Param("ruralProjectRecords") RuralProjectRecords ruralProjectRecords, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("beginDate")String beginDate,@Param("endDate") String endDate);
+
+    //部门级 查询项目超期信息的总条数
+    Integer selectDepartmentReportPageOverdueCountByYear(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
 }

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

@@ -4948,5 +4948,39 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		return page;
 	}
 
-
+	//部门级:chaoqi项目报表详细 年度
+	public Page<RuralProjectRecords> findDepartmentReportPageOverdueByYear(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.selectDepartmentReportPageOverdueByYear(projectRecords,statementCompanyComprehensiveInfo,beginDate,endDate);
+		int count = dao.selectDepartmentReportPageOverdueCountByYear(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;
+	}
 }

+ 63 - 2
src/main/java/com/jeeplus/modules/statement/controller/StatementCompanyComprehensiveController.java

@@ -1003,6 +1003,67 @@ public class StatementCompanyComprehensiveController extends BaseController {
     }
 
 
-//    切换年度报表
-//    public String
+    //部门级:项目报表详细
+    //参数:officeId ,bigDateType,smallDateType
+    // grade:是否为A、B类(1=B,2=A),recordState:不为空则为查询本*电子归档,reportedState:不为空则为查询本*上报
+    @RequestMapping(value = "departmentProjectReportListByYear")
+    public String departmentProjectReportListByYear(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");  //项目
+        statementCompanyComprehensiveInfo.setBigDateType("0");
+        //每次都必须接收前端传参并放入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.findDepartmentReportPageOverdueByYear(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";
+    }
 }

+ 36 - 0
src/main/java/com/jeeplus/modules/statement/dao/StatementCompanyComprehensiveDao.java

@@ -782,4 +782,40 @@ public interface StatementCompanyComprehensiveDao  extends CrudDao<StatementComp
      */
     List<StatementCompanyComprehensiveInfo> selectReportAllByType(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
 
+
+    /**
+     * 按照big,small,year,type,office_id查询部门级所有报表信息
+     * @param statementCompanyComprehensiveInfo
+     * @return
+     */
+    List<StatementCompanyComprehensiveInfo> selectAllByOfficeIdByYear(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
+
+
+    /**
+     * 部门级超期、未超期数据存储 年部
+     * @param statementDataInfoList
+     */
+    void insertOfficeStatementDataInfoByYear(@Param("dataList")List<StatementDataInfo> statementDataInfoList);
+
+
+    /**
+     * 部门级超期、未超期数据删除
+     * @param statementDataInfoList
+     */
+    void deleteOfficeStatementDataInfoByYear(StatementDataInfo statementDataInfoList);
+
+
+    /**
+     * 删除部门级数据信息
+     * @param info
+     * @return
+     */
+    Integer deleteOfficeComprehensiveByYear(StatementCompanyComprehensiveInfo info);
+
+    /**
+     * 保存部门级数据信息
+     * @param info
+     * @return
+     */
+    Integer insertOfficeComprehensiveByYear(StatementCompanyComprehensiveInfo info);
 }

+ 668 - 0
src/main/java/com/jeeplus/modules/statement/service/StatementCompanyComprehensiveService.java

@@ -2649,10 +2649,123 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         htinfo.setField3(htnum3);
         htinfo.setField4(htnum4);
         reportFormList4.add(htinfo);
+
+        //公司级:年部项目报表总览
+        //type:类型(1:项目;2:开票;3:报销;4:合同)
+        statementCompanyComprehensiveInfo.setType("1");
+        statementCompanyComprehensiveInfo.setBigDateType("0");
+        List<StatementCompanyComprehensiveInfo> reportFormList5 = dao.selectAllByOfficeIdByYear(statementCompanyComprehensiveInfo);
+        //项目表 各列合计
+        String xmYearNum1 = "0";
+        String xmYearNum2 = "0";
+        String xmYearNum3 = "0";
+        String xmYearNum4 = "0";
+        String xmYearNum5 = "0";
+        String xmYearNum6 = "0";
+        String xmYearNum7 = "0";
+        String xmYearNum8 = "0";
+        for(StatementCompanyComprehensiveInfo info:reportFormList5){
+            //转BigDecimal 处理   合计
+            xmYearNum1 = new BigDecimal(info.getField1()).add(new BigDecimal(xmYearNum1)).toString();
+            xmYearNum2 = new BigDecimal(info.getField2()).add(new BigDecimal(xmYearNum2)).toString();
+            xmYearNum3 = new BigDecimal(info.getField3()).add(new BigDecimal(xmYearNum3)).toString();
+            xmYearNum4 = new BigDecimal(info.getField4()).add(new BigDecimal(xmYearNum4)).toString();
+            xmYearNum5 = new BigDecimal(info.getField5()).add(new BigDecimal(xmYearNum5)).toString();
+            xmYearNum6 = new BigDecimal(info.getField6()).add(new BigDecimal(xmYearNum6)).toString();
+            xmYearNum7 = new BigDecimal(info.getField7()).add(new BigDecimal(xmYearNum7)).toString();
+            xmYearNum8 = new BigDecimal(info.getField8()).add(new BigDecimal(xmYearNum8)).toString();
+        }
+        //存放到对应报表的list集合,方便页面集合展示
+        StatementCompanyComprehensiveInfo xmInfoYear = new StatementCompanyComprehensiveInfo();
+        xmInfoYear.setOfficeName("本年合计");
+        xmInfoYear.setField1(xmYearNum1);
+        xmInfoYear.setField2(xmYearNum2);
+        xmInfoYear.setField3(xmYearNum3);
+        xmInfoYear.setField4(xmYearNum4);
+        xmInfoYear.setField5(xmYearNum5);
+        xmInfoYear.setField6(xmYearNum6);
+        xmInfoYear.setField7(xmYearNum7);
+        xmInfoYear.setField8(xmYearNum8);
+        reportFormList5.add(xmInfoYear);
+
+        //部门级:开票报表
+        //类型(1:项目;2:开票;3:报销;4:合同)
+        statementCompanyComprehensiveInfo.setType("2");
+        List<StatementCompanyComprehensiveInfo> reportFormList6 = dao.selectAllByOfficeIdByYear(statementCompanyComprehensiveInfo);
+        //各列合计
+        String kpYearNum1 = "0";
+        String kpYearNum2 = "0";
+        String kpYearNum3 = "0";
+        String kpYearNum4 = "0";
+        for(StatementCompanyComprehensiveInfo info:reportFormList6){
+            //转BigDecimal 处理
+            kpYearNum1 = new BigDecimal(info.getField1()).add(new BigDecimal(kpYearNum1)).toString();
+            kpYearNum2 = new BigDecimal(info.getField2()).add(new BigDecimal(kpYearNum2)).toString();
+            kpYearNum3 = new BigDecimal(info.getField3()).add(new BigDecimal(kpYearNum3)).toString();
+            kpYearNum4 = new BigDecimal(info.getField4()).add(new BigDecimal(kpYearNum4)).toString();
+        }
+        //存放到对应报表的list集合,方便页面集合展示
+        StatementCompanyComprehensiveInfo kpInfoYear = new StatementCompanyComprehensiveInfo();
+        kpInfoYear.setOfficeName("本年合计");
+        kpInfoYear.setField1(kpYearNum1);
+        kpInfoYear.setField2(kpYearNum2);
+        kpInfoYear.setField3(kpYearNum3);
+        kpInfoYear.setField4(kpYearNum4);
+        reportFormList6.add(kpInfoYear);
+
+        //公司级:报销报表
+        //类型(1:项目;2:开票;3:报销;4:合同)
+        statementCompanyComprehensiveInfo.setType("3");
+        List<StatementCompanyComprehensiveInfo> reportFormList7 = dao.selectAllByOfficeIdByYear(statementCompanyComprehensiveInfo);
+        //合计
+        String bxYearNum1 = "0";
+        String bxYearNum2 = "0";
+        for(StatementCompanyComprehensiveInfo info:reportFormList7){
+            //转BigDecimal 处理
+            bxYearNum1 = new BigDecimal(info.getField1()).add(new BigDecimal(bxYearNum1)).toString();
+            bxYearNum2 = new BigDecimal(info.getField2()).add(new BigDecimal(bxYearNum2)).toString();
+        }
+        //存放到对应报表的list集合,方便页面集合展示
+        StatementCompanyComprehensiveInfo bxInfoYear = new StatementCompanyComprehensiveInfo();
+        bxInfoYear.setOfficeName("本年合计");
+        bxInfoYear.setField1(bxYearNum1);
+        bxInfoYear.setField2(bxYearNum2);
+        reportFormList7.add(bxInfoYear);
+
+        //公司级:合同报表
+        //类型(1:项目;2:开票;3:报销;4:合同)
+        statementCompanyComprehensiveInfo.setType("4");
+        List<StatementCompanyComprehensiveInfo> reportFormList8= dao.selectAllByOfficeIdByYear(statementCompanyComprehensiveInfo);
+        //合计
+        String htYearNum1 = "0";
+        String htYearNum2 = "0";
+        String htYearNum3 = "0";
+        String htYearNum4 = "0";
+        for(StatementCompanyComprehensiveInfo info:reportFormList8){
+            //转BigDecimal 处理
+            htYearNum1 = new BigDecimal(info.getField1()).add(new BigDecimal(htYearNum1)).toString();
+            htYearNum2 = new BigDecimal(info.getField2()).add(new BigDecimal(htYearNum2)).toString();
+            htYearNum3 = new BigDecimal(info.getField3()).add(new BigDecimal(htYearNum3)).toString();
+            htYearNum4 = new BigDecimal(info.getField4()).add(new BigDecimal(htYearNum4)).toString();
+        }
+        //存放到对应报表的list集合,方便页面集合展示
+        StatementCompanyComprehensiveInfo htInfoYear = new StatementCompanyComprehensiveInfo();
+        htInfoYear.setOfficeName("本年合计");
+        htInfoYear.setField1(htYearNum1);
+        htInfoYear.setField2(htYearNum2);
+        htInfoYear.setField3(htYearNum3);
+        htInfoYear.setField4(htYearNum4);
+        reportFormList8.add(htInfoYear);
+
+
         map.put("reportFormList1",reportFormList1);
         map.put("reportFormList2",reportFormList2);
         map.put("reportFormList3",reportFormList3);
         map.put("reportFormList4",reportFormList4);
+        map.put("reportFormList5",reportFormList5);
+        map.put("reportFormList6",reportFormList6);
+        map.put("reportFormList7",reportFormList7);
+        map.put("reportFormList8",reportFormList8);
         return map;
     }
 
@@ -2717,4 +2830,559 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
     }
 
 
+    /**
+     * 部门级信息处理
+     * @param bigDateType 状态1(0:年;1:季度;2:月份)
+     * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
+     */
+    public void disposeStatementOfficeByYear(Integer year,Integer bigDateType,Integer smallDateType){
+        Calendar cal = Calendar.getInstance();
+        //获取当前年份
+        if(null == year){
+            year = cal.get(Calendar.YEAR);
+        }
+
+        Map<String, String> dateMap = getDateNew(bigDateType, smallDateType,year);
+        //开始时间
+        String beginDate = dateMap.get("beginDate");
+        //结束时间
+        String endDate = dateMap.get("endDate");
+        String statementDate = dateMap.get("statementDate");
+        //部门级项目处理
+        disposeStatementOfficeProjectByYear(year,beginDate,endDate,statementDate,bigDateType, smallDateType);
+        //查询部门信息
+        List<Office> officeList = dao.getAllOfficeListInfo();
+        //部门级开票处理
+        disposeStatementOfficeInvoiceByYear(year,beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
+        //部门级报销处理
+        disposeStatementOfficeReimbursementByYear(year,beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
+        //部门级合同处理
+        disposeStatementOfficeContractByYear(year,beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
+
+        //创建utilNotifyId参数
+        //参数是由 year、bigDateType、smallDateType参数设定
+        String utilNotifyId = year + "," + bigDateType + "," + smallDateType;
+        //发送通知
+        switch (bigDateType){
+            //年度汇总
+            case 0:
+                officeNotification(statementDate,"年","164",utilNotifyId);
+                break;
+            //季度汇总
+            case 1:
+                //smallDateType  为季度时候
+                officeNotification(statementDate,"季","165",utilNotifyId);
+                break;
+            //月度汇总
+            case 2:
+                //smallDateType  为月度时候
+                officeNotification(statementDate,"月","166",utilNotifyId);
+                break;
+        }
+    }
+
+    /**
+     * 部门级项目月报/季报/年报汇总方法 年部
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     * @param statementDate 报表时间
+     * @param bigDateType 状态1(0:年;1:季度;2:月份)
+     * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
+     */
+    @Transactional(readOnly = false)
+    public void disposeStatementOfficeProjectByYear(Integer year,String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType){
+
+        //查询新增A类项目数量
+        List<ReportDataEntity> field1All = dao.getOfficeInsertProjectCountByGradeAll("2", beginDate, endDate);
+        List<ReportDataEntity> field2All = dao.getOfficeInsertProjectCountByGradeAll( "1", beginDate, endDate);
+        List<ReportDataEntity> field3All = dao.getOfficeProjectCountByRecordAll(beginDate, endDate);
+        List<ReportDataEntity> field4All = dao.getOfficeProjectCountByReportedAll(beginDate, endDate);
+        //超期未归档
+        List<ReportDataEntity> field5All = dao.getOfficeOverDueNotRecordProjectAll();
+        //超期归档
+        List<ReportDataEntity> field6All = dao.getOfficeOverDueRecordProjectAll(beginDate, endDate);
+        //超期未上报
+        List<ReportDataEntity> field7All = dao.getOfficeOverDueNotReportedProjectAll();
+        //超期上报
+        List<ReportDataEntity> field8All = dao.getOfficeOverDueReportedProjectAll(beginDate, endDate);
+        //查询电子归档超期未归档项目数量(分组)
+        Map<String, List<ReportDataEntity>> field5AllMap = officeDataMessageDispose(field5All);
+        //分组
+        Map<String, List<ReportDataEntity>> field6AllMap = officeDataMessageDispose(field6All);
+        //分组
+        Map<String, List<ReportDataEntity>> field7AllMap = officeDataMessageDispose(field7All);
+        //分组
+        Map<String, List<ReportDataEntity>> field8AllMap = officeDataMessageDispose(field8All);
+
+        //查询部门信息
+        List<Office> officeList = dao.getOfficeListInfo();
+        for (Office officeInfo : officeList) {
+            //查询该部门的所有子部门
+            List<Office> childOfficeList = dao.getChildOfficeList(officeInfo.getId());
+            for (Office office : childOfficeList) {
+                //根据部门信息查询部门下的所有员工信息
+                List<User> officeUserList = dao.getUserByOfficeId(office.getId());
+                //遍历成员信息 并查询每个成员的项目信息
+                for (User user : officeUserList) {
+                    StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
+                    comprehensiveInfo.setType("1");
+                    comprehensiveInfo.setYear(String.valueOf(year));
+                    comprehensiveInfo.setBigDateType(bigDateType.toString());
+                    comprehensiveInfo.setSmallDateType(smallDateType.toString());
+                    comprehensiveInfo.setStatementDate(statementDate);
+                    comprehensiveInfo.setOfficeId(user.getOffice().getId());
+                    comprehensiveInfo.setOfficeParentIds(office.getParentIds());
+                    comprehensiveInfo.setUserId(user.getId());
+                    //查询新增A类项目数量
+                    /*Integer projectCountByA = dao.getOfficeInsertProjectCountByGrade(user.getId(), "2", beginDate, endDate);
+                    comprehensiveInfo.setField1(projectCountByA.toString());*/
+                    for (ReportDataEntity reportData: field1All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField1(String.valueOf(Integer.parseInt(comprehensiveInfo.getField1()) + reportData.getCount()));
+                        }
+                    }
+                    //查询新增B类项目数量
+                    /*Integer projectCountByB = dao.getOfficeInsertProjectCountByGrade(user.getId(), "1", beginDate, endDate);
+                    comprehensiveInfo.setField2(projectCountByB.toString());*/
+                    for (ReportDataEntity reportData: field2All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField2(String.valueOf(Integer.parseInt(comprehensiveInfo.getField2()) + reportData.getCount()));
+                        }
+                    }
+                    //查询本月电子归档项目数量
+                    /*Integer getProjectCountByRecord = dao.getOfficeProjectCountByRecord(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField3(getProjectCountByRecord.toString());*/
+                    for (ReportDataEntity reportData: field3All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField3(String.valueOf(Integer.parseInt(comprehensiveInfo.getField3()) + reportData.getCount()));
+                        }
+                    }
+                    //查询本月上报项目数量
+                    /*Integer getProjectCountByReported = dao.getOfficeProjectCountByReported(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField4(getProjectCountByReported.toString());*/
+                    for (ReportDataEntity reportData: field4All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField4(String.valueOf(Integer.parseInt(comprehensiveInfo.getField4()) + reportData.getCount()));
+                        }
+                    }
+                    //查询电子归档超期未归档项目数量(保存到数据库)
+                    /*List<String> overDueNotRecordProjectIdList = dao.getOfficeOverDueNotRecordProject(user.getId());
+                    comprehensiveInfo.setField5(String.valueOf(overDueNotRecordProjectIdList.size()));*/
+
+                    List<ReportDataEntity> field5ListAll = Lists.newArrayList();
+                    for (String key : field5AllMap.keySet()) {
+                        if(user.getId().equals(key)){
+                            List<ReportDataEntity> reportDataEntities = field5AllMap.get(key);
+                            field5ListAll.addAll(reportDataEntities);
+                            comprehensiveInfo.setField5(String.valueOf(Integer.parseInt(comprehensiveInfo.getField5()) + reportDataEntities.size()));
+                        }
+                    }
+
+                    List<StatementDataInfo> overDueNotRecordProjectList = Lists.newArrayList();
+                    for (ReportDataEntity reportDataEntity : field5ListAll) {
+                        StatementDataInfo info = new StatementDataInfo();
+                        info.setStatementDate(statementDate);
+                        info.setGradeType("1");
+                        info.setType("1");
+                        info.setYear(String.valueOf(year));
+                        info.setBigDateType(bigDateType.toString());
+                        info.setSmallDateType(smallDateType.toString());
+                        info.setOfficeId(user.getOffice().getId());
+                        info.setField1(reportDataEntity.getFieldId());
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        overDueNotRecordProjectList.add(info);
+                    }
+                    if(overDueNotRecordProjectList.size()>0){
+                        //每次删除之前的数据
+                        for (StatementDataInfo statementDataInfo : overDueNotRecordProjectList) {
+                            dao.deleteOfficeStatementDataInfoByYear(statementDataInfo);
+                        }
+                        dao.insertOfficeStatementDataInfoByYear(overDueNotRecordProjectList);
+                    }
+                    //查询电子归档超期归档项目数量(保存到数据库)
+                    /*List<String> overDueRecordProjectIdList = dao.getOfficeOverDueRecordProject(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField6(String.valueOf(overDueRecordProjectIdList.size()));*/
+                    List<ReportDataEntity> field6ListAll = Lists.newArrayList();
+                    for (String key : field6AllMap.keySet()) {
+                        if(user.getId().equals(key)){
+                            List<ReportDataEntity> reportDataEntities = field6AllMap.get(key);
+                            field6ListAll.addAll(reportDataEntities);
+                            comprehensiveInfo.setField6(String.valueOf(Integer.parseInt(comprehensiveInfo.getField6()) + reportDataEntities.size()));
+                        }
+                    }
+                    List<StatementDataInfo> overDueRecordProjectList = Lists.newArrayList();
+                    for (ReportDataEntity reportDataEntity : field6ListAll) {
+                        StatementDataInfo info = new StatementDataInfo();
+                        info.setStatementDate(statementDate);
+                        info.setGradeType("1");
+                        info.setType("1");
+                        info.setYear(String.valueOf(year));
+                        info.setBigDateType(bigDateType.toString());
+                        info.setSmallDateType(smallDateType.toString());
+                        info.setOfficeId(user.getOffice().getId());
+                        info.setField2(reportDataEntity.getFieldId());
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        overDueRecordProjectList.add(info);
+                    }
+                    if(overDueRecordProjectList.size()>0){
+                        //每次删除之前的数据
+                        for (StatementDataInfo statementDataInfo : overDueRecordProjectList) {
+                            dao.deleteOfficeStatementDataInfoByYear(statementDataInfo);
+                        }
+                        dao.insertOfficeStatementDataInfoByYear(overDueRecordProjectList);
+                    }
+                    //查询上报超期未上报项目数量(保存到数据库)
+                    /*List<String> overDueNotReportedProjectIdList = dao.getOfficeOverDueNotReportedProject(user.getId());
+                    comprehensiveInfo.setField7(String.valueOf(overDueNotReportedProjectIdList.size()));*/
+                    List<ReportDataEntity> field7ListAll = Lists.newArrayList();
+                    for (String key : field7AllMap.keySet()) {
+                        if(user.getId().equals(key)){
+                            List<ReportDataEntity> reportDataEntities = field7AllMap.get(key);
+                            field7ListAll.addAll(reportDataEntities);
+                            comprehensiveInfo.setField7(String.valueOf(Integer.parseInt(comprehensiveInfo.getField7()) + reportDataEntities.size()));
+                        }
+                    }
+                    List<StatementDataInfo> overDueNotReportedProjectList = Lists.newArrayList();
+                    for (ReportDataEntity reportDataEntity : field7ListAll) {
+                        StatementDataInfo info = new StatementDataInfo();
+                        info.setStatementDate(statementDate);
+                        info.setGradeType("1");
+                        info.setType("1");
+                        info.setYear(String.valueOf(year));
+                        info.setBigDateType(bigDateType.toString());
+                        info.setSmallDateType(smallDateType.toString());
+                        info.setOfficeId(user.getOffice().getId());
+                        info.setField3(reportDataEntity.getFieldId());
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        overDueNotReportedProjectList.add(info);
+                    }
+                    if(overDueNotReportedProjectList.size()>0){
+                        //每次删除之前的数据
+                        for (StatementDataInfo statementDataInfo : overDueNotReportedProjectList) {
+                            dao.deleteOfficeStatementDataInfoByYear(statementDataInfo);
+                        }
+                        dao.insertOfficeStatementDataInfoByYear(overDueNotReportedProjectList);
+                    }
+                    //查询上报超期上报项目数量(保存到数据库)
+                    /*List<String> overDueReportedProjectIdList = dao.getOfficeOverDueReportedProject(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField8(String.valueOf(overDueReportedProjectIdList.size()));*/
+                    List<ReportDataEntity> field8ListAll = Lists.newArrayList();
+                    for (String key : field8AllMap.keySet()) {
+                        if(user.getId().equals(key)){
+                            List<ReportDataEntity> reportDataEntities = field8AllMap.get(key);
+                            field8ListAll.addAll(reportDataEntities);
+                            comprehensiveInfo.setField8(String.valueOf(Integer.parseInt(comprehensiveInfo.getField8()) + reportDataEntities.size()));
+                        }
+                    }
+                    List<StatementDataInfo> overDueReportedProjectList = Lists.newArrayList();
+                    for (ReportDataEntity reportDataEntity : field8ListAll) {
+                        StatementDataInfo info = new StatementDataInfo();
+                        info.setStatementDate(statementDate);
+                        info.setGradeType("1");
+                        info.setType("1");
+                        info.setYear(String.valueOf(year));
+                        info.setBigDateType(bigDateType.toString());
+                        info.setSmallDateType(smallDateType.toString());
+                        info.setOfficeId(user.getOffice().getId());
+                        info.setField4(reportDataEntity.getFieldId());
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        overDueReportedProjectList.add(info);
+                    }
+                    if(overDueReportedProjectList.size()>0){
+                        //每次删除之前的数据
+                        for (StatementDataInfo statementDataInfo : overDueReportedProjectList) {
+                            dao.deleteOfficeStatementDataInfoByYear(statementDataInfo);
+                        }
+                        dao.insertOfficeStatementDataInfoByYear(overDueReportedProjectList);
+                    }
+                    //数据处理并保存到数据库中
+                    comprehensiveInfo.preInsert();
+                    //每次删除对应条件的数据   比部门多了userId
+                    dao.deleteOfficeComprehensiveByYear(comprehensiveInfo);
+                    dao.insertOfficeComprehensiveByYear(comprehensiveInfo);
+                }
+            }
+        }
+    }
+
+    /**
+     * 部门级开票记录月报/季报/年报汇总方法
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     * @param statementDate 报表时间
+     * @param bigDateType 状态1(0:年;1:季度;2:月份)
+     * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
+     * @param officeList 部门信息
+     */
+    @Transactional(readOnly = false)
+    public void disposeStatementOfficeInvoiceByYear(Integer year,String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType,List<Office> officeList){
+
+        List<ReportDataEntity> field1All = dao.getInsertOfficeInvoiceCountByOfficeAll(beginDate, endDate);
+        List<ReportDataEntity> field2All = dao.getInsertOfficeInvoiceSumMoneyByOfficeAll(beginDate, endDate);
+        List<ReportDataEntity> field3All = dao.getInsertOfficeInvoiceDetailsCountByOfficeAll(beginDate, endDate);
+        List<ReportDataEntity> field4All = dao.getInsertOfficeInvoiceDetailsSumMoneyByOfficeAll(beginDate, endDate);
+
+        for (Office officeInfo : officeList) {
+            //查询该部门的所有子部门
+            List<Office> childOfficeList = dao.getChildOfficeList(officeInfo.getId());
+            for (Office office : childOfficeList) {
+                //根据部门信息查询部门下的所有员工信息
+                List<User> officeUserList = dao.getUserByOfficeId(office.getId());
+                //遍历成员信息 并查询每个成员的项目信息
+                for (User user : officeUserList) {
+                    StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
+                    comprehensiveInfo.setType("2");
+                    comprehensiveInfo.setYear(String.valueOf(year));
+                    comprehensiveInfo.setBigDateType(bigDateType.toString());
+                    comprehensiveInfo.setSmallDateType(smallDateType.toString());
+                    comprehensiveInfo.setStatementDate(statementDate);
+                    comprehensiveInfo.setOfficeId(user.getOffice().getId());
+                    comprehensiveInfo.setOfficeParentIds(office.getParentIds());
+                    comprehensiveInfo.setUserId(user.getId());
+                    //查询新增发票信息
+                    /*Integer field1 = dao.getInsertOfficeInvoiceCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField1(field1.toString());*/
+                    for (ReportDataEntity reportData: field1All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField1(String.valueOf(Integer.parseInt(comprehensiveInfo.getField1()) + reportData.getCount()));
+                        }
+                    }
+                    //查询开票金额总额
+                    /*String field2 = dao.getInsertOfficeInvoiceSumMoneyByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField2(field2);*/
+                    for (ReportDataEntity reportData: field2All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField2(String.valueOf(new BigDecimal(comprehensiveInfo.getField2()).add(new BigDecimal(reportData.getVariableElement()))));
+                        }
+                    }
+                    //查询本月收款发票
+                    /*Integer field3 = dao.getInsertOfficeInvoiceDetailsCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField3(field3.toString());*/
+                    for (ReportDataEntity reportData: field3All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField3(String.valueOf(Integer.parseInt(comprehensiveInfo.getField3()) + reportData.getCount()));
+                        }
+                    }
+                    //查询本月收款
+                    /*String field4 = dao.getInsertOfficeInvoiceDetailsSumMoneyByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField4(field4);*/
+                    for (ReportDataEntity reportData: field4All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField4(String.valueOf(new BigDecimal(comprehensiveInfo.getField4()).add(new BigDecimal(reportData.getVariableElement()))));
+                        }
+                    }
+                    //对金额数据进行处理和四舍五入
+                    if(StringUtils.isNotBlank(comprehensiveInfo.getField2())){
+                        BigDecimal b = new BigDecimal(comprehensiveInfo.getField2());
+                        comprehensiveInfo.setField2(String.valueOf(b.setScale(2, BigDecimal.ROUND_HALF_UP)));
+                    }
+                    if(StringUtils.isNotBlank(comprehensiveInfo.getField4())){
+                        BigDecimal b = new BigDecimal(comprehensiveInfo.getField4());
+                        comprehensiveInfo.setField4(String.valueOf(b.setScale(2, BigDecimal.ROUND_HALF_UP)));
+                    }
+
+                    //数据处理并保存到数据库中
+                    comprehensiveInfo.preInsert();
+                    //每次删除对应条件的数据   比部门多了userId
+                    dao.deleteOfficeComprehensiveByYear(comprehensiveInfo);
+                    dao.insertOfficeComprehensiveByYear(comprehensiveInfo);
+                }
+            }
+
+        }
+    }
+
+    /**
+     * 部门级报销记录月报/季报/年报汇总方法
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     */
+    @Transactional(readOnly = false)
+    public void disposeStatementOfficeReimbursementByYear(Integer year,String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType,List<Office> officeList){
+
+        List<ReportDataEntity> field1All = dao.getInsertOfficeReimbursementCountByOfficeAll(beginDate, endDate);
+        List<ReportDataEntity> field2All = dao.getInsertOfficeReimbursementSumMoneyByOfficeAll(beginDate, endDate);
+
+        for (Office officeInfo : officeList) {
+            //查询该部门的所有子部门
+            List<Office> childOfficeList = dao.getChildOfficeList(officeInfo.getId());
+            for (Office office : childOfficeList) {
+                //根据部门信息查询部门下的所有员工信息
+                List<User> officeUserList = dao.getUserByOfficeId(office.getId());
+                //遍历成员信息 并查询每个成员的项目信息
+                for (User user : officeUserList) {
+                    StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
+                    comprehensiveInfo.setType("3");
+                    comprehensiveInfo.setYear(String.valueOf(year));
+                    comprehensiveInfo.setBigDateType(bigDateType.toString());
+                    comprehensiveInfo.setSmallDateType(smallDateType.toString());
+                    comprehensiveInfo.setStatementDate(statementDate);
+                    comprehensiveInfo.setOfficeId(officeInfo.getId());
+                    comprehensiveInfo.setOfficeParentIds(office.getParentIds());
+                    comprehensiveInfo.setUserId(user.getId());
+                    //查询新增报销信息
+                    /*Integer field1 = dao.getInsertOfficeReimbursementCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField1(field1.toString());*/
+                    for (ReportDataEntity reportData: field1All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField1(String.valueOf(Integer.parseInt(comprehensiveInfo.getField1()) + reportData.getCount()));
+                        }
+                    }
+                    //查询报销金额总额
+                    /*String field2 = dao.getInsertOfficeReimbursementSumMoneyByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField2(field2);*/
+                    for (ReportDataEntity reportData: field2All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField2(String.valueOf(new BigDecimal(comprehensiveInfo.getField2()).add(new BigDecimal(reportData.getVariableElement()))));
+                        }
+                    }
+                    //对金额数据进行处理和四舍五入
+                    if(StringUtils.isNotBlank(comprehensiveInfo.getField2())){
+                        BigDecimal b = new BigDecimal(comprehensiveInfo.getField2());
+                        comprehensiveInfo.setField2(String.valueOf(b.setScale(2, BigDecimal.ROUND_HALF_UP)));
+                    }
+                    //数据处理并保存到数据库中
+                    comprehensiveInfo.preInsert();
+                    //每次删除对应条件的数据   比部门多了userId
+                    dao.deleteOfficeComprehensiveByYear(comprehensiveInfo);
+                    dao.insertOfficeComprehensiveByYear(comprehensiveInfo);
+                }
+            }
+
+        }
+    }
+
+    /**
+     * 部门级合同记录月报/季报/年报汇总方法
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     */
+    @Transactional(readOnly = false)
+    public void disposeStatementOfficeContractByYear(Integer year,String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType,List<Office> officeList){
+
+        List<ReportDataEntity> field1All = dao.getInsertOfficeContractCountByOfficeAll(beginDate, endDate);
+        List<ReportDataEntity> field2All = dao.getInsertOfficeContractRecordCountByOfficeAll(beginDate, endDate);
+        List<ReportDataEntity> field3All = dao.getOfficeOverDueNotContractRecordCountByOfficeAll();
+        List<ReportDataEntity> field4All = dao.getOfficeOverDueContractRecordCountByOfficeAll(beginDate, endDate);
+
+        //查询电子归档超期未归档项目数量(分组)
+        Map<String, List<ReportDataEntity>> field3AllMap = officeDataMessageDispose(field3All);
+        //分组
+        Map<String, List<ReportDataEntity>> field4AllMap = officeDataMessageDispose(field4All);
+
+        for (Office officeInfo : officeList) {//查询该部门的所有子部门
+            List<Office> childOfficeList = dao.getChildOfficeList(officeInfo.getId());
+            for (Office office : childOfficeList) {
+                //根据部门信息查询部门下的所有员工信息
+                List<User> officeUserList = dao.getUserByOfficeId(office.getId());
+                //遍历成员信息 并查询每个成员的项目信息
+                for (User user : officeUserList) {
+                    StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
+                    comprehensiveInfo.setType("4");
+                    comprehensiveInfo.setYear(String.valueOf(year));
+                    comprehensiveInfo.setBigDateType(bigDateType.toString());
+                    comprehensiveInfo.setSmallDateType(smallDateType.toString());
+                    comprehensiveInfo.setStatementDate(statementDate);
+                    comprehensiveInfo.setOfficeId(officeInfo.getId());
+                    comprehensiveInfo.setOfficeParentIds(office.getParentIds());
+                    comprehensiveInfo.setUserId(user.getId());
+                    //查询新增合同信息
+                    /*Integer field1 = dao.getInsertOfficeContractCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField1(field1.toString());*/
+                    for (ReportDataEntity reportData: field1All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField1(String.valueOf(Integer.parseInt(comprehensiveInfo.getField1()) + reportData.getCount()));
+                        }
+                    }
+                    //查询本月纸质归档合同信息
+                    /*Integer field2 = dao.getInsertOfficeContractRecordCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField2(field2.toString());*/
+                    for (ReportDataEntity reportData: field2All) {
+                        if(user.getId().equals(reportData.getUserId())){
+                            comprehensiveInfo.setField2(String.valueOf(Integer.parseInt(comprehensiveInfo.getField2()) + reportData.getCount()));
+                        }
+                    }
+                    //查询超期未归档合同信息
+                    /*List<String> overDueNotContractIdList = dao.getOfficeOverDueNotContractRecordCountByOffice(user.getId());
+                    comprehensiveInfo.setField3(String.valueOf(overDueNotContractIdList.size()));*/
+                    List<ReportDataEntity> field3ListAll = Lists.newArrayList();
+                    for (String key : field3AllMap.keySet()) {
+                        if(user.getId().equals(key)){
+                            List<ReportDataEntity> reportDataEntities = field3AllMap.get(key);
+                            field3ListAll.addAll(reportDataEntities);
+                            comprehensiveInfo.setField3(String.valueOf(Integer.parseInt(comprehensiveInfo.getField3()) + reportDataEntities.size()));
+                        }
+                    }
+                    List<StatementDataInfo> overDueNotContractList = Lists.newArrayList();
+                    for (ReportDataEntity reportDataEntity : field3ListAll) {
+                        StatementDataInfo info = new StatementDataInfo();
+                        info.setStatementDate(statementDate);
+                        info.setGradeType("1");
+                        info.setType("4");
+                        info.setYear(String.valueOf(year));
+                        info.setBigDateType(bigDateType.toString());
+                        info.setSmallDateType(smallDateType.toString());
+                        info.setOfficeId(officeInfo.getId());
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        info.setField1(reportDataEntity.getFieldId());
+                        overDueNotContractList.add(info);
+                    }
+                    if(overDueNotContractList.size()>0){
+                        //每次删除之前的数据
+                        for (StatementDataInfo statementDataInfo : overDueNotContractList) {
+                            dao.deleteOfficeStatementDataInfoByYear(statementDataInfo);
+                        }
+                        dao.insertOfficeStatementDataInfoByYear(overDueNotContractList);
+                    }
+
+                    //查询超期归档合同信息
+                    /*List<String> overDueContractIdList = dao.getOfficeOverDueContractRecordCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField4(String.valueOf(overDueContractIdList.size()));*/
+                    List<ReportDataEntity> field4ListAll = Lists.newArrayList();
+                    for (String key : field4AllMap.keySet()) {
+                        if(user.getId().equals(key)){
+                            List<ReportDataEntity> reportDataEntities = field4AllMap.get(key);
+                            field4ListAll.addAll(reportDataEntities);
+                            comprehensiveInfo.setField4(String.valueOf(Integer.parseInt(comprehensiveInfo.getField4()) + reportDataEntities.size()));
+                        }
+                    }
+                    List<StatementDataInfo> overDueContractList = Lists.newArrayList();
+                    for (ReportDataEntity reportDataEntity : field4ListAll) {
+                        StatementDataInfo info = new StatementDataInfo();
+                        info.setStatementDate(statementDate);
+                        info.setGradeType("1");
+                        info.setType("4");
+                        info.setYear(String.valueOf(year));
+                        info.setBigDateType(bigDateType.toString());
+                        info.setSmallDateType(smallDateType.toString());
+                        info.setOfficeId(officeInfo.getId());
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        info.setField2(reportDataEntity.getFieldId());
+                        overDueContractList.add(info);
+                    }
+                    if(overDueContractList.size()>0){
+                        //每次删除之前的数据
+                        for (StatementDataInfo statementDataInfo : overDueContractList) {
+                            dao.deleteOfficeStatementDataInfoByYear(statementDataInfo);
+                        }
+                        dao.insertOfficeStatementDataInfoByYear(overDueContractList);
+                    }
+
+                    //数据处理并保存到数据库中
+                    comprehensiveInfo.preInsert();
+                    //每次删除对应条件的数据   比部门多了userId
+                    dao.deleteOfficeComprehensiveByYear(comprehensiveInfo);
+                    dao.insertOfficeComprehensiveByYear(comprehensiveInfo);
+                }
+            }
+
+
+        }
+    }
 }

+ 4 - 0
src/main/java/com/jeeplus/modules/workcalendar/service/WorkCalendarTaskService.java

@@ -15,6 +15,7 @@ import org.springframework.context.annotation.Lazy;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.RequestMapping;
 
 import java.util.Calendar;
 import java.util.List;
@@ -170,6 +171,9 @@ public class WorkCalendarTaskService  {
             logger.info("-----------部门级—月度报表(开始)------------------");
             statementCompanyComprehensiveService.disposeStatementOffice(year,2,month);
             logger.info("------------部门级—月度报表(结束)------------------");
+            logger.info("-----------部门级—年度报表(开始)------------------");
+            statementCompanyComprehensiveService.disposeStatementOfficeByYear(year,0,month);
+            logger.info("------------部门级—年度报表(结束)------------------");
         }
 
     }

+ 4 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -7493,6 +7493,10 @@ public class WorkProjectNotifyController extends BaseController {
 					model.addAttribute("reportFormList2",stringListMap.get("reportFormList2"));//开票报表
 					model.addAttribute("reportFormList3",stringListMap.get("reportFormList3"));//报销报表
 					model.addAttribute("reportFormList4",stringListMap.get("reportFormList4"));//合同报表
+					model.addAttribute("reportFormList5",stringListMap.get("reportFormList5"));//项目报表 年部
+					model.addAttribute("reportFormList6",stringListMap.get("reportFormList6"));//开票报表 年部
+					model.addAttribute("reportFormList7",stringListMap.get("reportFormList7"));//报销报表 年部
+					model.addAttribute("reportFormList8",stringListMap.get("reportFormList8"));//合同报表 年部
 					//判断并只显示七个部门的项目信息
 					String sevenOfficeId = statementCompanyComprehensiveService.selectSevenOfficeId();
 

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

@@ -4592,4 +4592,281 @@ GROUP BY
 		</where>
 	</select>
 
+
+	<select id="selectDepartmentReportPageOverdueByYear" 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"
+		,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_two sodi
+
+		<if test="statementCompanyComprehensiveInfo.field5 == '5'.toString() ">
+			LEFT JOIN rural_project_records a ON sodi.field1 = a.id
+		</if>
+		<if test="statementCompanyComprehensiveInfo.field6 == '5'.toString() ">
+			LEFT JOIN rural_project_records a ON sodi.field2 = a.id
+		</if>
+		<if test="statementCompanyComprehensiveInfo.field7 == '5'.toString() ">
+			LEFT JOIN rural_project_records a ON sodi.field3 = a.id
+		</if>
+		<if test="statementCompanyComprehensiveInfo.field8 == '5'.toString() ">
+			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="ruralProjectRecords.userId != null and ruralProjectRecords.userId != '' ">
+				and sodi.user_id = #{ruralProjectRecords.userId}
+			</if>
+			<if test="statementCompanyComprehensiveInfo.field5 == '5'.toString() ">
+				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 == '5'.toString() ">
+				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 == '5'.toString() ">
+				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 == '5'.toString() ">
+				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="selectDepartmentReportPageOverdueCountByYear" 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 == '5'.toString() ">
+				and field1 IS NOT NULL and field1 != ''
+			</if>
+			<if test="field6 == '5'.toString() ">
+				and field2 IS NOT NULL and field2 != ''
+			</if>
+			<if test="field7 == '5'.toString() ">
+				and field3 IS NOT NULL and field3 != ''
+			</if>
+			<if test="field8 == '5'.toString() ">
+				and field4 IS NOT NULL and field4 != ''
+			</if>
+		</where>
+	</select>
+
 </mapper>

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

@@ -1887,4 +1887,168 @@
 		</where>
 	</delete>
 
+
+	<select id="selectAllByOfficeIdByYear" parameterType="StatementCompanyComprehensiveInfo" resultType="StatementCompanyComprehensiveInfo">
+		SELECT
+		su.NAME as "userName",
+		so.NAME as "officeName",
+		a.id as "id",
+		a.del_flag as "delFlag",
+		a.create_date as "createDate",
+		a.year as "year",
+		a.type as "type",
+		a.big_date_type as "bigDateType",
+		a.small_date_type as "smallDateType",
+		a.statement_date as "statementDate",
+		a.office_id as "officeId",
+		a.user_id as "userId",
+		a.office_parent_ids as "officeParentIds",
+		a.field1 as "field1",
+		a.field2 as "field2",
+		a.field3 as "field3",
+		a.field4 as "field4",
+		a.field5 as "field5",
+		a.field6 as "field6",
+		a.field7 as "field7",
+		a.field8 as "field8"
+		FROM
+		statement_office_comprehensive_info_two 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}, '%' )
+			)
+		</where>
+		ORDER BY
+		a.office_id,
+		a.user_id
+	</select>
+
+	<insert id="insertOfficeStatementDataInfoByYear">
+		INSERT INTO statement_office_data_info_two
+		(
+		create_date
+		,year
+		,grade_type
+		,type
+		,big_date_type
+		,small_date_type
+		,statement_date
+		,user_id
+		,office_id
+		,office_parent_ids
+		,field1
+		,field2
+		,field3
+		,field4
+		)
+		VALUES
+		<foreach collection="dataList" item="data" separator=",">
+			(
+			now()
+			,#{data.year}
+			,#{data.gradeType}
+			,#{data.type}
+			,#{data.bigDateType}
+			,#{data.smallDateType}
+			,#{data.statementDate}
+			,#{data.userId}
+			,#{data.officeId}
+			,#{data.officeParentIds}
+			,#{data.field1}
+			,#{data.field2}
+			,#{data.field3}
+			,#{data.field4}
+			)
+		</foreach>
+	</insert>
+
+	<delete id="deleteOfficeStatementDataInfoByYear">
+		delete from statement_office_data_info_two
+		<where>
+			type = #{type}
+			and year = #{year}
+			and big_date_type = #{bigDateType}
+			and small_date_type = #{smallDateType}
+			and office_id = #{officeId}
+			and user_id = #{userId}
+
+			<if test="field1 != null and field1 != ''">
+				and field1 = #{field1}
+			</if>
+
+			<if test="field2 != null and field2 != ''">
+				and field2 = #{field2}
+			</if>
+
+			<if test="field3 != null and field3 != ''">
+				and field3 = #{field3}
+			</if>
+
+			<if test="field4 != null and field4 != ''">
+				and field4 = #{field4}
+			</if>
+		</where>
+	</delete>
+
+	<delete id="deleteOfficeComprehensiveByYear">
+		delete from statement_office_comprehensive_info_two
+		where type = #{type}
+		  and year = #{year}
+		  and big_date_type = #{bigDateType}
+		  and small_date_type = #{smallDateType}
+		  and office_id = #{officeId}
+		  and user_id = #{userId}
+	</delete>
+
+	<insert id="insertOfficeComprehensiveByYear">
+		INSERT INTO statement_office_comprehensive_info_two(
+			create_date,
+			year,
+			type,
+			big_date_type,
+			small_date_type,
+			statement_date,
+			user_id,
+			office_id,
+			office_parent_ids,
+			field1,
+			field2,
+			field3,
+			field4,
+			field5,
+			field6,
+			field7,
+			field8
+		) VALUES (
+			#{createDate},
+			#{year},
+			#{type},
+			#{bigDateType},
+			#{smallDateType},
+			#{statementDate},
+			#{userId},
+			#{officeId},
+			#{officeParentIds},
+			#{field1},
+			#{field2},
+			#{field3},
+			#{field4},
+			#{field5},
+			#{field6},
+			#{field7},
+			#{field8}
+
+		)
+	</insert>
 </mapper>

+ 53 - 39
src/main/webapp/webpage/modules/statement/companyDataView.jsp

@@ -43,19 +43,18 @@
 						}
 					});
 				});
-
-                form.on('radio(projectReportYear)', function(data){
-                    // console.log(data.elem); //得到radio原始DOM对象
-                    console.log(data.value);
-                    if(data.value=="monthTwo"){
-                        document.getElementById("projectReportMonth").style.display="";
+				form.on('radio(projectReportYear)', function(data){
+					// console.log(data.elem); //得到radio原始DOM对象
+					console.log(data.value);
+					if(data.value=="monthTwo"){
+						document.getElementById("projectReportMonth").style.display="";
 						document.getElementById("projectReportYear").style.display="none";
 						$('#monthOne').attr("checked", true); //注意这里使用的是attr()
 						layui.form.render(); //重新渲染显示效果
 						// document.getElementById("projectReportMonth").checked="false";
 						// document.getElementById("projectReportYear").checked="true";
 					}
-                });
+				});
 
 				form.on('radio(projectReportMonth)', function(data){
 					// console.log(data.elem); //得到radio原始DOM对象
@@ -121,6 +120,7 @@
 						layui.form.render(); //重新渲染显示效果
 					}
 				});
+
 				form.on('radio(contractMonth)', function(data){
 					// console.log(data.elem); //得到radio原始DOM对象
 					console.log(data.value);
@@ -132,6 +132,8 @@
 					}
 				});
 			})
+
+
 		});
 
 		function reset() {
@@ -905,12 +907,12 @@
 				<div class="form-group-label" style="display: block" ><h2>项目${nyr}报
 <%--					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
 <%--					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
-					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 8px;margin: 0px;padding-left: 0px" >
-						<input type="radio" title="年报" name="projectReport" value="yearOne" lay-filter="projectReportMonth" id="yearOne" >
-						<input type="radio" title="月报" name="projectReport" value="monthOne" lay-filter="projectReportMonth" checked id="monthOne">
-
+					<c:if test="${nyr eq '月'}">
+					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;margin: 0px;padding-left: 0px" >
+						<input type="radio" title="本年" name="projectReport" value="yearOne" lay-filter="projectReportMonth" id="yearOne" >
+						<input type="radio" title="本月" name="projectReport" value="monthOne" lay-filter="projectReportMonth" checked id="monthOne">
 					</div>
-
+					</c:if>
 				</h2>
 				</div>
 				<table class="oa-table layui-table" id="contentTable1" lay-filter="test"></table>
@@ -919,10 +921,12 @@
 				<div id="projectReportYear" style="display: none">
 				<%--项目报表年纪--%>
 				<div class="form-group-label"><h2>项目年报
-					<div  class="layui-input-block" style="float: right;height: 17.9px;bottom: 8px;margin: 0px;padding-left: 0px">
-						<input type="radio" name="projectReport" value="yearTwo" lay-filter="projectReportYear" style="margin: 0px;padding-left: 0px" id="yearTwo" title="年报">
-						<input type="radio" name="projectReport" value="monthTwo" lay-filter="projectReportYear" style="margin: 0px;padding-left: 0px" id="monthTwo" title="月报">
+				<c:if test="${nyr eq '月'}">
+					<div  class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;margin: 0px;padding-left: 0px">
+						<input type="radio" name="projectReport" value="yearTwo" lay-filter="projectReportYear" style="margin: 0px;padding-left: 0px" id="yearTwo" title="本年">
+						<input type="radio" name="projectReport" value="monthTwo" lay-filter="projectReportYear" style="margin: 0px;padding-left: 0px" id="monthTwo" title="本月">
 					</div>
+				</c:if>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable5" lay-filter="test"></table>
 				</div>
@@ -930,10 +934,12 @@
 				<div id="invoiceMonth">
 				<%--开票报表--%>
 				<div class="form-group-label"><h2>开票${nyr}报
-					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 8px;">
-						<input type="radio" name="invoice" value="invoiceYearOne"  lay-filter="invoiceMonth" id="invoiceYearOne" title="年报">
-						<input type="radio" name="invoice" value="invoiceMonthOne"  lay-filter="invoiceMonth" id="invoiceMonthOne" checked title="月报">
+				<c:if test="${nyr eq '月'}">
+					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+						<input type="radio" name="invoice" value="invoiceYearOne"  lay-filter="invoiceMonth" id="invoiceYearOne" title="本年">
+						<input type="radio" name="invoice" value="invoiceMonthOne"  lay-filter="invoiceMonth" id="invoiceMonthOne" checked title="本月">
 					</div>
+				</c:if>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable2" lay-filter="test"></table>
 				</div>
@@ -941,10 +947,12 @@
 				<div id="invoiceYear" style="display: none">
 				<%--开票年纪--%>
 				<div class="form-group-label"><h2>开票年报
-					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 8px;">
-						<input type="radio" name="invoice" value="invoiceYearTwo" lay-filter="invoiceYear" id="invoiceYearTwo" title="年报">
-						<input type="radio" name="invoice" value="invoiceMonthTwo"  lay-filter="invoiceYear" id="invoiceMonthTwo" title="月报">
+					<c:if test="${nyr eq '月'}">
+					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+						<input type="radio" name="invoice" value="invoiceYearTwo" lay-filter="invoiceYear" id="invoiceYearTwo" title="本年">
+						<input type="radio" name="invoice" value="invoiceMonthTwo"  lay-filter="invoiceYear" id="invoiceMonthTwo" title="本月">
 					</div>
+					</c:if>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable6" lay-filter="test"></table>
 				</div>
@@ -952,10 +960,12 @@
 				<div id="reimbursementMonth">
 				<%--报销报表--%>
 				<div class="form-group-label"><h2>报销${nyr}报
-					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 8px;">
-						<input type="radio" name="reimbursement" value="reimbursementYearOne" lay-filter="reimbursementMonth" id="reimbursementYearOne" title="年报">
-						<input type="radio" name="reimbursement" value="reimbursementMonthOne"  lay-filter="reimbursementMonth" id="reimbursementMonthOne" checked title="月报">
+					<c:if test="${nyr eq '月'}">
+					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+						<input type="radio" name="reimbursement" value="reimbursementYearOne" lay-filter="reimbursementMonth" id="reimbursementYearOne" title="本年">
+						<input type="radio" name="reimbursement" value="reimbursementMonthOne"  lay-filter="reimbursementMonth" id="reimbursementMonthOne" checked title="本月">
 					</div>
+					</c:if>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable3" lay-filter="test"></table>
 				</div>
@@ -963,10 +973,12 @@
 				<div id="reimbursementYear" style="display: none">
 					<%--报销报表--%>
 					<div class="form-group-label"><h2>报销年报
-						<div  class="layui-input-block" style="float: right;height: 17.9px;bottom: 8px;">
-							<input type="radio" name="reimbursement" value="reimbursementYearTwo"  lay-filter="reimbursementYear" id="reimbursementYearTwo" title="年报">
-							<input type="radio" name="reimbursement" value="reimbursementMonthTwo"  lay-filter="reimbursementYear" id="reimbursementMonthTwo" title="月报">
+						<c:if test="${nyr eq '月'}">
+						<div  class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+							<input type="radio" name="reimbursement" value="reimbursementYearTwo"  lay-filter="reimbursementYear" id="reimbursementYearTwo" title="本年">
+							<input type="radio" name="reimbursement" value="reimbursementMonthTwo"  lay-filter="reimbursementYear" id="reimbursementMonthTwo" title="本月">
 						</div>
+						</c:if>
 					</h2></div>
 					<table class="oa-table layui-table" id="contentTable7" lay-filter="test"></table>
 				</div>
@@ -974,10 +986,12 @@
 				<div id="contractMonth">
 				<%--合同报表--%>
 				<div class="form-group-label"><h2>合同${nyr}报
-					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 8px;">
-						<input type="radio" name="contract" value="contractYearOne" lay-filter="contractMonth" id="contractYearOne" title="年报">
-						<input type="radio" name="contract" value="contractMonthOne" checked="checked" lay-filter="contractMonth" id="contractMonthOne" checked title="月报">
+					<c:if test="${nyr eq '月'}">
+					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+						<input type="radio" name="contract" value="contractYearOne" lay-filter="contractMonth" id="contractYearOne" title="本年">
+						<input type="radio" name="contract" value="contractMonthOne" checked="checked" lay-filter="contractMonth" id="contractMonthOne" checked title="本月">
 					</div>
+					</c:if>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable4" lay-filter="test"></table>
 				</div>
@@ -985,10 +999,12 @@
 				<div id="contractYear" style="display: none">
 				<%--合同报表年纪--%>
 				<div class="form-group-label"><h2>合同年报
-					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 8px;">
-						<input type="radio" name="contract" value="contractYearTwo" lay-filter="contractYear" id="contractYearTwo" title="年报">
-						<input type="radio" name="contract" value="contractMonthTwo"  lay-filter="contractYear" id="contractMonthTwo" title="月报">
+					<c:if test="${nyr eq '月'}">
+					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+						<input type="radio" name="contract" value="contractYearTwo" lay-filter="contractYear" id="contractYearTwo" title="本年">
+						<input type="radio" name="contract" value="contractMonthTwo"  lay-filter="contractYear" id="contractMonthTwo" title="本月">
 					</div>
+					</c:if>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable8" lay-filter="test"></table>
 				</div>
@@ -1294,7 +1310,6 @@
 		});
 	})
 
-
 	//项目报表年级
 	layui.use('table', function(){
 		layui.table.render({
@@ -1393,7 +1408,7 @@
 	})
 	//项目报表年级结束
 
-	//开票报表开始
+	//开票报表年级开始
 	layui.use('table', function(){
 		layui.table.render({
 			elem: '#contentTable6'
@@ -1443,8 +1458,7 @@
 		});
 	})
 
-
-	//报销列表开始
+	//报销列表年级开始
 	layui.use('table', function(){
 		layui.table.render({
 			elem: '#contentTable7'
@@ -1484,7 +1498,7 @@
 	})
 	//报销列表结束
 
-	// 合同报表开始
+	// 合同报表年级开始
 	layui.use('table', function(){
 		layui.table.render({
 			elem: '#contentTable8'
@@ -1547,7 +1561,7 @@
 			,limit: 100
 		});
 	})
-	// 合同结束开始
+	// 合同结束年级结束
     resizeListTable();
     $("a").on("click",addLinkVisied);
 </script>

+ 469 - 6
src/main/webapp/webpage/modules/statement/departmentCompanyDataView.jsp

@@ -42,8 +42,99 @@
 							top.layer.msg(data, {icon: 0});
 						}
 					});
-				})
+				});
+
+				form.on('radio(projectReportYear)', function(data){
+					// console.log(data.elem); //得到radio原始DOM对象
+					console.log(data.value);
+					if(data.value=="monthTwo"){
+						$("#projectReportMonth").show();
+						$("#projectReportYear").hide();
+						$('#monthOne').attr("checked", true); //注意这里使用的是attr()
+						layui.form.render(); //重新渲染显示效果
+						// document.getElementById("projectReportMonth").checked="false";
+						// document.getElementById("projectReportYear").checked="true";
+					}
+				});
+
+				form.on('radio(projectReportMonth)', function(data){
+					// console.log(data.elem); //得到radio原始DOM对象
+					console.log(data.value);
+					if(data.value=="yearOne"){
+						$("#projectReportYear").show();
+						$("#projectReportMonth").hide();
+						$('#yearTwo').attr("checked", true); //注意这里使用的是attr()
+						layui.form.render(); //重新渲染显示效果
+						// document.getElementById("projectReportYearTwo").checked="true";
+						// document.getElementById("projectReportYear").checked="false";
+					}
+				});
+
+				form.on('radio(invoiceYear)', function(data){
+					// console.log(data.elem); //得到radio原始DOM对象
+					if(data.value=="invoiceMonthTwo"){
+						document.getElementById("invoiceYear").style.display="none";
+						document.getElementById("invoiceMonth").style.display="";
+						$('#invoiceMonthOne').attr("checked", true); //注意这里使用的是attr()
+						layui.form.render(); //重新渲染显示效果
+					}
+				});
+
+				form.on('radio(invoiceMonth)', function(data){
+					// console.log(data.elem); //得到radio原始DOM对象
+					console.log(data.value);
+					if(data.value=="invoiceYearOne"){
+						document.getElementById("invoiceMonth").style.display="none";
+						document.getElementById("invoiceYear").style.display="";
+						$('#invoiceYearTwo').attr("checked", true); //注意这里使用的是attr()
+						layui.form.render(); //重新渲染显示效果
+					}
+				});
+
+				form.on('radio(reimbursementYear)', function(data){
+					// console.log(data.elem); //得到radio原始DOM对象
+					if(data.value=="reimbursementMonthTwo"){
+						document.getElementById("reimbursementYear").style.display="none";
+						document.getElementById("reimbursementMonth").style.display="";
+						$('#reimbursementMonthOne').attr("checked", true); //注意这里使用的是attr()
+						layui.form.render(); //重新渲染显示效果
+					}
+				});
+
+				form.on('radio(reimbursementMonth)', function(data){
+					// console.log(data.elem); //得到radio原始DOM对象
+					console.log(data.value);
+					if(data.value=="reimbursementYearOne"){
+						document.getElementById("reimbursementMonth").style.display="none";
+						document.getElementById("reimbursementYear").style.display="";
+						$('#reimbursementYearTwo').attr("checked", true); //注意这里使用的是attr()
+						layui.form.render(); //重新渲染显示效果
+					}
+				});
+
+				form.on('radio(contractYear)', function(data){
+					// console.log(data.elem); //得到radio原始DOM对象
+					if(data.value=="contractMonthTwo"){
+						document.getElementById("contractYear").style.display="none";
+						document.getElementById("contractMonth").style.display="";
+						$('#contractMonthOne').attr("checked", true); //注意这里使用的是attr()
+						layui.form.render(); //重新渲染显示效果
+					}
+				});
+
+				form.on('radio(contractMonth)', function(data){
+					// console.log(data.elem); //得到radio原始DOM对象
+					console.log(data.value);
+					if(data.value=="contractYearOne"){
+						document.getElementById("contractMonth").style.display="none";
+						document.getElementById("contractYear").style.display="";
+						$('#contractYearTwo').attr("checked", true); //注意这里使用的是attr()
+						layui.form.render(); //重新渲染显示效果
+					}
+				});
 			})
+
+
 		});
 
 		function reset() {
@@ -805,23 +896,128 @@
 				</div>
 
 				<%--项目报表--%>
+				<div id="projectReportMonth">
 				<c:if test="${showFlag == 1}">
-					<div class="form-group-label"><h2>项目${nyr}报</h2></div>
+					<div class="form-group-label"><h2>项目${nyr}报
+						<c:if test="${nyr eq '月'}">
+							<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;margin: 0px;padding-left: 0px" >
+								<input type="radio" title="本年" name="projectReport" value="yearOne" lay-filter="projectReportMonth" id="yearOne" >
+								<input type="radio" title="本月" name="projectReport" value="monthOne" lay-filter="projectReportMonth" checked id="monthOne">
+							</div>
+						</c:if>
+					</h2></div>
 					<table class="oa-table layui-table" id="contentTable1" lay-filter="test"></table>
 				</c:if>
+				</div>
+				<%--				项目年报--%>
+<%--				<div id="projectReportYear">--%>
+<%--					&lt;%&ndash;项目报表年纪&ndash;%&gt;--%>
+<%--					<div class="form-group-label"><h2>项目年报--%>
+<%--						<c:if test="${nyr eq '月'}">--%>
+<%--							<div  class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;margin: 0px;padding-left: 0px">--%>
+<%--								<input type="radio" name="projectReport" value="yearTwo" lay-filter="projectReportYear" style="margin: 0px;padding-left: 0px" id="yearTwo" title="本年">--%>
+<%--								<input type="radio" name="projectReport" value="monthTwo" lay-filter="projectReportYear" style="margin: 0px;padding-left: 0px" id="monthTwo" title="本月">--%>
+<%--							</div>--%>
+<%--						</c:if>--%>
+<%--					</h2></div>--%>
+<%--					<table class="oa-table layui-table" id="contentTable5" lay-filter="test"></table>--%>
+<%--				</div>--%>
+
+				<%--				项目年报--%>
+				<c:if test="${showFlag == 1}">
+					<div id="projectReportYear" style="display: none">
+							<%--项目报表年纪--%>
+						<div class="form-group-label"><h2>项目年报
+							<c:if test="${nyr eq '月'}">
+								<div  class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;margin: 0px;padding-left: 0px">
+									<input type="radio" name="projectReport" value="yearTwo" lay-filter="projectReportYear" style="margin: 0px;padding-left: 0px" id="yearTwo" title="本年">
+									<input type="radio" name="projectReport" value="monthTwo" lay-filter="projectReportYear" style="margin: 0px;padding-left: 0px" id="monthTwo" title="本月">
+								</div>
+							</c:if>
+						</h2></div>
+						<table class="oa-table layui-table" id="contentTable5" lay-filter="test"></table>
+					</div>
+				</c:if>
+
+
 
-				<%--开票报表--%>
-				<div class="form-group-label"><h2>开票${nyr}报</h2></div>
+			<%--开票报表--%>
+				<div id="invoiceMonth">
+				<div class="form-group-label"><h2>开票${nyr}报
+					<c:if test="${nyr eq '月'}">
+						<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+							<input type="radio" name="invoice" value="invoiceYearOne"  lay-filter="invoiceMonth" id="invoiceYearOne" title="本年">
+							<input type="radio" name="invoice" value="invoiceMonthOne"  lay-filter="invoiceMonth" id="invoiceMonthOne" checked title="本月">
+						</div>
+					</c:if>
+				</h2></div>
 				<table class="oa-table layui-table" id="contentTable2" lay-filter="test"></table>
+				</div>
+
+				<%--开票年级--%>
+				<div id="invoiceYear" style="display: none">
+					<div class="form-group-label"><h2>开票年报
+						<c:if test="${nyr eq '月'}">
+							<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+								<input type="radio" name="invoice" value="invoiceYearTwo" lay-filter="invoiceYear" id="invoiceYearTwo" title="本年">
+								<input type="radio" name="invoice" value="invoiceMonthTwo"  lay-filter="invoiceYear" id="invoiceMonthTwo" title="本月">
+							</div>
+						</c:if>
+					</h2></div>
+					<table class="oa-table layui-table" id="contentTable6" lay-filter="test"></table>
+				</div>
 
 				<%--报销报表--%>
-				<div class="form-group-label"><h2>报销${nyr}报</h2></div>
+				<div id="reimbursementMonth">
+				<div class="form-group-label"><h2>报销${nyr}报
+					<c:if test="${nyr eq '月'}">
+						<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+							<input type="radio" name="reimbursement" value="reimbursementYearOne" lay-filter="reimbursementMonth" id="reimbursementYearOne" title="本年">
+							<input type="radio" name="reimbursement" value="reimbursementMonthOne"  lay-filter="reimbursementMonth" id="reimbursementMonthOne" checked title="本月">
+						</div>
+					</c:if>
+				</h2></div>
 				<table class="oa-table layui-table" id="contentTable3" lay-filter="test"></table>
+				</div>
+
+				<%--报销报表年级--%>
+				<div id="reimbursementYear" style="display: none">
+					<div class="form-group-label"><h2>报销年报
+						<c:if test="${nyr eq '月'}">
+							<div  class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+								<input type="radio" name="reimbursement" value="reimbursementYearTwo"  lay-filter="reimbursementYear" id="reimbursementYearTwo" title="本年">
+								<input type="radio" name="reimbursement" value="reimbursementMonthTwo"  lay-filter="reimbursementYear" id="reimbursementMonthTwo" title="本月">
+							</div>
+						</c:if>
+					</h2></div>
+					<table class="oa-table layui-table" id="contentTable7" lay-filter="test"></table>
+				</div>
 
 				<%--合同报表--%>
-				<div class="form-group-label"><h2>合同${nyr}报</h2></div>
+				<div id="contractMonth">
+				<div class="form-group-label"><h2>合同${nyr}报
+					<c:if test="${nyr eq '月'}">
+						<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+							<input type="radio" name="contract" value="contractYearOne" lay-filter="contractMonth" id="contractYearOne" title="本年">
+							<input type="radio" name="contract" value="contractMonthOne" checked="checked" lay-filter="contractMonth" id="contractMonthOne" checked title="本月">
+						</div>
+					</c:if>
+				</h2></div>
 				<table class="oa-table layui-table" id="contentTable4" lay-filter="test"></table>
+				</div>
 
+				<%--合同报表年级--%>
+				<div id="contractYear" style="display: none">
+					<div class="form-group-label"><h2>合同年报
+						<c:if test="${nyr eq '月'}">
+							<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 10px;">
+								<input type="radio" name="contract" value="contractYearTwo" lay-filter="contractYear" id="contractYearTwo" title="本年">
+								<input type="radio" name="contract" value="contractMonthTwo"  lay-filter="contractYear" id="contractMonthTwo" title="本月">
+							</div>
+						</c:if>
+					</h2></div>
+					<table class="oa-table layui-table" id="contentTable8" lay-filter="test"></table>
+				</div>
 
 				<div style="clear: both;"></div>
 			</div>
@@ -1140,6 +1336,273 @@
 		});
 	})
 
+	//项目报表年级
+	layui.use('table', function(){
+		layui.table.render({
+			elem: '#contentTable5'
+			,page: false
+			,cols: [[
+				// {checkbox: true, fixed: true},
+				{field: 'statementDate',align:'center', title: '时间',rowspan:2}
+				,{field:'officeName',align:'center', title: '部门',rowspan:2}
+				,{field:'userName',align:'center', title: '姓名',rowspan:2}
+				,{field:'field1',align:'center', title: '新增A类',rowspan:2,templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field1 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('新增A类', '${ctx}/statement/StatementCompanyComprehensive/departmentProjectReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&grade=2','95%', '95%')\">" + d.field1 + "</a>";
+						}else{
+							return "<span title='"+ d.field1 +"'>" +d.field1+ "</span>";
+						}
+					}}
+				,{field:'field2',align:'center', title: '新增B类',rowspan:2,templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field2 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('新增B类', '${ctx}/statement/StatementCompanyComprehensive/departmentProjectReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&grade=1','95%', '95%')\">" + d.field2 + "</a>";
+						}else{
+							return "<span title='"+ d.field2 +"'>" +d.field2+ "</span>";
+						}
+					}}
+				,{field:'field3',align:'center', title: '本年电子归档',rowspan:2,templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field3 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('本年电子归档', '${ctx}/statement/StatementCompanyComprehensive/departmentProjectReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&recordState=5','95%', '95%')\">" + d.field3 + "</a>";
+						}else{
+							return "<span title='"+ d.field3 +"'>" +d.field3+ "</span>";
+						}
+					}}
+				,{field:'field4',align:'center', title: '本年上报',rowspan:2,templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field4 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('本年上报', '${ctx}/statement/StatementCompanyComprehensive/departmentProjectReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&reportedState=5','95%', '95%')\">" + d.field4 + "</a>";
+						}else{
+							return "<span title='"+ d.field4 +"'>" +d.field4+ "</span>";
+						}
+					}}
+				,{align:'center', title: '电子超期未归档',colspan: 2}
+				,{align:'center', title: '上报超期',colspan:2}
+			],
+				[
+					{field:'field5',align:'center',title:'超期未归档',templet:function(d){
+							if("" != d.statementDate){
+								return "<a class=\"attention-info\" title=\"" + d.field5 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期未归档', '${ctx}/statement/StatementCompanyComprehensive/departmentProjectReportListByYear?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&field5=5','95%', '95%')\">" + d.field5 + "</a>";
+							}else{
+								return "<span title='"+ d.field5 +"'>" +d.field5+ "</span>";
+							}
+						}}
+					,{field:'field6',align:'center',title:'超期已归档',templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field6 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期已归档', '${ctx}/statement/StatementCompanyComprehensive/departmentProjectReportListByYear?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&field6=5','95%', '95%')\">" + d.field6 + "</a>";
+						}else{
+							return "<span title='"+ d.field6 +"'>" +d.field6+ "</span>";
+						}
+					}}
+					,{field:'field7',align:'center',title:'超期未上报',templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field7 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期未上报', '${ctx}/statement/StatementCompanyComprehensive/departmentProjectReportListByYear?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&field7=5','95%', '95%')\">" + d.field7 + "</a>";
+						}else{
+							return "<span title='"+ d.field7 +"'>" +d.field7+ "</span>";
+						}
+					}}
+					,{field:'field8',align:'center',title:'超期已上报',templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field8 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期已上报', '${ctx}/statement/StatementCompanyComprehensive/departmentProjectReportListByYear?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&field8=5','95%', '95%')\">" + d.field8 + "</a>";
+						}else{
+							return "<span title='"+ d.field8 +"'>" +d.field8+ "</span>";
+						}
+					}}
+				]]
+			,data: [
+				//data下是list集合,一定要这样写,不然无逗号分割会报错
+				<c:forEach items="${reportFormList5}" var="reportFormList" varStatus="index">
+				<c:if test="${index.index != 0}">,</c:if>
+				{
+					"id":"${reportFormList.id}"
+					,"year":"${reportFormList.year}"
+					,"officeId":"${reportFormList.officeId}"
+					,"bigDateType":"${reportFormList.bigDateType}"
+					,"smallDateType":"${reportFormList.smallDateType}"
+					,"type":"${reportFormList.type}"
+					,"statementDate":"${reportFormList.statementDate}"
+					,"officeName":"${reportFormList.officeName}"
+					,"userId":"${reportFormList.userId}"
+					,"userName":"${reportFormList.userName}"
+					,"field1":"${reportFormList.field1}"
+					,"field2":"${reportFormList.field2}"
+					,"field3":"${reportFormList.field3}"
+					,"field4":"${reportFormList.field4}"
+					,"field5":"${reportFormList.field5}"
+					,"field6":"${reportFormList.field6}"
+					,"field7":"${reportFormList.field7}"
+					,"field8":"${reportFormList.field8}"
+				}
+				</c:forEach>
+			]
+			,limit: 100
+		});
+	})
+	//项目报表年级结束
+
+	//开票报表年级开始
+	layui.use('table', function(){
+		layui.table.render({
+			elem: '#contentTable6'
+			,page: false
+			,cols: [[
+				// {checkbox: true, fixed: true},
+				{field: 'statementDate',align:'center', title: '时间'}
+				,{field:'officeName',align:'center', title: '部门'}
+				,{field:'userName',align:'center', title: '姓名'}
+				,{field:'field1',align:'center', title: '新增发票',templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field1 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('新增发票', '${ctx}/statement/StatementCompanyComprehensive/departmentBillingReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeIdd="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&newlyAdded=5','95%', '95%')\">" + d.field1 + "</a>";
+						}else{
+							return "<span title='"+ d.field1 +"'>" +d.field1+ "</span>";
+						}
+					}}
+				,{field:'field2',align:'center', title: '开票金额'}
+				,{field:'field3',align:'center', title: '本年收款发票',templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field3 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('本年收款发票', '${ctx}/statement/StatementCompanyComprehensive/departmentBillingReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeIdd="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&collectionThisMonth=5','95%', '95%')\">" + d.field3 + "</a>";
+						}else{
+							return "<span title='"+ d.field3 +"'>" +d.field3+ "</span>";
+						}
+					}}
+				,{field:'field4',align:'center', title: '本年收款金额'}
+			]]
+			,data: [
+				//data下是list集合,一定要这样写,不然无逗号分割会报错
+				<c:forEach items="${reportFormList6}" var="reportFormList" varStatus="index">
+				<c:if test="${index.index != 0}">,</c:if>
+				{
+					"id":"${reportFormList.id}"
+					,"year":"${reportFormList.year}"
+					,"officeId":"${reportFormList.officeId}"
+					,"bigDateType":"${reportFormList.bigDateType}"
+					,"smallDateType":"${reportFormList.smallDateType}"
+					,"type":"${reportFormList.type}"
+					,"statementDate":"${reportFormList.statementDate}"
+					,"officeName":"${reportFormList.officeName}"
+					,"userId":"${reportFormList.userId}"
+					,"userName":"${reportFormList.userName}"
+					,"field1":"${reportFormList.field1}"
+					,"field2":"${reportFormList.field2}"
+					,"field3":"${reportFormList.field3}"
+					,"field4":"${reportFormList.field4}"
+				}
+				</c:forEach>
+			]
+			,limit: 100
+		});
+	})
+
+	//报销列表年级开始
+	layui.use('table', function(){
+		layui.table.render({
+			elem: '#contentTable7'
+			,page: false
+			,cols: [[
+				// {checkbox: true, fixed: true},
+				{field: 'statementDate',align:'center', title: '时间'}
+				,{field:'officeName',align:'center', title: '部门'}
+				,{field:'userName',align:'center', title: '姓名'}
+				,{field:'field1',align:'center', title: '新增报销',templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field1 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('新增报销', '${ctx}/statement/StatementCompanyComprehensive/departmentReimbursementReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeIdd="+d.officeId+"&year="+d.year+"&userId="+d.userId+"','95%', '95%')\">" + d.field1 + "</a>";
+						}else{
+							return "<span title='"+ d.field1 +"'>" +d.field1+ "</span>";
+						}
+					}}
+				,{field:'field2',align:'center', title: '报销金额'}
+			]]
+			,data: [
+				//data下是list集合,一定要这样写,不然无逗号分割会报错
+				<c:forEach items="${reportFormList7}" var="reportFormList" varStatus="index">
+				<c:if test="${index.index != 0}">,</c:if>
+				{
+					"id":"${reportFormList.id}"
+					,"year":"${reportFormList.year}"
+					,"officeId":"${reportFormList.officeId}"
+					,"bigDateType":"${reportFormList.bigDateType}"
+					,"smallDateType":"${reportFormList.smallDateType}"
+					,"type":"${reportFormList.type}"
+					,"statementDate":"${reportFormList.statementDate}"
+					,"userId":"${reportFormList.userId}"
+					,"officeName":"${reportFormList.officeName}"
+					,"userName":"${reportFormList.userName}"
+					,"field1":"${reportFormList.field1}"
+					,"field2":"${reportFormList.field2}"
+				}
+				</c:forEach>
+			]
+			,limit: 100
+		});
+	})
+	//报销列表结束
+
+	// 合同报表年级开始
+	layui.use('table', function(){
+		layui.table.render({
+			elem: '#contentTable8'
+			,page: false
+			,cols: [[
+				// {checkbox: true, fixed: true},
+				{field: 'statementDate',align:'center', title: '时间',rowspan:2}
+				,{field:'officeName',align:'center', title: '部门',rowspan:2}
+				,{field:'userName',align:'center', title: '姓名',rowspan:2}
+				,{field:'field1',align:'center', title: '新增',rowspan:2,templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field1 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('新增', '${ctx}/statement/StatementCompanyComprehensive/departmentContractStatementList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeIdd="+d.officeId+"&year="+d.year+"&userId="+d.userId+"','95%', '95%')\">" + d.field1 + "</a>";
+						}else{
+							return "<span title='"+ d.field1 +"'>" +d.field1+ "</span>";
+						}
+					}}
+				,{field:'field2',align:'center', title: '本年纸质归档',rowspan:2,templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field2 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('本${nyr}纸质归档', '${ctx}/statement/StatementCompanyComprehensive/departmentContractStatementList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeIdd="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&contractRecordState=5','95%', '95%')\">" + d.field2 + "</a>";
+						}else{
+							return "<span title='"+ d.field2 +"'>" +d.field2+ "</span>";
+						}
+					}}
+				,{align:'center', title: '未纸质归档',colspan: 2}
+			],
+				[
+					{field:'field3',align:'center',title:'超期未归档',templet:function(d){
+							if("" != d.statementDate){
+								return "<a class=\"attention-info\" title=\"" + d.field3 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期未归档', '${ctx}/statement/StatementCompanyComprehensive/departmentContractStatementList?bigDateTypeByYear=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeIdd="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&field3=5','95%', '95%')\">" + d.field3 + "</a>";
+							}else{
+								return "<span title='"+ d.field3 +"'>" +d.field3+ "</span>";
+							}
+						}}
+					,{field:'field4',align:'center',title:'超期已归档',templet:function(d){
+						if("" != d.statementDate){
+							return "<a class=\"attention-info\" title=\"" + d.field4 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期已归档', '${ctx}/statement/StatementCompanyComprehensive/departmentContractStatementList?bigDateTypeByYear=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeIdd="+d.officeId+"&year="+d.year+"&userId="+d.userId+"&field4=5','95%', '95%')\">" + d.field4 + "</a>";
+						}else{
+							return "<span title='"+ d.field4 +"'>" +d.field4+ "</span>";
+						}
+					}}
+				]]
+			,data: [
+				//data下是list集合,一定要这样写,不然无逗号分割会报错
+				<c:forEach items="${reportFormList8}" var="reportFormList" varStatus="index">
+				<c:if test="${index.index != 0}">,</c:if>
+				{
+					"id":"${reportFormList.id}"
+					,"year":"${reportFormList.year}"
+					,"officeId":"${reportFormList.officeId}"
+					,"bigDateType":"${reportFormList.bigDateType}"
+					,"smallDateType":"${reportFormList.smallDateType}"
+					,"type":"${reportFormList.type}"
+					,"statementDate":"${reportFormList.statementDate}"
+					,"officeName":"${reportFormList.officeName}"
+					,"userId":"${reportFormList.userId}"
+					,"userName":"${reportFormList.userName}"
+					,"field1":"${reportFormList.field1}"
+					,"field2":"${reportFormList.field2}"
+					,"field3":"${reportFormList.field3}"
+					,"field4":"${reportFormList.field4}"
+				}
+				</c:forEach>
+			]
+			,limit: 100
+		});
+	})
+	// 合同结束年级结束
 
     resizeListTable();
     $("a").on("click",addLinkVisied);