| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- package cn.com.goldenwater.dcproj.controller.anze;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.dcproj.model.AttProjectInsuranceParticip;
- import cn.com.goldenwater.dcproj.param.AttProjectInsuranceParticipParam;
- import cn.com.goldenwater.dcproj.service.AttProjectInsuranceParticipService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import io.swagger.annotations.ApiParam;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.util.Assert;
- import org.springframework.web.bind.annotation.*;
- /**
- * @author lql
- * @date 2026-4-21
- */
- @Slf4j
- @Api(value = "水利工程参建单位信息管理", tags = "水利工程参建单位信息管理")
- @RestController
- @RequestMapping("/att/project/insurance/particip")
- public class AttProjectInsuranceParticipController extends BaseController {
- @Autowired
- private AttProjectInsuranceParticipService attProjectInsuranceParticipService;
- @ApiOperation(value = "添加水利工程参建单位信息")
- @RequestMapping(value = "/add", method = RequestMethod.POST)
- public BaseResponse<AttProjectInsuranceParticip> insert(
- @ApiParam(name = "attProjectInsuranceParticip", value = "AttProjectInsuranceParticip", required = true)
- @RequestBody AttProjectInsuranceParticip attProjectInsuranceParticip) {
- int ret = attProjectInsuranceParticipService.insert(attProjectInsuranceParticip);
- return buildSuccessResponse(attProjectInsuranceParticip);
- }
- @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 = attProjectInsuranceParticipService.delete(id);
- return buildSuccessResponse();
- }
- @ApiOperation(value = "更新水利工程参建单位信息信息")
- @RequestMapping(value = "/update", method = RequestMethod.POST)
- public BaseResponse<AttProjectInsuranceParticip> update(@ApiParam(name = "attProjectInsuranceParticip", value = "AttProjectInsuranceParticip", required = true)
- @RequestBody AttProjectInsuranceParticip attProjectInsuranceParticip) {
- Assert.notNull(attProjectInsuranceParticip.getId(), "主键id为必填参数");
- int ret = attProjectInsuranceParticipService.update(attProjectInsuranceParticip);
- return buildSuccessResponse(attProjectInsuranceParticip);
- }
- @ApiOperation(value = "根据ID获取水利工程参建单位信息(单表)")
- @RequestMapping(value = "/{id}", method = RequestMethod.GET)
- public BaseResponse<AttProjectInsuranceParticip> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- AttProjectInsuranceParticip attProjectInsuranceParticip = attProjectInsuranceParticipService.get(id);
- return buildSuccessResponse(attProjectInsuranceParticip);
- }
- @ApiOperation(value = "根据ID获取水利工程参建单位信息(单表)")
- @RequestMapping(value = "/getByProjectId/{id}", method = RequestMethod.GET)
- public BaseResponse<AttProjectInsuranceParticip> getByProjectId(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- AttProjectInsuranceParticipParam param = new AttProjectInsuranceParticipParam();
- param.setProjectId(id);
- AttProjectInsuranceParticip attProjectInsuranceParticip = attProjectInsuranceParticipService.getBy(param);
- return buildSuccessResponse(attProjectInsuranceParticip);
- }
- }
|