| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package cn.com.goldenwater.dcproj.controller.rsvr;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.dcproj.model.BisInspRsvrRgstr;
- import cn.com.goldenwater.dcproj.service.BisInspRsvrRgstrService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import io.swagger.annotations.ApiParam;
- import org.apache.commons.lang3.StringUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RestController;
- @Api(value = "APP 小水库审核流程接口", tags = "APP 小水库审核流程接口")
- @RestController
- @RequestMapping("/dc/insp/rsvr/active")
- public class BisInspRsvrActiveController extends BaseController {
- @Autowired
- private BisInspRsvrRgstrService bisInspRsvrRgstrService;
- @ApiOperation(value = "小水库审核流程接口,专家提交、助理提交报告;专家提交到助理-->成果讨论阶段(助理通过)-->中心修改阶段-->司局修改阶段:flag分别为:4,5,6,7")
- @RequestMapping(value = "/{regstrId}/{flag}", method = RequestMethod.GET)
- public BaseResponse delete(@ApiParam(name = "regstrId", value = "regstrId", required = true) @PathVariable String regstrId,
- @ApiParam(name = "flag", value = "flag", required = true) @PathVariable String flag) {
- if(StringUtils.isBlank(flag)){
- return buildFailResponse("阶段标识不能为空");
- }
- BisInspRsvrRgstr rsvrRgstr=bisInspRsvrRgstrService.get(regstrId);
- if(rsvrRgstr==null){
- return buildFailResponse("提交失败,无该登记信息记录");
- }
- if(flag.equals(rsvrRgstr.getState())){
- return buildFailResponse("该阶段信息已经提交!!");
- }
- rsvrRgstr=bisInspRsvrRgstrService.createCheckData(rsvrRgstr,flag,getCurrentPersId());
- bisInspRsvrRgstrService.update(rsvrRgstr);
- return buildSuccessResponse();
- }
- }
|