| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- package cn.com.goldenwater.dcproj.controller.ststn;
- import cn.com.goldenwater.dcproj.model.AttStstnBase;
- import cn.com.goldenwater.dcproj.model.AttWtgtBase;
- import cn.com.goldenwater.dcproj.param.AttStstnBaseParam;
- import cn.com.goldenwater.dcproj.service.AttStstnBaseService;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.id.util.UuidUtil;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import io.swagger.annotations.ApiParam;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.apache.commons.lang3.StringUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.util.Assert;
- 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.RequestMethod;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.List;
- /**
- * @author lhc
- * @date 2021-7-13
- */
- @Api(value = "福建标准化工地-工程信息管理",tags="福建标准化工地-工程信息管理")
- @RestController
- @RequestMapping("/att/ststn/base")
- public class AttStstnBaseController extends BaseController {
- private Logger logger = LoggerFactory.getLogger(getClass());
- @Autowired
- private AttStstnBaseService attStstnBaseService;
- @ApiOperation(value = "修改福建标准化工地-工程信息")
- @RequestMapping(value = "", method = RequestMethod.POST)
- public BaseResponse<AttStstnBase> insert(@ApiParam(name = "attStstnBase", value = "AttStstnBase", required = true) @RequestBody AttStstnBase attStstnBase) {
- int ret = 0;
- if(StringUtils.isBlank(attStstnBase.getId())){
- ret = attStstnBaseService.insert(attStstnBase);
- } else {
- ret = attStstnBaseService.update(attStstnBase);
- }
- return buildSuccessResponse(attStstnBase);
- }
- @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 = attStstnBaseService.delete(id);
- return buildSuccessResponse();
- }
- @ApiOperation(value = "根据ID获取福建标准化工地-工程信息(单表)")
- @RequestMapping(value = "/{id}", method = RequestMethod.GET)
- public BaseResponse<AttStstnBase> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- AttStstnBase attStstnBase = attStstnBaseService.get(id);
- return buildSuccessResponse(attStstnBase);
- }
- @ApiOperation(value = "根据 objId 获取取水许可管理基本信息(单表)")
- @RequestMapping(value = "/getObjId/{objId}", method = RequestMethod.GET)
- public BaseResponse<AttStstnBase> getObjId(@ApiParam(name = "objId", value = "objId", required = true) @PathVariable String objId) {
- AttStstnBase attStstnBase = attStstnBaseService.getObjId(objId);
- return buildSuccessResponse(attStstnBase);
- }
- }
|