a85695799eb49da98f492f5c3ccc59bc5ec9e03b.svn-base 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package cn.com.goldenwater.dcproj.controller.rsvr;
  2. import cn.com.goldenwater.core.web.BaseController;
  3. import cn.com.goldenwater.core.web.BaseResponse;
  4. import cn.com.goldenwater.dcproj.model.BisInspRsvrRgstr;
  5. import cn.com.goldenwater.dcproj.service.BisInspRsvrRgstrService;
  6. import io.swagger.annotations.Api;
  7. import io.swagger.annotations.ApiOperation;
  8. import io.swagger.annotations.ApiParam;
  9. import org.apache.commons.lang3.StringUtils;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.web.bind.annotation.PathVariable;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RequestMethod;
  14. import org.springframework.web.bind.annotation.RestController;
  15. @Api(value = "APP 小水库审核流程接口", tags = "APP 小水库审核流程接口")
  16. @RestController
  17. @RequestMapping("/dc/insp/rsvr/active")
  18. public class BisInspRsvrActiveController extends BaseController {
  19. @Autowired
  20. private BisInspRsvrRgstrService bisInspRsvrRgstrService;
  21. @ApiOperation(value = "小水库审核流程接口,专家提交、助理提交报告;专家提交到助理-->成果讨论阶段(助理通过)-->中心修改阶段-->司局修改阶段:flag分别为:4,5,6,7")
  22. @RequestMapping(value = "/{regstrId}/{flag}", method = RequestMethod.GET)
  23. public BaseResponse delete(@ApiParam(name = "regstrId", value = "regstrId", required = true) @PathVariable String regstrId,
  24. @ApiParam(name = "flag", value = "flag", required = true) @PathVariable String flag) {
  25. if(StringUtils.isBlank(flag)){
  26. return buildFailResponse("阶段标识不能为空");
  27. }
  28. BisInspRsvrRgstr rsvrRgstr=bisInspRsvrRgstrService.get(regstrId);
  29. if(rsvrRgstr==null){
  30. return buildFailResponse("提交失败,无该登记信息记录");
  31. }
  32. if(flag.equals(rsvrRgstr.getState())){
  33. return buildFailResponse("该阶段信息已经提交!!");
  34. }
  35. rsvrRgstr=bisInspRsvrRgstrService.createCheckData(rsvrRgstr,flag,getCurrentPersId());
  36. bisInspRsvrRgstrService.update(rsvrRgstr);
  37. return buildSuccessResponse();
  38. }
  39. }