| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- package cn.com.goldenwater.dcproj.controller.safeprod;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.dcproj.model.ChkSafeStatListIndustry;
- import cn.com.goldenwater.dcproj.param.ChkSafeStatListIndustryParam;
- import cn.com.goldenwater.dcproj.service.ChkSafeStatListIndustryService;
- import cn.com.goldenwater.dcproj.utils.StringUtils;
- import com.github.pagehelper.PageInfo;
- 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.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.RestController;
- import java.util.List;
- /**
- * 成都市水务行业安全大检查行业(领域)Controller
- *
- * @author ruoyi
- * @date 2023-02-22
- */
- @Api(value = "成都市水务行业安全大检查行业(领域)",tags="成都市水务行业安全大检查行业(领域)")
- @RestController
- @RequestMapping("/chk/safe/stat/industry")
- public class ChkSafeStatListIndustryController extends BaseController
- {
- private Logger logger = LoggerFactory.getLogger(getClass());
- /**
- * 成都市水务行业安全大检查行业(领域) 服务
- */
- @Autowired
- private ChkSafeStatListIndustryService chkSafeStatListIndustryService;
- /**
- * 新增/编辑成都市水务行业安全大检查行业(领域)单表
- */
- @ApiOperation(value = "修改")
- @RequestMapping(value = "/", method = RequestMethod.POST)
- public BaseResponse insert(@ApiParam(name = "chkSafeStatListIndustry", value = "ChkSafeStatListIndustry", required = true)
- @RequestBody ChkSafeStatListIndustry chkSafeStatListIndustry) {
- int ret = 0;
- if (StringUtils.isBlank(chkSafeStatListIndustry.getId())) {
- chkSafeStatListIndustry.setOrgId(getCurrentOrgId());
- chkSafeStatListIndustry.setPersId(getCurrentPersId());
- ret = chkSafeStatListIndustryService.insert(chkSafeStatListIndustry);
- } else {
- ret = chkSafeStatListIndustryService.update(chkSafeStatListIndustry);
- }
- return buildSuccessResponse(chkSafeStatListIndustry);
- }
- /**
- * 删除成都市水务行业安全大检查行业(领域) 单表
- */
- @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 = chkSafeStatListIndustryService.delete(id);
- return buildSuccessResponse();
- }
- /**
- * 查询成都市水务行业安全大检查行业(领域)单表
- */
- @ApiOperation(value = "根据ID获取单表")
- @RequestMapping(value = "/{id}", method = RequestMethod.GET)
- public BaseResponse<ChkSafeStatListIndustry> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- ChkSafeStatListIndustry chkSafeStatListIndustry = chkSafeStatListIndustryService.get(id);
- return buildSuccessResponse(chkSafeStatListIndustry);
- }
- /**
- * 查询成都市水务行业安全大检查行业(领域)列表
- */
- @ApiOperation(value = "列表--分页")
- @RequestMapping(value = "/page", method = RequestMethod.POST)
- public BaseResponse<PageInfo> page(@ApiParam(name = "chkSafeStatListIndustryParam", value = "chkSafeStatListIndustryParam", required = true)
- @RequestBody ChkSafeStatListIndustryParam chkSafeStatListIndustryParam) {
- chkSafeStatListIndustryParam.setOrgId(getCurrentOrgId());
- return buildSuccessResponse(chkSafeStatListIndustryService.findPageInfo(chkSafeStatListIndustryParam));
- }
- /**
- * 查询成都市水务行业安全大检查行业(领域)列表 下拉框列表
- */
- @ApiOperation(value = "下拉框列表")
- @RequestMapping(value = "/selectOptions", method = RequestMethod.POST)
- public BaseResponse<List<ChkSafeStatListIndustry>> querySelectOptions() {
- return buildSuccessResponse(chkSafeStatListIndustryService.querySelectOptions(null));
- }
- }
|