考核功能样式及bug修改。
This commit is contained in:
parent
c8972c40bd
commit
28aa2c3f30
@ -1,11 +1,13 @@
|
||||
package com.cm.bigdata.controller.apis.bossscore;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cm.bigdata.config.properties.PartyBuildingProperties;
|
||||
import com.cm.bigdata.config.properties.ScoreProperties;
|
||||
import com.cm.bigdata.pojo.dtos.boss.BossDTO;
|
||||
import com.cm.bigdata.pojo.dtos.configforscore.ConfigForScoreDTO;
|
||||
import com.cm.bigdata.pojo.dtos.deptassess.DeptAssessDTO;
|
||||
import com.cm.bigdata.pojo.dtos.scoredetail.ScoreDetailDTO;
|
||||
import com.cm.bigdata.pojo.dtos.worknote.WorkNoteForScoreDTO;
|
||||
import com.cm.bigdata.pojo.vos.scoredetail.ScoreDetailVO;
|
||||
@ -37,6 +39,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
@ -357,4 +361,48 @@ public class BossScoreController extends AbstractController {
|
||||
return year;
|
||||
}
|
||||
|
||||
/*@ApiOperation(value = "导出excel(立案情况)", notes = "导出excel(立案情况)接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("excelworknote")
|
||||
public void excelWorkNote(HttpServletResponse response) throws Exception {
|
||||
Map<String, Object> params = requestParams();
|
||||
|
||||
String excelName = params.get("year") + "年"+ params.get("quarter") +"季度街镇村立案情况考核分数统计表";
|
||||
String fileName = URLEncoder.encode(excelName, "UTF-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
|
||||
String [] headers = {"街镇村","上报数量","每件得分","总得分"};
|
||||
List<List<String>> listHeader = new ArrayList<>();
|
||||
for (String item : headers){
|
||||
List<String> title = new ArrayList<>();
|
||||
title.add(item);
|
||||
listHeader.add(title);
|
||||
}
|
||||
|
||||
List<DeptAssessDTO> deptAssessDTOs = deptAssessDao.listDeptAssess(params);
|
||||
List<List<String>> listData = new ArrayList<>();
|
||||
for (DeptAssessDTO d : deptAssessDTOs) {
|
||||
List<String> data = new ArrayList<String>();
|
||||
data.add(d.getDeptName());
|
||||
data.add(d.getDeptTotalYear());
|
||||
data.add(d.getDeptTotalQuarter());
|
||||
data.add(d.getDeptCaseNum().toString());
|
||||
data.add("加"+d.getDeptCaseSettleScore().toString()+"分");
|
||||
data.add(d.getDeptCaseTimeoutNum().toString());
|
||||
data.add("加"+d.getDeptCaseTimeoutScore().toString()+"分");
|
||||
data.add(d.getDeptCaseGrossScore().toString());
|
||||
Integer num = deptInspectorService.countDeptInspectorNum(d.getDeptTotalYear(),d.getDeptTotalQuarter(),d.getDeptId());
|
||||
data.add("扣"+num.toString()+"分");
|
||||
data.add(d.getDeptCaseTotalScore().toString()+"分");
|
||||
double zdy = deptAssessChangeScoreService.getDeptChangeScore(d.getDeptAssessId());
|
||||
data.add(zdy+"分");
|
||||
Double eventScore = totalEvenSocre(d.getDeptCaseTotalScore(),zdy);
|
||||
data.add(eventScore.toString()+"分");
|
||||
data.add(d.getDeptTotalTime());
|
||||
listData.add(data);
|
||||
}
|
||||
|
||||
EasyExcel.write(response.getOutputStream()).sheet("职能部门考核分数表").head(listHeader).doWrite(listData);
|
||||
}*/
|
||||
|
||||
}
|
@ -82,8 +82,8 @@ public class DeptAssessServiceImpl extends AbstractService implements IDeptAsses
|
||||
* @throws Exception
|
||||
*/
|
||||
public void excelManualDeptData(String deptTotalYear, String deptTotalQuarter, HttpServletResponse response) throws Exception{
|
||||
String excelName = "y年q季度职能部门考核分数统计表";
|
||||
String fileName = URLEncoder.encode("党费管理Excel模板", "UTF-8");
|
||||
String excelName = deptTotalYear + "年"+ deptTotalQuarter +"季度职能部门考核分数统计表";
|
||||
String fileName = URLEncoder.encode(excelName, "UTF-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
String [] headers = {"部门名称","统计年份","统计季度","部门已处理案件数量","案件处理情况分数","部门超时案件数量","案件处置时效分数","案件处理结果分数",
|
||||
"案件督查分数","总分","自定义共加分","最终得分","数据统计时间"
|
||||
|
@ -179,7 +179,7 @@
|
||||
<select id="listScoreDetailForPage" parameterType="map" resultMap="scoreDetailDTO">
|
||||
SELECT
|
||||
table1.lost_score,
|
||||
table1.type,y
|
||||
table1.type,
|
||||
table1.area_name,
|
||||
table1.table1. YEAR,
|
||||
table1. QUARTER,
|
||||
|
@ -30,6 +30,9 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="excel" class="layui-btn layui-btn-normal layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-export"></i> 导出数据
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
@ -55,6 +58,46 @@
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/bossscore/worknoteforscore';
|
||||
|
||||
|
||||
$(document).on('click', '#excel', function() {
|
||||
var year = $('#year').val();
|
||||
var quarter = $('#quarter').val();
|
||||
excel(year,quarter);
|
||||
});
|
||||
|
||||
function excel(v1,v2){
|
||||
if(v1 === ''){
|
||||
layer.msg('请选择导出数据年份')
|
||||
}
|
||||
if(v2 === ''){
|
||||
layer.msg('请选择导出数据季度')
|
||||
}
|
||||
var v2Str = "";
|
||||
if(v2 === '1'){
|
||||
v2Str = '第一季度'
|
||||
}
|
||||
if(v2 === '2'){
|
||||
v2Str = '第二季度'
|
||||
}
|
||||
if(v2 === '3'){
|
||||
v2Str = '第三季度'
|
||||
}
|
||||
if(v2 === '4'){
|
||||
v2Str = '第四季度'
|
||||
}
|
||||
|
||||
|
||||
top.dialog.msg('确定要导出'+v1+'年'+v2Str+'的数据吗?', {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
window.open(top.restAjax.path('api/bossscore/excelworknote?year={year}&quarter={quarter}', [v1,v2]));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function quarterFun(value){
|
||||
$("#quarter").empty();
|
||||
var date;
|
||||
|
@ -29,6 +29,9 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="excel" class="layui-btn layui-btn-normal layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-export"></i> 导出数据
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
|
@ -36,8 +36,8 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="excel" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 导出数据
|
||||
<button type="button" id="excel" class="layui-btn layui-btn-normal layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-export"></i> 导出数据
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
|
@ -12,7 +12,10 @@
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/bigdata/css/reset.css" />
|
||||
<style>
|
||||
.main-container{width: 100%;}
|
||||
.tableClass{width: 100%;table-layout: fixed;border-collapse: collapse;border-spacing: 0;float:left}
|
||||
.quarter{text-align: center;font-size: 24px;}
|
||||
.card{margin-bottom: 15px;}
|
||||
.title{font-size: 20px;margin-bottom: 10px;}
|
||||
.tableClass{width: 100%;table-layout: fixed;border-collapse: collapse;border-spacing: 0;}
|
||||
.tableClass td{height: 35px;text-align: center;border: 1px solid #000;box-sizing: border-box}
|
||||
[v-cloak]{display: none;}
|
||||
</style>
|
||||
@ -37,107 +40,94 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="excel" class="layui-btn layui-btn-normal layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-export"></i> 导出数据
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="app">
|
||||
<div class="main-container">
|
||||
<table class="tableClass" v-cloak>
|
||||
<tr v-for="(area, areaIndex) in dataList">
|
||||
<td width="5%">{{area.areaName}}</td>
|
||||
<td width="95%">
|
||||
<table class="tableClass" style="width: 100%;" v-if="count == 1">
|
||||
<tr>
|
||||
<td colspan="4">第一季度</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO1" v-for="(quarter1, quarterIndex1) in area.partyMeetingScoreDTO1.meetingList">
|
||||
<td>{{quarter1.categoryName}}</td>
|
||||
<td>{{quarter1.shouldCount}}</td>
|
||||
<td>{{quarter1.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex1 < 1">{{area.partyMeetingScoreDTO1.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tableClass" style="width: 100%;" v-if="count == 2">
|
||||
<tr>
|
||||
<td colspan="4">第二季度</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO2" v-for="(quarter2, quarterIndex2) in area.partyMeetingScoreDTO2.meetingList">
|
||||
<td>{{quarter2.categoryName}}</td>
|
||||
<td>{{quarter2.shouldCount}}</td>
|
||||
<td>{{quarter2.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex2 < 1">{{area.partyMeetingScoreDTO2.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tableClass" style="width: 100%;" v-if="count == 3">
|
||||
<tr>
|
||||
<td colspan="4">第三季度</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO3" v-for="(quarter3, quarterIndex3) in area.partyMeetingScoreDTO3.meetingList">
|
||||
<td>{{quarter3.categoryName}}</td>
|
||||
<td>{{quarter3.shouldCount}}</td>
|
||||
<td>{{quarter3.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex3 < 1">{{area.partyMeetingScoreDTO3.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tableClass" style="width: 100%;" v-if="count == 4">
|
||||
<tr>
|
||||
<td colspan="4">第四季度</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO4" v-for="(quarter4, quarterIndex4) in area.partyMeetingScoreDTO4.meetingList">
|
||||
<td>{{quarter4.categoryName}}</td>
|
||||
<td>{{quarter4.shouldCount}}</td>
|
||||
<td>{{quarter4.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex4 < 1">{{area.partyMeetingScoreDTO4.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tableClass" style="width: 100%;" v-if="count == 5">
|
||||
<tr>
|
||||
<td colspan="4">全年</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO5" v-for="(quarter5, quarterIndex5) in area.partyMeetingScoreDTO5.meetingList">
|
||||
<td>{{quarter5.categoryName}}</td>
|
||||
<td>{{quarter5.shouldCount}}</td>
|
||||
<td>{{quarter5.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex5 < 1">{{area.partyMeetingScoreDTO5.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="main-container" v-cloak>
|
||||
<div class="quarter" v-if="count == 1">{{year}}第一季度</div>
|
||||
<div class="quarter" v-if="count == 2">{{year}}第二季度</div>
|
||||
<div class="quarter" v-if="count == 3">{{year}}第三季度</div>
|
||||
<div class="quarter" v-if="count == 4">{{year}}第四季度</div>
|
||||
<div class="card" v-for="(area, areaName) in dataList">
|
||||
<div class="title">{{area.areaName}}</div>
|
||||
<table class="tableClass" v-cloak v-if="count == 1">
|
||||
<tr>
|
||||
<td width="">类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO1" v-for="(quarter1, quarterIndex1) in area.partyMeetingScoreDTO1.meetingList">
|
||||
<td>{{quarter1.categoryName}}</td>
|
||||
<td>{{quarter1.shouldCount}}</td>
|
||||
<td>{{quarter1.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex1 < 1">{{area.partyMeetingScoreDTO1.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tableClass" v-cloak v-if="count == 2">
|
||||
<tr>
|
||||
<td width="">类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO2" v-for="(quarter2, quarterIndex2) in area.partyMeetingScoreDTO2.meetingList">
|
||||
<td>{{quarter2.categoryName}}</td>
|
||||
<td>{{quarter2.shouldCount}}</td>
|
||||
<td>{{quarter2.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex2 < 1">{{area.partyMeetingScoreDTO2.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tableClass" v-cloak v-if="count == 3">
|
||||
<tr>
|
||||
<td width="">类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO3" v-for="(quarter3, quarterIndex3) in area.partyMeetingScoreDTO3.meetingList">
|
||||
<td>{{quarter3.categoryName}}</td>
|
||||
<td>{{quarter3.shouldCount}}</td>
|
||||
<td>{{quarter3.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex3 < 1">{{area.partyMeetingScoreDTO3.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tableClass" v-cloak v-if="count == 4">
|
||||
<tr>
|
||||
<td width="">类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO4" v-for="(quarter4, quarterIndex4) in area.partyMeetingScoreDTO4.meetingList">
|
||||
<td>{{quarter4.categoryName}}</td>
|
||||
<td>{{quarter4.shouldCount}}</td>
|
||||
<td>{{quarter4.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex4 < 1">{{area.partyMeetingScoreDTO4.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tableClass" v-cloak v-if="count == 5">
|
||||
<tr>
|
||||
<td width="">类型</td>
|
||||
<td>应上报数</td>
|
||||
<td>实际上报</td>
|
||||
<td>总分</td>
|
||||
</tr>
|
||||
<tr v-if="area.partyMeetingScoreDTO5" v-for="(quarter5, quarterIndex5) in area.partyMeetingScoreDTO5.meetingList">
|
||||
<td>{{quarter5.categoryName}}</td>
|
||||
<td>{{quarter5.shouldCount}}</td>
|
||||
<td>{{quarter5.counts}}</td>
|
||||
<td rowspan="8" v-if="quarterIndex5 < 1">{{area.partyMeetingScoreDTO5.score}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -158,13 +148,14 @@
|
||||
var laydate = layui.laydate;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/partyscore/partymeetingscore';
|
||||
var yearDate = new Date().getFullYear();
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
count: 4,
|
||||
count: 1,
|
||||
dataList: [],
|
||||
quarter: []
|
||||
year: new Date().getFullYear()
|
||||
},
|
||||
methods: {
|
||||
getData: function() {
|
||||
@ -183,6 +174,7 @@
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/partyscore/partymeetingscore?year={year}&quarter={quarter}', [yearVal, quarterVal]), {}, null, function(code, data) {
|
||||
// 将街镇村名字放到集合中
|
||||
console.log(data)
|
||||
self.dataList = data;
|
||||
if(data[0]['partyMeetingScoreDTO1']) {
|
||||
self.count = 1;
|
||||
@ -203,6 +195,10 @@
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
},
|
||||
setDate: function (date) {
|
||||
var self = this;
|
||||
self.year = date;
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
var self = this;
|
||||
@ -216,9 +212,15 @@
|
||||
var year;
|
||||
if(!value) {
|
||||
date = new Date();
|
||||
yearDate = date.getFullYear();
|
||||
}else {
|
||||
year = value + '-12-31';
|
||||
date = new Date(year);
|
||||
if(value != new Date().getFullYear()) {
|
||||
year = value + '-12-31';
|
||||
date = new Date(year);
|
||||
}else {
|
||||
date = new Date();
|
||||
}
|
||||
yearDate = value;
|
||||
}
|
||||
var month = date.getMonth() + 1;
|
||||
if(month >= 1 && month <=3) {
|
||||
@ -263,8 +265,8 @@
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
// searchFun(currentPage);
|
||||
vue.getData();
|
||||
vue.setDate(yearDate);
|
||||
}
|
||||
|
||||
function searchFun(currentPage) {
|
||||
|
@ -29,6 +29,9 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="excel" class="layui-btn layui-btn-normal layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-export"></i> 导出数据
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
|
@ -29,6 +29,9 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="excel" class="layui-btn layui-btn-normal layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-export"></i> 导出数据
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<script type="text/html" id="barDemo">
|
||||
|
Loading…
Reference in New Issue
Block a user