diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEventTypeController.java b/zc-business/src/main/java/com/zc/business/controller/DcEventTypeController.java index e956e94b..4c644a44 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcEventTypeController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcEventTypeController.java @@ -2,6 +2,10 @@ 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; @@ -27,8 +31,9 @@ import com.ruoyi.common.core.page.TableDataInfo; * @author ruoyi * @date 2024-01-03 */ +@Api(value = "事件类型") @RestController -@RequestMapping("/system/dcEventType") +@RequestMapping("/business/dcEventType") public class DcEventTypeController extends BaseController { @Autowired @@ -37,9 +42,10 @@ public class DcEventTypeController extends BaseController /** * 查询事件类型列表 */ - @PreAuthorize("@ss.hasPermi('system:dcEventType:list')") + @ApiOperation("查询事件类型列表") + @PreAuthorize("@ss.hasPermi('business:dcEventType:list')") @GetMapping("/list") - public TableDataInfo list(DcEventType dcEventType) + public TableDataInfo list(@RequestBody DcEventType dcEventType) { startPage(); List list = dcEventTypeService.selectDcEventTypeList(dcEventType); @@ -49,7 +55,7 @@ public class DcEventTypeController extends BaseController /** * 导出事件类型列表 */ - @PreAuthorize("@ss.hasPermi('system:dcEventType:export')") + @PreAuthorize("@ss.hasPermi('business:dcEventType:export')") @Log(title = "事件类型", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, DcEventType dcEventType) @@ -62,9 +68,10 @@ public class DcEventTypeController extends BaseController /** * 获取事件类型详细信息 */ - @PreAuthorize("@ss.hasPermi('system:dcEventType:query')") + @ApiOperation("获取事件类型详细信息") + @PreAuthorize("@ss.hasPermi('business:dcEventType:query')") @GetMapping(value = "/{eventType}") - public AjaxResult getInfo(@PathVariable("eventType") Integer eventType) + public AjaxResult getInfo(@PathVariable("eventType") @ApiParam(name = "eventType", value = "事件类型", required = true) Integer eventType) { return AjaxResult.success(dcEventTypeService.selectDcEventTypeByEventType(eventType)); } @@ -72,7 +79,8 @@ public class DcEventTypeController extends BaseController /** * 新增事件类型 */ - @PreAuthorize("@ss.hasPermi('system:dcEventType:add')") + @ApiOperation("新增事件类型") + @PreAuthorize("@ss.hasPermi('business:dcEventType:add')") @Log(title = "事件类型", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DcEventType dcEventType) @@ -83,7 +91,8 @@ public class DcEventTypeController extends BaseController /** * 修改事件类型 */ - @PreAuthorize("@ss.hasPermi('system:dcEventType:edit')") + @ApiOperation("修改事件类型") + @PreAuthorize("@ss.hasPermi('business:dcEventType:edit')") @Log(title = "事件类型", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody DcEventType dcEventType) @@ -94,10 +103,11 @@ public class DcEventTypeController extends BaseController /** * 删除事件类型 */ - @PreAuthorize("@ss.hasPermi('system:dcEventType:remove')") + @ApiOperation("删除事件类型") + @PreAuthorize("@ss.hasPermi('business:dcEventType:remove')") @Log(title = "事件类型", businessType = BusinessType.DELETE) @DeleteMapping("/{eventType}") - public AjaxResult remove(@PathVariable Integer eventType) + public AjaxResult remove(@PathVariable @ApiParam(value = "事件类型", name = "eventType", required = true) Integer eventType) { return dcEventTypeService.deleteDcEventTypeByEventType(eventType); } diff --git a/zc-business/src/main/java/com/zc/business/controller/DcInfoBoardTemplateController.java b/zc-business/src/main/java/com/zc/business/controller/DcInfoBoardTemplateController.java new file mode 100644 index 00000000..c6a48b4b --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/controller/DcInfoBoardTemplateController.java @@ -0,0 +1,73 @@ +package com.zc.business.controller; + +import com.alibaba.fastjson.JSONObject; +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.DcInfoBoardTemplate; +import com.zc.business.service.IDcInfoBoardTemplateService; +import io.swagger.annotations.Api; +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.*; + + +/** + * 情报板模板Controller + * + */ +@Api("情报板模板") +@RestController +@RequestMapping("/business/boardTemplate") +public class DcInfoBoardTemplateController extends BaseController +{ + @Autowired + private IDcInfoBoardTemplateService dcInfoBoardTemplateService; + + @ApiOperation("获取情报板模板") + @GetMapping("/getAllVmsTemplate") + public AjaxResult getAllVmsTemplate(String category, String devicePixel) { + return AjaxResult.success(dcInfoBoardTemplateService.getAllVmsTemplate(category, devicePixel)); + } + + /** + * 新增情报板模板 + */ + @ApiOperation("新增情报板模板") + @PreAuthorize("@ss.hasPermi('business:boardTemplate:add')") + @Log(title = "情报板模板", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DcInfoBoardTemplate dcInfoBoardTemplate) + { + return AjaxResult.success(dcInfoBoardTemplateService.insertSdVmsTemplate(dcInfoBoardTemplate)); + } + + /** + * 修改情报板模板 + */ + @ApiOperation("修改情报板模板") + @PreAuthorize("@ss.hasPermi('business:boardTemplate:edit')") + @Log(title = "情报板模板", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcInfoBoardTemplate dcInfoBoardTemplate) + { + return toAjax(dcInfoBoardTemplateService.updateSdVmsTemplate(dcInfoBoardTemplate)); + } + + /** + * 删除情报板模板 + */ + @ApiOperation("删除情报板模板") + @PreAuthorize("@ss.hasPermi('business:boardTemplate:remove')") + @Log(title = "情报板模板", businessType = BusinessType.DELETE) + @DeleteMapping("/{id}") + public AjaxResult remove(@PathVariable @ApiParam(value="id", name="id", required=true) Long id) + { + return toAjax(dcInfoBoardTemplateService.deleteSdVmsTemplateById(id)); + } + + +} diff --git a/zc-business/src/main/java/com/zc/business/controller/DcPublishInfoController.java b/zc-business/src/main/java/com/zc/business/controller/DcPublishInfoController.java new file mode 100644 index 00000000..0729e014 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/controller/DcPublishInfoController.java @@ -0,0 +1,115 @@ +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.DcPublishInfo; +import com.zc.business.service.IDcPublishInfoService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 信息发布记录Controller + * + * @author ruoyi + * @date 2024-01-04 + */ +@Api(value = "信息发布记录") +@RestController +@RequestMapping("/business/dcPublishInfo") +public class DcPublishInfoController extends BaseController +{ + @Autowired + private IDcPublishInfoService dcPublishInfoService; + + /** + * 查询 信息发布记录列表 + */ + @ApiOperation("查询信息发布记录列表") + @PreAuthorize("@ss.hasPermi('business:dcPublishInfo:list')") + @GetMapping("/list") + public TableDataInfo list(DcPublishInfo dcPublishInfo) + { + startPage(); + List list = dcPublishInfoService.selectDcPublishInfoList(dcPublishInfo); + return getDataTable(list); + } + + /** + * 导出 信息发布记录列表 + */ + @ApiOperation("导出信息发布记录") + @PreAuthorize("@ss.hasPermi('business:dcPublishInfo:export')") + @Log(title = " 信息发布记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DcPublishInfo dcPublishInfo) + { + List list = dcPublishInfoService.selectDcPublishInfoList(dcPublishInfo); + ExcelUtil util = new ExcelUtil<>(DcPublishInfo.class); + util.exportExcel(response, list, " 信息发布记录数据"); + } + + /** + * 获取 信息发布记录详细信息 + */ + @ApiOperation("获取 信息发布记录详细信息") + @PreAuthorize("@ss.hasPermi('business:dcPublishInfo:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") @ApiParam(name = "id", value = "id", required = true) Long id) + { + return AjaxResult.success(dcPublishInfoService.selectDcPublishInfoById(id)); + } + + /** + * 新增 信息发布记录 + */ + @ApiOperation("新增 信息发布记录") + @PreAuthorize("@ss.hasPermi('business:dcPublishInfo:add')") + @Log(title = " 信息发布记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DcPublishInfo dcPublishInfo) + { + return toAjax(dcPublishInfoService.insertDcPublishInfo(dcPublishInfo)); + } + + /** + * 修改 信息发布记录 + */ + @ApiOperation("修改 信息发布记录") + @PreAuthorize("@ss.hasPermi('business:dcPublishInfo:edit')") + @Log(title = " 信息发布记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcPublishInfo dcPublishInfo) + { + return toAjax(dcPublishInfoService.updateDcPublishInfo(dcPublishInfo)); + } + + /** + * 删除 信息发布记录 + */ + @ApiOperation("删除 信息发布记录") + @PreAuthorize("@ss.hasPermi('business:dcPublishInfo:remove')") + @Log(title = " 信息发布记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{id}") + public AjaxResult remove(@PathVariable @ApiParam(name = "id", value = "id", required = true) Long id) + { + return toAjax(dcPublishInfoService.deleteDcPublishInfoById(id)); + } +} diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEventType.java b/zc-business/src/main/java/com/zc/business/domain/DcEventType.java index 65de9898..bb1eaa8a 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEventType.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEventType.java @@ -1,5 +1,7 @@ package com.zc.business.domain; +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; @@ -14,23 +16,27 @@ import java.util.List; * @author ruoyi * @date 2024-01-03 */ -public class DcEventType extends BaseEntity +@ApiModel(value="事件类型对象") +public class DcEventType { - private static final long serialVersionUID = 1L; /** 事件类型 */ + @ApiModelProperty(value = "事件类型", required = true) @Excel(name = "事件类型") private Integer eventType; /** 事件名称 */ + @ApiModelProperty(value = "事件名称", required = true) @Excel(name = "事件名称") private String eventName; /** 处置流程 */ @Excel(name = "处置流程") + @ApiModelProperty(hidden = true) private String processConfig; - /** 处置流程 */ + /** 处置流程列表 */ + @ApiModelProperty(value = "处置流程列表") private List processConfigList = new ArrayList<>(); public void setEventType(Integer eventType) diff --git a/zc-business/src/main/java/com/zc/business/domain/DcInfoBoardTemplate.java b/zc-business/src/main/java/com/zc/business/domain/DcInfoBoardTemplate.java new file mode 100644 index 00000000..5ea9637e --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/domain/DcInfoBoardTemplate.java @@ -0,0 +1,228 @@ +package com.zc.business.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiOperation; + +import java.util.Date; + +/** + * 情报板模板 dc_info_board_template + * + */ +@ApiModel("情报板模板对象") +public class DcInfoBoardTemplate { + + /** + * id + */ + @ApiModelProperty(value = "id") + private Long id; + + /** + * 模板分组 + */ + @ApiModelProperty(value = "模板分组") + private String category; + + /** + * 内容 + */ + @ApiModelProperty(value = "内容") + private String content; + + /** + * 屏幕尺寸 + */ + @ApiModelProperty(value = "屏幕尺寸") + private String screenSize; + + /** + * 字体颜色 + */ + @ApiModelProperty(value = "字体颜色") + private String fontColor; + + /** + * 字体大小 + */ + @ApiModelProperty(value = "字体大小") + private String fontSize; + + /** + * 字体类型 + */ + @ApiModelProperty(value = "字体类型") + private String fontType; + + /** + * 字体间距 + */ + @ApiModelProperty(value = "字体间距") + private String fontSpacing; + + /** + * 滚动速度 + */ + @ApiModelProperty(value = "滚动速度") + private String rollingSpeed; + + /** + * 停留时间 + */ + @ApiModelProperty(value = "停留时间") + private String stopTime; + + /** + * 入屏方式 + */ + @ApiModelProperty(value = "入屏方式") + private String inScreenMode; + + /** + * 对齐样式 0-左对齐 2-居中 1-右对齐 + */ + @ApiModelProperty(value = "对齐样式 0-左对齐 2-居中 1-右对齐") + private String formatStyle; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 创建时间 + */ + @ApiModelProperty(hidden = true) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date createTime; + + /** + * 修改时间 + */ + @ApiModelProperty(hidden = true) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date updateTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getScreenSize() { + return screenSize; + } + + public void setScreenSize(String screenSize) { + this.screenSize = screenSize; + } + + public String getFontColor() { + return fontColor; + } + + public void setFontColor(String fontColor) { + this.fontColor = fontColor; + } + + public String getFontSize() { + return fontSize; + } + + public void setFontSize(String fontSize) { + this.fontSize = fontSize; + } + + public String getFontType() { + return fontType; + } + + public void setFontType(String fontType) { + this.fontType = fontType; + } + + public String getFontSpacing() { + return fontSpacing; + } + + public void setFontSpacing(String fontSpacing) { + this.fontSpacing = fontSpacing; + } + + public String getRollingSpeed() { + return rollingSpeed; + } + + public void setRollingSpeed(String rollingSpeed) { + this.rollingSpeed = rollingSpeed; + } + + public String getStopTime() { + return stopTime; + } + + public void setStopTime(String stopTime) { + this.stopTime = stopTime; + } + + public String getInScreenMode() { + return inScreenMode; + } + + public void setInScreenMode(String inScreenMode) { + this.inScreenMode = inScreenMode; + } + + public String getFormatStyle() { + return formatStyle; + } + + public void setFormatStyle(String formatStyle) { + this.formatStyle = formatStyle; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } +} diff --git a/zc-business/src/main/java/com/zc/business/domain/DcProcessConfig.java b/zc-business/src/main/java/com/zc/business/domain/DcProcessConfig.java index 954541a6..936948fa 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcProcessConfig.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcProcessConfig.java @@ -1,5 +1,7 @@ package com.zc.business.domain; +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; @@ -11,26 +13,30 @@ import com.ruoyi.common.core.domain.BaseEntity; * @author ruoyi * @date 2024-01-03 */ -public class DcProcessConfig extends BaseEntity +@ApiModel(value = "事件流程配置对象") +public class DcProcessConfig { - private static final long serialVersionUID = 1L; /** id */ private Long id; /** 事件类型 */ + @ApiModelProperty(value = "事件类型", required = true) private Integer eventType; /** 处置流程 */ + @ApiModelProperty(value = "处置流程") @Excel(name = "处置流程") private String nodeNode; /** 处置流程名称 */ + @ApiModelProperty(value = "处置流程名称") @Excel(name = "处置流程名称") private String processNode; - /** 格式:{流程节点: [常用语,常用语]} */ - @Excel(name = "格式:{流程节点: [常用语,常用语]}") + /** 常用语 格式:[常用语1,常用语2] */ + @ApiModelProperty(value = "常用语 格式:[常用语1,常用语2]") + @Excel(name = "常用语 格式:[常用语1,常用语2]") private String commonPhrases; public void setId(Long id) @@ -69,12 +75,12 @@ public class DcProcessConfig extends BaseEntity { return processNode; } - public void setCommonPhrases(String commonPhrases) + public void setCommonPhrases(String commonPhrases) { this.commonPhrases = commonPhrases; } - public String getCommonPhrases() + public String getCommonPhrases() { return commonPhrases; } diff --git a/zc-business/src/main/java/com/zc/business/domain/DcPublishInfo.java b/zc-business/src/main/java/com/zc/business/domain/DcPublishInfo.java new file mode 100644 index 00000000..48853218 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/domain/DcPublishInfo.java @@ -0,0 +1,213 @@ +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_publish_info + * + * @author ruoyi + * @date 2024-01-04 + */ +@ApiModel("信息发布记录对象") +public class DcPublishInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + @ApiModelProperty(value = "id") + private Long id; + + /** 所属机构 */ + @ApiModelProperty(value = "所属机构") + @Excel(name = "所属机构") + private Long groupId; + + /** 所属信息 */ + @ApiModelProperty(value = "所属信息") + @Excel(name = "所属信息") + private String subjectId; + + /** 标题 */ + @ApiModelProperty(value = "标题") + @Excel(name = "标题") + private String title; + + /** 发布渠道1-事件,2-情报板,3-广播 */ + @ApiModelProperty(value = "发布渠道1-事件,2-情报板,3-广播") + @Excel(name = "发布渠道1-事件,2-情报板,3-广播") + private Integer publishChannel; + + /** 审核状态0-未审核, 1-已审核, 2-驳回 */ + @ApiModelProperty(value = "审核状态0-未审核, 1-已审核, 2-驳回") + @Excel(name = "审核状态0-未审核, 1-已审核, 2-驳回") + private Integer isverify; + + /** 发布者 */ + @ApiModelProperty(value = "发布者") + @Excel(name = "发布者") + private String publisher; + + /** 审核者 */ + @ApiModelProperty(value = "审核者") + @Excel(name = "审核者") + private String auditor; + + /** 发布时间 */ + @ApiModelProperty(value = "发布时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date publishTime; + + /** 审核时间 */ + @ApiModelProperty(value = "审核时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date auditTime; + + /** 发布状态0失败, 1成功, 2草稿 */ + @ApiModelProperty(value = "发布状态0失败, 1成功, 2草稿") + @Excel(name = "发布状态0失败, 1成功, 2草稿") + private Integer publishStatus; + + /** 内容 json结构 */ + @ApiModelProperty(value = "内容 json结构") + @Excel(name = "内容 json结构") + private String content; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setGroupId(Long groupId) + { + this.groupId = groupId; + } + + public Long getGroupId() + { + return groupId; + } + public void setSubjectId(String subjectId) + { + this.subjectId = subjectId; + } + + public String getSubjectId() + { + return subjectId; + } + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + public void setPublishChannel(Integer publishChannel) + { + this.publishChannel = publishChannel; + } + + public Integer getPublishChannel() + { + return publishChannel; + } + public void setIsverify(Integer isverify) + { + this.isverify = isverify; + } + + public Integer getIsverify() + { + return isverify; + } + public void setPublisher(String publisher) + { + this.publisher = publisher; + } + + public String getPublisher() + { + return publisher; + } + public void setAuditor(String auditor) + { + this.auditor = auditor; + } + + public String getAuditor() + { + return auditor; + } + public void setPublishTime(Date publishTime) + { + this.publishTime = publishTime; + } + + public Date getPublishTime() + { + return publishTime; + } + public void setAuditTime(Date auditTime) + { + this.auditTime = auditTime; + } + + public Date getAuditTime() + { + return auditTime; + } + public void setPublishStatus(Integer publishStatus) + { + this.publishStatus = publishStatus; + } + + public Integer getPublishStatus() + { + return publishStatus; + } + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("groupId", getGroupId()) + .append("subjectId", getSubjectId()) + .append("title", getTitle()) + .append("publishChannel", getPublishChannel()) + .append("isverify", getIsverify()) + .append("publisher", getPublisher()) + .append("auditor", getAuditor()) + .append("publishTime", getPublishTime()) + .append("auditTime", getAuditTime()) + .append("publishStatus", getPublishStatus()) + .append("content", getContent()) + .append("remark", getRemark()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcInfoBoardTemplateMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcInfoBoardTemplateMapper.java new file mode 100644 index 00000000..25045191 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/mapper/DcInfoBoardTemplateMapper.java @@ -0,0 +1,52 @@ +package com.zc.business.mapper; + + +import com.zc.business.domain.DcInfoBoardTemplate; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 情报板模板Mapper接口 + * + */ +public interface DcInfoBoardTemplateMapper +{ + + public List selectTemplateList(@Param("category") String category, @Param("devicePixel") String devicePixel); + + /** + * 新增情报板模板 + * + * @param dcInfoBoardTemplate 情报板模板 + * @return 结果 + */ + public int insertSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate); + + /** + * 修改情报板模板 + * + * @param dcInfoBoardTemplate 情报板模板 + * @return 结果 + */ + public int updateSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate); + + /** + * 删除情报板模板 + * + * @param id 情报板模板ID + * @return 结果 + */ + public int deleteSdVmsTemplateById(Long id); + + /** + * 删除情报板模板 + * + * @param id 需要删除的数据ID + * @return 结果 + */ + public int deleteSdVmsTemplateByIds(Long id); + + public Long selectSdVmsTemplateId(); + +} diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcPublishInfoMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcPublishInfoMapper.java new file mode 100644 index 00000000..efee3e74 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/mapper/DcPublishInfoMapper.java @@ -0,0 +1,61 @@ +package com.zc.business.mapper; + +import java.util.List; +import com.zc.business.domain.DcPublishInfo; + +/** + * 信息发布记录Mapper接口 + * + * @author ruoyi + * @date 2024-01-04 + */ +public interface DcPublishInfoMapper +{ + /** + * 查询 信息发布记录 + * + * @param id 信息发布记录主键 + * @return 信息发布记录 + */ + public DcPublishInfo selectDcPublishInfoById(Long id); + + /** + * 查询 信息发布记录列表 + * + * @param dcPublishInfo 信息发布记录 + * @return 信息发布记录集合 + */ + List selectDcPublishInfoList(DcPublishInfo dcPublishInfo); + + /** + * 新增 信息发布记录 + * + * @param dcPublishInfo 信息发布记录 + * @return 结果 + */ + int insertDcPublishInfo(DcPublishInfo dcPublishInfo); + + /** + * 修改 信息发布记录 + * + * @param dcPublishInfo 信息发布记录 + * @return 结果 + */ + int updateDcPublishInfo(DcPublishInfo dcPublishInfo); + + /** + * 删除 信息发布记录 + * + * @param id 信息发布记录主键 + * @return 结果 + */ + int deleteDcPublishInfoById(Long id); + + /** + * 批量删除 信息发布记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteDcPublishInfoByIds(Long[] ids); +} diff --git a/zc-business/src/main/java/com/zc/business/service/IDcInfoBoardTemplateService.java b/zc-business/src/main/java/com/zc/business/service/IDcInfoBoardTemplateService.java new file mode 100644 index 00000000..5162c826 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/service/IDcInfoBoardTemplateService.java @@ -0,0 +1,42 @@ +package com.zc.business.service; + +import com.alibaba.fastjson.JSONObject; +import com.zc.business.domain.DcInfoBoardTemplate; + +import java.util.List; +import java.util.Map; + +/** + * 情报板模板Service接口 + * + * @author 刘方堃 + * @date 2021-11-30 + */ +public interface IDcInfoBoardTemplateService { + + Map> getAllVmsTemplate(String category, String devicePixel); + + /** + * 新增情报板模板 + * + * @param dcInfoBoardTemplate 情报板模板 + * @return 结果 + */ + int insertSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate); + + /** + * 修改情报板模板 + * + * @param dcInfoBoardTemplate 情报板模板 + * @return 结果 + */ + int updateSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate); + + /** + * 批量删除情报板模板 + * + * @param ids 需要删除的情报板模板ID + * @return 结果 + */ + int deleteSdVmsTemplateById(Long ids); +} diff --git a/zc-business/src/main/java/com/zc/business/service/IDcPublishInfoService.java b/zc-business/src/main/java/com/zc/business/service/IDcPublishInfoService.java new file mode 100644 index 00000000..4df719c2 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/service/IDcPublishInfoService.java @@ -0,0 +1,61 @@ +package com.zc.business.service; + +import java.util.List; +import com.zc.business.domain.DcPublishInfo; + +/** + * 信息发布记录Service接口 + * + * @author ruoyi + * @date 2024-01-04 + */ +public interface IDcPublishInfoService +{ + /** + * 查询 信息发布记录 + * + * @param id 信息发布记录主键 + * @return 信息发布记录 + */ + public DcPublishInfo selectDcPublishInfoById(Long id); + + /** + * 查询 信息发布记录列表 + * + * @param dcPublishInfo 信息发布记录 + * @return 信息发布记录集合 + */ + List selectDcPublishInfoList(DcPublishInfo dcPublishInfo); + + /** + * 新增 信息发布记录 + * + * @param dcPublishInfo 信息发布记录 + * @return 结果 + */ + int insertDcPublishInfo(DcPublishInfo dcPublishInfo); + + /** + * 修改 信息发布记录 + * + * @param dcPublishInfo 信息发布记录 + * @return 结果 + */ + int updateDcPublishInfo(DcPublishInfo dcPublishInfo); + + /** + * 批量删除 信息发布记录 + * + * @param ids 需要删除的 信息发布记录主键集合 + * @return 结果 + */ + int deleteDcPublishInfoByIds(Long[] ids); + + /** + * 删除 信息发布记录信息 + * + * @param id 信息发布记录主键 + * @return 结果 + */ + int deleteDcPublishInfoById(Long id); +} diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcInfoBoardTemplateServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcInfoBoardTemplateServiceImpl.java new file mode 100644 index 00000000..4ae3fa6e --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcInfoBoardTemplateServiceImpl.java @@ -0,0 +1,87 @@ +package com.zc.business.service.impl; + +import com.ruoyi.common.core.domain.entity.SysDictData; +import com.ruoyi.common.utils.DictUtils; +import com.zc.business.domain.DcInfoBoardTemplate; +import com.zc.business.mapper.DcInfoBoardTemplateMapper; +import com.zc.business.service.IDcInfoBoardTemplateService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 情报板模板Service业务层处理 + * + * @author + * @date + */ +@Service +public class DcInfoBoardTemplateServiceImpl implements IDcInfoBoardTemplateService { + + @Autowired + private DcInfoBoardTemplateMapper dcInfoBoardTemplateMapper; + + + @Override + public Map> getAllVmsTemplate(String category, String devicePixel) { + Map> map = new HashMap<>(); + + List categorys = DictUtils.getDictCache("iot_template_category"); + List iotBoardTemplates = dcInfoBoardTemplateMapper.selectTemplateList(null, devicePixel); + List template = new ArrayList<>(); + if (categorys != null) { + for (int i = 0;i < categorys.size();i++) { + template = new ArrayList<>(); + String dictValue = categorys.get(i).getDictValue(); + for (int j = 0; j < iotBoardTemplates.size(); j++) { + DcInfoBoardTemplate iotBoardTemplate = iotBoardTemplates.get(j); + if (!dictValue.equals(iotBoardTemplate.getCategory())) { + continue; + } + template.add(iotBoardTemplate); + } + map.put(dictValue, template); + } + } + return map; + } + + /** + * 新增情报板模板 + * + * @param dcInfoBoardTemplate 情报板模板 + * @return 结果 + */ + @Override + public int insertSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate) { + + return dcInfoBoardTemplateMapper.insertSdVmsTemplate(dcInfoBoardTemplate); + } + + /** + * 修改情报板模板 + * + * @param dcInfoBoardTemplate 情报板模板 + * @return 结果 + */ + @Override + public int updateSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate) { + return dcInfoBoardTemplateMapper.updateSdVmsTemplate(dcInfoBoardTemplate); + } + + /** + * 删除情报板模板 + * + * @param id 需要删除的情报板模板ID + * @return 结果 + */ + @Override + public int deleteSdVmsTemplateById(Long id) { + return dcInfoBoardTemplateMapper.deleteSdVmsTemplateByIds(id); + } + +} diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishInfoServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishInfoServiceImpl.java new file mode 100644 index 00000000..3ca25789 --- /dev/null +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishInfoServiceImpl.java @@ -0,0 +1,96 @@ +package com.zc.business.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zc.business.mapper.DcPublishInfoMapper; +import com.zc.business.domain.DcPublishInfo; +import com.zc.business.service.IDcPublishInfoService; + +/** + * 信息发布记录Service业务层处理 + * + * @author ruoyi + * @date 2024-01-04 + */ +@Service +public class DcPublishInfoServiceImpl implements IDcPublishInfoService +{ + @Autowired + private DcPublishInfoMapper dcPublishInfoMapper; + + /** + * 查询 信息发布记录 + * + * @param id 信息发布记录主键 + * @return 信息发布记录 + */ + @Override + public DcPublishInfo selectDcPublishInfoById(Long id) + { + return dcPublishInfoMapper.selectDcPublishInfoById(id); + } + + /** + * 查询 信息发布记录列表 + * + * @param dcPublishInfo 信息发布记录 + * @return 信息发布记录 + */ + @Override + public List selectDcPublishInfoList(DcPublishInfo dcPublishInfo) + { + return dcPublishInfoMapper.selectDcPublishInfoList(dcPublishInfo); + } + + /** + * 新增 信息发布记录 + * + * @param dcPublishInfo 信息发布记录 + * @return 结果 + */ + @Override + public int insertDcPublishInfo(DcPublishInfo dcPublishInfo) + { + dcPublishInfo.setCreateTime(DateUtils.getNowDate()); + return dcPublishInfoMapper.insertDcPublishInfo(dcPublishInfo); + } + + /** + * 修改 信息发布记录 + * + * @param dcPublishInfo 信息发布记录 + * @return 结果 + */ + @Override + public int updateDcPublishInfo(DcPublishInfo dcPublishInfo) + { + dcPublishInfo.setUpdateTime(DateUtils.getNowDate()); + return dcPublishInfoMapper.updateDcPublishInfo(dcPublishInfo); + } + + /** + * 批量删除 信息发布记录 + * + * @param ids 需要删除的 信息发布记录主键 + * @return 结果 + */ + @Override + public int deleteDcPublishInfoByIds(Long[] ids) + { + return dcPublishInfoMapper.deleteDcPublishInfoByIds(ids); + } + + /** + * 删除 信息发布记录信息 + * + * @param id 信息发布记录主键 + * @return 结果 + */ + @Override + public int deleteDcPublishInfoById(Long id) + { + return dcPublishInfoMapper.deleteDcPublishInfoById(id); + } +} diff --git a/zc-business/src/main/resources/mapper/business/DcInfoBoardTemplateMapper.xml b/zc-business/src/main/resources/mapper/business/DcInfoBoardTemplateMapper.xml new file mode 100644 index 00000000..6c2b66e7 --- /dev/null +++ b/zc-business/src/main/resources/mapper/business/DcInfoBoardTemplateMapper.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, category, content, screen_size, font_color, font_size, font_type, font_spacing, rolling_speed, stop_time, + in_screen_mode, format_style, remark, create_time, update_time + from dc_info_board_template + + + + + + + + + + insert into dc_info_board_template + + category, + content, + screen_size, + font_color, + font_size, + font_type, + font_spacing, + rolling_speed, + stop_time, + in_screen_mode, + format_style, + remark, + create_time + + + #{category}, + #{content}, + #{screenSize}, + #{fontColor}, + #{fontSize}, + #{fontType}, + #{fontSpacing}, + #{rollingSpeed}, + #{stopTime}, + #{inScreenMode}, + #{formatStyle}, + #{remark}, + now() + + + + + update dc_info_board_template + + category = #{category}, + content = #{content}, + screen_size = #{screenSize}, + font_color = #{fontColor}, + font_size = #{fontSize}, + font_type = #{fontType}, + font_spacing = #{fontSpacing}, + rolling_speed = #{rollingSpeed}, + stop_time = #{stopTime}, + in_screen_mode = #{inScreenMode}, + format_style = #{formatStyle}, + remark = #{remark}, + update_time = now() + + where id = #{id} + + + + delete from dc_info_board_template where id = #{id} + + + + delete from dc_info_board_template where id = #{id} + + + + + diff --git a/zc-business/src/main/resources/mapper/business/DcPublishInfoMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishInfoMapper.xml new file mode 100644 index 00000000..344fcf2c --- /dev/null +++ b/zc-business/src/main/resources/mapper/business/DcPublishInfoMapper.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, group_id, subject_id, title, publish_channel, isverify, publisher, auditor, publish_time, audit_time, publish_status, content, remark, create_time, update_time from dc_publish_info + + + + + + + + insert into dc_publish_info + + id, + group_id, + subject_id, + title, + publish_channel, + isverify, + publisher, + auditor, + publish_time, + audit_time, + publish_status, + content, + remark, + create_time, + update_time, + + + #{id}, + #{groupId}, + #{subjectId}, + #{title}, + #{publishChannel}, + #{isverify}, + #{publisher}, + #{auditor}, + #{publishTime}, + #{auditTime}, + #{publishStatus}, + #{content}, + #{remark}, + #{createTime}, + #{updateTime}, + + + + + update dc_publish_info + + group_id = #{groupId}, + subject_id = #{subjectId}, + title = #{title}, + publish_channel = #{publishChannel}, + isverify = #{isverify}, + publisher = #{publisher}, + auditor = #{auditor}, + publish_time = #{publishTime}, + audit_time = #{auditTime}, + publish_status = #{publishStatus}, + content = #{content}, + remark = #{remark}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from dc_publish_info where id = #{id} + + + + delete from dc_publish_info where id in + + #{id} + + + \ No newline at end of file