From ae5d5108c1004f8cabc170984daf6d444d855287 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Sat, 22 Apr 2023 10:05:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E8=BD=AC=E8=AF=AD=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant-design-vue-jeecg/package.json | 13 +- ant-design-vue-jeecg/src/App.vue | 173 +++++++++-- .../src/views/message/ZySpeechMessageList.vue | 272 ++++++++++++++++ .../message/modules/ZySpeechMessageForm.vue | 114 +++++++ .../message/modules/ZySpeechMessageModal.vue | 60 ++++ .../ZySpeechMessageModal__Style#Drawer.vue | 84 +++++ .../src/views/speak/Speak-tts.vue | 32 ++ .../src/views/system/UserAnnouncementList.vue | 293 ++++++++++-------- .../controller/ZySpeechMessageController.java | 156 ++++++++++ .../message/entity/ZySpeechMessage.java | 92 ++++++ .../message/mapper/ZySpeechMessageMapper.java | 15 + .../service/IZySpeechMessageService.java | 15 + .../impl/ZySpeechMessageServiceImpl.java | 18 ++ 13 files changed, 1179 insertions(+), 158 deletions(-) create mode 100644 ant-design-vue-jeecg/src/views/message/ZySpeechMessageList.vue create mode 100644 ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageForm.vue create mode 100644 ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageModal.vue create mode 100644 ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageModal__Style#Drawer.vue create mode 100644 ant-design-vue-jeecg/src/views/speak/Speak-tts.vue create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/controller/ZySpeechMessageController.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/entity/ZySpeechMessage.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/ZySpeechMessageMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/service/IZySpeechMessageService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/service/impl/ZySpeechMessageServiceImpl.java diff --git a/ant-design-vue-jeecg/package.json b/ant-design-vue-jeecg/package.json index 730bfbbc..60a0548b 100644 --- a/ant-design-vue-jeecg/package.json +++ b/ant-design-vue-jeecg/package.json @@ -28,14 +28,17 @@ "echarts": "^5.3.0", "element-ui": "^2.15.6", "enquire.js": "^2.1.6", + "html2canvas": "~1.0.0-rc.4", "jquery": "^3.6.0", "js-cookie": "^2.2.0", + "jspdf": "^2.5.1", "lodash.get": "^4.4.2", "lodash.pick": "^4.4.0", "md5": "^2.2.1", "nprogress": "^0.2.0", "qiankun": "^2.5.1", "qs": "^6.10.3", + "speak-tts": "^2.0.8", "tinymce": "5.4.1", "viser-vue": "^2.4.8", "vue": "^2.6.10", @@ -53,9 +56,7 @@ "vxe-table": "2.9.13", "vxe-table-plugin-antd": "1.8.10", "xe-utils": "2.4.8", - "xss": "^1.0.13", - "html2canvas": "~1.0.0-rc.4", - "jspdf": "^2.5.1" + "xss": "^1.0.13" }, "devDependencies": { "@babel/polyfill": "^7.2.5", @@ -68,11 +69,11 @@ "eslint": "^5.16.0", "eslint-plugin-vue": "^5.1.0", "html-webpack-plugin": "^4.2.0", + "html2canvas": "~1.0.0-rc.4", + "jspdf": "^2.5.1", "less": "^3.9.0", "less-loader": "^4.1.0", - "vue-template-compiler": "^2.6.10", - "html2canvas": "~1.0.0-rc.4", - "jspdf": "^2.5.1" + "vue-template-compiler": "^2.6.10" }, "eslintConfig": { "root": true, diff --git a/ant-design-vue-jeecg/src/App.vue b/ant-design-vue-jeecg/src/App.vue index 9f4f7a8f..b0122c15 100644 --- a/ant-design-vue-jeecg/src/App.vue +++ b/ant-design-vue-jeecg/src/App.vue @@ -6,39 +6,162 @@ \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/message/ZySpeechMessageList.vue b/ant-design-vue-jeecg/src/views/message/ZySpeechMessageList.vue new file mode 100644 index 00000000..24f0a725 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/message/ZySpeechMessageList.vue @@ -0,0 +1,272 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageForm.vue b/ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageForm.vue new file mode 100644 index 00000000..7572a4e7 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageForm.vue @@ -0,0 +1,114 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageModal.vue b/ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageModal.vue new file mode 100644 index 00000000..c5dea8b9 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageModal__Style#Drawer.vue new file mode 100644 index 00000000..da843833 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/message/modules/ZySpeechMessageModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/speak/Speak-tts.vue b/ant-design-vue-jeecg/src/views/speak/Speak-tts.vue new file mode 100644 index 00000000..ab19d2d8 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/speak/Speak-tts.vue @@ -0,0 +1,32 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue b/ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue index 749e4fe3..2027d6ee 100644 --- a/ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue +++ b/ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue @@ -16,7 +16,7 @@ - + 查询 重置 @@ -51,142 +51,181 @@ \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/controller/ZySpeechMessageController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/controller/ZySpeechMessageController.java new file mode 100644 index 00000000..d17a8d94 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/controller/ZySpeechMessageController.java @@ -0,0 +1,156 @@ +package org.jeecg.modules.message.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.message.entity.ZySpeechMessage; +import org.jeecg.modules.message.service.IZySpeechMessageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + +/** + * @Description: 生产消息播报 + * @Author: jeecg-boot + * @Date: 2023-04-21 + * @Version: V1.0 + */ +@Api(tags = "生产消息播报") +@RestController +@RequestMapping("/org.jeecg.modules.message/zySpeechMessage") +@Slf4j +public class ZySpeechMessageController extends JeecgController { + @Autowired + private IZySpeechMessageService zySpeechMessageService; + + /** + * 分页列表查询 + * + * @param zySpeechMessage + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "生产消息播报-分页列表查询") + @ApiOperation(value = "生产消息播报-分页列表查询", notes = "生产消息播报-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(ZySpeechMessage zySpeechMessage, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zySpeechMessage, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = zySpeechMessageService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param zySpeechMessage + * @return + */ + @AutoLog(value = "生产消息播报-添加") + @ApiOperation(value = "生产消息播报-添加", notes = "生产消息播报-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody ZySpeechMessage zySpeechMessage) { + zySpeechMessageService.save(zySpeechMessage); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param zySpeechMessage + * @return + */ + @AutoLog(value = "生产消息播报-编辑") + @ApiOperation(value = "生产消息播报-编辑", notes = "生产消息播报-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody ZySpeechMessage zySpeechMessage) { + zySpeechMessageService.updateById(zySpeechMessage); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "生产消息播报-通过id删除") + @ApiOperation(value = "生产消息播报-通过id删除", notes = "生产消息播报-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + zySpeechMessageService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "生产消息播报-批量删除") + @ApiOperation(value = "生产消息播报-批量删除", notes = "生产消息播报-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + this.zySpeechMessageService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "生产消息播报-通过id查询") + @ApiOperation(value = "生产消息播报-通过id查询", notes = "生产消息播报-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + ZySpeechMessage zySpeechMessage = zySpeechMessageService.getById(id); + if (zySpeechMessage == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(zySpeechMessage); + } + + /** + * 导出excel + * + * @param request + * @param zySpeechMessage + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ZySpeechMessage zySpeechMessage) { + return super.exportXls(request, zySpeechMessage, ZySpeechMessage.class, "生产消息播报"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ZySpeechMessage.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/entity/ZySpeechMessage.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/entity/ZySpeechMessage.java new file mode 100644 index 00000000..1ac07612 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/entity/ZySpeechMessage.java @@ -0,0 +1,92 @@ +package org.jeecg.modules.message.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 生产消息播报 + * @Author: jeecg-boot + * @Date: 2023-04-21 + * @Version: V1.0 + */ +@Data +@TableName("zy_speech_message") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "zy_speech_message对象", description = "生产消息播报") +public class ZySpeechMessage implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /** + * 创建人 + */ + @ApiModelProperty(value = "创建人") + private String createBy; + /** + * 创建日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private String updateBy; + /** + * 更新日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /** + * 订单商品id + */ + @Excel(name = "订单商品id", width = 15) + @ApiModelProperty(value = "订单商品id") + private String ordergoodsId; + /** + * 工单id + */ + @Excel(name = "工单id", width = 15) + @ApiModelProperty(value = "工单id") + private String workorderId; + /** + * 生产计划工序id + */ + @Excel(name = "生产计划工序id", width = 15) + @ApiModelProperty(value = "生产计划工序id") + private String zyplanprocessId; + /** + * 播报状态 + */ + @Excel(name = "播报状态", width = 15) + @ApiModelProperty(value = "是否加急") + @Dict(dicCode = "sfjj") + private String status; + + @Excel(name = "消息", width = 15) + @ApiModelProperty(value = "消息") + private String message; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/ZySpeechMessageMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/ZySpeechMessageMapper.java new file mode 100644 index 00000000..fbd00072 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/mapper/ZySpeechMessageMapper.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.message.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.message.entity.ZySpeechMessage; + +/** + * @Description: 生产消息播报 + * @Author: jeecg-boot + * @Date: 2023-04-21 + * @Version: V1.0 + */ +public interface ZySpeechMessageMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/service/IZySpeechMessageService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/service/IZySpeechMessageService.java new file mode 100644 index 00000000..465be749 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/service/IZySpeechMessageService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.message.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.message.entity.ZySpeechMessage; + +/** + * @Description: 生产消息播报 + * @Author: jeecg-boot + * @Date: 2023-04-21 + * @Version: V1.0 + */ +public interface IZySpeechMessageService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/service/impl/ZySpeechMessageServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/service/impl/ZySpeechMessageServiceImpl.java new file mode 100644 index 00000000..e6557ddc --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/message/service/impl/ZySpeechMessageServiceImpl.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.message.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.message.entity.ZySpeechMessage; +import org.jeecg.modules.message.mapper.ZySpeechMessageMapper; +import org.jeecg.modules.message.service.IZySpeechMessageService; +import org.springframework.stereotype.Service; + +/** + * @Description: 生产消息播报 + * @Author: jeecg-boot + * @Date: 2023-04-21 + * @Version: V1.0 + */ +@Service +public class ZySpeechMessageServiceImpl extends ServiceImpl implements IZySpeechMessageService { + +}