From fde3ace053192524221b16f2b017babdfec1abce Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Thu, 24 Oct 2024 17:27:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A7=E7=89=88=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E5=8D=95=E4=BD=8D=E6=8D=A2=E7=AE=97=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=20sys=5Funit=5Fconvert=E5=92=8C=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=B8=AD=E5=AF=B9=E5=BA=94=E7=9A=84=E5=89=8D=E7=AB=AF=E6=89=80?= =?UTF-8?q?=E6=9C=89=E4=BB=A3=E7=A0=81=E5=92=8C=E5=90=8E=E7=AB=AF=E6=89=80?= =?UTF-8?q?=E6=9C=89=E4=BB=A3=E7=A0=81=20=E5=92=8C=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E7=9A=84=E7=B3=BB=E7=BB=9F=E8=8F=9C=E5=8D=95=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysUnitConvertController.java | 129 ----------------- .../ruoyi/system/domain/SysUnitConvert.java | 93 ------------- .../system/mapper/SysUnitConvertMapper.java | 61 -------- .../service/ISysUnitConvertService.java | 61 -------- .../impl/SysUnitConvertServiceImpl.java | 103 -------------- .../unitConvert/unitConvert/add.html | 53 ------- .../unitConvert/unitConvert/edit.html | 54 -------- .../unitConvert/unitConvert/unitConvert.html | 130 ------------------ 8 files changed, 684 deletions(-) delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java delete mode 100644 ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/add.html delete mode 100644 ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/edit.html delete mode 100644 ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/unitConvert.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java deleted file mode 100644 index b17cbb60..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.ruoyi.system.controller; - -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.SysUnitConvert; -import com.ruoyi.system.service.ISysUnitConvertService; -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.*; - -import java.util.List; - -/** - * 单位换算Controller - * - * @author sunzhenhu - * @date 2021-06-16 - */ -@Controller -@RequestMapping("/unitConvert/unitConvert") -public class SysUnitConvertController extends BaseController -{ - private String prefix = "unitConvert/unitConvert"; - - @Autowired - private ISysUnitConvertService sysUnitConvertService; - - @RequiresPermissions("unitConvert:unitConvert:view") - @GetMapping() - public String unitConvert() - { - return prefix + "/unitConvert"; - } - - /** - * 查询单位换算列表 - */ - @RequiresPermissions("unitConvert:unitConvert:list") - @PostMapping("/list") - @ResponseBody - public TableDataInfo list(SysUnitConvert sysUnitConvert) - { - startPage(); - List list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert); - return getDataTable(list); - } - - /** - * 导出单位换算列表 - */ - @RequiresPermissions("unitConvert:unitConvert:export") - @Log(title = "单位换算", businessType = BusinessType.EXPORT) - @PostMapping("/export") - @ResponseBody - public AjaxResult export(SysUnitConvert sysUnitConvert) - { - List list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert); - ExcelUtil util = new ExcelUtil(SysUnitConvert.class); - return util.exportExcel(list, "单位换算数据"); - } - - /** - * 新增单位换算 - */ - @GetMapping("/add") - public String add() - { - return prefix + "/add"; - } - - /** - * 新增保存单位换算 - */ - @RequiresPermissions("unitConvert:unitConvert:add") - @Log(title = "单位换算", businessType = BusinessType.INSERT) - @PostMapping("/add") - @ResponseBody - public AjaxResult addSave(SysUnitConvert sysUnitConvert) - { - int i=sysUnitConvertService.insertSysUnitConvert(sysUnitConvert); - if (i<0){ - AjaxResult result=AjaxResult.error("数据重复", null); - return result; - - } - return toAjax(i); - } - - /** - * 修改单位换算 - */ - @GetMapping("/edit/{id}") - public String edit(@PathVariable("id") Integer id, ModelMap mmap) - { - SysUnitConvert sysUnitConvert = sysUnitConvertService.selectSysUnitConvertById(id); - mmap.put("sysUnitConvert", sysUnitConvert); - return prefix + "/edit"; - } - - /** - * 修改保存单位换算 - */ - @RequiresPermissions("unitConvert:unitConvert:edit") - @Log(title = "单位换算", businessType = BusinessType.UPDATE) - @PostMapping("/edit") - @ResponseBody - public AjaxResult editSave(SysUnitConvert sysUnitConvert) - { - return toAjax(sysUnitConvertService.updateSysUnitConvert(sysUnitConvert)); - } - - /** - * 删除单位换算 - */ - @RequiresPermissions("unitConvert:unitConvert:remove") - @Log(title = "单位换算", businessType = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) - { - return toAjax(sysUnitConvertService.deleteSysUnitConvertByIds(ids)); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java deleted file mode 100644 index 3c8b5d54..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.ruoyi.system.domain; - -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; - -/** - * 单位换算对象 sys_unit_convert - * - * @author sunzhenhu - * @date 2021-06-16 - */ -public class SysUnitConvert extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** */ - private Integer id; - - /** 换算起始值 */ - @Excel(name = "换算起始值") - private String convertStartValue; - - /** 换算起始单位 */ - @Excel(name = "换算起始单位") - private String convertStartUnit; - - /** 换算结尾值 */ - @Excel(name = "换算结尾值") - private String convertEndValue; - - /** 换算结尾单位 */ - @Excel(name = "换算结尾单位") - private String convertEndUnit; - - public void setId(Integer id) - { - this.id = id; - } - - public Integer getId() - { - return id; - } - public void setConvertStartValue(String convertStartValue) - { - this.convertStartValue = convertStartValue; - } - - public String getConvertStartValue() - { - return convertStartValue; - } - public void setConvertStartUnit(String convertStartUnit) - { - this.convertStartUnit = convertStartUnit; - } - - public String getConvertStartUnit() - { - return convertStartUnit; - } - public void setConvertEndValue(String convertEndValue) - { - this.convertEndValue = convertEndValue; - } - - public String getConvertEndValue() - { - return convertEndValue; - } - public void setConvertEndUnit(String convertEndUnit) - { - this.convertEndUnit = convertEndUnit; - } - - public String getConvertEndUnit() - { - return convertEndUnit; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("convertStartValue", getConvertStartValue()) - .append("convertStartUnit", getConvertStartUnit()) - .append("convertEndValue", getConvertEndValue()) - .append("convertEndUnit", getConvertEndUnit()) - .toString(); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java deleted file mode 100644 index fef2c1ed..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; -import com.ruoyi.system.domain.SysUnitConvert; - -/** - * 单位换算Mapper接口 - * - * @author sunzhenhu - * @date 2021-06-16 - */ -public interface SysUnitConvertMapper -{ - /** - * 查询单位换算 - * - * @param id 单位换算ID - * @return 单位换算 - */ - public SysUnitConvert selectSysUnitConvertById(Integer id); - - /** - * 查询单位换算列表 - * - * @param sysUnitConvert 单位换算 - * @return 单位换算集合 - */ - public List selectSysUnitConvertList(SysUnitConvert sysUnitConvert); - - /** - * 新增单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - public int insertSysUnitConvert(SysUnitConvert sysUnitConvert); - - /** - * 修改单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - public int updateSysUnitConvert(SysUnitConvert sysUnitConvert); - - /** - * 删除单位换算 - * - * @param id 单位换算ID - * @return 结果 - */ - public int deleteSysUnitConvertById(Integer id); - - /** - * 批量删除单位换算 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteSysUnitConvertByIds(String[] ids); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java deleted file mode 100644 index 9009e56b..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import com.ruoyi.system.domain.SysUnitConvert; - -/** - * 单位换算Service接口 - * - * @author sunzhenhu - * @date 2021-06-16 - */ -public interface ISysUnitConvertService -{ - /** - * 查询单位换算 - * - * @param id 单位换算ID - * @return 单位换算 - */ - public SysUnitConvert selectSysUnitConvertById(Integer id); - - /** - * 查询单位换算列表 - * - * @param sysUnitConvert 单位换算 - * @return 单位换算集合 - */ - public List selectSysUnitConvertList(SysUnitConvert sysUnitConvert); - - /** - * 新增单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - public int insertSysUnitConvert(SysUnitConvert sysUnitConvert); - - /** - * 修改单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - public int updateSysUnitConvert(SysUnitConvert sysUnitConvert); - - /** - * 批量删除单位换算 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteSysUnitConvertByIds(String ids); - - /** - * 删除单位换算信息 - * - * @param id 单位换算ID - * @return 结果 - */ - public int deleteSysUnitConvertById(Integer id); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java deleted file mode 100644 index 32519753..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.ruoyi.system.service.impl; - -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.system.domain.SysUnitConvert; -import com.ruoyi.system.mapper.SysUnitConvertMapper; -import com.ruoyi.system.service.ISysUnitConvertService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - -/** - * 单位换算Service业务层处理 - * - * @author sunzhenhu - * @date 2021-06-16 - */ -@Service -public class SysUnitConvertServiceImpl implements ISysUnitConvertService -{ - @Autowired - private SysUnitConvertMapper sysUnitConvertMapper; - - /** - * 查询单位换算 - * - * @param id 单位换算ID - * @return 单位换算 - */ - @Override - public SysUnitConvert selectSysUnitConvertById(Integer id) - { - return sysUnitConvertMapper.selectSysUnitConvertById(id); - } - - /** - * 查询单位换算列表 - * - * @param sysUnitConvert 单位换算 - * @return 单位换算 - */ - @Override - public List selectSysUnitConvertList(SysUnitConvert sysUnitConvert) - { - return sysUnitConvertMapper.selectSysUnitConvertList(sysUnitConvert); - } - - /** - * 新增单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - @Override - public int insertSysUnitConvert(SysUnitConvert sysUnitConvert) - { - SysUnitConvert temp=new SysUnitConvert(); - temp.setConvertStartUnit(sysUnitConvert.getConvertStartUnit()); - temp.setConvertEndUnit(sysUnitConvert.getConvertEndUnit()); - List sysUnitConverts = new ArrayList<>(sysUnitConvertMapper.selectSysUnitConvertList(temp)); - if (sysUnitConverts.size()>0){ - return -1; - } - return sysUnitConvertMapper.insertSysUnitConvert(sysUnitConvert); - } - - /** - * 修改单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - @Override - public int updateSysUnitConvert(SysUnitConvert sysUnitConvert) - { - return sysUnitConvertMapper.updateSysUnitConvert(sysUnitConvert); - } - - /** - * 删除单位换算对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteSysUnitConvertByIds(String ids) - { - return sysUnitConvertMapper.deleteSysUnitConvertByIds(Convert.toStrArray(ids)); - } - - /** - * 删除单位换算信息 - * - * @param id 单位换算ID - * @return 结果 - */ - @Override - public int deleteSysUnitConvertById(Integer id) - { - return sysUnitConvertMapper.deleteSysUnitConvertById(id); - } -} diff --git a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/add.html b/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/add.html deleted file mode 100644 index 018f4d0b..00000000 --- a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/add.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/edit.html b/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/edit.html deleted file mode 100644 index 2fd60d83..00000000 --- a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/edit.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/unitConvert.html b/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/unitConvert.html deleted file mode 100644 index 98cd198e..00000000 --- a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/unitConvert.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - \ No newline at end of file