main
parent
5f2b20b716
commit
d8a935c0f2
@ -0,0 +1,98 @@
|
|||||||
|
package com.ruoyi.szxc.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.szxc.domain.SzxcJmCar;
|
||||||
|
import com.ruoyi.szxc.service.ISzxcJmCarService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 居民车辆关联Controller
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2024-03-30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/szxc/jmcar")
|
||||||
|
public class SzxcJmCarController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISzxcJmCarService szxcJmCarService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询居民车辆关联列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmcar:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SzxcJmCar szxcJmCar)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SzxcJmCar> list = szxcJmCarService.selectSzxcJmCarList(szxcJmCar);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出居民车辆关联列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmcar:export')")
|
||||||
|
@Log(title = "居民车辆关联", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SzxcJmCar szxcJmCar)
|
||||||
|
{
|
||||||
|
List<SzxcJmCar> list = szxcJmCarService.selectSzxcJmCarList(szxcJmCar);
|
||||||
|
ExcelUtil<SzxcJmCar> util = new ExcelUtil<SzxcJmCar>(SzxcJmCar.class);
|
||||||
|
util.exportExcel(response, list, "居民车辆关联数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取居民车辆关联详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmcar:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(szxcJmCarService.selectSzxcJmCarById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增居民车辆关联
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmcar:add')")
|
||||||
|
@Log(title = "居民车辆关联", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SzxcJmCar szxcJmCar)
|
||||||
|
{
|
||||||
|
return toAjax(szxcJmCarService.insertSzxcJmCar(szxcJmCar));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改居民车辆关联
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmcar:edit')")
|
||||||
|
@Log(title = "居民车辆关联", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SzxcJmCar szxcJmCar)
|
||||||
|
{
|
||||||
|
return toAjax(szxcJmCarService.updateSzxcJmCar(szxcJmCar));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除居民车辆关联
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmcar:remove')")
|
||||||
|
@Log(title = "居民车辆关联", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(szxcJmCarService.deleteSzxcJmCarByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
package com.ruoyi.szxc.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.szxc.domain.SzxcJmHouse;
|
||||||
|
import com.ruoyi.szxc.service.ISzxcJmHouseService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 居民房屋关联Controller
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2024-03-30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/szxc/jmhouse")
|
||||||
|
public class SzxcJmHouseController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISzxcJmHouseService szxcJmHouseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询居民房屋关联列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmhouse:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SzxcJmHouse szxcJmHouse)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SzxcJmHouse> list = szxcJmHouseService.selectSzxcJmHouseList(szxcJmHouse);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出居民房屋关联列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmhouse:export')")
|
||||||
|
@Log(title = "居民房屋关联", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SzxcJmHouse szxcJmHouse)
|
||||||
|
{
|
||||||
|
List<SzxcJmHouse> list = szxcJmHouseService.selectSzxcJmHouseList(szxcJmHouse);
|
||||||
|
ExcelUtil<SzxcJmHouse> util = new ExcelUtil<SzxcJmHouse>(SzxcJmHouse.class);
|
||||||
|
util.exportExcel(response, list, "居民房屋关联数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取居民房屋关联详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmhouse:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(szxcJmHouseService.selectSzxcJmHouseById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增居民房屋关联
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmhouse:add')")
|
||||||
|
@Log(title = "居民房屋关联", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SzxcJmHouse szxcJmHouse)
|
||||||
|
{
|
||||||
|
return toAjax(szxcJmHouseService.insertSzxcJmHouse(szxcJmHouse));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改居民房屋关联
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmhouse:edit')")
|
||||||
|
@Log(title = "居民房屋关联", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SzxcJmHouse szxcJmHouse)
|
||||||
|
{
|
||||||
|
return toAjax(szxcJmHouseService.updateSzxcJmHouse(szxcJmHouse));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除居民房屋关联
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:jmhouse:remove')")
|
||||||
|
@Log(title = "居民房屋关联", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(szxcJmHouseService.deleteSzxcJmHouseByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in new issue