From 09cd5f9b60296bf20631784c08f868df2a91acd6 Mon Sep 17 00:00:00 2001 From: ptt <2403326863@qq.com> Date: Thu, 5 Jun 2025 14:32:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=92=A2=E6=9D=90?= =?UTF-8?q?=E7=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SteelPoundController.java | 108 ++ .../operation/service/ISteelPoundService.java | 62 + .../service/impl/SteelPoundServiceImpl.java | 94 ++ .../api/measurement/operation/steelpound.js | 44 + .../operation/shortdispound/index.vue | 4 +- .../operation/steelpound/index.vue | 1127 +++++++++++++++++ 6 files changed, 1437 insertions(+), 2 deletions(-) create mode 100644 measurement/src/main/java/com/ruoyi/operation/controller/SteelPoundController.java create mode 100644 measurement/src/main/java/com/ruoyi/operation/service/ISteelPoundService.java create mode 100644 measurement/src/main/java/com/ruoyi/operation/service/impl/SteelPoundServiceImpl.java create mode 100644 ruoyi-ui/src/api/measurement/operation/steelpound.js create mode 100644 ruoyi-ui/src/views/measurement/operation/steelpound/index.vue diff --git a/measurement/src/main/java/com/ruoyi/operation/controller/SteelPoundController.java b/measurement/src/main/java/com/ruoyi/operation/controller/SteelPoundController.java new file mode 100644 index 0000000..ab472fe --- /dev/null +++ b/measurement/src/main/java/com/ruoyi/operation/controller/SteelPoundController.java @@ -0,0 +1,108 @@ +package com.ruoyi.operation.controller; + +import java.util.Arrays; +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.bill.domain.PoundBill; +import com.ruoyi.bill.service.IPoundBillService; +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.ruoyi.operation.service.ISteelPoundService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 钢材磅Controller + * + * @author ptt + * @date 2025-06-05 + */ +@RestController +@RequestMapping("/measurement/operation/steelpound") +public class SteelPoundController extends BaseController +{ + @Autowired + private IPoundBillService steelPoundService; + + /** + * 查询钢材磅列表 + */ + @PreAuthorize("@ss.hasPermi('measurement/operation:steelpound:list')") + @GetMapping("/list") + public TableDataInfo list(PoundBill steelPound) + { + startPage(); + List list = steelPoundService.selectPoundBillList(steelPound); + return getDataTable(list); + } + + /** + * 导出钢材磅列表 + */ + @PreAuthorize("@ss.hasPermi('measurement/operation:steelpound:export')") + @Log(title = "钢材磅", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, PoundBill steelPound) + { + List list = steelPoundService.selectPoundBillList(steelPound); + ExcelUtil util = new ExcelUtil(PoundBill.class); + util.exportExcel(response, list, "钢材磅数据"); + } + + /** + * 获取钢材磅详细信息 + */ + @PreAuthorize("@ss.hasPermi('measurement/operation:steelpound:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(steelPoundService.getById(id)); + } + + /** + * 新增钢材磅 + */ + @PreAuthorize("@ss.hasPermi('measurement/operation:steelpound:add')") + @Log(title = "钢材磅", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody PoundBill steelPound) + { + return toAjax(steelPoundService.save(steelPound)); + } + + /** + * 修改钢材磅 + */ + @PreAuthorize("@ss.hasPermi('measurement/operation:steelpound:edit')") + @Log(title = "钢材磅", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody PoundBill steelPound) + { + return toAjax(steelPoundService.updatePoundBill(steelPound)); + } + + /** + * 删除钢材磅 + */ + @PreAuthorize("@ss.hasPermi('measurement/operation:steelpound:remove')") + @Log(title = "钢材磅", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + List list = Arrays.asList(ids); + return toAjax(steelPoundService.removeByIds(list)); + } +} diff --git a/measurement/src/main/java/com/ruoyi/operation/service/ISteelPoundService.java b/measurement/src/main/java/com/ruoyi/operation/service/ISteelPoundService.java new file mode 100644 index 0000000..8eb5a5b --- /dev/null +++ b/measurement/src/main/java/com/ruoyi/operation/service/ISteelPoundService.java @@ -0,0 +1,62 @@ +package com.ruoyi.operation.service; + +import java.util.List; + +import com.ruoyi.bill.domain.PoundBill; + +/** + * 钢材磅Service接口 + * + * @author ptt + * @date 2025-06-05 + */ +public interface ISteelPoundService +{ + /** + * 查询钢材磅 + * + * @param id 钢材磅主键 + * @return 钢材磅 + */ + public PoundBill selectSteelPoundById(String id); + + /** + * 查询钢材磅列表 + * + * @param steelPound 钢材磅 + * @return 钢材磅集合 + */ + public List selectSteelPoundList(PoundBill steelPound); + + /** + * 新增钢材磅 + * + * @param steelPound 钢材磅 + * @return 结果 + */ + public int insertSteelPound(PoundBill steelPound); + + /** + * 修改钢材磅 + * + * @param steelPound 钢材磅 + * @return 结果 + */ + public int updateSteelPound(PoundBill steelPound); + + /** + * 批量删除钢材磅 + * + * @param ids 需要删除的钢材磅主键集合 + * @return 结果 + */ + public int deleteSteelPoundByIds(String[] ids); + + /** + * 删除钢材磅信息 + * + * @param id 钢材磅主键 + * @return 结果 + */ + public int deleteSteelPoundById(String id); +} diff --git a/measurement/src/main/java/com/ruoyi/operation/service/impl/SteelPoundServiceImpl.java b/measurement/src/main/java/com/ruoyi/operation/service/impl/SteelPoundServiceImpl.java new file mode 100644 index 0000000..5622da6 --- /dev/null +++ b/measurement/src/main/java/com/ruoyi/operation/service/impl/SteelPoundServiceImpl.java @@ -0,0 +1,94 @@ +package com.ruoyi.operation.service.impl; + +import java.util.List; + +import com.ruoyi.bill.domain.PoundBill; +import com.ruoyi.bill.mapper.PoundBillMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.operation.service.ISteelPoundService; + +/** + * 钢材磅Service业务层处理 + * + * @author ptt + * @date 2025-06-05 + */ +@Service +public class SteelPoundServiceImpl implements ISteelPoundService +{ + @Autowired + private PoundBillMapper steelPoundMapper; + + /** + * 查询钢材磅 + * + * @param id 钢材磅主键 + * @return 钢材磅 + */ + @Override + public PoundBill selectSteelPoundById(String id) + { + return steelPoundMapper.selectPoundBillById(id); + } + + /** + * 查询钢材磅列表 + * + * @param steelPound 钢材磅 + * @return 钢材磅 + */ + @Override + public List selectSteelPoundList(PoundBill steelPound) + { + return steelPoundMapper.selectPoundBillList(steelPound); + } + + /** + * 新增钢材磅 + * + * @param steelPound 钢材磅 + * @return 结果 + */ + @Override + public int insertSteelPound(PoundBill steelPound) + { + return steelPoundMapper.insertPoundBill(steelPound); + } + + /** + * 修改钢材磅 + * + * @param steelPound 钢材磅 + * @return 结果 + */ + @Override + public int updateSteelPound(PoundBill steelPound) + { + return steelPoundMapper.updatePoundBill(steelPound); + } + + /** + * 批量删除钢材磅 + * + * @param ids 需要删除的钢材磅主键 + * @return 结果 + */ + @Override + public int deleteSteelPoundByIds(String[] ids) + { + return steelPoundMapper.deletePoundBillByIds(ids); + } + + /** + * 删除钢材磅信息 + * + * @param id 钢材磅主键 + * @return 结果 + */ + @Override + public int deleteSteelPoundById(String id) + { + return steelPoundMapper.deletePoundBillById(id); + } +} diff --git a/ruoyi-ui/src/api/measurement/operation/steelpound.js b/ruoyi-ui/src/api/measurement/operation/steelpound.js new file mode 100644 index 0000000..c211932 --- /dev/null +++ b/ruoyi-ui/src/api/measurement/operation/steelpound.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询钢材磅列表 +export function listSteelpound(query) { + return request({ + url: '/measurement/operation/steelpound/list', + method: 'get', + params: query + }) +} + +// 查询钢材磅详细 +export function getSteelpound(id) { + return request({ + url: '/measurement/operation/steelpound/' + id, + method: 'get' + }) +} + +// 新增钢材磅 +export function addSteelpound(data) { + return request({ + url: '/measurement/operation/steelpound', + method: 'post', + data: data + }) +} + +// 修改钢材磅 +export function updateSteelpound(data) { + return request({ + url: '/measurement/operation/steelpound', + method: 'put', + data: data + }) +} + +// 删除钢材磅 +export function delSteelpound(id) { + return request({ + url: '/measurement/operation/steelpound/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue b/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue index 78c6a56..2b56da4 100644 --- a/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue @@ -230,7 +230,7 @@ {{ tab.label }} -
+
- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +