Browse Source

2022/7/13 公司级报表年度级别

guoxu 2 years ago
parent
commit
f5240c130a

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

@@ -140,7 +140,7 @@ public class StatementCompanyComprehensiveController extends BaseController {
             page = projectRecordsService.findReportPage(new Page<RuralProjectRecords>(request, response), projectRecords, officeId, grade, bigDateType, smallDateType, recordState, reportedState, year);
         }else {
             statementCompanyComprehensiveInfo.setType("1");
-            page = projectRecordsService.findReportPageZJOverdue(new Page<RuralProjectRecords>(request, response), projectRecords,statementCompanyComprehensiveInfo,year,bigDateType, smallDateType);
+            page = projectRecordsService.findReportPageOverdue(new Page<RuralProjectRecords>(request, response), projectRecords,statementCompanyComprehensiveInfo,year,bigDateType, smallDateType);
         }
         //查询工程类型
         if (projectRecords.getEngineeringType()!=null){

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

@@ -184,7 +184,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         String xmnumyear6 = "0";
         String xmnumyear7 = "0";
         String xmnumyear8 = "0";
-        for(StatementCompanyComprehensiveInfo info:reportFormList1){
+        for(StatementCompanyComprehensiveInfo info:reportFormList5){
             //转BigDecimal 处理   合计
             xmnumyear1 = new BigDecimal(info.getField1()).add(new BigDecimal(xmnumyear1)).toString();
             xmnumyear2 = new BigDecimal(info.getField2()).add(new BigDecimal(xmnumyear2)).toString();
@@ -2501,7 +2501,8 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
 
 //根据公司级报告查询所有的表内容
     public List<StatementCompanyComprehensiveInfo> selectAllByTypeInYearReport(StatementCompanyComprehensiveInfo info){
-        List<StatementCompanyComprehensiveInfo> list = dao.selectAllByType(info);
+        info.setBigDateType("0");
+        List<StatementCompanyComprehensiveInfo> list = dao.selectAllByTypeByYear(info);
         return list;
     }
 

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

@@ -174,36 +174,6 @@ public class WorkCalendarTaskService  {
 
     }
 
-    /**
-     * 月度报表
-     */
-    //测试用
-    @Scheduled(cron= "*/30 * * * * ?")
-    //@Scheduled(cron= "0 0/2 * * * ?")
-    @Transactional(readOnly = false)
-    public void getStatementCompanyComprehensiveOnMonth2() {
-        final Calendar c = Calendar.getInstance();
-        Integer year = c.get(Calendar.YEAR);
-        System.out.println(c.get(Calendar.DATE));
-        System.out.println(c.getActualMaximum(Calendar.DATE));
-//        if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)){
-
-            Integer month = c.get(Calendar.MONTH)+1; //第一个月从0开始,所以得到月份+1
-            //当月最后一天
-            logger.info("-----------公司级—月度报表(开始)------------------");
-            statementCompanyComprehensiveService.disposeStatementCompany(year,2,month);
-            logger.info("------------公司级—月度报表(结束)------------------");
-        System.out.println("===========================================开始");
-            logger.info("------------公司级—年度报表(开始)------------------");
-            statementCompanyComprehensiveService.disposeStatementCompanyByYear(year,0,month);
-            logger.info("------------公司级—年度报表(结束)------------------");
-            logger.info("-----------部门级—月度报表(开始)------------------");
-//            statementCompanyComprehensiveService.disposeStatementOffice(year,2,month);
-            logger.info("------------部门级—月度报表(结束)------------------");
-//        }
-
-    }
-
 
     /**
      * 季度报表

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

@@ -42,7 +42,95 @@
 							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"){
+                        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对象
+					console.log(data.value);
+					if(data.value=="yearOne"){
+						document.getElementById("projectReportYear").style.display="";
+						document.getElementById("projectReportMonth").style.display="none";
+						$('#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(); //重新渲染显示效果
+					}
+				});
 			})
 		});
 
@@ -778,12 +866,8 @@
 			xml+="</div>";
 			return[xml].join('');
 		}
-		
-	//	单选按钮点击事件
-		function switchReport() {
-			// var nyr = $('input:radio:checked').val();
-			// alert nyr;
-		}
+
+
 	</script>
 	<style>
 		body{
@@ -809,87 +893,97 @@
 				<div class="nav-btns">
 					<div style="clear: both;"></div>
 				</div>
-
+				<div id="projectReportMonth">
 				<%--项目报表--%>
 <%--				<div class="form-group-label"><h2>项目${nyr}报</h2>--%>
-				<div class="form-group-label" style="display: block"><h2>项目${nyr}报
+				<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 style="float: right;height: 17.9px">
-						<input type="radio" name="projectReport" value="year"><span style="font-size: 16px;font-weight: normal" onclick="switchReport">年</span>
-						<input type="radio" name="projectReport" value="month" checked="checked"><span style="font-size: 16px;font-weight: normal" onclick="switchReport" >月</span>
+					<div class="layui-input-block" style="float: right;height: 17.9px;bottom: 8px;margin: 0px;padding-left: 0px" >
+						<input type="radio" name="projectReport" value="yearOne" lay-filter="projectReportMonth" style="margin: 0px;padding-left: 0px" id="yearOne" ><span style="font-size: 16px;font-weight: normal;margin: 0 auto" >年</span>
+						<input type="radio" name="projectReport" value="monthOne" lay-filter="projectReportMonth" style="margin: 0px;padding-left: 0px" checked id="monthOne"><span style="font-size: 16px;font-weight: normal;margin: 0 auto"  >月</span>
 					</div>
 				</h2>
-
-<%--					<input type="radio" checked="checked" name="month" style="text-align:left">月--%>
 				</div>
-<%--				年月单选按钮--%>
-
 				<table class="oa-table layui-table" id="contentTable1" lay-filter="test"></table>
+				</div>
 
+				<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"><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>
+					</div>
+				</h2></div>
+				<table class="oa-table layui-table" id="contentTable5" lay-filter="test"></table>
+				</div>
+
+				<div id="invoiceMonth">
 				<%--开票报表--%>
 				<div class="form-group-label"><h2>开票${nyr}报
-					<div style="float: right;height: 17.9px">
-						<input type="radio" name="projectReport" value="year"><span style="font-size: 16px;font-weight: normal" onclick="switchReport">年</span>
-						<input type="radio" name="projectReport" value="month" checked="checked"><span style="font-size: 16px;font-weight: normal" onclick="switchReport" >月</span>
+					<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>
 					</div>
 				</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>开票年报
+					<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>
+					</div>
+				</h2></div>
+				<table class="oa-table layui-table" id="contentTable6" lay-filter="test"></table>
+				</div>
+
+				<div id="reimbursementMonth">
 				<%--报销报表--%>
 				<div class="form-group-label"><h2>报销${nyr}报
-					<div style="float: right;height: 17.9px">
-						<input type="radio" name="projectReport" value="year"><span style="font-size: 16px;font-weight: normal" onclick="switchReport">年</span>
-						<input type="radio" name="projectReport" value="month" checked="checked"><span style="font-size: 16px;font-weight: normal" onclick="switchReport" >月</span>
+					<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>
 					</div>
 				</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>报销年报
+						<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>
+						</div>
+					</h2></div>
+					<table class="oa-table layui-table" id="contentTable7" lay-filter="test"></table>
+				</div>
 
+				<div id="contractMonth">
 				<%--合同报表--%>
 				<div class="form-group-label"><h2>合同${nyr}报
-					<div style="float: right;height: 17.9px">
-						<input type="radio" name="projectReport" value="year"><span style="font-size: 16px;font-weight: normal" onclick="switchReport">年</span>
-						<input type="radio" name="projectReport" value="month" checked="checked"><span style="font-size: 16px;font-weight: normal" onclick="switchReport" >月</span>
+					<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>
 					</div>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable4" lay-filter="test"></table>
+				</div>
 
-
-				<%--项目报表年纪--%>
-                <div class="form-group-label"><h2>项目年报
-					<div style="float: right;height: 17.9px">
-						<input type="radio" name="projectReport" value="year"><span style="font-size: 16px;font-weight: normal" onclick="switchReport">年</span>
-						<input type="radio" name="projectReport" value="month" checked="checked"><span style="font-size: 16px;font-weight: normal" onclick="switchReport" >月</span>
-					</div>
-				</h2></div>
-				<table class="oa-table layui-table" id="contentTable5" lay-filter="test"></table>
-
-				<%--开票年纪--%>
-				<div class="form-group-label"><h2>开票年报
-					<div style="float: right;height: 17.9px">
-						<input type="radio" name="projectReport" value="year"><span style="font-size: 16px;font-weight: normal" onclick="switchReport">年</span>
-						<input type="radio" name="projectReport" value="month" checked="checked"><span style="font-size: 16px;font-weight: normal" onclick="switchReport" >月</span>
-					</div>
-				</h2></div>
-				<table class="oa-table layui-table" id="contentTable6" lay-filter="test"></table>
-
-				<%--报销年纪--%>
-				<div class="form-group-label"><h2>报销年报
-					<div style="float: right;height: 17.9px">
-						<input type="radio" name="projectReport" value="year"><span style="font-size: 16px;font-weight: normal" onclick="switchReport">年</span>
-						<input type="radio" name="projectReport" value="month" checked="checked"><span style="font-size: 16px;font-weight: normal" onclick="switchReport" >月</span>
-					</div>
-				</h2></div>
-				<table class="oa-table layui-table" id="contentTable7" lay-filter="test"></table>
-
-				<%--项目报表年纪--%>
+				<div id="contractYear" style="display: none">
+				<%--合同报表年纪--%>
 				<div class="form-group-label"><h2>合同年报
-					<div style="float: right;height: 17.9px">
-						<input type="radio" name="projectReport" value="year"><span style="font-size: 16px;font-weight: normal" onclick="switchReport">年</span>
-						<input type="radio" name="projectReport" value="month" checked="checked"><span style="font-size: 16px;font-weight: normal" onclick="switchReport" >月</span>
+					<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>
 					</div>
 				</h2></div>
 				<table class="oa-table layui-table" id="contentTable8" lay-filter="test"></table>
+				</div>
 
 				<div style="clear: both;"></div>
 			</div>
@@ -1066,7 +1160,6 @@
 					}}
 				,{field:'field4',align:'center', title: '本${nyr}收款金额'}
 			]]
-			//年级报表结束
 			,data: [
 				//data下是list集合,一定要这样写,不然无逗号分割会报错
 				<c:forEach items="${reportFormList2}" var="reportFormList" varStatus="index">
@@ -1136,8 +1229,8 @@
 			,page: false
 			,cols: [[
 				// {checkbox: true, fixed: true},
-				{field: 'statementDate',align:'center', title: '11时间',rowspan:2}
-				,{field:'officeName',align:'center', title: '11部门',rowspan:2}
+				{field: 'statementDate',align:'center', title: '时间',rowspan:2}
+				,{field:'officeName',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/contractStatementList?bigDateType=" + d.bigDateType +"&smallDateType=" + d.smallDateType +"&officeIdd="+d.officeId+"&year="+d.year+"','95%', '95%')\">" + d.field1 + "</a>";
@@ -1266,7 +1359,7 @@
 				]]
 			,data: [
 				//data下是list集合,一定要这样写,不然无逗号分割会报错
-				<c:forEach items="${reportFormList1}" var="reportFormList" varStatus="index">
+				<c:forEach items="${reportFormList5}" var="reportFormList" varStatus="index">
 				<c:if test="${index.index != 0}">,</c:if>
 				{
 					"id":"${reportFormList.id}"
@@ -1321,7 +1414,7 @@
 			//年级报表结束
 			,data: [
 				//data下是list集合,一定要这样写,不然无逗号分割会报错
-				<c:forEach items="${reportFormList2}" var="reportFormList" varStatus="index">
+				<c:forEach items="${reportFormList6}" var="reportFormList" varStatus="index">
 				<c:if test="${index.index != 0}">,</c:if>
 				{
 					"id":"${reportFormList.id}"
@@ -1341,7 +1434,7 @@
 			,limit: 100
 		});
 	})
-	// 开票报表结束
+
 
 	//报销列表开始
 	layui.use('table', function(){
@@ -1363,7 +1456,7 @@
 			]]
 			,data: [
 				//data下是list集合,一定要这样写,不然无逗号分割会报错
-				<c:forEach items="${reportFormList3}" var="reportFormList" varStatus="index">
+				<c:forEach items="${reportFormList7}" var="reportFormList" varStatus="index">
 				<c:if test="${index.index != 0}">,</c:if>
 				{
 					"id":"${reportFormList.id}"
@@ -1426,7 +1519,7 @@
 				]]
 			,data: [
 				//data下是list集合,一定要这样写,不然无逗号分割会报错
-				<c:forEach items="${reportFormList4}" var="reportFormList" varStatus="index">
+				<c:forEach items="${reportFormList8}" var="reportFormList" varStatus="index">
 				<c:if test="${index.index != 0}">,</c:if>
 				{
 					"id":"${reportFormList.id}"