新增复杂案件

This commit is contained in:
Renpc-kilig 2024-04-10 10:49:51 +08:00
parent adebd6d8e5
commit 79bc386be5
9 changed files with 525 additions and 11 deletions

View File

@ -132,6 +132,19 @@ public class ReportCaseController extends AbstractController {
return new SuccessResult();
}
@ApiOperation(value = "删除为复杂案件", notes = "删除为复杂案件接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "上报案件ID列表用下划线分隔", paramType = "path", example = "1_2_3")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove-to-complex-cases/{id}")
public SuccessResult removeToComplexCases(@PathVariable("id") String id) throws RemoveException {
Map<String, Object> params = getParams();
params.put("reportCaseIds", Arrays.asList(id));
reportCaseService.removeToComplexCases(params);
return new SuccessResult();
}
@ApiOperation(value = "上报案件修改", notes = "上报案件修改接口")
@ApiImplicitParams({
@ -501,6 +514,25 @@ public class ReportCaseController extends AbstractController {
return reportCaseService.listReportCaseException(page);
}
/**
* 已删除且有争议案件
*/
@ApiOperation(value = "复杂案件列表caseStatus=99", notes = "复杂案件列表接口caseStatus=99")
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-page-report-complex")
public SuccessResultList<List<ReportCaseDTO>> listPageReportComplex(ListPage page) throws SearchException {
Map<String, Object> params = requestParams();
page.setParams(params);
return reportCaseService.listReportCaseComplex(page);
}
@ApiOperation(value = "案件日志列表", notes = "案件日志列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "caseId", value = "案件ID", paramType = "path"),

View File

@ -384,6 +384,4 @@ public interface IReportCaseDao {
List<HandleDepartmentDTO> listDept(Map<String, Object> params);
Integer countReportCaseAssign(Map<String, Object> reportCaseAssignMap);
}

View File

@ -34,7 +34,7 @@ public class ReportCaseDTO {
private String communityName;
@ApiModelProperty(name = "caseSource", value = "来源")
private String caseSource;
@ApiModelProperty(name = "caseStatus", value = "状态")
@ApiModelProperty(name = "caseStatus", value = "状态(值=99为复杂案件")
private String caseStatus;
@ApiModelProperty(name = "caseTypeId", value = "类型ID")
private String caseTypeId;

View File

@ -490,4 +490,7 @@ public interface IReportCaseService {
ReportCaseDTO getReportCaseForDel(Map<String, Object> params);
SuccessResultList<List<ReportCaseDTO>> listReportCaseComplex(ListPage page);
void removeToComplexCases(Map<String, Object> params);
}

View File

@ -347,6 +347,24 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
return reportCaseDao.getReportCaseForDel(params);
}
@Override
public SuccessResultList<List<ReportCaseDTO>> listReportCaseComplex(ListPage page) {
setNPersonAreaParams(page.getParams());
page.getParams().put("caseStatus", 99);
// caseStatus=99为复杂案件
PageHelper.startPage(page.getPage(), page.getRows());
List<ReportCaseDTO> deleteList = reportCaseDao.listPageReportDelete(page.getParams());
PageInfo<ReportCaseDTO> pageInfo = new PageInfo<>(deleteList);
return new SuccessResultList<>(deleteList, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public void removeToComplexCases(Map<String, Object> params) {
setUpdateInfo(params);
params.put("caseStatus", 99);
reportCaseDao.removeToDisputedCases(params);
}
@Override
public ReportCaseDTO getReportCase(String token, Map<String, Object> params) throws SearchException {
ReportCaseDTO dto = reportCaseDao.getReportCase(params);

View File

@ -42,7 +42,6 @@ import com.cm.systemcity.service.community.ICommunityService;
import com.cm.systemcity.service.communityboss.ICommunityBossService;
import com.cm.systemcity.service.dict.IDictService;
import com.cm.systemcity.service.userpoints.IUserPointsService;
import javafx.scene.layout.GridPane;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;

View File

@ -1,6 +1,6 @@
server:
port: 7022
url: http://192.168.0.15:7022/servicecity
url: http://192.168.0.4:7022/servicecity
title: 生态环保网格化监督平台
servlet:
context-path: /servicecity
@ -24,11 +24,12 @@ spring:
max-request-size: 1GB
datasource:
druid:
url: jdbc:mysql://192.168.0.151:3306/db_btgxq_city?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
# url: jdbc:mysql://192.168.0.151:3306/db_btgxq_city?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
url: jdbc:mysql://localhost:3306/db_btgxq?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
db-type: mysql
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
password: 123456
initial-size: 2
min-idle: 2
max-active: 10
@ -81,7 +82,7 @@ file:
# 安全
security:
oauth2:
oauth-server: http://192.168.0.15:7021/usercenter
oauth-server: http://192.168.0.4:7021/usercenter
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
client:
client-id: c024a89b35b04d4d8b5b4ea4d66a8acb

View File

@ -0,0 +1,436 @@
<!doctype html>
<html lang="zh-CN">
<head>
<base href="/servicecity/">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<!-- 图片 -->
<link rel="stylesheet" type="text/css" href="assets/js/vendor/swiper3/css/swiper.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
<!-- 图片 -->
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" href="assets/js/vendor/zTree3/css/metroStyle/metroStyle.css"/>
<style>
.layui-table-cell{
height: auto;
}
.layui-table-body td{
height: 210px;
}
.layui-table img{
max-width: 100%;
}
.info-row {border-bottom: 1px dotted;}
.info-row:last-child {border: none;}
.info-row .col-left {width:30%;height:28px;text-align:center;border-right:1px dotted;display:inline-block;padding:5px;vertical-align:top;}
.info-row .col-right {width:70%;display:inline-block;padding:5px;vertical-align:top;}
.info-row .col-line {width:100%;color:black;text-align:center;display:block;padding:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.info-row .col-line .fa {color: red; margin-right: 5px;}
.info-row .col-content {width:100%;display:inline-block;padding:5px;height:86px;overflow:auto;white-space:normal;word-break:break-all;word-wrap:break-word;vertical-align:top;}
</style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div class="test-table-reload-btn layui-form" style="margin-bottom: 5px;">
<div class="layui-inline">
<input type="text" id="caseNumber" class="layui-input search-item" placeholder="案件编号" style="height: 38px;width:150px;" autocomplete="off">
</div>
<div class="layui-inline" id="areaSelectTemplateBox" style="width: 150px;"></div>
<script id="areaSelectTemplate" type="text/html">
<select id="areaId" name="areaId">
<option value="">选择街镇</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictId}}">{{item.dictName}}</option>
{{# } }}
</select>
</script>
<div class="layui-inline" id="caseTypeSelectTemplateBox" style="width: 150px;"></div>
<script id="caseTypeSelectTemplate" type="text/html">
<select id="caseTypeId" name="caseTypeId" lay-filter="changeCaseType">
<option value="">案件类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictId}}">{{item.dictName}}</option>
{{# } }}
</select>
</script>
<div class="layui-inline" id="childCaseTypeSelectTemplateBox" style="width: 150px;"></div>
<script id="childCaseTypeSelectTemplate" type="text/html">
<select id="childCaseTypeId" name="childCaseTypeId">
<option value="">案件子类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictId}}">{{item.dictName}}</option>
{{# } }}
</select>
</script>
<div class="layui-inline" id="deptContainer"></div>
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item"
readonly="readonly" placeholder="开始时间" style="height: 38px;width:150px;cursor: pointer" autocomplete="off">
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item"
readonly="readonly" placeholder="结束时间" style="height: 38px;width:150px;cursor: pointer" autocomplete="off">
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<!-- 图片 -->
<script type="text/javascript" src="assets/js/vendor/swiper3/js/swiper.min.js"></script>
<script type="text/javascript" src="assets/js/vendor/viewer/viewer.min.js"></script>
<!-- 图片 -->
<script type="text/javascript">
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laytpl', 'form','laydate', 'selecttree'], function() {
var $ = layui.$;
var $win = $(window);
var laytpl = layui.laytpl;
var table = layui.table;
var admin = layui.admin;
var form = layui.form;
var laydate = layui.laydate;
var selecttree = layui.selecttree;
var tableUrl = 'api/reportcase/list-page-report-complex'
selecttree.dept({
elem: '#deptContainer',
name: 'dept',
});
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(getParamsUrl(tableUrl), []),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 100,
limit: 10,
limits: [10, 20, 40, 80, 100, 200],
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [[
{field:'rowNum', width:60, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{type:'checkbox', fixed: 'left'},
{width: 300, title: '案件图片', align:'center',
templet: function(row) {
var photos = row.casePhotos.split(',')
var value = '<div id="photo_'+ row.reportCaseId +'" class="swiper-container" style="width:100%;">' +
'<div class="swiper-wrapper" style="width:100%">';
for(var i = 0, item = photos[i]; item = photos[i++];) {
value += '<div class="swiper-slide" style="width:100%;">' +
'<img class="swiper-lazy" src="route/file/downloadfile/true/'+ item +'" style="width:270px;height:180px;cursor:pointer;"/>' +
'<div class="swiper-lazy-preloader"></div>' +
'</div>';
}
value += '</div><div id="photo_swiper_'+ row.reportCaseId +'" class="swiper-pagination"></div></div>';
setTimeout(function() {
new Swiper('#photo_'+ row.reportCaseId, {
lazyLoading: true,
autoplay: 3000,
pagination : '#photo_swiper_'+ row.reportCaseId,
paginationClickable :true,
});
new Viewer(document.getElementById('photo_'+ row.reportCaseId));
}, 50);
return value;
}
},
{width: 450, title: '案件信息', align: 'center',
templet: function (row) {
var caseFlowType = row.caseFlowType;
if(caseFlowType == '1'){
caseFlowType = '(职能部门案件)';
} else {
caseFlowType = '(街镇案件)'
}
var value = '<div style="text-align: left">'+
'<div class="info-row"><span class="col-left">案件编号</span><span class="col-right">'+ row.caseNumber +'</span></div>'+
'<div class="info-row"><span class="col-left">所在地区</span><span class="col-right">'+ row.areaName +'</span></div>'+
'<div class="info-row"><span class="col-left">所在社区</span><span class="col-right">'+ row.communityName +'</span></div>'+
'<div class="info-row"><span class="col-left">案件类型</span><span class="col-right">'+ caseFlowType + row.caseTypeName +'</span></div>'+
'<div class="info-row"><span class="col-left">操作</span>' +
'<span class="col-right">'+
'<div class="btn-group btn-group-xs">' +
'<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="showEvent">详情</button>'+
'<button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="caseFlowEvent">流程</button>'+
'<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="reportBack">恢复</button>'+
'</div>'+
'</span>'+
'</div>'+
'</div>'
return value;
}
},
{width: 300, title: '案件内容', align: 'center',
templet: function (row) {
var value = '<div style="text-align: left">'+
'<div class="info-row"><span class="col-left">案件来源</span><span class="col-right">'+ sourceFormatter(row.caseSource) +'</span></div>'+
'<div class="info-row"><a href="javascript:;" class="col-line" lay-event="showLocation"><i class="fa fa-map-marker"></i>'+ row.casePosition +'</a></div>'+
'<div class="info-row"><span class="col-content">'+ row.caseContent +'</span></div>'+
'</div>';
return value;
}
},
{width: 250, title: '案件状态', align: 'center',
templet: function (row) {
var value = '<div style="text-align: left">'+
'<div class="info-row"><span class="col-left">上报时间</span><span class="col-right">'+ row.reportDate +'</span></div>'+
'<div class="info-row"><span class="col-left">上报人员</span><span class="col-right">'+ row.caseReporter +'</span></div>'+
'<div class="info-row"><span class="col-left">删除时间</span><span class="col-right">'+ row.gmtModified +'</span></div>'+
'<div class="info-row"><span class="col-left">处理人员</span><span class="col-right">'+ row.handleUserName +'</span></div>'+
'</div>';
return value;
}
}
]],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
},
});
}
setTimeout(function(){
initTable();
},500);
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(getParamsUrl(tableUrl), []),
page: {
curr: currentPage
},
height: $win.height() - 100,
});
}
//初始化地区
function initArea(){
top.restAjax.get('api/dict/listdict/9d179f05-3ea0-48f7-853c-d3b7124b791c', {}, null, function(code, data) {
laytpl(document.getElementById('areaSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('areaSelectTemplateBox').innerHTML = html;
});
form.render('select');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
initArea();
//初始化案件类型
function initCaseType(){
top.restAjax.get('api/dict/listdict/46d108b2-4ef9-4f6f-b30c-0c700e3ee852', {}, null, function(code, data) {
laytpl(document.getElementById('caseTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('caseTypeSelectTemplateBox').innerHTML = html;
});
form.render('select');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
initCaseType();
//初始化子案件类型
function initChildCaseType(parentId){
if(typeof(parentId) === 'undefined' || '' == parentId){
laytpl(document.getElementById('childCaseTypeSelectTemplate').innerHTML).render([], function(html) {
document.getElementById('childCaseTypeSelectTemplateBox').innerHTML = html;
});
}
top.restAjax.get('api/dict/listdict/' + parentId, {}, null, function(code, data) {
laytpl(document.getElementById('childCaseTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('childCaseTypeSelectTemplateBox').innerHTML = html;
});
form.render('select');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
initChildCaseType();
//初始化时间
function initDateTime(){
laydate.render({
elem: '#startTime'
,value: ''
});
laydate.render({
elem: '#endTime'
,value: ''
});
}
initDateTime();
function getParamsUrl(url) {
var areaId = $('#areaId').val();
var caseTypeId = $('#caseTypeId').val();
var childCaseTypeId = $('#childCaseTypeId').val();
var startTime = $('#startTime').val();
var endTime = $('#endTime').val();
var caseNumber = $('#caseNumber').val();
var deptId = $('#deptId').val();
var params = '?t='+ new Date().getTime();
if('' != areaId && 'undefined' != typeof(areaId)) {
params += '&areaId='+ areaId;
}
if(childCaseTypeId) {
caseTypeId = childCaseTypeId;
}
if(caseTypeId) {
params += '&caseTypeId='+ caseTypeId;
}
if('' != startTime) {
params += '&startTime='+ startTime;
}
if('' != endTime) {
params += '&endTime='+ endTime;
}
if('' != caseNumber) {
params += '&caseNumber='+ caseNumber;
}
if('' != deptId) {
params += '&departmentId='+ deptId;
}
return url + params;
}
// 来源格式化
function sourceFormatter(val) {
var value;
switch (val) {
case '1':
value = '群众举报';
break;
case '2':
value = '巡检采集';
break;
case '3':
value = '专管员上报';
break;
default:
value = '未知';
}
return value;
}
// 案件状态
function caseStatusFormatter(val) {
var value;
switch (val) {
case '0':
value = '待受理';
break;
case '1':
value = '待立案';
break;
case '2':
value = '待转派';
break;
case '3':
value = '待处理';
break;
case '4':
value = '待检查';
break;
case '5':
value = '待结案';
break;
case '6':
value = '已归档';
break;
case '7':
value = '删除且有争议';
break;
default:
value = '异常';
}
return value;
}
table.on('tool(dataTable)', function(obj) {
if(obj.event === 'showEvent'){
layer.open({
type: 2,
title: '详情',
closeBtn: 1,
area: ['70%', '80%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/reportcase/show.html?reportCaseId={id}',
[obj.data.reportCaseId]),
end: function() {
}
});
}
if(obj.event === 'caseFlowEvent'){
layer.open({
type: 2,
title: '案件流程',
closeBtn: 1,
area: ['50%', '60%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/reportcase/list_case_log.html?reportCaseId={id}',
[obj.data.reportCaseId]),
end: function() {
}
});
}
if(obj.event === 'reportBack'){
top.dialog.confirm('确定恢复案件吗?', function(index) {
top.dialog.close(index);
top.restAjax.get(top.restAjax.path('api/reportcase/update-back-disputed-case/{reportCaseId}',
[obj.data.reportCaseId]), {}, null, function(code, data) {
top.dialog.msg('恢复完成');
reloadTable();
}, function(code, data) {
top.dialog.msg(data.msg);
});
})
}
});
form.on('select(changeCaseType)',function(data){
if(data.value == ''){
$('#childCaseTypeId').val('');
initChildCaseType();
} else {
initChildCaseType(data.value);
}
});
$(document).on('click', '#search', function() {
reloadTable(1);
});
})
</script>
</body>
</html>

View File

@ -170,9 +170,10 @@
'<div class="info-row"><span class="col-left">操作</span>' +
'<span class="col-right">'+
'<div class="btn-group btn-group-xs">' +
'<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="showEvent">详情</button>'+
'<button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="caseFlowEvent">流程</button>'+
'<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="disputedEvent">争议案件</button>'+
'<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="showEvent">详情</button>'+
'<button type="button" class="layui-btn layui-btn-warm layui-btn-xs" lay-event="caseFlowEvent">流程</button>'+
'<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="disputedEvent">争议案件</button>'+
'<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="complexEvent">复杂案件</button>'+
'</div>'+
'</span>'+
'</div>'+
@ -477,6 +478,32 @@
}
});
}
if(obj.event === 'complexEvent') {
top.dialog.msg('确定删除为复杂案件吗?', {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function (index) {
top.dialog.close(index);
var layIndex;
top.restAjax.delete(top.restAjax.path('api/reportcase/remove-to-complex-cases/{id}', [obj.data.reportCaseId]), {}, null, function (code, data) {
// success
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000}, function () {
reloadTable();
});
}, function (code, data) {
// error
top.dialog.msg(data.msg);
}, function () {
// before
layIndex = top.dialog.msg('正在提交...', {icon: 16, time: 0, shade: 0.3});
}, function () {
// complete
top.dialog.close(layIndex);
});
}
});
}
});
form.on('select(changeCaseType)',function(data){