初始化钢材磅
This commit is contained in:
parent
5d038e81d7
commit
09cd5f9b60
|
@ -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<PoundBill> 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<PoundBill> list = steelPoundService.selectPoundBillList(steelPound);
|
||||||
|
ExcelUtil<PoundBill> util = new ExcelUtil<PoundBill>(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<String> list = Arrays.asList(ids);
|
||||||
|
return toAjax(steelPoundService.removeByIds(list));
|
||||||
|
}
|
||||||
|
}
|
|
@ -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<PoundBill> 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);
|
||||||
|
}
|
|
@ -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<PoundBill> 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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -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'
|
||||||
|
})
|
||||||
|
}
|
|
@ -230,7 +230,7 @@
|
||||||
<el-button v-for="tab in tabs" :key="tab.name" :type="activeTab === tab.name ? 'primary' : 'default'"
|
<el-button v-for="tab in tabs" :key="tab.name" :type="activeTab === tab.name ? 'primary' : 'default'"
|
||||||
@click="activeTab = tab.name" size="mini" class="transition-all duration-200"> {{ tab.label }}</el-button>
|
@click="activeTab = tab.name" size="mini" class="transition-all duration-200"> {{ tab.label }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div >
|
<div>
|
||||||
<el-form :model="queryParams" v-if="activeTab === 'tareRequest'" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" v-if="activeTab === 'tareRequest'" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="起始日期" prop="lstedtdt">
|
<el-form-item label="起始日期" prop="lstedtdt">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
|
@ -375,7 +375,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="最后修改人" align="center" prop="lstedtopr" />
|
<el-table-column label="最后修改人" align="center" prop="lstedtopr" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table style="width: 2000px;display: inline-block;float: left;"
|
<el-table style="width: 1400px;display: inline-block;float: left;"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="operationpoundList"
|
:data="operationpoundList"
|
||||||
v-if="activeTab === 'tareRequest'"
|
v-if="activeTab === 'tareRequest'"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue