异常案件重新上报逻辑修改

This commit is contained in:
wans 2021-07-13 17:48:27 +08:00
parent 440af5f1a5
commit 1e77fbe3e7
5 changed files with 258 additions and 1 deletions

View File

@ -466,4 +466,30 @@ public class ReportCaseController extends AbstractController {
return reportCaseService.updateReportCaseException(params); return reportCaseService.updateReportCaseException(params);
} }
@ApiOperation(value = "异常案件重新受理", notes = "异常案件重新受理")
@ApiImplicitParams({
@ApiImplicitParam(name = "caseId", value = "案件ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save-exception-accept-again/{caseId}")
public SuccessResult saveExceptionAcceptAgain(@PathVariable("caseId") String caseId,
@RequestBody ReportCaseAcceptVO reportCaseAcceptVO) throws ParamsException, SaveException, UpdateException {
Map<String, Object> params = getParams();
params.put("caseId", caseId);
params.put("acceptStatus", reportCaseAcceptVO.getAcceptStatus());
if (StringUtils.isBlank(reportCaseAcceptVO.getCommunityBossId())) {
throw new ParamsException("片区网格长ID不能为空");
}
params.put("communityBossId", reportCaseAcceptVO.getCommunityBossId());
if (StringUtils.isBlank(reportCaseAcceptVO.getCommunityBossName())) {
throw new ParamsException("片区网格长名称不能为空");
}
params.put("communityBossName", reportCaseAcceptVO.getCommunityBossName());
if (StringUtils.isBlank(reportCaseAcceptVO.getAcceptOpinion())) {
throw new ParamsException("受理意见不能为空");
}
params.put("acceptOpinion", reportCaseAcceptVO.getAcceptOpinion());
return reportCaseService.saveExceptionAcceptAgain(params);
}
} }

View File

@ -426,4 +426,10 @@ public interface IReportCaseService {
*/ */
List<Map<String, Object>> getReportCaseCommunityOverseer(Map<String, Object> params); List<Map<String, Object>> getReportCaseCommunityOverseer(Map<String, Object> params);
/**
* 重新受理异常案件
* @param params
* @return
*/
SuccessResult saveExceptionAcceptAgain(Map<String, Object> params);
} }

View File

@ -1485,4 +1485,40 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
} }
return resultList; return resultList;
} }
@Override
public SuccessResult saveExceptionAcceptAgain(Map<String, Object> params) {
Map<String, Object> reportCaseParams = new HashMap<>();
// 将案件状态重新更改为受理
String caseId = params.get("caseId").toString();
reportCaseParams.put("reportCaseId", caseId);
reportCaseParams.put("caseStatus", 1);
setUpdateInfo(reportCaseParams);
reportCaseDao.updateReportCase(reportCaseParams);
// 删除受理立案下派处理表的历史记录
Map<String, Object> removeMap = new HashMap<>();
removeMap.put("caseId",caseId);
reportCaseDao.removeReportCaseAccept(removeMap);
reportCaseDao.removeReportCaseRegister(removeMap);
reportCaseDao.removeReportCaseAssign(removeMap);
reportCaseDao.removeReportCaseHandle(removeMap);
// 受理表中添加受理记录
params.put("isRegister", 0);
params.put("acceptStatus", 1);
params.put("acceptUserName", securityComponent.getCurrentUser().getUserName());
setSaveInfo(params);
reportCaseDao.saveReportCaseAccept(params);
// 新增重新受理日志
Map<String, Object> caseLogParams = new HashMap<>();
caseLogParams.put("caseId", params.get("caseId"));
caseLogParams.put("userOpinion", params.get("acceptOpinion"));
caseLogParams.put("optionType", "异常案件重新受理");
caseLogParams.put("handleStatus", 1);
addReportCaseLog(caseLogParams);
// 自动进行立案
params.clear();
params.put("caseId", caseId);
params.put("registerOpinion", "自动立案");
return saveReportCaseRegister(params);
}
} }

View File

