用水户和取水口信息
This commit is contained in:
@ -0,0 +1,110 @@
|
||||
package com.fastbee.data.controller.userRecharge;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.rechargecard.domain.NgInformationWaterIntake;
|
||||
import com.fastbee.rechargecard.service.INgInformationWaterIntakeService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 取水口信息Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rechargecard/intake")
|
||||
@Api(tags = "取水口信息")
|
||||
public class NgInformationWaterIntakeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INgInformationWaterIntakeService ngInformationWaterIntakeService;
|
||||
|
||||
/**
|
||||
* 查询取水口信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:intake:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询取水口信息列表")
|
||||
public TableDataInfo list(NgInformationWaterIntake ngInformationWaterIntake)
|
||||
{
|
||||
startPage();
|
||||
List<NgInformationWaterIntake> list = ngInformationWaterIntakeService.selectNgInformationWaterIntakeList(ngInformationWaterIntake);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出取水口信息列表
|
||||
*/
|
||||
@ApiOperation("导出取水口信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:intake:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, NgInformationWaterIntake ngInformationWaterIntake)
|
||||
{
|
||||
List<NgInformationWaterIntake> list = ngInformationWaterIntakeService.selectNgInformationWaterIntakeList(ngInformationWaterIntake);
|
||||
ExcelUtil<NgInformationWaterIntake> util = new ExcelUtil<NgInformationWaterIntake>(NgInformationWaterIntake.class);
|
||||
util.exportExcel(response, list, "取水口信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取取水口信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:intake:query')")
|
||||
@GetMapping(value = "/{intakeId}")
|
||||
@ApiOperation("获取取水口信息详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("intakeId") Long intakeId)
|
||||
{
|
||||
return success(ngInformationWaterIntakeService.selectNgInformationWaterIntakeByIntakeId(intakeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增取水口信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:intake:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增取水口信息")
|
||||
public AjaxResult add(@RequestBody NgInformationWaterIntake ngInformationWaterIntake)
|
||||
{
|
||||
return toAjax(ngInformationWaterIntakeService.insertNgInformationWaterIntake(ngInformationWaterIntake));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改取水口信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:intake:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改取水口信息")
|
||||
public AjaxResult edit(@RequestBody NgInformationWaterIntake ngInformationWaterIntake)
|
||||
{
|
||||
return toAjax(ngInformationWaterIntakeService.updateNgInformationWaterIntake(ngInformationWaterIntake));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除取水口信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:intake:remove')")
|
||||
@DeleteMapping("/{intakeIds}")
|
||||
@ApiOperation("删除取水口信息")
|
||||
public AjaxResult remove(@PathVariable Long[] intakeIds)
|
||||
{
|
||||
return toAjax(ngInformationWaterIntakeService.deleteNgInformationWaterIntakeByIntakeIds(intakeIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.fastbee.data.controller.userRecharge;
|
||||
|
||||
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.rechargecard.domain.NgInformationWaterUser;
|
||||
import com.fastbee.rechargecard.service.INgInformationWaterUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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;
|
||||
|
||||
import static com.fastbee.common.utils.PageUtils.startPage;
|
||||
|
||||
/**
|
||||
* 用水户信息Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ng/user")
|
||||
@Api(tags = "用水户信息")
|
||||
public class NgInformationWaterUserController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INgInformationWaterUserService ngInformationWaterUserService;
|
||||
|
||||
/**
|
||||
* 查询用水户信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:user:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询用水户信息列表")
|
||||
public TableDataInfo list(NgInformationWaterUser ngInformationWaterUser)
|
||||
{
|
||||
startPage();
|
||||
List<NgInformationWaterUser> list = ngInformationWaterUserService.selectNgInformationWaterUserList(ngInformationWaterUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用水户信息列表
|
||||
*/
|
||||
@ApiOperation("导出用水户信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('iot:user:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, NgInformationWaterUser ngInformationWaterUser)
|
||||
{
|
||||
List<NgInformationWaterUser> list = ngInformationWaterUserService.selectNgInformationWaterUserList(ngInformationWaterUser);
|
||||
ExcelUtil<NgInformationWaterUser> util = new ExcelUtil<NgInformationWaterUser>(NgInformationWaterUser.class);
|
||||
util.exportExcel(response, list, "用水户信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用水户信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:user:query')")
|
||||
@GetMapping(value = "/{waterUserId}")
|
||||
@ApiOperation("获取用水户信息详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("waterUserId") Long waterUserId)
|
||||
{
|
||||
return success(ngInformationWaterUserService.selectNgInformationWaterUserByWaterUserId(waterUserId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用水户信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:user:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增用水户信息")
|
||||
public AjaxResult add(@RequestBody NgInformationWaterUser ngInformationWaterUser)
|
||||
{
|
||||
return toAjax(ngInformationWaterUserService.insertNgInformationWaterUser(ngInformationWaterUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用水户信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:user:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改用水户信息")
|
||||
public AjaxResult edit(@RequestBody NgInformationWaterUser ngInformationWaterUser)
|
||||
{
|
||||
return toAjax(ngInformationWaterUserService.updateNgInformationWaterUser(ngInformationWaterUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用水户信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:user:remove')")
|
||||
@DeleteMapping("/{waterUserIds}")
|
||||
@ApiOperation("删除用水户信息")
|
||||
public AjaxResult remove(@PathVariable Long[] waterUserIds)
|
||||
{
|
||||
return toAjax(ngInformationWaterUserService.deleteNgInformationWaterUserByWaterUserIds(waterUserIds));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user