package com.aps.core.controller;
|
|
import java.util.List;
|
import java.io.IOException;
|
|
import jakarta.servlet.http.HttpServletResponse;
|
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.aps.common.log.annotation.Log;
|
import com.aps.common.log.enums.BusinessType;
|
import com.aps.common.security.annotation.RequiresPermissions;
|
import com.aps.core.domain.ApsWeldSeamTemp;
|
import com.aps.core.service.IApsWeldSeamTempService;
|
import com.aps.common.core.web.controller.BaseController;
|
import com.aps.common.core.web.domain.AjaxResult;
|
import com.aps.common.core.utils.poi.ExcelUtil;
|
import com.aps.common.core.web.page.TableDataInfo;
|
|
/**
|
* 焊缝-临时Controller
|
*
|
* @author wwj
|
* @date 2025-04-09
|
*/
|
@RestController
|
@RequestMapping("/weldSeamTemp")
|
public class ApsWeldSeamTempController extends BaseController
|
{
|
@Autowired
|
private IApsWeldSeamTempService apsWeldSeamTempService;
|
|
/**
|
* 查询焊缝-临时列表
|
*/
|
@RequiresPermissions("gasPipingTemp:gasPipingTemp:list")
|
@GetMapping("/list")
|
public TableDataInfo list(ApsWeldSeamTemp apsWeldSeamTemp)
|
{
|
// startPage();
|
List<ApsWeldSeamTemp> list = apsWeldSeamTempService.selectApsWeldSeamTempList(apsWeldSeamTemp);
|
return getDataTable(list);
|
}
|
|
/**
|
* 导出焊缝-临时列表
|
*/
|
@RequiresPermissions("gasPipingTemp:gasPipingTemp:export")
|
@Log(title = "焊缝-临时", businessType = BusinessType.EXPORT)
|
@PostMapping("/export")
|
public void export(HttpServletResponse response, ApsWeldSeamTemp apsWeldSeamTemp)
|
{
|
List<ApsWeldSeamTemp> list = apsWeldSeamTempService.selectApsWeldSeamTempList(apsWeldSeamTemp);
|
ExcelUtil<ApsWeldSeamTemp> util = new ExcelUtil<ApsWeldSeamTemp>(ApsWeldSeamTemp.class);
|
util.exportExcel(response, list, "焊缝-临时数据");
|
}
|
|
/**
|
* 获取焊缝-临时详细信息
|
*/
|
@RequiresPermissions("gasPipingTemp:gasPipingTemp:query")
|
@GetMapping(value = "/{id}")
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
{
|
return success(apsWeldSeamTempService.selectApsWeldSeamTempById(id));
|
}
|
|
/**
|
* 新增焊缝-临时
|
*/
|
@RequiresPermissions("gasPipingTemp:gasPipingTemp:add")
|
@Log(title = "焊缝-临时", businessType = BusinessType.INSERT)
|
@PostMapping
|
public AjaxResult add(@RequestBody ApsWeldSeamTemp apsWeldSeamTemp)
|
{
|
return toAjax(apsWeldSeamTempService.insertApsWeldSeamTemp(apsWeldSeamTemp));
|
}
|
|
/**
|
* 修改焊缝-临时
|
*/
|
@RequiresPermissions("gasPipingTemp:gasPipingTemp:edit")
|
@Log(title = "焊缝-临时", businessType = BusinessType.UPDATE)
|
@PutMapping
|
public AjaxResult edit(@RequestBody ApsWeldSeamTemp apsWeldSeamTemp)
|
{
|
return toAjax(apsWeldSeamTempService.updateApsWeldSeamTemp(apsWeldSeamTemp));
|
}
|
|
/**
|
* 删除焊缝-临时
|
*/
|
@RequiresPermissions("gasPipingTemp:gasPipingTemp:remove")
|
@Log(title = "焊缝-临时", businessType = BusinessType.DELETE)
|
@DeleteMapping("/{ids}")
|
public AjaxResult remove(@PathVariable String[] ids)
|
{
|
return toAjax(apsWeldSeamTempService.deleteApsWeldSeamTempByIds(ids));
|
}
|
}
|