109 lines
3.7 KiB
Java
109 lines
3.7 KiB
Java
|
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.IMoltenIronPoundService;
|
||
|
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/moltenironpound")
|
||
|
public class MoltenIronPoundController extends BaseController
|
||
|
{
|
||
|
@Autowired
|
||
|
private IPoundBillService moltenIronPoundService;
|
||
|
|
||
|
/**
|
||
|
* 查询铁水磅列表
|
||
|
*/
|
||
|
@PreAuthorize("@ss.hasPermi('measurement/operation:moltenironpound:list')")
|
||
|
@GetMapping("/list")
|
||
|
public TableDataInfo list(PoundBill moltenIronPound)
|
||
|
{
|
||
|
startPage();
|
||
|
List<PoundBill> list = moltenIronPoundService.selectPoundBillList(moltenIronPound);
|
||
|
return getDataTable(list);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 导出铁水磅列表
|
||
|
*/
|
||
|
@PreAuthorize("@ss.hasPermi('measurement/operation:moltenironpound:export')")
|
||
|
@Log(title = "铁水磅", businessType = BusinessType.EXPORT)
|
||
|
@PostMapping("/export")
|
||
|
public void export(HttpServletResponse response, PoundBill moltenIronPound)
|
||
|
{
|
||
|
List<PoundBill> list = moltenIronPoundService.selectPoundBillList(moltenIronPound);
|
||
|
ExcelUtil<PoundBill> util = new ExcelUtil<PoundBill>(PoundBill.class);
|
||
|
util.exportExcel(response, list, "铁水磅数据");
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 获取铁水磅详细信息
|
||
|
*/
|
||
|
@PreAuthorize("@ss.hasPermi('measurement/operation:moltenironpound:query')")
|
||
|
@GetMapping(value = "/{id}")
|
||
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
||
|
{
|
||
|
return success(moltenIronPoundService.getById(id));
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 新增铁水磅
|
||
|
*/
|
||
|
@PreAuthorize("@ss.hasPermi('measurement/operation:moltenironpound:add')")
|
||
|
@Log(title = "铁水磅", businessType = BusinessType.INSERT)
|
||
|
@PostMapping
|
||
|
public AjaxResult add(@RequestBody PoundBill moltenIronPound)
|
||
|
{
|
||
|
return toAjax(moltenIronPoundService.save(moltenIronPound));
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 修改铁水磅
|
||
|
*/
|
||
|
@PreAuthorize("@ss.hasPermi('measurement/operation:moltenironpound:edit')")
|
||
|
@Log(title = "铁水磅", businessType = BusinessType.UPDATE)
|
||
|
@PutMapping
|
||
|
public AjaxResult edit(@RequestBody PoundBill moltenIronPound)
|
||
|
{
|
||
|
return toAjax(moltenIronPoundService.updatePoundBill(moltenIronPound));
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 删除铁水磅
|
||
|
*/
|
||
|
@PreAuthorize("@ss.hasPermi('measurement/operation:moltenironpound:remove')")
|
||
|
@Log(title = "铁水磅", businessType = BusinessType.DELETE)
|
||
|
@DeleteMapping("/{ids}")
|
||
|
public AjaxResult remove(@PathVariable String[] ids)
|
||
|
{
|
||
|
List<String> list = Arrays.asList(ids);
|
||
|
return toAjax(moltenIronPoundService.removeByIds(list));
|
||
|
}
|
||
|
}
|