Browse Source

1.情报板发送记录

2.情报板控制\回读
3.情报板敏感词
develop
lau572 11 months ago
parent
commit
2b8e0aae59
  1. 12
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  2. 12
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  3. 53
      zc-business/src/main/java/com/zc/business/controller/DcBoardController.java
  4. 104
      zc-business/src/main/java/com/zc/business/controller/DcBoardReleaseLogController.java
  5. 4
      zc-business/src/main/java/com/zc/business/controller/DcEventTypeController.java
  6. 5
      zc-business/src/main/java/com/zc/business/controller/DcInfoBoardTemplateController.java
  7. 124
      zc-business/src/main/java/com/zc/business/controller/DcInfoBoardVocabularyController.java
  8. 16
      zc-business/src/main/java/com/zc/business/controller/DcProcessConfigController.java
  9. 47
      zc-business/src/main/java/com/zc/business/domain/DcBoardPublish.java
  10. 208
      zc-business/src/main/java/com/zc/business/domain/DcBoardReleaseLog.java
  11. 70
      zc-business/src/main/java/com/zc/business/domain/DcInfoBoardVocabulary.java
  12. 8
      zc-business/src/main/java/com/zc/business/domain/DcPublishInfo.java
  13. 61
      zc-business/src/main/java/com/zc/business/mapper/DcBoardReleaseLogMapper.java
  14. 61
      zc-business/src/main/java/com/zc/business/mapper/DcInfoBoardVocabularyMapper.java
  15. 61
      zc-business/src/main/java/com/zc/business/service/IDcBoardReleaseLogService.java
  16. 27
      zc-business/src/main/java/com/zc/business/service/IDcBoardService.java
  17. 71
      zc-business/src/main/java/com/zc/business/service/IDcInfoBoardVocabularyService.java
  18. 93
      zc-business/src/main/java/com/zc/business/service/impl/DcBoardReleaseLogServiceImpl.java
  19. 104
      zc-business/src/main/java/com/zc/business/service/impl/DcBoardServiceImpl.java
  20. 127
      zc-business/src/main/java/com/zc/business/service/impl/DcInfoBoardVocabularyServiceImpl.java
  21. 105
      zc-business/src/main/resources/mapper/business/DcBoardReleaseLogMapper.xml
  22. 60
      zc-business/src/main/resources/mapper/business/DcInfoBoardVocabularyMapper.xml

12
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java

@ -39,6 +39,9 @@ public class SysUser extends BaseEntity
@Excel(name = "用户名称") @Excel(name = "用户名称")
private String nickName; private String nickName;
/** 用户类型(00系统用户) */
private String userType;
/** 用户邮箱 */ /** 用户邮箱 */
@Excel(name = "用户邮箱") @Excel(name = "用户邮箱")
private String email; private String email;
@ -146,6 +149,14 @@ public class SysUser extends BaseEntity
this.nickName = nickName; this.nickName = nickName;
} }
public String getUserType() {
return userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
@Xss(message = "用户账号不能包含脚本字符") @Xss(message = "用户账号不能包含脚本字符")
@NotBlank(message = "用户账号不能为空") @NotBlank(message = "用户账号不能为空")
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
@ -321,6 +332,7 @@ public class SysUser extends BaseEntity
.append("deptId", getDeptId()) .append("deptId", getDeptId())
.append("userName", getUserName()) .append("userName", getUserName())
.append("nickName", getNickName()) .append("nickName", getNickName())
.append("userType", getUserType())
.append("email", getEmail()) .append("email", getEmail())
.append("phonenumber", getPhonenumber()) .append("phonenumber", getPhonenumber())
.append("sex", getSex()) .append("sex", getSex())

12
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@ -9,6 +9,7 @@
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="userName" column="user_name" /> <result property="userName" column="user_name" />
<result property="nickName" column="nick_name" /> <result property="nickName" column="nick_name" />
<result property="userType" column="user_type" />
<result property="email" column="email" /> <result property="email" column="email" />
<result property="phonenumber" column="phonenumber" /> <result property="phonenumber" column="phonenumber" />
<result property="sex" column="sex" /> <result property="sex" column="sex" />
@ -47,7 +48,7 @@
</resultMap> </resultMap>
<sql id="selectUserVo"> <sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, select u.user_id, u.dept_id, u.user_name, u.nick_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u from sys_user u
@ -57,7 +58,7 @@
</sql> </sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u select u.user_id, u.dept_id, u.nick_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
left join sys_dept d on u.dept_id = d.dept_id left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0' where u.del_flag = '0'
<if test="userId != null and userId != 0"> <if test="userId != null and userId != 0">
@ -86,7 +87,7 @@
</select> </select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.user_type, u.email, u.phonenumber, u.status, u.create_time
from sys_user u from sys_user u
left join sys_dept d on u.dept_id = d.dept_id left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id left join sys_user_role ur on u.user_id = ur.user_id
@ -103,7 +104,7 @@
</select> </select>
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult"> <select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.user_type, u.email, u.phonenumber, u.status, u.create_time
from sys_user u from sys_user u
left join sys_dept d on u.dept_id = d.dept_id left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id left join sys_user_role ur on u.user_id = ur.user_id
@ -148,6 +149,7 @@
<if test="deptId != null and deptId != 0">dept_id,</if> <if test="deptId != null and deptId != 0">dept_id,</if>
<if test="userName != null and userName != ''">user_name,</if> <if test="userName != null and userName != ''">user_name,</if>
<if test="nickName != null and nickName != ''">nick_name,</if> <if test="nickName != null and nickName != ''">nick_name,</if>
<if test="userType != null and userType != ''">user_type,</if>
<if test="email != null and email != ''">email,</if> <if test="email != null and email != ''">email,</if>
<if test="avatar != null and avatar != ''">avatar,</if> <if test="avatar != null and avatar != ''">avatar,</if>
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if> <if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
@ -162,6 +164,7 @@
<if test="deptId != null and deptId != ''">#{deptId},</if> <if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="userName != null and userName != ''">#{userName},</if> <if test="userName != null and userName != ''">#{userName},</if>
<if test="nickName != null and nickName != ''">#{nickName},</if> <if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="userType != null and userType != ''">#{userType},</if>
<if test="email != null and email != ''">#{email},</if> <if test="email != null and email != ''">#{email},</if>
<if test="avatar != null and avatar != ''">#{avatar},</if> <if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if> <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
@ -180,6 +183,7 @@
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if> <if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if> <if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if> <if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="userType != null and userType != ''">user_type = #{userType},</if>
<if test="email != null ">email = #{email},</if> <if test="email != null ">email = #{email},</if>
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if> <if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if> <if test="sex != null and sex != ''">sex = #{sex},</if>

53
zc-business/src/main/java/com/zc/business/controller/DcBoardController.java

@ -0,0 +1,53 @@
package com.zc.business.controller;
import com.ruoyi.common.core.domain.AjaxResult;
import com.zc.business.domain.DcBoardPublish;
import com.zc.business.service.IDcBoardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* @Description 情报板Controller
*
* @author liuwenge
* @date 2024/1/5 11:38
*/
@Api(tags = "情报板")
@RestController
@RequestMapping("/business/board")
public class DcBoardController {
@Autowired
private IDcBoardService dcBoardService;
/**
* 情报板发布
*/
@ApiOperation("情报板发布")
@PreAuthorize("@ss.hasPermi('business:board:publish')")
@PostMapping("/publish")
public AjaxResult publish(@RequestBody DcBoardPublish dcBoardPublish){
return dcBoardService.publish(dcBoardPublish);
}
/**
* 情报板回读
*/
@ApiOperation("情报板回读")
@PreAuthorize("@ss.hasPermi('business:board:realtimeProperty')")
@GetMapping("/realtimeProperty/{deviceId}")
public AjaxResult realtimeProperty(@ApiParam(name = "deviceId", value = "设备id", required = true) @PathVariable("deviceId") String deviceId){
return dcBoardService.realtimeProperty(deviceId);
}
}

104
zc-business/src/main/java/com/zc/business/controller/DcBoardReleaseLogController.java

@ -0,0 +1,104 @@
package com.zc.business.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.zc.business.domain.DcBoardReleaseLog;
import com.zc.business.service.IDcBoardReleaseLogService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 情报板内容发布日志Controller
*
* @author ruoyi
* @date 2024-01-05
*/
@RestController
@RequestMapping("/business/boardReleaseLog")
public class DcBoardReleaseLogController extends BaseController
{
@Autowired
private IDcBoardReleaseLogService dcBoardReleaseLogService;
/**
* 查询情报板内容发布日志列表
*/
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:list')")
@GetMapping("/list")
public TableDataInfo list(DcBoardReleaseLog dcBoardReleaseLog)
{
startPage();
List<DcBoardReleaseLog> list = dcBoardReleaseLogService.selectDcBoardReleaseLogList(dcBoardReleaseLog);
return getDataTable(list);
}
/**
* 导出情报板内容发布日志列表
*/
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:export')")
@Log(title = "情报板内容发布日志", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcBoardReleaseLog dcBoardReleaseLog)
{
List<DcBoardReleaseLog> list = dcBoardReleaseLogService.selectDcBoardReleaseLogList(dcBoardReleaseLog);
ExcelUtil<DcBoardReleaseLog> util = new ExcelUtil<>(DcBoardReleaseLog.class);
util.exportExcel(response, list, "情报板内容发布日志数据");
}
/**
* 获取情报板内容发布日志详细信息
*/
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(dcBoardReleaseLogService.selectDcBoardReleaseLogById(id));
}
/**
* 新增情报板内容发布日志
*/
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:add')")
@Log(title = "情报板内容发布日志", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBoardReleaseLog dcBoardReleaseLog)
{
return toAjax(dcBoardReleaseLogService.insertDcBoardReleaseLog(dcBoardReleaseLog));
}
/**
* 修改情报板内容发布日志
*/
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:edit')")
@Log(title = "情报板内容发布日志", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBoardReleaseLog dcBoardReleaseLog)
{
return toAjax(dcBoardReleaseLogService.updateDcBoardReleaseLog(dcBoardReleaseLog));
}
/**
* 删除情报板内容发布日志
*/
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:remove')")
@Log(title = "情报板内容发布日志", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBoardReleaseLogService.deleteDcBoardReleaseLogByIds(ids));
}
}

4
zc-business/src/main/java/com/zc/business/controller/DcEventTypeController.java

@ -31,7 +31,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi * @author ruoyi
* @date 2024-01-03 * @date 2024-01-03
*/ */
@Api(value = "事件类型") @Api(value = "事件类型",tags = {"事件类型"})
@RestController @RestController
@RequestMapping("/business/dcEventType") @RequestMapping("/business/dcEventType")
public class DcEventTypeController extends BaseController public class DcEventTypeController extends BaseController
@ -45,7 +45,7 @@ public class DcEventTypeController extends BaseController
@ApiOperation("查询事件类型列表") @ApiOperation("查询事件类型列表")
@PreAuthorize("@ss.hasPermi('business:dcEventType:list')") @PreAuthorize("@ss.hasPermi('business:dcEventType:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(@RequestBody DcEventType dcEventType) public TableDataInfo list(DcEventType dcEventType)
{ {
startPage(); startPage();
List<DcEventType> list = dcEventTypeService.selectDcEventTypeList(dcEventType); List<DcEventType> list = dcEventTypeService.selectDcEventTypeList(dcEventType);

5
zc-business/src/main/java/com/zc/business/controller/DcInfoBoardTemplateController.java

@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
* 情报板模板Controller * 情报板模板Controller
* *
*/ */
@Api("情报板模板") @Api(tags = {"情报板模板"})
@RestController @RestController
@RequestMapping("/business/boardTemplate") @RequestMapping("/business/boardTemplate")
public class DcInfoBoardTemplateController extends BaseController public class DcInfoBoardTemplateController extends BaseController
@ -29,7 +29,8 @@ public class DcInfoBoardTemplateController extends BaseController
@ApiOperation("获取情报板模板") @ApiOperation("获取情报板模板")
@GetMapping("/getAllVmsTemplate") @GetMapping("/getAllVmsTemplate")
public AjaxResult getAllVmsTemplate(String category, String devicePixel) { public AjaxResult getAllVmsTemplate(@ApiParam(value="情报板分组", name="category", required=true) String category,
@ApiParam(value="分辨率", name="devicePixel", required=true) String devicePixel) {
return AjaxResult.success(dcInfoBoardTemplateService.getAllVmsTemplate(category, devicePixel)); return AjaxResult.success(dcInfoBoardTemplateService.getAllVmsTemplate(category, devicePixel));
} }

124
zc-business/src/main/java/com/zc/business/controller/DcInfoBoardVocabularyController.java

@ -0,0 +1,124 @@
package com.zc.business.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.zc.business.domain.DcInfoBoardVocabulary;
import com.zc.business.service.IDcInfoBoardVocabularyService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 情报板敏感字管理Controller
*
* @author ruoyi
* @date 2024-01-05
*/
@Api(tags = {"情报板敏感字管理"})
@RestController
@RequestMapping("/business/dcInfoBoardVocabulary")
public class DcInfoBoardVocabularyController extends BaseController
{
@Autowired
private IDcInfoBoardVocabularyService dcInfoBoardVocabularyService;
/**
* 查询情报板敏感字管理列表
*/
@ApiOperation("查询情报板敏感字管理列表")
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:list')")
@GetMapping("/list")
public TableDataInfo list(DcInfoBoardVocabulary dcInfoBoardVocabulary)
{
startPage();
List<DcInfoBoardVocabulary> list = dcInfoBoardVocabularyService.selectDcInfoBoardVocabularyList(dcInfoBoardVocabulary);
return getDataTable(list);
}
/**
* 导出情报板敏感字管理列表
*/
@ApiOperation("导出情报板敏感字管理列表")
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:export')")
@Log(title = "情报板敏感字管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcInfoBoardVocabulary dcInfoBoardVocabulary)
{
List<DcInfoBoardVocabulary> list = dcInfoBoardVocabularyService.selectDcInfoBoardVocabularyList(dcInfoBoardVocabulary);
ExcelUtil<DcInfoBoardVocabulary> util = new ExcelUtil<>(DcInfoBoardVocabulary.class);
util.exportExcel(response, list, "情报板敏感字管理数据");
}
/**
* 获取情报板敏感字管理详细信息
*/
@ApiOperation("获取情报板敏感字管理详细信息")
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") @ApiParam(value="id", name="id", required=true) Long id)
{
return AjaxResult.success(dcInfoBoardVocabularyService.selectDcInfoBoardVocabularyById(id));
}
/**
* 新增情报板敏感字管理
*/
@ApiOperation("新增情报板敏感字管理")
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:add')")
@Log(title = "情报板敏感字管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcInfoBoardVocabulary dcInfoBoardVocabulary)
{
return toAjax(dcInfoBoardVocabularyService.insertDcInfoBoardVocabulary(dcInfoBoardVocabulary));
}
/**
* 修改情报板敏感字管理
*/
@ApiOperation("修改情报板敏感字管理")
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:edit')")
@Log(title = "情报板敏感字管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcInfoBoardVocabulary dcInfoBoardVocabulary)
{
return toAjax(dcInfoBoardVocabularyService.updateDcInfoBoardVocabulary(dcInfoBoardVocabulary));
}
/**
* 删除情报板敏感字管理
*/
@ApiOperation("删除情报板敏感字管理")
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:remove')")
@Log(title = "情报板敏感字管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{id}")
public AjaxResult remove(@PathVariable @ApiParam(value="id", name="id", required=true) Long id)
{
return toAjax(dcInfoBoardVocabularyService.deleteDcInfoBoardVocabularyById(id));
}
/**
* 检查情报板是否含有敏感字
*/
@ApiOperation("检查情报板是否含有敏感字")
@GetMapping("/checkBoardContent")
public AjaxResult checkBoardContent(String content) {
return dcInfoBoardVocabularyService.checkBoardContent(content);
}
}

16
zc-business/src/main/java/com/zc/business/controller/DcProcessConfigController.java

@ -30,9 +30,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi * @author ruoyi
* @date 2024-01-03 * @date 2024-01-03
*/ */
@Api("事件流程配置")
@RestController @RestController
@RequestMapping("/system/dcProcessConfig") @RequestMapping("/business/dcProcessConfig")
public class DcProcessConfigController extends BaseController public class DcProcessConfigController extends BaseController
{ {
@Autowired @Autowired
@ -41,8 +40,7 @@ public class DcProcessConfigController extends BaseController
/** /**
* 查询事件流程配置列表 * 查询事件流程配置列表
*/ */
@ApiOperation("查询事件流程配置列表") @PreAuthorize("@ss.hasPermi('business:dcProcessConfig:list')")
@PreAuthorize("@ss.hasPermi('system:dcProcessConfig:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcProcessConfig dcProcessConfig) public TableDataInfo list(DcProcessConfig dcProcessConfig)
{ {
@ -54,7 +52,7 @@ public class DcProcessConfigController extends BaseController
/** /**
* 导出事件流程配置列表 * 导出事件流程配置列表
*/ */
@PreAuthorize("@ss.hasPermi('system:dcProcessConfig:export')") @PreAuthorize("@ss.hasPermi('business:dcProcessConfig:export')")
@Log(title = "事件流程配置", businessType = BusinessType.EXPORT) @Log(title = "事件流程配置", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DcProcessConfig dcProcessConfig) public void export(HttpServletResponse response, DcProcessConfig dcProcessConfig)
@ -67,7 +65,7 @@ public class DcProcessConfigController extends BaseController
/** /**
* 获取事件流程配置详细信息 * 获取事件流程配置详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:dcProcessConfig:query')") @PreAuthorize("@ss.hasPermi('business:dcProcessConfig:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
@ -77,7 +75,7 @@ public class DcProcessConfigController extends BaseController
/** /**
* 新增事件流程配置 * 新增事件流程配置
*/ */
@PreAuthorize("@ss.hasPermi('system:dcProcessConfig:add')") @PreAuthorize("@ss.hasPermi('business:dcProcessConfig:add')")
@Log(title = "事件流程配置", businessType = BusinessType.INSERT) @Log(title = "事件流程配置", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcProcessConfig dcProcessConfig) public AjaxResult add(@RequestBody DcProcessConfig dcProcessConfig)
@ -88,7 +86,7 @@ public class DcProcessConfigController extends BaseController
/** /**
* 修改事件流程配置 * 修改事件流程配置
*/ */
@PreAuthorize("@ss.hasPermi('system:dcProcessConfig:edit')") @PreAuthorize("@ss.hasPermi('business:dcProcessConfig:edit')")
@Log(title = "事件流程配置", businessType = BusinessType.UPDATE) @Log(title = "事件流程配置", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcProcessConfig dcProcessConfig) public AjaxResult edit(@RequestBody DcProcessConfig dcProcessConfig)
@ -99,7 +97,7 @@ public class DcProcessConfigController extends BaseController
/** /**
* 删除事件流程配置 * 删除事件流程配置
*/ */
@PreAuthorize("@ss.hasPermi('system:dcProcessConfig:remove')") @PreAuthorize("@ss.hasPermi('business:dcProcessConfig:remove')")
@Log(title = "事件流程配置", businessType = BusinessType.DELETE) @Log(title = "事件流程配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)

47
zc-business/src/main/java/com/zc/business/domain/DcBoardPublish.java

@ -0,0 +1,47 @@
package com.zc.business.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 情报板发布对象
*
* @author ruoyi
* @date 2024-01-05
*/
@ApiModel("情报板发布对象")
public class DcBoardPublish
{
@ApiModelProperty(value = "设备id", required = true)
private String deviceId;
@ApiModelProperty(value = "内容列表", required = true)
private List<Map<String,Object>> content;
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public List<Map<String, Object>> getContent() {
return content;
}
public void setContent(List<Map<String, Object>> content) {
this.content = content;
}
}

208
zc-business/src/main/java/com/zc/business/domain/DcBoardReleaseLog.java

@ -0,0 +1,208 @@
package com.zc.business.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 情报板内容发布日志对象 dc_board_release_log
*
* @author ruoyi
* @date 2024-01-05
*/
@ApiModel("情报板内容发布日志对象")
public class DcBoardReleaseLog extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
@ApiModelProperty(value="id")
private Long id;
/** 设备编号 */
@Excel(name = "设备编号")
@ApiModelProperty(value="设备编号")
private String deviceId;
/** 设备名称 */
@Excel(name = "设备名称")
@ApiModelProperty(value="设备名称")
private String deviceName;
/** 发布内容 */
@Excel(name = "发布内容")
@ApiModelProperty(value="发布内容")
private String releaseContent;
/** 发布状态(0:成功;1:失败) */
@Excel(name = "发布状态", readConverterExp = "0=:成功;1:失败")
@ApiModelProperty(value="发布状态0=:成功;1:失败")
private String releaseStatus;
/** 发布时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value="发布时间")
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date releaseTime;
/** 发布机构 */
@Excel(name = "发布机构")
@ApiModelProperty(value="发布机构")
private String releaseDeptName;
/** 发布机构 */
@Excel(name = "发布机构")
@ApiModelProperty(value="发布机构id")
private String releaseDeptId;
/** 发布用户 */
@Excel(name = "发布用户")
@ApiModelProperty(value="发布用户")
private String releaseUserName;
/** 发布用户 */
@Excel(name = "发布用户")
@ApiModelProperty(value="发布用户")
private String releaseUserId;
/** 发布端 */
@Excel(name = "发布端")
@ApiModelProperty(value="发布端(00=系统用户,01=智慧大脑,02=GIS+BIM")
private String platform;
/** ip地址 */
@Excel(name = "ip地址")
@ApiModelProperty(value="ip地址")
private String releaseIp;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceId(String deviceId)
{
this.deviceId = deviceId;
}
public String getDeviceId()
{
return deviceId;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
{
return deviceName;
}
public void setReleaseContent(String releaseContent)
{
this.releaseContent = releaseContent;
}
public String getReleaseContent()
{
return releaseContent;
}
public void setReleaseStatus(String releaseStatus)
{
this.releaseStatus = releaseStatus;
}
public String getReleaseStatus()
{
return releaseStatus;
}
public void setReleaseTime(Date releaseTime)
{
this.releaseTime = releaseTime;
}
public Date getReleaseTime()
{
return releaseTime;
}
public void setReleaseDeptName(String releaseDeptName)
{
this.releaseDeptName = releaseDeptName;
}
public String getReleaseDeptName()
{
return releaseDeptName;
}
public void setReleaseDeptId(String releaseDeptId)
{
this.releaseDeptId = releaseDeptId;
}
public String getReleaseDeptId()
{
return releaseDeptId;
}
public void setReleaseUserName(String releaseUserName)
{
this.releaseUserName = releaseUserName;
}
public String getReleaseUserName()
{
return releaseUserName;
}
public void setReleaseUserId(String releaseUserId)
{
this.releaseUserId = releaseUserId;
}
public String getReleaseUserId()
{
return releaseUserId;
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform;
}
public void setReleaseIp(String releaseIp)
{
this.releaseIp = releaseIp;
}
public String getReleaseIp()
{
return releaseIp;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceId", getDeviceId())
.append("deviceName", getDeviceName())
.append("releaseContent", getReleaseContent())
.append("releaseStatus", getReleaseStatus())
.append("releaseTime", getReleaseTime())
.append("releaseDeptName", getReleaseDeptName())
.append("releaseDeptId", getReleaseDeptId())
.append("releaseUserName", getReleaseUserName())
.append("releaseUserId", getReleaseUserId())
.append("releaseIp", getReleaseIp())
.toString();
}
}

70
zc-business/src/main/java/com/zc/business/domain/DcInfoBoardVocabulary.java

@ -0,0 +1,70 @@
package com.zc.business.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 情报板敏感字管理对象 dc_info_board_vocabulary
*
* @author ruoyi
* @date 2024-01-05
*/
@ApiModel("情报板敏感字管理对象")
public class DcInfoBoardVocabulary
{
private static final long serialVersionUID = 1L;
/** id */
private Long id;
/** 文本 */
@Excel(name = "文本")
private String word;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@Excel(name = "创建时间")
private Date createTime;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setWord(String word)
{
this.word = word;
}
public String getWord()
{
return word;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("word", getWord())
.append("createTime", getCreateTime())
.toString();
}
}

8
zc-business/src/main/java/com/zc/business/domain/DcPublishInfo.java

@ -61,14 +61,14 @@ public class DcPublishInfo extends BaseEntity
/** 发布时间 */ /** 发布时间 */
@ApiModelProperty(value = "发布时间") @ApiModelProperty(value = "发布时间")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date publishTime; private Date publishTime;
/** 审核时间 */ /** 审核时间 */
@ApiModelProperty(value = "审核时间") @ApiModelProperty(value = "审核时间")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date auditTime; private Date auditTime;
/** 发布状态0失败, 1成功, 2草稿 */ /** 发布状态0失败, 1成功, 2草稿 */

61
zc-business/src/main/java/com/zc/business/mapper/DcBoardReleaseLogMapper.java

@ -0,0 +1,61 @@
package com.zc.business.mapper;
import java.util.List;
import com.zc.business.domain.DcBoardReleaseLog;
/**
* 情报板内容发布日志Mapper接口
*
* @author ruoyi
* @date 2024-01-05
*/
public interface DcBoardReleaseLogMapper
{
/**
* 查询情报板内容发布日志
*
* @param id 情报板内容发布日志主键
* @return 情报板内容发布日志
*/
public DcBoardReleaseLog selectDcBoardReleaseLogById(Long id);
/**
* 查询情报板内容发布日志列表
*
* @param dcBoardReleaseLog 情报板内容发布日志
* @return 情报板内容发布日志集合
*/
List<DcBoardReleaseLog> selectDcBoardReleaseLogList(DcBoardReleaseLog dcBoardReleaseLog);
/**
* 新增情报板内容发布日志
*
* @param dcBoardReleaseLog 情报板内容发布日志
* @return 结果
*/
int insertDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog);
/**
* 修改情报板内容发布日志
*
* @param dcBoardReleaseLog 情报板内容发布日志
* @return 结果
*/
int updateDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog);
/**
* 删除情报板内容发布日志
*
* @param id 情报板内容发布日志主键
* @return 结果
*/
int deleteDcBoardReleaseLogById(Long id);
/**
* 批量删除情报板内容发布日志
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
int deleteDcBoardReleaseLogByIds(Long[] ids);
}

61
zc-business/src/main/java/com/zc/business/mapper/DcInfoBoardVocabularyMapper.java

@ -0,0 +1,61 @@
package com.zc.business.mapper;
import java.util.List;
import com.zc.business.domain.DcInfoBoardVocabulary;
/**
* 情报板敏感字管理Mapper接口
*
* @author ruoyi
* @date 2024-01-05
*/
public interface DcInfoBoardVocabularyMapper
{
/**
* 查询情报板敏感字管理
*
* @param id 情报板敏感字管理主键
* @return 情报板敏感字管理
*/
public DcInfoBoardVocabulary selectDcInfoBoardVocabularyById(Long id);
/**
* 查询情报板敏感字管理列表
*
* @param dcInfoBoardVocabulary 情报板敏感字管理
* @return 情报板敏感字管理集合
*/
List<DcInfoBoardVocabulary> selectDcInfoBoardVocabularyList(DcInfoBoardVocabulary dcInfoBoardVocabulary);
/**
* 新增情报板敏感字管理
*
* @param dcInfoBoardVocabulary 情报板敏感字管理
* @return 结果
*/
int insertDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary);
/**
* 修改情报板敏感字管理
*
* @param dcInfoBoardVocabulary 情报板敏感字管理
* @return 结果
*/
int updateDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary);
/**
* 删除情报板敏感字管理
*
* @param id 情报板敏感字管理主键
* @return 结果
*/
int deleteDcInfoBoardVocabularyById(Long id);
/**
* 批量删除情报板敏感字管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
int deleteDcInfoBoardVocabularyByIds(Long[] ids);
}

61
zc-business/src/main/java/com/zc/business/service/IDcBoardReleaseLogService.java

@ -0,0 +1,61 @@
package com.zc.business.service;
import java.util.List;
import com.zc.business.domain.DcBoardReleaseLog;
/**
* 情报板内容发布日志Service接口
*
* @author ruoyi
* @date 2024-01-05
*/
public interface IDcBoardReleaseLogService
{
/**
* 查询情报板内容发布日志
*
* @param id 情报板内容发布日志主键
* @return 情报板内容发布日志
*/
public DcBoardReleaseLog selectDcBoardReleaseLogById(Long id);
/**
* 查询情报板内容发布日志列表
*
* @param dcBoardReleaseLog 情报板内容发布日志
* @return 情报板内容发布日志集合
*/
List<DcBoardReleaseLog> selectDcBoardReleaseLogList(DcBoardReleaseLog dcBoardReleaseLog);
/**
* 新增情报板内容发布日志
*
* @param dcBoardReleaseLog 情报板内容发布日志
* @return 结果
*/
int insertDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog);
/**
* 修改情报板内容发布日志
*
* @param dcBoardReleaseLog 情报板内容发布日志
* @return 结果
*/
int updateDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog);
/**
* 批量删除情报板内容发布日志
*
* @param ids 需要删除的情报板内容发布日志主键集合
* @return 结果
*/
int deleteDcBoardReleaseLogByIds(Long[] ids);
/**
* 删除情报板内容发布日志信息
*
* @param id 情报板内容发布日志主键
* @return 结果
*/
int deleteDcBoardReleaseLogById(Long id);
}

27
zc-business/src/main/java/com/zc/business/service/IDcBoardService.java

@ -0,0 +1,27 @@
package com.zc.business.service;
import com.ruoyi.common.core.domain.AjaxResult;
import com.zc.business.domain.DcBoardPublish;
import java.util.List;
import java.util.Map;
/**
* 情报板Service接口
*
* @author ruoyi
* @date 2024-01-03
*/
public interface IDcBoardService
{
/**
* 情报板发布
*/
AjaxResult publish(DcBoardPublish dcBoardPublish);
/**
* 情报板回读
*/
AjaxResult realtimeProperty(String deviceId);
}

71
zc-business/src/main/java/com/zc/business/service/IDcInfoBoardVocabularyService.java

@ -0,0 +1,71 @@
package com.zc.business.service;
import java.util.List;
import com.ruoyi.common.core.domain.AjaxResult;
import com.zc.business.domain.DcInfoBoardVocabulary;
/**
* 情报板敏感字管理Service接口
*
* @author ruoyi
* @date 2024-01-05
*/
public interface IDcInfoBoardVocabularyService
{
/**
* 查询情报板敏感字管理
*
* @param id 情报板敏感字管理主键
* @return 情报板敏感字管理
*/
public DcInfoBoardVocabulary selectDcInfoBoardVocabularyById(Long id);
/**
* 查询情报板敏感字管理列表
*
* @param dcInfoBoardVocabulary 情报板敏感字管理
* @return 情报板敏感字管理集合
*/
List<DcInfoBoardVocabulary> selectDcInfoBoardVocabularyList(DcInfoBoardVocabulary dcInfoBoardVocabulary);
/**
* 新增情报板敏感字管理
*
* @param dcInfoBoardVocabulary 情报板敏感字管理
* @return 结果
*/
int insertDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary);
/**
* 修改情报板敏感字管理
*
* @param dcInfoBoardVocabulary 情报板敏感字管理
* @return 结果
*/
int updateDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary);
/**
* 批量删除情报板敏感字管理
*
* @param ids 需要删除的情报板敏感字管理主键集合
* @return 结果
*/
int deleteDcInfoBoardVocabularyByIds(Long[] ids);
/**
* 删除情报板敏感字管理信息
*
* @param id 情报板敏感字管理主键
* @return 结果
*/
int deleteDcInfoBoardVocabularyById(Long id);
/**
* 检查情报板是否含有敏感字
*
* @param content 情报板内容
* @return 结果
*/
AjaxResult checkBoardContent(String content);
}

93
zc-business/src/main/java/com/zc/business/service/impl/DcBoardReleaseLogServiceImpl.java

@ -0,0 +1,93 @@
package com.zc.business.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zc.business.mapper.DcBoardReleaseLogMapper;
import com.zc.business.domain.DcBoardReleaseLog;
import com.zc.business.service.IDcBoardReleaseLogService;
/**
* 情报板内容发布日志Service业务层处理
*
* @author ruoyi
* @date 2024-01-05
*/
@Service
public class DcBoardReleaseLogServiceImpl implements IDcBoardReleaseLogService
{
@Autowired
private DcBoardReleaseLogMapper dcBoardReleaseLogMapper;
/**
* 查询情报板内容发布日志
*
* @param id 情报板内容发布日志主键
* @return 情报板内容发布日志
*/
@Override
public DcBoardReleaseLog selectDcBoardReleaseLogById(Long id)
{
return dcBoardReleaseLogMapper.selectDcBoardReleaseLogById(id);
}
/**
* 查询情报板内容发布日志列表
*
* @param dcBoardReleaseLog 情报板内容发布日志
* @return 情报板内容发布日志
*/
@Override
public List<DcBoardReleaseLog> selectDcBoardReleaseLogList(DcBoardReleaseLog dcBoardReleaseLog)
{
return dcBoardReleaseLogMapper.selectDcBoardReleaseLogList(dcBoardReleaseLog);
}
/**
* 新增情报板内容发布日志
*
* @param dcBoardReleaseLog 情报板内容发布日志
* @return 结果
*/
@Override
public int insertDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog)
{
return dcBoardReleaseLogMapper.insertDcBoardReleaseLog(dcBoardReleaseLog);
}
/**
* 修改情报板内容发布日志
*
* @param dcBoardReleaseLog 情报板内容发布日志
* @return 结果
*/
@Override
public int updateDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog)
{
return dcBoardReleaseLogMapper.updateDcBoardReleaseLog(dcBoardReleaseLog);
}
/**
* 批量删除情报板内容发布日志
*
* @param ids 需要删除的情报板内容发布日志主键
* @return 结果
*/
@Override
public int deleteDcBoardReleaseLogByIds(Long[] ids)
{
return dcBoardReleaseLogMapper.deleteDcBoardReleaseLogByIds(ids);
}
/**
* 删除情报板内容发布日志信息
*
* @param id 情报板内容发布日志主键
* @return 结果
*/
@Override
public int deleteDcBoardReleaseLogById(Long id)
{
return dcBoardReleaseLogMapper.deleteDcBoardReleaseLogById(id);
}
}

104
zc-business/src/main/java/com/zc/business/service/impl/DcBoardServiceImpl.java

@ -0,0 +1,104 @@
package com.zc.business.service.impl;
import com.alibaba.fastjson.JSON;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.zc.business.domain.DcBoardPublish;
import com.zc.business.domain.DcBoardReleaseLog;
import com.zc.business.mapper.DcBoardReleaseLogMapper;
import com.zc.business.service.IDcBoardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 情报板Service业务层处理
*
* @author ruoyi
* @date 2024-01-03
*/
@Service
public class DcBoardServiceImpl implements IDcBoardService {
@Autowired
private DcBoardReleaseLogMapper dcBoardReleaseLogMapper;
/**
* @Description 情报板发布
*
* @author liuwenge
* @date 2024/1/5 14:30
* @return com.ruoyi.common.core.domain.AjaxResult
*/
public AjaxResult publish(DcBoardPublish dcBoardPublish){
if (StringUtils.isEmpty(dcBoardPublish.getDeviceId())){
return AjaxResult.error("设备id为空");
}
if (dcBoardPublish.getContent() == null || dcBoardPublish.getContent().size() == 0){
return AjaxResult.error("下发内容为空");
}
String deviceId = dcBoardPublish.getDeviceId();
List<Map<String,Object>> contentList = dcBoardPublish.getContent();
//TODO 调用控制设备接口
/* //下发文件名
Map<String,Object> param = new HashMap<>();
param.put("size","65535");
param.put("fileName","play010.lst");
invokeFunction(deviceId,"11",param);
//功能码13 下发内容
param = new HashMap<>();
param.put("parameters",contentList);
invokeFunction(deviceId,"1B",param);
//功能码1B 播放
param = new HashMap<>();
param.put("fileId","10");
invokeFunction(deviceId,"13",param);*/
String status = "1";
//发布记录
LoginUser loginUser = SecurityUtils.getLoginUser();
for (Map<String, Object> content : contentList) {
DcBoardReleaseLog releaseLog = new DcBoardReleaseLog();
releaseLog.setDeviceId(deviceId);
releaseLog.setReleaseContent(JSON.toJSONString(content));
releaseLog.setReleaseIp(loginUser.getIpaddr());
releaseLog.setReleaseStatus(status);
releaseLog.setReleaseUserId(loginUser.getUsername());
releaseLog.setReleaseUserName(loginUser.getUser().getNickName());
releaseLog.setReleaseDeptId(loginUser.getDeptId().toString());
dcBoardReleaseLogMapper.insertDcBoardReleaseLog(releaseLog);
}
return AjaxResult.success();
}
/**
* @Description 情报板回读
*
* @author liuwenge
* @date 2024/1/5 15:58
* @param deviceId 设备id
*/
public AjaxResult realtimeProperty(String deviceId){
/*Map<String,Object> param = new HashMap<>();
param.put("async",false);
invokeFunction(deviceId,"3A",param);*/
return AjaxResult.success();
}
}

127
zc-business/src/main/java/com/zc/business/service/impl/DcInfoBoardVocabularyServiceImpl.java

@ -0,0 +1,127 @@
package com.zc.business.service.impl;
import java.net.URLDecoder;
import java.util.List;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zc.business.mapper.DcInfoBoardVocabularyMapper;
import com.zc.business.domain.DcInfoBoardVocabulary;
import com.zc.business.service.IDcInfoBoardVocabularyService;
/**
* 情报板敏感字管理Service业务层处理
*
* @author ruoyi
* @date 2024-01-05
*/
@Service
public class DcInfoBoardVocabularyServiceImpl implements IDcInfoBoardVocabularyService
{
@Autowired
private DcInfoBoardVocabularyMapper dcInfoBoardVocabularyMapper;
/**
* 查询情报板敏感字管理
*
* @param id 情报板敏感字管理主键
* @return 情报板敏感字管理
*/
@Override
public DcInfoBoardVocabulary selectDcInfoBoardVocabularyById(Long id)
{
return dcInfoBoardVocabularyMapper.selectDcInfoBoardVocabularyById(id);
}
/**
* 查询情报板敏感字管理列表
*
* @param dcInfoBoardVocabulary 情报板敏感字管理
* @return 情报板敏感字管理
*/
@Override
public List<DcInfoBoardVocabulary> selectDcInfoBoardVocabularyList(DcInfoBoardVocabulary dcInfoBoardVocabulary)
{
return dcInfoBoardVocabularyMapper.selectDcInfoBoardVocabularyList(dcInfoBoardVocabulary);
}
/**
* 新增情报板敏感字管理
*
* @param dcInfoBoardVocabulary 情报板敏感字管理
* @return 结果
*/
@Override
public int insertDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary)
{
dcInfoBoardVocabulary.setCreateTime(DateUtils.getNowDate());
return dcInfoBoardVocabularyMapper.insertDcInfoBoardVocabulary(dcInfoBoardVocabulary);
}
/**
* 修改情报板敏感字管理
*
* @param dcInfoBoardVocabulary 情报板敏感字管理
* @return 结果
*/
@Override
public int updateDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary)
{
return dcInfoBoardVocabularyMapper.updateDcInfoBoardVocabulary(dcInfoBoardVocabulary);
}
/**
* 批量删除情报板敏感字管理
*
* @param ids 需要删除的情报板敏感字管理主键
* @return 结果
*/
@Override
public int deleteDcInfoBoardVocabularyByIds(Long[] ids)
{
return dcInfoBoardVocabularyMapper.deleteDcInfoBoardVocabularyByIds(ids);
}
/**
* 删除情报板敏感字管理信息
*
* @param id 情报板敏感字管理主键
* @return 结果
*/
@Override
public int deleteDcInfoBoardVocabularyById(Long id)
{
return dcInfoBoardVocabularyMapper.deleteDcInfoBoardVocabularyById(id);
}
/**
* 检查情报板是否含有敏感字
*
* @param content 情报板内容
* @return 结果
*/
@Override
public AjaxResult checkBoardContent(String content){
if (content == null || content.equals("")) {
return AjaxResult.error("情报板内容为空");
} else {
Boolean flag = false;
List<DcInfoBoardVocabulary> boardVocabularies = dcInfoBoardVocabularyMapper.selectDcInfoBoardVocabularyList(null);
try {
content = URLDecoder.decode(content, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error();
}
for (int i = 0;i < boardVocabularies.size();i++) {
String word = boardVocabularies.get(i).getWord();
if (content.contains(word)) {
return AjaxResult.error("当前发布内容包含敏感字段'" + word + "',请修改");
}
}
}
return AjaxResult.success("验证通过");
}
}

105
zc-business/src/main/resources/mapper/business/DcBoardReleaseLogMapper.xml

@ -0,0 +1,105 @@
<?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.zc.business.mapper.DcBoardReleaseLogMapper">
<resultMap type="DcBoardReleaseLog" id="DcBoardReleaseLogResult">
<result property="id" column="id" />
<result property="deviceId" column="device_id" />
<result property="deviceName" column="device_name" />
<result property="releaseContent" column="release_content" />
<result property="releaseStatus" column="release_status" />
<result property="releaseTime" column="release_time" />
<result property="releaseDeptName" column="release_dept_name" />
<result property="releaseDeptId" column="release_dept_id" />
<result property="releaseUserName" column="release_user_name" />
<result property="releaseUserId" column="release_user_id" />
<result property="platform" column="platform" />
<result property="releaseIp" column="release_ip" />
</resultMap>
<sql id="selectDcBoardReleaseLogVo">
select id, device_id, device_name, release_content, release_status, release_time, release_dept_name, release_dept_id, release_user_name, release_user_id, platform,release_ip from dc_board_release_log
</sql>
<select id="selectDcBoardReleaseLogList" parameterType="DcBoardReleaseLog" resultMap="DcBoardReleaseLogResult">
<include refid="selectDcBoardReleaseLogVo"/>
<where>
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="releaseContent != null and releaseContent != ''"> and release_content = #{releaseContent}</if>
<if test="releaseStatus != null and releaseStatus != ''"> and release_status = #{releaseStatus}</if>
<if test="releaseTime != null "> and release_time = #{releaseTime}</if>
<if test="releaseDeptName != null and releaseDeptName != ''"> and release_dept_name like concat('%', #{releaseDeptName}, '%')</if>
<if test="releaseDeptId != null and releaseDeptId != ''"> and release_dept_id = #{releaseDeptId}</if>
<if test="releaseUserName != null and releaseUserName != ''"> and release_user_name like concat('%', #{releaseUserName}, '%')</if>
<if test="releaseUserId != null and releaseUserId != ''"> and release_user_id = #{releaseUserId}</if>
<if test="releaseIp != null and releaseIp != ''"> and release_ip = #{releaseIp}</if>
<if test="platform != null and platform != ''"> and platform = #{platform}</if>
</where>
</select>
<select id="selectDcBoardReleaseLogById" parameterType="Long" resultMap="DcBoardReleaseLogResult">
<include refid="selectDcBoardReleaseLogVo"/>
where id = #{id}
</select>
<insert id="insertDcBoardReleaseLog" parameterType="DcBoardReleaseLog" useGeneratedKeys="true" keyProperty="id">
insert into dc_board_release_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceId != null">device_id,</if>
<if test="deviceName != null">device_name,</if>
<if test="releaseContent != null">release_content,</if>
<if test="releaseStatus != null">release_status,</if>
<if test="releaseDeptName != null">release_dept_name,</if>
<if test="releaseDeptId != null">release_dept_id,</if>
<if test="releaseUserName != null">release_user_name,</if>
<if test="releaseUserId != null">release_user_id,</if>
<if test="releaseIp != null">release_ip,</if>
<if test="platform != null">platform,</if>
release_time
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceId != null">#{deviceId},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="releaseContent != null">#{releaseContent},</if>
<if test="releaseStatus != null">#{releaseStatus},</if>
<if test="releaseDeptName != null">#{releaseDeptName},</if>
<if test="releaseDeptId != null">#{releaseDeptId},</if>
<if test="releaseUserName != null">#{releaseUserName},</if>
<if test="releaseUserId != null">#{releaseUserId},</if>
<if test="releaseIp != null">#{releaseIp},</if>
<if test="platform != null">#{platform},</if>
now()
</trim>
</insert>
<update id="updateDcBoardReleaseLog" parameterType="DcBoardReleaseLog">
update dc_board_release_log
<trim prefix="SET" suffixOverrides=",">
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="releaseContent != null">release_content = #{releaseContent},</if>
<if test="releaseStatus != null">release_status = #{releaseStatus},</if>
<if test="releaseDeptName != null">release_dept_name = #{releaseDeptName},</if>
<if test="releaseDeptId != null">release_dept_id = #{releaseDeptId},</if>
<if test="releaseUserName != null">release_user_name = #{releaseUserName},</if>
<if test="releaseUserId != null">release_user_id = #{releaseUserId},</if>
<if test="releaseIp != null">release_ip = #{releaseIp},</if>
<if test="platform != null">platform = #{platform},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBoardReleaseLogById" parameterType="Long">
delete from dc_board_release_log where id = #{id}
</delete>
<delete id="deleteDcBoardReleaseLogByIds" parameterType="String">
delete from dc_board_release_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

60
zc-business/src/main/resources/mapper/business/DcInfoBoardVocabularyMapper.xml

@ -0,0 +1,60 @@
<?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.zc.business.mapper.DcInfoBoardVocabularyMapper">
<resultMap type="DcInfoBoardVocabulary" id="DcInfoBoardVocabularyResult">
<result property="id" column="id" />
<result property="word" column="word" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectDcInfoBoardVocabularyVo">
select id, word, create_time from dc_info_board_vocabulary
</sql>
<select id="selectDcInfoBoardVocabularyList" parameterType="DcInfoBoardVocabulary" resultMap="DcInfoBoardVocabularyResult">
<include refid="selectDcInfoBoardVocabularyVo"/>
<where>
<if test="word != null and word != ''"> and word = #{word}</if>
</where>
</select>
<select id="selectDcInfoBoardVocabularyById" parameterType="Long" resultMap="DcInfoBoardVocabularyResult">
<include refid="selectDcInfoBoardVocabularyVo"/>
where id = #{id}
</select>
<insert id="insertDcInfoBoardVocabulary" parameterType="DcInfoBoardVocabulary" useGeneratedKeys="true" keyProperty="id">
insert into dc_info_board_vocabulary
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="word != null">word,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="word != null">#{word},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateDcInfoBoardVocabulary" parameterType="DcInfoBoardVocabulary">
update dc_info_board_vocabulary
<trim prefix="SET" suffixOverrides=",">
<if test="word != null">word = #{word},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcInfoBoardVocabularyById" parameterType="Long">
delete from dc_info_board_vocabulary where id = #{id}
</delete>
<delete id="deleteDcInfoBoardVocabularyByIds" parameterType="String">
delete from dc_info_board_vocabulary where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save