| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- package cn.com.goldenwater.dcproj.controller.duty;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.dcproj.model.AttInspTypeDuty;
- import cn.com.goldenwater.dcproj.service.AttInspTypeDutyService;
- 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.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- /**
- * @author lhc
- * @date 2021-7-14
- */
- @Api(value = "xxx管理", tags = "xxx管理")
- @RestController
- @RequestMapping("/att/insp/type/duty")
- public class AttInspTypeDutyController extends BaseController {
- private Logger logger = LoggerFactory.getLogger(getClass());
- @Autowired
- private AttInspTypeDutyService attInspTypeDutyService;
- @ApiOperation(value = "修改xxx")
- @RequestMapping(value = "", method = RequestMethod.POST)
- public BaseResponse<AttInspTypeDuty> insert(@ApiParam(name = "attInspTypeDuty", value = "AttInspTypeDuty", required = true) @RequestBody AttInspTypeDuty attInspTypeDuty) {
- attInspTypeDutyService.insert(attInspTypeDuty);
- return buildSuccessResponse(attInspTypeDuty);
- }
- @ApiOperation(value = "根据ID删除xxx")
- @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
- public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- int ret = attInspTypeDutyService.delete(id);
- return buildSuccessResponse();
- }
- @ApiOperation(value = "根据ID获取xxx(单表)")
- @RequestMapping(value = "/{id}", method = RequestMethod.GET)
- public BaseResponse<AttInspTypeDuty> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- AttInspTypeDuty attInspTypeDuty = attInspTypeDutyService.get(id);
- return buildSuccessResponse(attInspTypeDuty);
- }
- @ApiOperation(value = "根据ID获取xxx(单表)")
- @RequestMapping(value = "/arrayByOrgId", method = RequestMethod.GET)
- public BaseResponse<String[]> arrayByOrgId() {
- return buildSuccessResponse(attInspTypeDutyService.arrayByOrgId(getCurrentOrgId()));
- }
- }
|