| | |
| | | import com.lf.server.annotation.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.ctrl.DownloadReqEntity; |
| | | import com.lf.server.entity.show.ApplyEntity; |
| | | import com.lf.server.entity.show.FlowEntity; |
| | |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.service.data.DownloadService; |
| | | import com.lf.server.service.show.ApplyService; |
| | | import com.lf.server.service.show.FlowService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | public class ApplyController extends BaseController { |
| | | @Autowired |
| | | ApplyService applyService; |
| | | |
| | | @Autowired |
| | | FlowService flowService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询流程") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1") |
| | | @ApiImplicitParam(name = "applyid", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectFlows") |
| | | public ResponseMsg<Object> selectFlows(Integer id) { |
| | | public ResponseMsg<Object> selectFlows(Integer applyid) { |
| | | try { |
| | | List<FlowEntity> rs = applyService.selectFlows(id); |
| | | List<FlowEntity> rs = applyService.selectFlows(applyid); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "废弃申请") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1") |
| | | @ApiImplicitParam(name = "applyid", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/updateForDiscard") |
| | | public ResponseMsg<Object> updateForDiscard(Integer id) { |
| | | public ResponseMsg<Object> updateForDiscard(Integer applyid) { |
| | | try { |
| | | int rows = applyService.updateForDiscard(id); |
| | | int rows = applyService.updateForDiscard(applyid); |
| | | |
| | | return success(rows); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "重新提交") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "applyid", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/updateForResubmit") |
| | | public ResponseMsg<Object> updateForResubmit(Integer applyid) { |
| | | try { |
| | | int rows = applyService.updateForResubmit(applyid); |
| | | |
| | | return success(rows); |
| | | } catch (Exception ex) { |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "flowId", value = "申请流程ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/updateForSubmit") |
| | | public ResponseMsg<Object> updateForSubmit(Integer flowId) { |
| | | try { |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "flowId", value = "申请流程ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/updateForReject") |
| | | public ResponseMsg<Object> updateForReject(Integer flowId) { |
| | | try { |
| | | FlowEntity flowEntity = flowService.selectById(flowId); |
| | | if (null == flowEntity) { |
| | | return fail("找不到申请流程"); |
| | | } |
| | | if (flowEntity.getStatus() != 0) { |
| | | return fail("该申请流程无需要打回"); |
| | | } |
| | | |
| | | return success(null); |
| | | ApplyEntity applyEntity = applyService.selectById(flowEntity.getApplyid()); |
| | | if (null == applyEntity) { |
| | | return fail("找不到数据申请"); |
| | | } |
| | | if (!(applyEntity.getStatus() >= 0 && applyEntity.getStatus() <= StaticData.NINE)) { |
| | | return fail("该数据申请无需要打回"); |
| | | } |
| | | |
| | | Integer rows = applyService.updateForReject(applyEntity.getId(), flowEntity.getId()); |
| | | |
| | | return success(rows); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |