| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- package cn.com.goldenwater.dcproj.controller.zhejiang;
- import cn.com.goldenwater.dcproj.dto.BisInspRgstrDto;
- import cn.com.goldenwater.dcproj.model.BisZhejiangJgRgstr;
- import cn.com.goldenwater.dcproj.param.BisZhejiangJgRgstrParam;
- import cn.com.goldenwater.dcproj.service.BisZhejiangJgRgstrService;
- 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.apache.commons.lang3.StringUtils;
- import com.github.pagehelper.PageInfo;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- import cn.com.goldenwater.dcproj.param.TypeParam;
- /**
- * @author lune
- * @date 2020-5-12
- */
- @Api(value = "BIS 2020浙江强监管登记表3管理",tags="BIS 2020浙江强监管登记表3管理")
- @RestController
- @RequestMapping("/bis/zhejiang/jg/rgstr")
- public class BisZhejiangJgRgstrController extends BaseController {
- private Logger logger = LoggerFactory.getLogger(getClass());
- @Autowired
- private BisZhejiangJgRgstrService bisZhejiangJgRgstrService;
- @ApiOperation(value = "添加/修改2020浙江强监管登记表3")
- @RequestMapping(value = "", method = RequestMethod.POST)
- public BaseResponse<BisZhejiangJgRgstr> insert(@ApiParam(name = "bisZhejiangJgRgstr", value = "BisZhejiangJgRgstr", required = true) @RequestBody BisZhejiangJgRgstr bisZhejiangJgRgstr) {
- if(StringUtils.isBlank(bisZhejiangJgRgstr.getId())) {
- String uuid = UuidUtil.uuid(); // 生成uuid
- bisZhejiangJgRgstr.setId(uuid);
- bisZhejiangJgRgstrService.insert(bisZhejiangJgRgstr);
- }else{
- bisZhejiangJgRgstrService.update(bisZhejiangJgRgstr);
- }
- return buildSuccessResponse(bisZhejiangJgRgstr);
- }
- @ApiOperation(value = "根据ID删除2020浙江强监管登记表3")
- @RequestMapping(value = "/del/{id}", method = RequestMethod.GET)
- public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- int ret = bisZhejiangJgRgstrService.delete(id);
- return buildSuccessResponse();
- }
- @ApiOperation(value = "根据ID获取2020浙江强监管登记表3(单表)")
- @RequestMapping(value = "/{id}", method = RequestMethod.GET)
- public BaseResponse<BisZhejiangJgRgstr> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
- BisZhejiangJgRgstr bisZhejiangJgRgstr = bisZhejiangJgRgstrService.get(id);
- return buildSuccessResponse(bisZhejiangJgRgstr);
- }
- @ApiOperation(value = "获取2020浙江强监管登记表3(列表所有)")
- @RequestMapping(value = "/list", method = RequestMethod.POST)
- public BaseResponse<List<BisZhejiangJgRgstr>> list(@ApiParam(name = "bisZhejiangJgRgstrParam", value = "bisZhejiangJgRgstrParam", required = true) @RequestBody BisZhejiangJgRgstrParam bisZhejiangJgRgstrParam) {
- List<BisZhejiangJgRgstr> bisZhejiangJgRgstrList = bisZhejiangJgRgstrService.findList(bisZhejiangJgRgstrParam);
- return buildSuccessResponse(bisZhejiangJgRgstrList);
- }
- @ApiOperation(value = "获取2020浙江强监管登记表3(列表--分页)")
- @RequestMapping(value = "/page", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisZhejiangJgRgstr>> page(@ApiParam(name = "bisZhejiangJgRgstrParam", value = "bisZhejiangJgRgstrParam", required = true) @RequestBody BisZhejiangJgRgstrParam bisZhejiangJgRgstrParam) {
- PageInfo<BisZhejiangJgRgstr> bisZhejiangJgRgstrList = bisZhejiangJgRgstrService.findPageInfo(bisZhejiangJgRgstrParam);
- return buildSuccessResponse(bisZhejiangJgRgstrList);
- }
- @ApiOperation(value = "浙江强监管登记表-pc端(列表--分页)")
- @PostMapping("/rgstrs-pc")
- public BaseResponse<PageInfo<BisInspRgstrDto>> getZhejiangJgRegstrInfoToPc(@ApiParam(name = "typeParam", value = "typeParam", required = true)@RequestBody TypeParam typeParam){
- typeParam.setOrgId(getCurrentOrgId());
- return buildSuccessResponse(bisZhejiangJgRgstrService.getZhejiangJgRegstrInfo(typeParam));
- }
- @ApiOperation(value = "浙江强监管登记表-app端(列表--分页)")
- @GetMapping("/rgstrs-app")
- public BaseResponse<PageInfo<BisInspRgstrDto>> getZhejiangJgRegstrInfoToApp(@ApiParam(name = "typeParam", value = "typeParam", required = true) TypeParam typeParam){
- return buildSuccessResponse(bisZhejiangJgRgstrService.getZhejiangJgRegstrInfo(typeParam));
- }
- }
|