@ -0,0 +1,189 @@
<!doctype html>
<html lang="en">
<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" 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">
</head>
<body>
<div class="layui-anim layui-anim-fadein" style="padding: 5px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-card">
<div class="layui-card-body">
<div class="layui-row">
<div class="layui-col-md12 layui-col-sm12">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">案件所属区域</label>
<div class="layui-input-block">
<input id="communityName" name="communityName" autocomplete="off" placeholder="请输入内容" class="layui-input" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12 layui-col-sm12">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">案件类型</label>
<div class="layui-input-block">
<input id="caseTypeName" name="caseTypeName" autocomplete="off" placeholder="请输入内容" class="layui-input" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12 layui-col-sm12">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label"><span style="color: red;">*</span>责任网格长</label>
<div class="layui-input-block">
<input id="communityBossName" name="communityBossName" autocomplete="off" placeholder="点选责任网格长"
style="cursor:pointer" class="layui-input" readonly="readonly" lay-verify="required">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12 layui-col-sm12">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label"><span style="color: red;">*</span>重新受理意见</label>
<div class="layui-input-block">
<textarea id="acceptOpinion" name="acceptOpinion" autocomplete="off" maxlength="255"
placeholder="请输入受理意见" class="layui-textarea" lay-verify="required"></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">保存</button>
<button type="button" class="layui-btn layui-btn-primary close">取消</button>
</div>
</div>
</div>
</div>
</form>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'form'], function() {
var $ = layui.$;
var form = layui.form;
var reportCaseId = top.restAjax.params(window.location.href).reportCaseId;
var caseTypeName = '';
var communityId = '';
var communityName = '';
var communityBossId = '';
var communityBossName = '';
function initData(){
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/reportcase/getreportcase/{reportCaseId}', [reportCaseId]), {}, null, function(code, data) {
console.log(data);
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i];
}
caseTypeName = dataFormData['caseTypeName'];
communityId = dataFormData['communityId'];
communityName = dataFormData['communityName'];
form.val('dataForm', dataFormData);
$('#communityName').val(data.areaName + '-' + data.communityName);
form.render(null, 'dataForm');
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
initData();
// 选择网格长
function selectBoss () {
top.dialog.tree({
title: '选择网格长',
apiUri: top.restAjax.path('api/communityboss/listcommunitybossbycommunity/{communityId}', [communityId]),
width: '200px',
height: '400px',
otherParams: {
communityBossLevel: '2'
},
dataFilter: function(treeId, parentNode, childNodes) {
for(var i = 0, item = childNodes[i]; item = childNodes[i++];) {
item.id = item.communityBossId;
item.name = item.communityBossName;
}
return childNodes;
},
selectedNodes: [
{
id: communityBossId,
name: communityBossName,
title: communityBossName
}
],
onClose: function() {
var selectNodes = top.dialog.dialogTreeData.selectedNodes;
if(typeof(selectNodes) != 'undefined' && selectNodes != null) {
if(selectNodes.length > 0) {
var selectedNode = selectNodes[0];
communityBossId = selectNodes[0].id;
communityBossName = selectNodes[0].name;
} else {
communityBossId = '';
communityBossName = '';
}
$('#communityBossName').val(communityBossName);
}
}
});
}
$(document).on('click','#communityBossName',function(){
selectBoss();
});
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
$('.close').on('click', function() {
closeBox();
});
form.on('submit(submitForm)', function(formData) {
//封装数据
var formObject = {};
formObject['acceptStatus'] = formData.field['acceptStatus'];
formObject['communityBossId'] = communityBossId;
formObject['communityBossName'] = communityBossName;
formObject['acceptOpinion'] = formData.field['acceptOpinion'];
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/reportcase/save-exception-accept-again/{caseId}', [reportCaseId]), formObject, null, function(code, data) {
top.dialog.msg('受理完成');
closeBox();
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
})
});
</script>
</body>
</html>

View File

@ -414,7 +414,7 @@
area: ['40%', '70%'], area: ['40%', '70%'],
shadeClose: true, shadeClose: true,
anim: 2, anim: 2,
content: top.restAjax.path('route/reportcase/case_accept.html?reportCaseId={id}', content: top.restAjax.path('route/reportcase/case_accept_again.html?reportCaseId={id}',
[obj.data.reportCaseId]), [obj.data.reportCaseId]),
end: function() { end: function() {
reloadTable() reloadTable()