| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package cn.com.goldenwater.dcproj.controller.wiujs;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.dcproj.model.BisInspWiujsWtrcr;
- import cn.com.goldenwater.dcproj.service.BisInspWiujsWtrcrService;
- import cn.com.goldenwater.target.CheckException;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import io.swagger.annotations.ApiParam;
- import org.apache.commons.lang3.StringUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- /**
- * @author lql
- * @date 2022-2-21
- */
- @Api(value = "节水型载体现场考核管理", tags = "节水型载体现场考核管理")
- @RestController
- @RequestMapping("/bis/insp/wiujs/wtrcr")
- public class BisInspWiujsWtrcrController extends BaseController {
- @Autowired
- private BisInspWiujsWtrcrService bisInspWiujsWtrcrService;
- @ApiOperation(value = "修改节水型载体现场考核")
- @RequestMapping(value = "", method = RequestMethod.POST)
- public BaseResponse<BisInspWiujsWtrcr> insert(@ApiParam(name = "bisInspWiujsWtrcr", value = "BisInspWiujsWtrcr", required = true) @RequestBody BisInspWiujsWtrcr bisInspWiujsWtrcr) {
- // 必填项判断
- if (StringUtils.isBlank(bisInspWiujsWtrcr.getRgstrId())) {
- throw new CheckException("缺少登记表编码");
- }
- int ret = bisInspWiujsWtrcrService.update(bisInspWiujsWtrcr);
- return buildSuccessResponse(bisInspWiujsWtrcr);
- }
- @ApiOperation(value = "根据ID删除节水型载体现场考核")
- @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
- public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- int ret = bisInspWiujsWtrcrService.delete(id);
- return buildSuccessResponse();
- }
- @ApiOperation(value = "根据ID获取节水型载体现场考核(单表)")
- @RequestMapping(value = "/{id}", method = RequestMethod.GET)
- public BaseResponse<BisInspWiujsWtrcr> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- BisInspWiujsWtrcr bisInspWiujsWtrcr = bisInspWiujsWtrcrService.get(id);
- return buildSuccessResponse(bisInspWiujsWtrcr);
- }
- }
|