fix:办案情况通报

special-20250331
wangxy 2 days ago
parent 36b3e5f652
commit b9d259eb4a

@ -10,6 +10,7 @@ import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.*;
import com.ruoyi.system.service.*;
import com.ruoyi.web.controller.manager.CaseReportManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
@ -55,6 +56,10 @@ public class HomeController {
private ISysColumnService columnService;
@Autowired
private CaseReportManager caseReportManager;
public static final String PAGE_SIZE = "15";
//栏目等级
@ -91,6 +96,9 @@ public class HomeController {
//网站内容
List<SysContent> contentList = contentService.selectSysContentHomeList(new SysContent());
mmap.put("contentList", contentList);
//办案情况通报
List<SysCaseReport> caseReportList = caseReportManager.selectSysCaseReportHomeList();
mmap.put("caseReportList", caseReportList);
//宣传活动对应的栏目
LambdaQueryWrapper<SysColumn> qxWrapper= new LambdaQueryWrapper<>();
@ -156,6 +164,9 @@ public class HomeController {
//网站内容
List<SysContent> contentList = contentService.selectSysContentHomeList(new SysContent());
mmap.put("contentList", contentList);
//办案情况通报
List<SysCaseReport> caseReportList = caseReportManager.selectSysCaseReportHomeList();
mmap.put("caseReportList", caseReportList);
//宣传活动对应的栏目
LambdaQueryWrapper<SysColumn> qxWrapper= new LambdaQueryWrapper<>();
@ -317,6 +328,23 @@ public class HomeController {
}
@ApiOperation("办案情况通报")
@GetMapping("/case_view.html")
public String caseReport(ModelMap mmap,
@RequestParam(required = false, defaultValue = "1", value = "p") Integer pageNum,
@RequestParam(required = false ,defaultValue = PAGE_SIZE, value = "ps") Integer pageSize) {
PageMethod.startPage(pageNum,pageSize);
//办案情况通报
SysCaseReport caseReport = new SysCaseReport();
caseReport.setStatus(STATUS);
List<SysCaseReport> caseReportList = caseReportManager.selectSysCaseReportList(caseReport);
PageInfo<SysCaseReport> page = new PageInfo<>(caseReportList, pageSize);
mmap.put("page", page);
mmap.put("pageUrl", "/case_view.html");
return "home/case_view";
}
@ApiOperation("详情")
@GetMapping("/public_view.html")
public String notice(ModelMap mmap,@RequestParam(required = false) String type, @RequestParam String id) {
@ -332,6 +360,10 @@ public class HomeController {
SysSpecial sysSpecial = specialService.selectSysSpecialById(id);
mmap.put("sysSpecial", sysSpecial);
SysCaseReport caseReport = caseReportManager.selectSysCaseReportById(id);
mmap.put("caseReport", caseReport);
mmap.put("type", type);
//访问量
/*Integer total = operLogService.selectOperToatl(Constants.WEBSITE_ACCESS);

@ -0,0 +1,79 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.system.domain.SysCaseReport;
import com.ruoyi.system.domain.SysColumn;
import com.ruoyi.system.service.SysCaseReportService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* ClassName: CaseReportManager
* Package: com.ruoyi.web.controller.manager
* Description:
*
* @Author wangxy
* @Create 2025/5/19 9:34
* @Version 1.0
*/
@Component
public class CaseReportManager {
@Resource
private SysCaseReportService caseReportService;
public List<SysCaseReport> selectSysCaseReportList(SysCaseReport caseReport) {
return caseReportService.selectSysCaseReportList(caseReport);
}
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(SysCaseReport caseReport) {
if (CharSequenceUtil.isNotBlank(caseReport.getCaseId())) {
caseReport.setUpdateTime(new Date());
caseReport.setUpdateBy(ShiroUtils.getSysUser().getUserName());
} else {
caseReport.setCaseId(IdUtils.simpleUUID());
caseReport.setCreateTime(new Date());
caseReport.setCreateBy(ShiroUtils.getSysUser().getUserName());
}
caseReport.setStatus("0");
caseReport.setType("6");
return caseReportService.saveOrUpdate(caseReport);
}
public SysCaseReport selectSysCaseReportById(String caseId) {
return caseReportService.lambdaQuery()
.eq(SysCaseReport::getCaseId, caseId)
.eq(SysCaseReport::getStatus, "0")
.one();
}
@Transactional(rollbackFor = Exception.class)
public boolean deletedSysCaseReportIds(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return caseReportService.removeByIds(list);
}
public List<SysCaseReport> selectSysCaseReportHomeList() {
return caseReportService.lambdaQuery()
.eq(SysCaseReport::getStatus, "0")
.last("limit 10")
.orderByDesc(SysCaseReport::getCreateTime)
.list();
}
}

@ -0,0 +1,114 @@
package com.ruoyi.web.controller.system;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.SysCaseReport;
import com.ruoyi.web.controller.manager.CaseReportManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* ClassName: SysCaseReportController
* Package: com.ruoyi.web.controller.system
* Description:
*
* @Author wangxy
* @Create 2025/5/19 9:35
* @Version 1.0
*/
@Controller
@RequestMapping("/system/caseReport")
public class SysCaseReportController extends BaseController {
@Resource
private CaseReportManager caseReportManager;
private String prefix = "system/caseReport";
@RequiresPermissions("system:caseReport:view")
@GetMapping()
public String caseReport() {
return prefix + "/caseReport";
}
/**
*
*/
@RequiresPermissions("system:caseReport:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysCaseReport caseReport) {
startPage();
List<SysCaseReport> list = caseReportManager.selectSysCaseReportList(caseReport);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:caseReport:add")
@Log(title = "办案情况通报", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(@Validated SysCaseReport caseReport) {
return toAjax(caseReportManager.saveOrUpdate(caseReport));
}
/**
*
*/
@RequiresPermissions("system:caseReport:edit")
@GetMapping("/edit/{caseId}")
public String edit(@PathVariable("caseId") String caseId, ModelMap mmap) {
mmap.put("caseReport", caseReportManager.selectSysCaseReportById(caseId));
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:caseReport:edit")
@Log(title = "办案情况通报", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(@Validated SysCaseReport caseReport) {
return toAjax(caseReportManager.saveOrUpdate(caseReport));
}
/**
*
*/
@RequiresPermissions("system:caseReport:remove")
@Log(title = "办案情况通报", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(caseReportManager.deletedSysCaseReportIds(ids));
}
}

@ -232,7 +232,7 @@
<hr>
<div class="layui-container" style="min-width: 1330px;">
<div class="layui-row layui-col-space15">
<div class="layui-col-md6" style="width: 70%">
<div class="layui-col-md6" style="width: 35%">
<div class="layui-card">
<div class="layui-card-header"><i class="layui-icon layui-icon-tabs" style="display: inline-block;font-size: 21px;
font-weight: bold;border-bottom: 3px solid #0b61d3;height: 100%;line-height: 40px;color: #0b61d3;">检察业务</i>
@ -257,7 +257,7 @@
>
[[${status.count}]]
</span>
<a th:href="@{/public_view.html(type=4,id=${business.businessId})}" th:title="${business.businessTitle}" target="_blank">[[${#strings.abbreviate(business.businessTitle,28)}]]</a>
<a th:href="@{/public_view.html(type=4,id=${business.businessId})}" th:title="${business.businessTitle}" target="_blank">[[${#strings.abbreviate(business.businessTitle,20)}]]</a>
<span class="time">[[${business.createBy}]]</span>
</li>
</ul>
@ -267,6 +267,43 @@
</div>
</div>
</div>
<div class="layui-col-md6" style="width: 35%">
<div class="layui-card">
<div class="layui-card-header"><i class="layui-icon layui-icon-speaker" style="display: inline-block;font-size: 21px;
font-weight: bold;border-bottom: 3px solid #0b61d3;height: 100%;line-height: 40px;color: #0b61d3;">办案情况通报</i>
<span class="more">
<a href="case_view.html" target="_blank">更多+</a>
</span>
</div>
<div class="layui-card-body" style="min-height: 400px;overflow: hidden;">
<ul class="newslist-to">
<li style="list-style: none" th:each="caseReport,status : ${caseReportList}" th:if="${caseReportList.size() > 0}" th:class="${status.count == 1 ? 'firstLi' : (status.count == 2 ? 'secondLi' : (status.count == 3 ? 'thirdLi' : ''))}">
<span
th:class="${status.count == 1 ? 'first' : (status.count == 2 ? 'second' : (status.count == 3 ? 'third' : ''))}"
style="
text-align: center;
display: inline-block;
width: 30px;
height: 30px;
background-color: #838284;
line-height: 30px;
color: white;
"
>
[[${status.count}]]
</span>
<a th:href="@{/public_view.html(type=6,id=${caseReport.caseId})}" th:title="${caseReport.caseTitle}" target="_blank">[[${#strings.abbreviate(caseReport.caseTitle,20)}]]</a>
<span class="time">[[${caseReport.createBy}]]</span>
</li>
</ul>
<span style="position: absolute;top: 45%;left: 30%;" th:if="${caseReportList.size() == 0}">
<img src="/home/base/nodata.png"/>
</span>
</div>
</div>
</div>
<div class="layui-col-md6" style="width: 30%">
<div class="layui-card">
<div class="layui-card-header"><i class="layui-icon layui-icon-theme" style="display: inline-block;font-size: 21px;

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>甘肃省人民检察院兰铁分院</title>
<link th:href="@{/home/base/favicon.ico}" rel="shortcut icon"/>
<link href="/home/lib/css/layui.css" th:href="@{/home/lib/css/layui.css}" rel="stylesheet"/>
<style>
/* 页面整体布局 */
html, body {
height: 100%;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
}
/* 设置内容区域自动填充剩余高度 */
#content {
flex-grow: 1;
padding-bottom: 48px;
}
.layui-nav-item {
position: relative;
margin: 0 10px;
padding: 0 5px;
}
.time {
position: absolute;
right: 0;
}
</style>
</head>
<body class="layui-bg-gray" style="">
<div id="content">
<!--头部-->
<th:block th:include="home_head.html :: home_head"/>
<div class="layui-container" style="padding-top: 20px">
<div>
<blockquote class="layui-elem-quote">
<h2 style="color: #074488;">办案情况通报</h2>
</blockquote>
<br>
<p><i class="layui-icon layui-icon-location"></i>当前位置:<a target="_parent" href="base.html">首页</a>&nbsp;/&nbsp;<a
href="case_view.html" target="_parent">办案情况通报</a></p>
<hr>
<br>
<table class="layui-table" lay-skin="line">
<colgroup>
<col width="800">
<col width="350">
<col>
</colgroup>
<thead>
<tr>
<th>办案情况通报名称</th>
<th>创建人</th>
<th>创建日期</th>
</tr>
</thead>
<tbody th:each="caseReport,status : ${page.list}">
<tr>
<td>
<a target="_blank" th:title="${caseReport.caseTitle}" th:href="@{/public_view.html(type=4,id=${caseReport.caseId})}">
[[${caseReport.caseTitle}]]
</a>
</td>
<td>[[${caseReport.createBy}]]</td>
<td>[[${#dates.format(caseReport.createTime, 'yyyy-MM-dd HH:mm:ss')}]]</td>
</tr>
</tbody>
</table>
<!--分页-->
<th:block th:include="home_page :: home_page"/>
</div>
</div>
</div>
<!--底部-->
<th:block th:include="home_footer :: home_footer"/>
<script th:src="@{/home/lib/layui.js}"></script>
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function () {
var currentUrl = location.href;
// 获取所有的<a>标签
var links = document.querySelectorAll('a');
// 遍历每个链接并判断其href属性是否与当前URL相同
for (var i = 0; i < links.length; i++) {
if (links[i].href === currentUrl) {
// 添加layui-this类名到对应的父元素的class中
links[i].parentNode.classList.add('layui-this');
}
}
});
function redirect(url) {
window.location.href = url;
}
function openPopup(url) {
window.open(url, '_blank');
}
</script>
</body>
</html>

@ -104,6 +104,11 @@
<a href="special_list.html" target="_parent">
<span>专题活动</span></a>
</div>
<div class="main" th:if="${type} eq '6'">
<a href="base.html" target="_parent">首页</a>&nbsp;&gt;&nbsp;
<a href="case_view.html" target="_parent">
<span>办案情况通报</span></a>
</div>
</div>
<div class="main-content">
<div class="main" th:if="${type} eq '1'">
@ -176,6 +181,20 @@
</div>
<div class="detailContent" id="detailContent" th:utext="${sysSpecial.specialContent}"></div>
</div>
<div class="main" th:if="${type} eq '6'">
<h1>[[${caseReport.caseTitle}]]</h1>
<div class="info clearbox">
<p>日期:[[${#dates.format(caseReport.createTime, 'yyyy-MM-dd HH:mm:ss')}]]</p>
</div>
<div th:unless="${#strings.isEmpty(caseReport.fileUrl)}">
<p>文件下载:<a style="color: #33F;" target="_blank" th:href="@{${caseReport.fileUrl}}">
[[${caseReport.fileName}]]</a>
</p>
<iframe th:if="${#strings.endsWith(caseReport.fileName, '.pdf')}" th:src="@{${caseReport.fileUrl}}" width="100%" height="800px">
</iframe>
</div>
<div class="detailContent" id="detailContent" th:utext="${caseReport.caseContent}"></div>
</div>
</div>
<!--底部-->
<th:block th:include="home_footer :: home_footer"/>

@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增办案情况通报')" />
<th:block th:include="include :: summernote-css" />
<th:block th:include="include :: jasny-bootstrap-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-case-add">
<div class="form-group">
<label class="col-sm-2 control-label is-required">办案情况名称:</label>
<div class="col-sm-10">
<input id="caseTitle" name="caseTitle" class="form-control" type="text" required maxlength="100">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">办案情况内容:</label>
<div class="col-sm-10">
<input id="caseContent" name="caseContent" type="hidden">
<div class="summernote"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">文件上传:</label>
<div class="fileinput fileinput-new" data-provides="fileinput">
<span class="btn btn-white btn-file">
<span class="fileinput-new">选择文件</span>
<span class="fileinput-exists">更改</span>
<input type="file" id="fileUrlId" name="...">
<input type="hidden" id="fileUrl" name="fileUrl">
<input type="hidden" id="fileName" name="fileName">
</span>
<span class="fileinput-filename"></span>
<a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">&times;</a>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">办案情况通报状态:</label>
<div class="col-sm-10">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_business_status')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<th:block th:include="include :: jasny-bootstrap-js" />
<script type="text/javascript">
var prefix = ctx + "system/caseReport";
$('.summernote').summernote({
placeholder: '请输入办案情况内容',
height : 192,
lang : 'zh-CN',
followingToolbar: false,
dialogsInBody: true,
callbacks: {
onImageUpload: function (files) {
sendFile(files[0], this);
}
}
});
// 上传文件
function sendFile(file, obj) {
var data = new FormData();
data.append("file", file);
$.ajax({
type: "POST",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$(obj).summernote('editor.insertImage', result.url, result.fileName);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
$("#form-business-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
var sHTML = $('.summernote').summernote('code');
$("#caseContent").val(sHTML);
$.operate.save(prefix + "/add", $('#form-case-add').serialize());
}
}
//文件上传
$('#fileUrlId').on('change.bs.fileinput ', function (e) {
// 处理自己的业务
var file = e.target.files[0];
var data = new FormData();
data.append("file", file);
$.ajax({
type: "POST",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$("#fileUrl").val(result.url);
$("#fileName").val(result.originalFilename);
} else {
$("#fileUrl").val("");
$("#fileName").val("");
}
},
error: function(error) {
$.modal.alertWarning("文件上传失败。");
}
});
});
</script>
</body>
</html>

@ -0,0 +1,99 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('办案情况通报列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="notice-form">
<div class="select-list">
<ul>
<li>
办案情况通报名称:<input type="text" name="caseTitle"/>
</li>
<li>
操作人员:<input type="text" name="createBy"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:caseReport:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:caseReport:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:caseReport:remove">
<i class="fa fa-remove"></i> 删除
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:caseReport:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:caseReport:remove')}]];
var datas = [[${@dict.getType('sys_business_status')}]];
var prefix = ctx + "system/caseReport";
$(function() {
var options = {
uniqueId: "caseId",
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
modalName: "办案情况通报",
columns: [{
checkbox: true
},
{
field : 'caseTitle',
title : '办案情况通报名称'
},
{
field: 'status',
title: '状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field : 'createBy',
title : '创建人'
},
{
field: 'createTime',
title: '创建时间',
sortable: true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.caseId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.caseId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

@ -0,0 +1,140 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改办案情况通报')" />
<th:block th:include="include :: summernote-css" />
<th:block th:include="include :: jasny-bootstrap-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-case-edit" th:object="${caseReport}">
<input id="caseId" name="caseId" th:field="*{caseId}" type="hidden">
<div class="form-group">
<label class="col-sm-2 control-label is-required">办案情况通报名称:</label>
<div class="col-sm-10">
<input id="caseTitle" name="caseTitle" th:field="*{caseTitle}" class="form-control" type="text" required maxlength="100">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">办案情况通报内容:</label>
<div class="col-sm-10">
<input id="caseContent" name="caseContent" th:field="*{caseContent}" type="hidden">
<div id="editor" class="summernote"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">文件上传:</label>
<div class="fileinput fileinput-new" data-provides="fileinput">
<span class="btn btn-white btn-file">
<span class="fileinput-new">选择文件</span>
<span class="fileinput-exists">更改</span>
<input type="file" id="fileUrlId" name="...">
<input type="hidden" id="fileUrl" name="fileUrl" th:field="*{fileUrl}">
<input type="hidden" id="fileName" name="fileName" th:field="*{fileName}">
</span>
<span class="fileinput-filename">[[*{fileName}]]</span>
<a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">&times;</a>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">办案情况通报状态:</label>
<div class="col-sm-10">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_business_status')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<th:block th:include="include :: jasny-bootstrap-js" />
<script type="text/javascript">
var prefix = ctx + "system/caseReport";
$(function() {
$('.summernote').summernote({
placeholder: '请输入办案情况通报内容',
height : 192,
lang : 'zh-CN',
followingToolbar: false,
dialogsInBody: true,
callbacks: {
onImageUpload: function (files) {
sendFile(files[0], this);
}
}
});
var content = $("#caseContent").val();
$('#editor').summernote('code', content);
});
// 上传文件
function sendFile(file, obj) {
var data = new FormData();
data.append("file", file);
$.ajax({
type: "POST",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$(obj).summernote('editor.insertImage', result.url, result.fileName);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
$("#form-case-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
var sHTML = $('.summernote').summernote('code');
$("#caseContent").val(sHTML);
$.operate.save(prefix + "/edit", $('#form-case-edit').serialize());
}
}
//文件上传
$('#fileUrlId').on('change.bs.fileinput ', function (e) {
// 处理自己的业务
var file = e.target.files[0];
var data = new FormData();
data.append("file", file);
$.ajax({
type: "POST",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$("#fileUrl").val(result.url);
$("#fileName").val(result.originalFilename);
} else {
$("#fileUrl").val("");
$("#fileName").val("");
}
},
error: function(error) {
$.modal.alertWarning("文件上传失败。");
}
});
});
</script>
</body>
</html>

@ -310,6 +310,7 @@ public class ShiroConfig
filterChainDefinitionMap.put("/work_view.html", "anon");
filterChainDefinitionMap.put("/dept_trends_view.html", "anon");
filterChainDefinitionMap.put("/business_view.html", "anon");
filterChainDefinitionMap.put("/case_view.html", "anon");
filterChainDefinitionMap.put("/special_view.html", "anon");
filterChainDefinitionMap.put("/public_view.html", "anon");
filterChainDefinitionMap.put("/special_list.html", "anon");

@ -0,0 +1,46 @@
package com.ruoyi.system.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
*
* @TableName sys_business
* @author wangxy
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysCaseReport extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 公告ID */
@TableId
private String caseId;
/** 公告标题 */
private String caseTitle;
/** 公告内容 */
private String caseContent;
/** 公告状态0正常 1关闭 */
private String status;
private String type;
/** 文件地址 */
private String fileUrl;
/** 文件地址 */
private String fileName;
}

@ -0,0 +1,25 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.SysCaseReport;
import java.util.List;
/**
* ClassName: SysCaseReportMapper
* Package: com.ruoyi.system.mapper
* Description:
*
* @Author wangxy
* @Create 2025/5/19 9:20
* @Version 1.0
*/
public interface SysCaseReportMapper extends BaseMapper<SysCaseReport> {
public List<SysCaseReport> selectSysCaseReportList(SysCaseReport caseReport);
}

@ -0,0 +1,24 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.SysBusiness;
import com.ruoyi.system.domain.SysCaseReport;
import java.util.List;
/**
* ClassName: SysCaseReportService
* Package: com.ruoyi.system.service
* Description:
*
* @Author wangxy
* @Create 2025/5/19 9:21
* @Version 1.0
*/
public interface SysCaseReportService extends IService<SysCaseReport> {
public List<SysCaseReport> selectSysCaseReportList(SysCaseReport caseReport);
}

@ -0,0 +1,33 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.SysBusiness;
import com.ruoyi.system.domain.SysCaseReport;
import com.ruoyi.system.mapper.SysCaseReportMapper;
import com.ruoyi.system.service.SysCaseReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
/**
* ClassName: SysCaseReportServiceImpl
* Package: com.ruoyi.system.service.impl
* Description:
*
* @Author wangxy
* @Create 2025/5/19 9:22
* @Version 1.0
*/
@Service
public class SysCaseReportServiceImpl extends ServiceImpl<SysCaseReportMapper, SysCaseReport> implements SysCaseReportService {
@Autowired
private SysCaseReportMapper caseReportMapper;
@Override
public List<SysCaseReport> selectSysCaseReportList(SysCaseReport caseReport) {
return caseReportMapper.selectSysCaseReportList(caseReport);
}
}

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysCaseReportMapper">
<resultMap type="SysCaseReport" id="SysCaseReportResult">
<result property="caseId" column="case_id" />
<result property="caseTitle" column="case_title" />
<result property="caseContent" column="case_content" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="type" column="type" />
<result property="fileUrl" column="file_url" />
<result property="fileName" column="file_name" />
</resultMap>
<sql id="selectSysCaseReportVo">
select case_id, case_title, case_content, status, create_by, create_time, update_by, update_time, remark,type,file_url,file_name
from sys_case_report
</sql>
<select id="selectSysCaseReportById" parameterType="String" resultMap="SysCaseReportResult">
<include refid="selectSysCaseReportVo"/>
where case_id = #{caseId}
</select>
<select id="selectSysCaseReportList" parameterType="SysCaseReport" resultMap="SysCaseReportResult">
<include refid="selectSysCaseReportVo"/>
<where>
<if test="caseTitle != null and caseTitle != ''">
AND case_title like concat('%', #{caseTitle}, '%')
</if>
<if test="createBy != null and createBy != ''">
AND create_by like concat('%', #{createBy}, '%')
</if>
<if test="status != null">
AND status = #{status}
</if>
</where>
order by create_time desc
</select>
<select id="selectSysCaseReportHomeList" parameterType="SysCaseReport" resultMap="SysCaseReportResult">
<include refid="selectSysCaseReportVo"/>
<where>
<if test="caseTitle != null and caseTitle != ''">
AND case_title like concat('%', #{caseTitle}, '%')
</if>
<if test="createBy != null and createBy != ''">
AND create_by like concat('%', #{createBy}, '%')
</if>
AND status = '0'
</where>
order by create_time desc limit 10
</select>
</mapper>

@ -130,6 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT d.trends_id as id, d.trends_title as title, d.create_time as createTime, d.type from sys_dept_trends d where d.trends_title like concat('%', #{title}, '%') AND d.status = '0'
union all
SELECT s.special_id as id, s.special_title as title, s.create_time as createTime,s.type from sys_special s where s.special_title like concat('%', #{title}, '%') AND s.status = '0'
union all
SELECT r.case_id as id, r.case_title as title, r.create_time as createTime,r.type from sys_case_report r where r.case_title like concat('%', #{title}, '%') AND r.status = '0'
</select>
<select id="selectNoticeHomeUrl" parameterType="SysNotice" resultMap="SysNoticeResult">

Loading…
Cancel
Save