From 2f258ad8b9b5307bd03fbcd2482c9e42a910825f Mon Sep 17 00:00:00 2001 From: 15066119699 Date: Fri, 7 Mar 2025 15:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Eled=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=B1=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/AppLedConfigController.java | 60 ++--- .../com/ruoyi/app/domain/AppLedConfig.java | 249 +++++++++++++++++- .../ruoyi/app/mapper/AppLedConfigMapper.java | 57 ++-- .../app/service/IAppLedConfigService.java | 57 ++-- .../service/impl/AppLedConfigServiceImpl.java | 69 ++--- .../mapper/app/AppLedConfigMapper.xml | 124 +++++++-- 6 files changed, 460 insertions(+), 156 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/AppLedConfigController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/AppLedConfigController.java index e94d4fb0..5b6fb915 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/AppLedConfigController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/AppLedConfigController.java @@ -2,11 +2,6 @@ package com.ruoyi.web.controller.app; import java.util.List; import javax.servlet.http.HttpServletResponse; - -import com.ruoyi.app.domain.AppGoodsPair; -import com.ruoyi.app.domain.AppLedConfig; -import com.ruoyi.app.service.IAppLedConfigService; -import com.ruoyi.web.controller.section.EnhanceDataList; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -21,28 +16,29 @@ 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.ruoyi.app.domain.AppLedConfig; +import com.ruoyi.app.service.IAppLedConfigService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** - * 【请填写功能名称】Controller + * led显示屏设置Controller * * @author ruoyi - * @date 2025-01-15 + * @date 2025-03-07 */ @RestController -@RequestMapping("/app/led") +@RequestMapping("/app/ledconfig") public class AppLedConfigController extends BaseController { @Autowired private IAppLedConfigService appLedConfigService; /** - * 查询【请填写功能名称】列表 + * 查询led显示屏设置列表 */ - @PreAuthorize("@ss.hasPermi('system:config:list')") + @PreAuthorize("@ss.hasPermi('app:ledconfig:list')") @GetMapping("/list") - @EnhanceDataList(entityType = AppLedConfig.class) public TableDataInfo list(AppLedConfig appLedConfig) { startPage(); @@ -51,33 +47,33 @@ public class AppLedConfigController extends BaseController } /** - * 导出【请填写功能名称】列表 + * 导出led显示屏设置列表 */ - @PreAuthorize("@ss.hasPermi('system:config:export')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('app:ledconfig:export')") + @Log(title = "led显示屏设置", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, AppLedConfig appLedConfig) { List list = appLedConfigService.selectAppLedConfigList(appLedConfig); ExcelUtil util = new ExcelUtil(AppLedConfig.class); - util.exportExcel(response, list, "【请填写功能名称】数据"); + util.exportExcel(response, list, "led显示屏设置数据"); } /** - * 获取【请填写功能名称】详细信息 + * 获取led显示屏设置详细信息 */ - @PreAuthorize("@ss.hasPermi('system:config:query')") - @GetMapping(value = "/{ledId}") - public AjaxResult getInfo(@PathVariable("ledId") String ledId) + @PreAuthorize("@ss.hasPermi('app:ledconfig:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) { - return success(appLedConfigService.selectAppLedConfigByLedId(ledId)); + return success(appLedConfigService.selectAppLedConfigById(id)); } /** - * 新增【请填写功能名称】 + * 新增led显示屏设置 */ - @PreAuthorize("@ss.hasPermi('system:config:add')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PreAuthorize("@ss.hasPermi('app:ledconfig:add')") + @Log(title = "led显示屏设置", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody AppLedConfig appLedConfig) { @@ -85,10 +81,10 @@ public class AppLedConfigController extends BaseController } /** - * 修改【请填写功能名称】 + * 修改led显示屏设置 */ - @PreAuthorize("@ss.hasPermi('system:config:edit')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PreAuthorize("@ss.hasPermi('app:ledconfig:edit')") + @Log(title = "led显示屏设置", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody AppLedConfig appLedConfig) { @@ -96,13 +92,13 @@ public class AppLedConfigController extends BaseController } /** - * 删除【请填写功能名称】 + * 删除led显示屏设置 */ - @PreAuthorize("@ss.hasPermi('system:config:remove')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ledIds}") - public AjaxResult remove(@PathVariable String[] ledIds) + @PreAuthorize("@ss.hasPermi('app:ledconfig:remove')") + @Log(title = "led显示屏设置", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) { - return toAjax(appLedConfigService.deleteAppLedConfigByLedIds(ledIds)); + return toAjax(appLedConfigService.deleteAppLedConfigByIds(ids)); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/app/domain/AppLedConfig.java b/ruoyi-system/src/main/java/com/ruoyi/app/domain/AppLedConfig.java index 020a081e..f58025e3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/app/domain/AppLedConfig.java +++ b/ruoyi-system/src/main/java/com/ruoyi/app/domain/AppLedConfig.java @@ -1,38 +1,263 @@ package com.ruoyi.app.domain; -import com.ruoyi.common.annotation.Excel; +import java.math.BigDecimal; 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; /** - * 【请填写功能名称】对象 app_led_config - * + * led显示屏设置对象 app_led_config + * * @author ruoyi - * @date 2025-01-14 + * @date 2025-03-07 */ public class AppLedConfig extends BaseEntity { private static final long serialVersionUID = 1L; /** 主键 */ - @Excel(name = "主键") - private String ledId; + private String id; - public void setLedId(String ledId) + /** 屏类别 1:分拣屏 */ + @Excel(name = "屏类别 1:分拣屏") + private String sType; + + /** 屏编码 */ + @Excel(name = "屏编码") + private String sCode; + + /** 屏IP地址 */ + @Excel(name = "屏IP地址") + private String sIp; + + /** 屏1内容 */ + @Excel(name = "屏1内容") + private String sOneContent; + + /** 屏2内容 */ + @Excel(name = "屏2内容") + private String sTwoContent; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String sThreeContent; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String sFourContent; + + /** 物料编码 */ + @Excel(name = "物料编码") + private String goodsId; + + /** 消息内容 */ + @Excel(name = "消息内容") + private String messageContent; + + /** 数量 */ + @Excel(name = "数量") + private BigDecimal quantity; + + /** 单位 */ + @Excel(name = "单位") + private String unit; + + /** 产线 */ + @Excel(name = "产线") + private String productLine; + + /** 工位 */ + @Excel(name = "工位") + private String station; + + /** 配盘点 */ + @Excel(name = "配盘点") + private String inventoryPosition; + + /** 状态 */ + @Excel(name = "状态") + private String goodsStatus; + + /** 显示状态 */ + @Excel(name = "显示状态") + private String sStatus; + + public void setId(String id) { - this.ledId = ledId; + this.id = id; } - public String getLedId() + public String getId() { - return ledId; + return id; + } + public void setsType(String sType) + { + this.sType = sType; + } + + public String getsType() + { + return sType; + } + public void setsCode(String sCode) + { + this.sCode = sCode; + } + + public String getsCode() + { + return sCode; + } + public void setsIp(String sIp) + { + this.sIp = sIp; + } + + public String getsIp() + { + return sIp; + } + public void setsOneContent(String sOneContent) + { + this.sOneContent = sOneContent; + } + + public String getsOneContent() + { + return sOneContent; + } + public void setsTwoContent(String sTwoContent) + { + this.sTwoContent = sTwoContent; + } + + public String getsTwoContent() + { + return sTwoContent; + } + public void setsThreeContent(String sThreeContent) + { + this.sThreeContent = sThreeContent; + } + + public String getsThreeContent() + { + return sThreeContent; + } + public void setsFourContent(String sFourContent) + { + this.sFourContent = sFourContent; + } + + public String getsFourContent() + { + return sFourContent; + } + public void setGoodsId(String goodsId) + { + this.goodsId = goodsId; + } + + public String getGoodsId() + { + return goodsId; + } + public void setMessageContent(String messageContent) + { + this.messageContent = messageContent; + } + + public String getMessageContent() + { + return messageContent; + } + public void setQuantity(BigDecimal quantity) + { + this.quantity = quantity; + } + + public BigDecimal getQuantity() + { + return quantity; + } + public void setUnit(String unit) + { + this.unit = unit; + } + + public String getUnit() + { + return unit; + } + public void setProductLine(String productLine) + { + this.productLine = productLine; + } + + public String getProductLine() + { + return productLine; + } + public void setStation(String station) + { + this.station = station; + } + + public String getStation() + { + return station; + } + public void setInventoryPosition(String inventoryPosition) + { + this.inventoryPosition = inventoryPosition; + } + + public String getInventoryPosition() + { + return inventoryPosition; + } + public void setGoodsStatus(String goodsStatus) + { + this.goodsStatus = goodsStatus; + } + + public String getGoodsStatus() + { + return goodsStatus; + } + public void setsStatus(String sStatus) + { + this.sStatus = sStatus; + } + + public String getsStatus() + { + return sStatus; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("ledId", getLedId()) - .toString(); + .append("id", getId()) + .append("sType", getsType()) + .append("sCode", getsCode()) + .append("sIp", getsIp()) + .append("sOneContent", getsOneContent()) + .append("sTwoContent", getsTwoContent()) + .append("sThreeContent", getsThreeContent()) + .append("sFourContent", getsFourContent()) + .append("goodsId", getGoodsId()) + .append("messageContent", getMessageContent()) + .append("quantity", getQuantity()) + .append("unit", getUnit()) + .append("productLine", getProductLine()) + .append("station", getStation()) + .append("inventoryPosition", getInventoryPosition()) + .append("updateTime", getUpdateTime()) + .append("goodsStatus", getGoodsStatus()) + .append("sStatus", getsStatus()) + .toString(); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/app/mapper/AppLedConfigMapper.java b/ruoyi-system/src/main/java/com/ruoyi/app/mapper/AppLedConfigMapper.java index a256c4e9..0cda71f7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/app/mapper/AppLedConfigMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/app/mapper/AppLedConfigMapper.java @@ -1,62 +1,61 @@ package com.ruoyi.app.mapper; +import java.util.List; import com.ruoyi.app.domain.AppLedConfig; -import java.util.List; - /** - * 【请填写功能名称】Mapper接口 - * + * led显示屏设置Mapper接口 + * * @author ruoyi - * @date 2025-01-14 + * @date 2025-03-07 */ -public interface AppLedConfigMapper +public interface AppLedConfigMapper { /** - * 查询【请填写功能名称】 - * - * @param ledId 【请填写功能名称】主键 - * @return 【请填写功能名称】 + * 查询led显示屏设置 + * + * @param id led显示屏设置主键 + * @return led显示屏设置 */ - public AppLedConfig selectAppLedConfigByLedId(String ledId); + public AppLedConfig selectAppLedConfigById(String id); /** - * 查询【请填写功能名称】列表 - * - * @param appLedConfig 【请填写功能名称】 - * @return 【请填写功能名称】集合 + * 查询led显示屏设置列表 + * + * @param appLedConfig led显示屏设置 + * @return led显示屏设置集合 */ public List selectAppLedConfigList(AppLedConfig appLedConfig); /** - * 新增【请填写功能名称】 - * - * @param appLedConfig 【请填写功能名称】 + * 新增led显示屏设置 + * + * @param appLedConfig led显示屏设置 * @return 结果 */ public int insertAppLedConfig(AppLedConfig appLedConfig); /** - * 修改【请填写功能名称】 - * - * @param appLedConfig 【请填写功能名称】 + * 修改led显示屏设置 + * + * @param appLedConfig led显示屏设置 * @return 结果 */ public int updateAppLedConfig(AppLedConfig appLedConfig); /** - * 删除【请填写功能名称】 - * - * @param ledId 【请填写功能名称】主键 + * 删除led显示屏设置 + * + * @param id led显示屏设置主键 * @return 结果 */ - public int deleteAppLedConfigByLedId(String ledId); + public int deleteAppLedConfigById(String id); /** - * 批量删除【请填写功能名称】 - * - * @param ledIds 需要删除的数据主键集合 + * 批量删除led显示屏设置 + * + * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteAppLedConfigByLedIds(String[] ledIds); + public int deleteAppLedConfigByIds(String[] ids); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/app/service/IAppLedConfigService.java b/ruoyi-system/src/main/java/com/ruoyi/app/service/IAppLedConfigService.java index d0871e8a..82bd3656 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/app/service/IAppLedConfigService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/app/service/IAppLedConfigService.java @@ -1,62 +1,61 @@ package com.ruoyi.app.service; +import java.util.List; import com.ruoyi.app.domain.AppLedConfig; -import java.util.List; - /** - * 【请填写功能名称】Service接口 - * + * led显示屏设置Service接口 + * * @author ruoyi - * @date 2025-01-14 + * @date 2025-03-07 */ -public interface IAppLedConfigService +public interface IAppLedConfigService { /** - * 查询【请填写功能名称】 - * - * @param ledId 【请填写功能名称】主键 - * @return 【请填写功能名称】 + * 查询led显示屏设置 + * + * @param id led显示屏设置主键 + * @return led显示屏设置 */ - public AppLedConfig selectAppLedConfigByLedId(String ledId); + public AppLedConfig selectAppLedConfigById(String id); /** - * 查询【请填写功能名称】列表 - * - * @param appLedConfig 【请填写功能名称】 - * @return 【请填写功能名称】集合 + * 查询led显示屏设置列表 + * + * @param appLedConfig led显示屏设置 + * @return led显示屏设置集合 */ public List selectAppLedConfigList(AppLedConfig appLedConfig); /** - * 新增【请填写功能名称】 - * - * @param appLedConfig 【请填写功能名称】 + * 新增led显示屏设置 + * + * @param appLedConfig led显示屏设置 * @return 结果 */ public int insertAppLedConfig(AppLedConfig appLedConfig); /** - * 修改【请填写功能名称】 - * - * @param appLedConfig 【请填写功能名称】 + * 修改led显示屏设置 + * + * @param appLedConfig led显示屏设置 * @return 结果 */ public int updateAppLedConfig(AppLedConfig appLedConfig); /** - * 批量删除【请填写功能名称】 - * - * @param ledIds 需要删除的【请填写功能名称】主键集合 + * 批量删除led显示屏设置 + * + * @param ids 需要删除的led显示屏设置主键集合 * @return 结果 */ - public int deleteAppLedConfigByLedIds(String[] ledIds); + public int deleteAppLedConfigByIds(String[] ids); /** - * 删除【请填写功能名称】信息 - * - * @param ledId 【请填写功能名称】主键 + * 删除led显示屏设置信息 + * + * @param id led显示屏设置主键 * @return 结果 */ - public int deleteAppLedConfigByLedId(String ledId); + public int deleteAppLedConfigById(String id); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/app/service/impl/AppLedConfigServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/app/service/impl/AppLedConfigServiceImpl.java index 3c529423..5d07a1bb 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/app/service/impl/AppLedConfigServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/app/service/impl/AppLedConfigServiceImpl.java @@ -1,42 +1,42 @@ package com.ruoyi.app.service.impl; import java.util.List; - -import com.ruoyi.app.domain.AppLedConfig; -import com.ruoyi.app.mapper.AppLedConfigMapper; -import com.ruoyi.app.service.IAppLedConfigService; +import com.ruoyi.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import com.ruoyi.app.mapper.AppLedConfigMapper; +import com.ruoyi.app.domain.AppLedConfig; +import com.ruoyi.app.service.IAppLedConfigService; /** - * 【请填写功能名称】Service业务层处理 - * + * led显示屏设置Service业务层处理 + * * @author ruoyi - * @date 2025-01-14 + * @date 2025-03-07 */ @Service -public class AppLedConfigServiceImpl implements IAppLedConfigService +public class AppLedConfigServiceImpl implements IAppLedConfigService { @Autowired private AppLedConfigMapper appLedConfigMapper; /** - * 查询【请填写功能名称】 - * - * @param ledId 【请填写功能名称】主键 - * @return 【请填写功能名称】 + * 查询led显示屏设置 + * + * @param id led显示屏设置主键 + * @return led显示屏设置 */ @Override - public AppLedConfig selectAppLedConfigByLedId(String ledId) + public AppLedConfig selectAppLedConfigById(String id) { - return appLedConfigMapper.selectAppLedConfigByLedId(ledId); + return appLedConfigMapper.selectAppLedConfigById(id); } /** - * 查询【请填写功能名称】列表 - * - * @param appLedConfig 【请填写功能名称】 - * @return 【请填写功能名称】 + * 查询led显示屏设置列表 + * + * @param appLedConfig led显示屏设置 + * @return led显示屏设置 */ @Override public List selectAppLedConfigList(AppLedConfig appLedConfig) @@ -45,9 +45,9 @@ public class AppLedConfigServiceImpl implements IAppLedConfigService } /** - * 新增【请填写功能名称】 - * - * @param appLedConfig 【请填写功能名称】 + * 新增led显示屏设置 + * + * @param appLedConfig led显示屏设置 * @return 结果 */ @Override @@ -57,38 +57,39 @@ public class AppLedConfigServiceImpl implements IAppLedConfigService } /** - * 修改【请填写功能名称】 - * - * @param appLedConfig 【请填写功能名称】 + * 修改led显示屏设置 + * + * @param appLedConfig led显示屏设置 * @return 结果 */ @Override public int updateAppLedConfig(AppLedConfig appLedConfig) { + appLedConfig.setUpdateTime(DateUtils.getNowDate()); return appLedConfigMapper.updateAppLedConfig(appLedConfig); } /** - * 批量删除【请填写功能名称】 - * - * @param ledIds 需要删除的【请填写功能名称】主键 + * 批量删除led显示屏设置 + * + * @param ids 需要删除的led显示屏设置主键 * @return 结果 */ @Override - public int deleteAppLedConfigByLedIds(String[] ledIds) + public int deleteAppLedConfigByIds(String[] ids) { - return appLedConfigMapper.deleteAppLedConfigByLedIds(ledIds); + return appLedConfigMapper.deleteAppLedConfigByIds(ids); } /** - * 删除【请填写功能名称】信息 - * - * @param ledId 【请填写功能名称】主键 + * 删除led显示屏设置信息 + * + * @param id led显示屏设置主键 * @return 结果 */ @Override - public int deleteAppLedConfigByLedId(String ledId) + public int deleteAppLedConfigById(String id) { - return appLedConfigMapper.deleteAppLedConfigByLedId(ledId); + return appLedConfigMapper.deleteAppLedConfigById(id); } } diff --git a/ruoyi-system/src/main/resources/mapper/app/AppLedConfigMapper.xml b/ruoyi-system/src/main/resources/mapper/app/AppLedConfigMapper.xml index 5ed33be0..5c5f6242 100644 --- a/ruoyi-system/src/main/resources/mapper/app/AppLedConfigMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/app/AppLedConfigMapper.xml @@ -1,53 +1,137 @@ +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - + + + + + + + + + + + + + + + + + + - select led_id from app_led_config + select id, s_type, s_code, s_ip, s_one_content, s_two_content, s_three_content, s_four_content, goods_id, message_content, quantity, unit, product_line, station, inventory_position, update_time, goods_status, s_status from app_led_config - - - where led_id = #{ledId} + where id = #{id} insert into app_led_config - led_id, - + id, + s_type, + s_code, + s_ip, + s_one_content, + s_two_content, + s_three_content, + s_four_content, + goods_id, + message_content, + quantity, + unit, + product_line, + station, + inventory_position, + update_time, + goods_status, + s_status, + - #{ledId}, - + #{id}, + #{sType}, + #{sCode}, + #{sIp}, + #{sOneContent}, + #{sTwoContent}, + #{sThreeContent}, + #{sFourContent}, + #{goodsId}, + #{messageContent}, + #{quantity}, + #{unit}, + #{productLine}, + #{station}, + #{inventoryPosition}, + #{updateTime}, + #{goodsStatus}, + #{sStatus}, + update app_led_config + s_type = #{sType}, + s_code = #{sCode}, + s_ip = #{sIp}, + s_one_content = #{sOneContent}, + s_two_content = #{sTwoContent}, + s_three_content = #{sThreeContent}, + s_four_content = #{sFourContent}, + goods_id = #{goodsId}, + message_content = #{messageContent}, + quantity = #{quantity}, + unit = #{unit}, + product_line = #{productLine}, + station = #{station}, + inventory_position = #{inventoryPosition}, + update_time = #{updateTime}, + goods_status = #{goodsStatus}, + s_status = #{sStatus}, - where led_id = #{ledId} + where id = #{id} - - delete from app_led_config where led_id = #{ledId} + + delete from app_led_config where id = #{id} - - delete from app_led_config where led_id in - - #{ledId} + + delete from app_led_config where id in + + #{id} \ No newline at end of file