diff --git a/ruoyi-admin/src/main/resources/templates/wanli/deviceinfo/add.html b/ruoyi-admin/src/main/resources/templates/wanli/deviceinfo/add.html new file mode 100644 index 00000000..38486802 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/wanli/deviceinfo/add.html @@ -0,0 +1,116 @@ + + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/wanli/deviceinfo/deviceinfo.html b/ruoyi-admin/src/main/resources/templates/wanli/deviceinfo/deviceinfo.html new file mode 100644 index 00000000..4289c4d5 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/wanli/deviceinfo/deviceinfo.html @@ -0,0 +1,193 @@ + + + + + + + +
+
+
+
+
+
    +
  • + + +
  • + + + + + + + + + + + + + + + + + + + +
  • + + +
  • + + + + + + + + +
  • + + + - + +
  • + + + + + + + + + + + + +
  • +  搜索 +  重置 +
  • +
+
+
+
+ +
+ + 添加 + + + + + + + + + 导出 + +
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/wanli/deviceinfo/edit.html b/ruoyi-admin/src/main/resources/templates/wanli/deviceinfo/edit.html new file mode 100644 index 00000000..eee30884 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/wanli/deviceinfo/edit.html @@ -0,0 +1,121 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + + +
+ +
+ + +
+
+ + + + + + + + + + + + +
+
+ + + + + + \ No newline at end of file diff --git a/代码生成/ruoyi.zip b/代码生成/ruoyi.zip new file mode 100644 index 00000000..49925a83 Binary files /dev/null and b/代码生成/ruoyi.zip differ diff --git a/代码生成/ruoyi/main/java/com/ruoyi/wanli/controller/RealWorkdataController.java b/代码生成/ruoyi/main/java/com/ruoyi/wanli/controller/RealWorkdataController.java new file mode 100644 index 00000000..765c8401 --- /dev/null +++ b/代码生成/ruoyi/main/java/com/ruoyi/wanli/controller/RealWorkdataController.java @@ -0,0 +1,126 @@ +package com.ruoyi.wanli.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.wanli.domain.RealWorkdata; +import com.ruoyi.wanli.service.IRealWorkdataService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 生产数据记录Controller + * + * @author Caesar + * @date 2025-07-11 + */ +@Controller +@RequestMapping("/wanli/realworkdata") +public class RealWorkdataController extends BaseController +{ + private String prefix = "wanli/realworkdata"; + + @Autowired + private IRealWorkdataService realWorkdataService; + + @RequiresPermissions("wanli:realworkdata:view") + @GetMapping() + public String realworkdata() + { + return prefix + "/realworkdata"; + } + + /** + * 查询生产数据记录列表 + */ + @RequiresPermissions("wanli:realworkdata:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(RealWorkdata realWorkdata) + { + startPage(); + List list = realWorkdataService.selectRealWorkdataList(realWorkdata); + return getDataTable(list); + } + + /** + * 导出生产数据记录列表 + */ + @RequiresPermissions("wanli:realworkdata:export") + @Log(title = "生产数据记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(RealWorkdata realWorkdata) + { + List list = realWorkdataService.selectRealWorkdataList(realWorkdata); + ExcelUtil util = new ExcelUtil(RealWorkdata.class); + return util.exportExcel(list, "realworkdata"); + } + + /** + * 新增生产数据记录 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存生产数据记录 + */ + @RequiresPermissions("wanli:realworkdata:add") + @Log(title = "生产数据记录", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(RealWorkdata realWorkdata) + { + return toAjax(realWorkdataService.insertRealWorkdata(realWorkdata)); + } + + /** + * 修改生产数据记录 + */ + @GetMapping("/edit/{combineid}") + public String edit(@PathVariable("combineid") String combineid, ModelMap mmap) + { + RealWorkdata realWorkdata = realWorkdataService.selectRealWorkdataById(combineid); + mmap.put("realWorkdata", realWorkdata); + return prefix + "/edit"; + } + + /** + * 修改保存生产数据记录 + */ + @RequiresPermissions("wanli:realworkdata:edit") + @Log(title = "生产数据记录", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(RealWorkdata realWorkdata) + { + return toAjax(realWorkdataService.updateRealWorkdata(realWorkdata)); + } + + /** + * 删除生产数据记录 + */ + @RequiresPermissions("wanli:realworkdata:remove") + @Log(title = "生产数据记录", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(realWorkdataService.deleteRealWorkdataByIds(ids)); + } +} diff --git a/代码生成/ruoyi/main/java/com/ruoyi/wanli/domain/RealWorkdata.java b/代码生成/ruoyi/main/java/com/ruoyi/wanli/domain/RealWorkdata.java new file mode 100644 index 00000000..34668101 --- /dev/null +++ b/代码生成/ruoyi/main/java/com/ruoyi/wanli/domain/RealWorkdata.java @@ -0,0 +1,109 @@ +package com.ruoyi.wanli.domain; + +import java.util.Date; +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; + +/** + * 生产数据记录对象 real_workdata + * + * @author Caesar + * @date 2025-07-11 + */ +public class RealWorkdata extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 传感器编号 */ + @Excel(name = "传感器编号") + private String combineid; + + /** 采集时间 */ + @Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date tm; + + /** 传感器数据 */ + @Excel(name = "传感器数据") + private String data; + + /** 上报方式 */ + @Excel(name = "上报方式") + private Long reportmode; + + /** 记录时间 */ + @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date edittime; + + /** 是否可用 */ + @Excel(name = "是否可用") + private Long deleteflag; + + public void setCombineid(String combineid) + { + this.combineid = combineid; + } + + public String getCombineid() + { + return combineid; + } + public void setTm(Date tm) + { + this.tm = tm; + } + + public Date getTm() + { + return tm; + } + public void setData(String data) + { + this.data = data; + } + + public String getData() + { + return data; + } + public void setReportmode(Long reportmode) + { + this.reportmode = reportmode; + } + + public Long getReportmode() + { + return reportmode; + } + public void setEdittime(Date edittime) + { + this.edittime = edittime; + } + + public Date getEdittime() + { + return edittime; + } + public void setDeleteflag(Long deleteflag) + { + this.deleteflag = deleteflag; + } + + public Long getDeleteflag() + { + return deleteflag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("combineid", getCombineid()) + .append("tm", getTm()) + .append("data", getData()) + .append("reportmode", getReportmode()) + .append("edittime", getEdittime()) + .append("deleteflag", getDeleteflag()) + .toString(); + } +} diff --git a/代码生成/ruoyi/main/java/com/ruoyi/wanli/mapper/RealWorkdataMapper.java b/代码生成/ruoyi/main/java/com/ruoyi/wanli/mapper/RealWorkdataMapper.java new file mode 100644 index 00000000..89d00b8d --- /dev/null +++ b/代码生成/ruoyi/main/java/com/ruoyi/wanli/mapper/RealWorkdataMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.wanli.mapper; + +import java.util.List; +import com.ruoyi.wanli.domain.RealWorkdata; + +/** + * 生产数据记录Mapper接口 + * + * @author Caesar + * @date 2025-07-11 + */ +public interface RealWorkdataMapper +{ + /** + * 查询生产数据记录 + * + * @param combineid 生产数据记录ID + * @return 生产数据记录 + */ + public RealWorkdata selectRealWorkdataById(String combineid); + + /** + * 查询生产数据记录列表 + * + * @param realWorkdata 生产数据记录 + * @return 生产数据记录集合 + */ + public List selectRealWorkdataList(RealWorkdata realWorkdata); + + /** + * 新增生产数据记录 + * + * @param realWorkdata 生产数据记录 + * @return 结果 + */ + public int insertRealWorkdata(RealWorkdata realWorkdata); + + /** + * 修改生产数据记录 + * + * @param realWorkdata 生产数据记录 + * @return 结果 + */ + public int updateRealWorkdata(RealWorkdata realWorkdata); + + /** + * 删除生产数据记录 + * + * @param combineid 生产数据记录ID + * @return 结果 + */ + public int deleteRealWorkdataById(String combineid); + + /** + * 批量删除生产数据记录 + * + * @param combineids 需要删除的数据ID + * @return 结果 + */ + public int deleteRealWorkdataByIds(String[] combineids); +} diff --git a/代码生成/ruoyi/main/java/com/ruoyi/wanli/service/IRealWorkdataService.java b/代码生成/ruoyi/main/java/com/ruoyi/wanli/service/IRealWorkdataService.java new file mode 100644 index 00000000..683997d9 --- /dev/null +++ b/代码生成/ruoyi/main/java/com/ruoyi/wanli/service/IRealWorkdataService.java @@ -0,0 +1,61 @@ +package com.ruoyi.wanli.service; + +import java.util.List; +import com.ruoyi.wanli.domain.RealWorkdata; + +/** + * 生产数据记录Service接口 + * + * @author Caesar + * @date 2025-07-11 + */ +public interface IRealWorkdataService +{ + /** + * 查询生产数据记录 + * + * @param combineid 生产数据记录ID + * @return 生产数据记录 + */ + public RealWorkdata selectRealWorkdataById(String combineid); + + /** + * 查询生产数据记录列表 + * + * @param realWorkdata 生产数据记录 + * @return 生产数据记录集合 + */ + public List selectRealWorkdataList(RealWorkdata realWorkdata); + + /** + * 新增生产数据记录 + * + * @param realWorkdata 生产数据记录 + * @return 结果 + */ + public int insertRealWorkdata(RealWorkdata realWorkdata); + + /** + * 修改生产数据记录 + * + * @param realWorkdata 生产数据记录 + * @return 结果 + */ + public int updateRealWorkdata(RealWorkdata realWorkdata); + + /** + * 批量删除生产数据记录 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteRealWorkdataByIds(String ids); + + /** + * 删除生产数据记录信息 + * + * @param combineid 生产数据记录ID + * @return 结果 + */ + public int deleteRealWorkdataById(String combineid); +} diff --git a/代码生成/ruoyi/main/java/com/ruoyi/wanli/service/impl/RealWorkdataServiceImpl.java b/代码生成/ruoyi/main/java/com/ruoyi/wanli/service/impl/RealWorkdataServiceImpl.java new file mode 100644 index 00000000..daa038a0 --- /dev/null +++ b/代码生成/ruoyi/main/java/com/ruoyi/wanli/service/impl/RealWorkdataServiceImpl.java @@ -0,0 +1,94 @@ +package com.ruoyi.wanli.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.wanli.mapper.RealWorkdataMapper; +import com.ruoyi.wanli.domain.RealWorkdata; +import com.ruoyi.wanli.service.IRealWorkdataService; +import com.ruoyi.common.core.text.Convert; + +/** + * 生产数据记录Service业务层处理 + * + * @author Caesar + * @date 2025-07-11 + */ +@Service +public class RealWorkdataServiceImpl implements IRealWorkdataService +{ + @Autowired + private RealWorkdataMapper realWorkdataMapper; + + /** + * 查询生产数据记录 + * + * @param combineid 生产数据记录ID + * @return 生产数据记录 + */ + @Override + public RealWorkdata selectRealWorkdataById(String combineid) + { + return realWorkdataMapper.selectRealWorkdataById(combineid); + } + + /** + * 查询生产数据记录列表 + * + * @param realWorkdata 生产数据记录 + * @return 生产数据记录 + */ + @Override + public List selectRealWorkdataList(RealWorkdata realWorkdata) + { + return realWorkdataMapper.selectRealWorkdataList(realWorkdata); + } + + /** + * 新增生产数据记录 + * + * @param realWorkdata 生产数据记录 + * @return 结果 + */ + @Override + public int insertRealWorkdata(RealWorkdata realWorkdata) + { + return realWorkdataMapper.insertRealWorkdata(realWorkdata); + } + + /** + * 修改生产数据记录 + * + * @param realWorkdata 生产数据记录 + * @return 结果 + */ + @Override + public int updateRealWorkdata(RealWorkdata realWorkdata) + { + return realWorkdataMapper.updateRealWorkdata(realWorkdata); + } + + /** + * 删除生产数据记录对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteRealWorkdataByIds(String ids) + { + return realWorkdataMapper.deleteRealWorkdataByIds(Convert.toStrArray(ids)); + } + + /** + * 删除生产数据记录信息 + * + * @param combineid 生产数据记录ID + * @return 结果 + */ + @Override + public int deleteRealWorkdataById(String combineid) + { + return realWorkdataMapper.deleteRealWorkdataById(combineid); + } +} diff --git a/代码生成/ruoyi/main/resources/mapper/wanli/RealWorkdataMapper.xml b/代码生成/ruoyi/main/resources/mapper/wanli/RealWorkdataMapper.xml new file mode 100644 index 00000000..60db30aa --- /dev/null +++ b/代码生成/ruoyi/main/resources/mapper/wanli/RealWorkdataMapper.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + select combineid, tm, data, reportmode, edittime, deleteflag from real_workdata + + + + + + + + insert into real_workdata + + combineid, + tm, + data, + reportmode, + edittime, + deleteflag, + + + #{combineid}, + #{tm}, + #{data}, + #{reportmode}, + #{edittime}, + #{deleteflag}, + + + + + update real_workdata + + tm = #{tm}, + data = #{data}, + reportmode = #{reportmode}, + edittime = #{edittime}, + deleteflag = #{deleteflag}, + + where combineid = #{combineid} + + + + delete from real_workdata where combineid = #{combineid} + + + + delete from real_workdata where combineid in + + #{combineid} + + + + diff --git a/代码生成/ruoyi/main/resources/templates/wanli/realworkdata/add.html b/代码生成/ruoyi/main/resources/templates/wanli/realworkdata/add.html new file mode 100644 index 00000000..95215dea --- /dev/null +++ b/代码生成/ruoyi/main/resources/templates/wanli/realworkdata/add.html @@ -0,0 +1,25 @@ + + + + + + +
+
+
+
+ + + + \ No newline at end of file diff --git a/代码生成/ruoyi/main/resources/templates/wanli/realworkdata/edit.html b/代码生成/ruoyi/main/resources/templates/wanli/realworkdata/edit.html new file mode 100644 index 00000000..f6efe2b6 --- /dev/null +++ b/代码生成/ruoyi/main/resources/templates/wanli/realworkdata/edit.html @@ -0,0 +1,26 @@ + + + + + + +
+
+ +
+
+ + + + \ No newline at end of file diff --git a/代码生成/ruoyi/main/resources/templates/wanli/realworkdata/realworkdata.html b/代码生成/ruoyi/main/resources/templates/wanli/realworkdata/realworkdata.html new file mode 100644 index 00000000..053e3b79 --- /dev/null +++ b/代码生成/ruoyi/main/resources/templates/wanli/realworkdata/realworkdata.html @@ -0,0 +1,129 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + + - + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/代码生成/ruoyi/realworkdataMenu.sql b/代码生成/ruoyi/realworkdataMenu.sql new file mode 100644 index 00000000..b4d322b4 --- /dev/null +++ b/代码生成/ruoyi/realworkdataMenu.sql @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('生产数据记录', '2058', '1', '/wanli/realworkdata', 'C', '0', 'wanli:realworkdata:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '生产数据记录菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('生产数据记录查询', @parentId, '1', '#', 'F', '0', 'wanli:realworkdata:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); + +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('生产数据记录新增', @parentId, '2', '#', 'F', '0', 'wanli:realworkdata:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); + +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('生产数据记录修改', @parentId, '3', '#', 'F', '0', 'wanli:realworkdata:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); + +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('生产数据记录删除', @parentId, '4', '#', 'F', '0', 'wanli:realworkdata:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); + +insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('生产数据记录导出', @parentId, '5', '#', 'F', '0', 'wanli:realworkdata:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');