瀏覽代碼

2022/7/14

guoxu 2 年之前
父節點
當前提交
9855308478

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

@@ -4014,6 +4014,44 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		return page;
 	}
 
+	//公司级:chaoqi项目报表详细 年度级
+	public Page<RuralProjectRecords> findReportPageOverdueByYear(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords,
+														   StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,
+														   String year,String bigDateType,String smallDateType) {
+		//将获取的datetype转为需要的具体时间   含年月日
+		Map<String,String> map = statementCompanyComprehensiveService.getDateNew(new Integer(bigDateType),new Integer(smallDateType),new Integer(year));
+		String beginDate = map.get("beginDate");
+		String endDate = map.get("endDate");
+		statementCompanyComprehensiveInfo.setBigDateType("2");
+		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.selectReportPageOverdue(projectRecords,statementCompanyComprehensiveInfo,beginDate,endDate);
+		int count = dao.selectReportPageOverdueCount(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;
+	}
+
 	//部门级:项目报表详细
 	public Page<RuralProjectRecords> findDepartmentReportPage(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords,StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,String grade
 			,String recordState,String reportedState) {

+ 62 - 0
src/main/java/com/jeeplus/modules/statement/controller/StatementCompanyComprehensiveController.java

@@ -151,6 +151,68 @@ public class StatementCompanyComprehensiveController extends BaseController {
         return "modules/statement/projectReportList";
     }
 
+
+//    年度级
+    @RequestMapping(value = "projectReportListByYear")
+    public String projectReportListByYear(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response
+            , Model model, @Param(value = "bigDateType") String bigDateType
+            , @Param(value = "smallDateType") String smallDateType
+            , @Param(value = "officeId") String officeId
+            , @Param(value = "year") String year
+            , @Param(value = "grade")String grade
+            , @Param(value = "recordState")String recordState
+            , @Param(value = "reportedState")String reportedState
+            ,StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo){
+
+        //每次都必须接收前端传参并放入model
+        model.addAttribute("bigDateType",bigDateType);
+        model.addAttribute("smallDateType",smallDateType);
+        model.addAttribute("officeId",officeId);
+        model.addAttribute("year",year);
+        model.addAttribute("grade",grade);
+        model.addAttribute("recordState",recordState);
+        model.addAttribute("reportedState",reportedState);
+        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.findReportPage(new Page<RuralProjectRecords>(request, response), projectRecords, officeId, grade, bigDateType, smallDateType, recordState, reportedState, year);
+        }else {
+            statementCompanyComprehensiveInfo.setType("1");
+            page = projectRecordsService.findReportPageOverdueByYear(new Page<RuralProjectRecords>(request, response), projectRecords,statementCompanyComprehensiveInfo,year,bigDateType, smallDateType);
+        }
+        //查询工程类型
+        if (projectRecords.getEngineeringType()!=null){
+            ProjectEngineeringInfo engineeringInfo=engineeringService.get(projectRecords.getEngineeringType());
+            model.addAttribute("engineeringInfo", engineeringInfo);
+        }
+        model.addAttribute("page", page);
+        return "modules/statement/projectReportList";
+    }
+
     //公司级:项目报表详细(发送张静)
     //参数:officeId ,bigDateType,smallDateType
     // grade:是否为A、B类(1=B,2=A),recordState:不为空则为查询本*电子归档,reportedState:不为空则为查询本*上报

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

@@ -217,7 +217,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         String kpyearnum2 = "0";
         String kpyearnum3 = "0";
         String kpyearnum4 = "0";
-        for(StatementCompanyComprehensiveInfo info:reportFormList2){
+        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();
@@ -240,7 +240,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         //合计
         String bxyearnum1 = "0";
         String bxyearnum2 = "0";
-        for(StatementCompanyComprehensiveInfo info:reportFormList3){
+        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();
@@ -261,7 +261,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         String htyearnum2 = "0";
         String htyearnum3 = "0";
         String htyearnum4 = "0";
-        for(StatementCompanyComprehensiveInfo info:reportFormList4){
+        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();

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

@@ -920,8 +920,8 @@
 				<%--项目报表年纪--%>
 				<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"><span style="font-size: 16px;font-weight: normal">年</span>
-						<input type="radio" name="projectReport" value="monthTwo" lay-filter="projectReportYear" style="margin: 0px;padding-left: 0px" id="monthTwo"><span style="font-size: 16px;font-weight: normal" >月</span>
+						<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>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable5" lay-filter="test"></table>
@@ -931,8 +931,8 @@
 				<%--开票报表--%>
 				<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"><span style="font-size: 16px;font-weight: normal" onclick="switchReport">年</span>
-						<input type="radio" name="invoice" value="invoiceMonthOne"  lay-filter="invoiceMonth" id="invoiceMonthOne" checked><span style="font-size: 16px;font-weight: normal" onclick="switchReport" >月</span>
+						<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>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable2" lay-filter="test"></table>
@@ -942,8 +942,8 @@
 				<%--开票年纪--%>
 				<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"><span style="font-size: 16px;font-weight: normal" >年</span>
-						<input type="radio" name="invoice" value="invoiceMonthTwo"  lay-filter="invoiceYear" id="invoiceMonthTwo"><span style="font-size: 16px;font-weight: normal" >月</span>
+						<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>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable6" lay-filter="test"></table>
@@ -953,8 +953,8 @@
 				<%--报销报表--%>
 				<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"><span style="font-size: 16px;font-weight: normal" >年</span>
-						<input type="radio" name="reimbursement" value="reimbursementMonthOne"  lay-filter="reimbursementMonth" id="reimbursementMonthOne" checked><span style="font-size: 16px;font-weight: normal"  >月</span>
+						<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>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable3" lay-filter="test"></table>
@@ -964,8 +964,8 @@
 					<%--报销报表--%>
 					<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"><span style="font-size: 16px;font-weight: normal">年</span>
-							<input type="radio" name="reimbursement" value="reimbursementMonthTwo"  lay-filter="reimbursementYear" id="reimbursementMonthTwo"><span style="font-size: 16px;font-weight: normal" >月</span>
+							<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>
 					</h2></div>
 					<table class="oa-table layui-table" id="contentTable7" lay-filter="test"></table>
@@ -975,8 +975,8 @@
 				<%--合同报表--%>
 				<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"><span style="font-size: 16px;font-weight: normal" >年</span>
-						<input type="radio" name="contract" value="contractMonthOne" checked="checked" lay-filter="contractMonth" id="contractMonthOne" checked><span style="font-size: 16px;font-weight: normal">月</span>
+						<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>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable4" lay-filter="test"></table>
@@ -986,8 +986,8 @@
 				<%--合同报表年纪--%>
 				<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"><span style="font-size: 16px;font-weight: normal" >年</span>
-						<input type="radio" name="contract" value="contractMonthTwo"  lay-filter="contractYear" id="contractMonthTwo"><span style="font-size: 16px;font-weight: normal" >月</span>
+						<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>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable8" lay-filter="test"></table>
@@ -1338,28 +1338,28 @@
 				[
 					{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/projectReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&field5=5','95%', '95%')\">" + d.field5 + "</a>";
+								return "<a class=\"attention-info\" title=\"" + d.field5 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期未归档', '${ctx}/statement/StatementCompanyComprehensive/projectReportListByYear?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&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/projectReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&field6=5','95%', '95%')\">" + d.field6 + "</a>";
+							return "<a class=\"attention-info\" title=\"" + d.field6 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期已归档', '${ctx}/statement/StatementCompanyComprehensive/projectReportListByYear?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&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/projectReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&field7=5','95%', '95%')\">" + d.field7 + "</a>";
+							return "<a class=\"attention-info\" title=\"" + d.field7 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期未上报', '${ctx}/statement/StatementCompanyComprehensive/projectReportListByYear?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&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/projectReportList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&field8=5','95%', '95%')\">" + d.field8 + "</a>";
+							return "<a class=\"attention-info\" title=\"" + d.field8 + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('超期已上报', '${ctx}/statement/StatementCompanyComprehensive/projectReportListByYear?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeId="+d.officeId+"&year="+d.year+"&field8=5','95%', '95%')\">" + d.field8 + "</a>";
 						}else{
 							return "<span title='"+ d.field8 +"'>" +d.field8+ "</span>";
 						}