|
|
@ -1,8 +1,11 @@
|
|
|
|
package com.ruoyi.zongzhi.controller;
|
|
|
|
package com.ruoyi.zongzhi.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
@ -24,25 +27,22 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 等保单位Controller
|
|
|
|
* 等保单位Controller
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @author ruoyi
|
|
|
|
* @author ruoyi
|
|
|
|
* @date 2023-08-10
|
|
|
|
* @date 2023-08-10
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/zongzhi/dengbaounit")
|
|
|
|
@RequestMapping("/zongzhi/dengbaounit")
|
|
|
|
@Api(tags = " 等保单位")
|
|
|
|
@Api(tags = " 等保单位")
|
|
|
|
public class TcDengbaoUnitController extends BaseController
|
|
|
|
public class TcDengbaoUnitController extends BaseController {
|
|
|
|
{
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private ITcDengbaoUnitService tcDengbaoUnitService;
|
|
|
|
private ITcDengbaoUnitService tcDengbaoUnitService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询等保单位列表
|
|
|
|
* 查询等保单位列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('zongzhi:unit:list')")
|
|
|
|
|
|
|
|
@GetMapping("/list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
public TableDataInfo list(TcDengbaoUnit tcDengbaoUnit)
|
|
|
|
public TableDataInfo list(TcDengbaoUnit tcDengbaoUnit) {
|
|
|
|
{
|
|
|
|
|
|
|
|
startPage();
|
|
|
|
startPage();
|
|
|
|
List<TcDengbaoUnit> list = tcDengbaoUnitService.selectTcDengbaoUnitList(tcDengbaoUnit);
|
|
|
|
List<TcDengbaoUnit> list = tcDengbaoUnitService.selectTcDengbaoUnitList(tcDengbaoUnit);
|
|
|
|
return getDataTable(list);
|
|
|
|
return getDataTable(list);
|
|
|
@ -51,11 +51,9 @@ public class TcDengbaoUnitController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 导出等保单位列表
|
|
|
|
* 导出等保单位列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('zongzhi:unit:export')")
|
|
|
|
|
|
|
|
@Log(title = "等保单位", businessType = BusinessType.EXPORT)
|
|
|
|
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, TcDengbaoUnit tcDengbaoUnit)
|
|
|
|
public void export(HttpServletResponse response, TcDengbaoUnit tcDengbaoUnit) {
|
|
|
|
{
|
|
|
|
|
|
|
|
List<TcDengbaoUnit> list = tcDengbaoUnitService.selectTcDengbaoUnitList(tcDengbaoUnit);
|
|
|
|
List<TcDengbaoUnit> list = tcDengbaoUnitService.selectTcDengbaoUnitList(tcDengbaoUnit);
|
|
|
|
ExcelUtil<TcDengbaoUnit> util = new ExcelUtil<TcDengbaoUnit>(TcDengbaoUnit.class);
|
|
|
|
ExcelUtil<TcDengbaoUnit> util = new ExcelUtil<TcDengbaoUnit>(TcDengbaoUnit.class);
|
|
|
|
util.exportExcel(response, list, "等保单位数据");
|
|
|
|
util.exportExcel(response, list, "等保单位数据");
|
|
|
@ -64,43 +62,32 @@ public class TcDengbaoUnitController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取等保单位详细信息
|
|
|
|
* 获取等保单位详细信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('zongzhi:unit:query')")
|
|
|
|
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return success(tcDengbaoUnitService.selectTcDengbaoUnitById(id));
|
|
|
|
return success(tcDengbaoUnitService.selectTcDengbaoUnitById(id));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 新增等保单位
|
|
|
|
* 新增等保单位
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('zongzhi:unit:add')")
|
|
|
|
|
|
|
|
@Log(title = "等保单位", businessType = BusinessType.INSERT)
|
|
|
|
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody TcDengbaoUnit tcDengbaoUnit)
|
|
|
|
public AjaxResult add(@RequestBody TcDengbaoUnit tcDengbaoUnit) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(tcDengbaoUnitService.insertTcDengbaoUnit(tcDengbaoUnit));
|
|
|
|
return toAjax(tcDengbaoUnitService.insertTcDengbaoUnit(tcDengbaoUnit));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 修改等保单位
|
|
|
|
* 修改等保单位
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('zongzhi:unit:edit')")
|
|
|
|
|
|
|
|
@Log(title = "等保单位", businessType = BusinessType.UPDATE)
|
|
|
|
|
|
|
|
@PutMapping
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@RequestBody TcDengbaoUnit tcDengbaoUnit)
|
|
|
|
public AjaxResult edit(@RequestBody TcDengbaoUnit tcDengbaoUnit) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(tcDengbaoUnitService.updateTcDengbaoUnit(tcDengbaoUnit));
|
|
|
|
return toAjax(tcDengbaoUnitService.updateTcDengbaoUnit(tcDengbaoUnit));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 删除等保单位
|
|
|
|
* 删除等保单位
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('zongzhi:unit:remove')")
|
|
|
|
@DeleteMapping("/{ids}")
|
|
|
|
@Log(title = "等保单位", businessType = BusinessType.DELETE)
|
|
|
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
|
@DeleteMapping("/{ids}")
|
|
|
|
|
|
|
|
public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(tcDengbaoUnitService.deleteTcDengbaoUnitByIds(ids));
|
|
|
|
return toAjax(tcDengbaoUnitService.deleteTcDengbaoUnitByIds(ids));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|