¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.dncFlow.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.modules.dnc.response.CommonCode; |
| | | import org.jeecg.modules.dnc.response.DataResponseResult; |
| | | import org.jeecg.modules.dnc.response.QueryPageResponseResult; |
| | | import org.jeecg.modules.dnc.response.ResponseResult; |
| | | import org.jeecg.modules.dncFlow.entity.AssignFileStream; |
| | | import org.jeecg.modules.dncFlow.ext.AssignFileStreamExt; |
| | | import org.jeecg.modules.dncFlow.request.ApproveBatchRequest; |
| | | import org.jeecg.modules.dncFlow.request.AssignFileRequest; |
| | | import org.jeecg.modules.dncFlow.request.AssignFileStreamQueryRequest; |
| | | import org.jeecg.modules.dncFlow.service.IAssignFileStreamService; |
| | | import org.jeecg.modules.dncFlow.vo.AssignFlowTaskVo; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Api(tags = "DNCææ´¾è®¾å¤æµç¨æä½") |
| | | @RestController |
| | | @RequestMapping("/nc/activit") |
| | | public class AssignFileStreamController { |
| | | @Resource |
| | | private IAssignFileStreamService assignFileStreamService; |
| | | |
| | | @AutoLog(value = "DNCææ´¾è®¾å¤æµç¨æä½-å¯å¨æµç¨ ä¿åç¸åºçæ°æ® ç»å®businessKey") |
| | | @ApiOperation(value = "DNCææ´¾è®¾å¤æµç¨æä½-å¯å¨æµç¨ ä¿åç¸åºçæ°æ® ç»å®businessKey", notes = "DNCææ´¾è®¾å¤æµç¨æä½-å¯å¨æµç¨ ä¿åç¸åºçæ°æ® ç»å®businessKey") |
| | | @PostMapping("/assign/file/apply") |
| | | public Result<?> applyAssignFile(@RequestBody AssignFileStream stream) { |
| | | return assignFileStreamService.applyAssignFile(stream); |
| | | } |
| | | |
| | | @AutoLog(value = "DNCææ´¾è®¾å¤æµç¨æä½-å®¡æ¹æå¡") |
| | | @ApiOperation(value = "DNCææ´¾è®¾å¤æµç¨æä½-å®¡æ¹æå¡", notes = "DNCææ´¾è®¾å¤æµç¨æä½-å®¡æ¹æå¡") |
| | | @PostMapping("/assign/file/approve") |
| | | public ResponseResult approveAssignFile(@RequestBody AssignFlowTaskVo assignFlowTaskVo) { |
| | | boolean b = assignFileStreamService.approveAssignFile(assignFlowTaskVo); |
| | | if(b) |
| | | return new ResponseResult(CommonCode.SUCCESS); |
| | | return new ResponseResult(CommonCode.FAIL); |
| | | } |
| | | |
| | | @AutoLog(value = "DNCææ´¾è®¾å¤æµç¨æä½-æ¹éææ´¾å°è®¾å¤") |
| | | @ApiOperation(value = "DNCææ´¾è®¾å¤æµç¨æä½-æ¹éææ´¾å°è®¾å¤", notes = "DNCææ´¾è®¾å¤æµç¨æä½-æ¹éææ´¾å°è®¾å¤") |
| | | @PostMapping("/assign/file/batch/apply") |
| | | public ResponseResult applyBatchAssignFile(@RequestBody AssignFileRequest assignFileRequest) { |
| | | boolean b = assignFileStreamService.applyBatchAssignFile(assignFileRequest); |
| | | if(b) |
| | | return new ResponseResult(CommonCode.SUCCESS); |
| | | return new ResponseResult(CommonCode.FAIL); |
| | | } |
| | | |
| | | @AutoLog(value = "DNCææ´¾è®¾å¤æµç¨æä½-æ¹é审æ¹") |
| | | @ApiOperation(value = "DNCææ´¾è®¾å¤æµç¨æä½-æ¹é审æ¹", notes = "DNCææ´¾è®¾å¤æµç¨æä½-æ¹é审æ¹") |
| | | @PostMapping("/assign/file/batch/approve") |
| | | public ResponseResult approveBatchAssignFile(@RequestBody ApproveBatchRequest approveBatchRequest) { |
| | | boolean b = assignFileStreamService.approveBatchAssignFile(approveBatchRequest); |
| | | if(b) |
| | | return new ResponseResult(CommonCode.SUCCESS); |
| | | return new ResponseResult(CommonCode.FAIL); |
| | | } |
| | | |
| | | @AutoLog(value = "DNCææ´¾è®¾å¤æµç¨æä½-å·²åå表è·å") |
| | | @ApiOperation(value = "DNCææ´¾è®¾å¤æµç¨æä½-å·²åå表è·å", notes = "DNCææ´¾è®¾å¤æµç¨æä½-å·²åå表è·å") |
| | | @GetMapping("/find/page") |
| | | public Result<?> findPageList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, AssignFileStreamQueryRequest request) { |
| | | return assignFileStreamService.findPageList(pageNo, pageSize, request); |
| | | } |
| | | |
| | | @AutoLog(value = "DNCææ´¾è®¾å¤æµç¨æä½-æ¥è¯¢ææ¡£ç审æ¹è®°å½") |
| | | @ApiOperation(value = "DNCææ´¾è®¾å¤æµç¨æä½-æ¥è¯¢ææ¡£ç审æ¹è®°å½", notes = "DNCææ´¾è®¾å¤æµç¨æä½-æ¥è¯¢ææ¡£ç审æ¹è®°å½") |
| | | @GetMapping("/find/page/{page}/{size}/{docId}") |
| | | public QueryPageResponseResult<AssignFileStreamExt> findPageListByDocId(@PathVariable("page") int page, @PathVariable("size") int size, @PathVariable("docId") String docId) { |
| | | return assignFileStreamService.findPageListByDocId(page, size, docId); |
| | | } |
| | | |
| | | @AutoLog(value = "DNCææ´¾è®¾å¤æµç¨æä½-è·åå¯ç¨æµç¨çæ è®°") |
| | | @ApiOperation(value = "DNCææ´¾è®¾å¤æµç¨æä½-è·åå¯ç¨æµç¨çæ è®°", notes = "DNCææ´¾è®¾å¤æµç¨æä½-è·åå¯ç¨æµç¨çæ è®°") |
| | | @GetMapping("/get/enable/flag") |
| | | public DataResponseResult<Boolean> getActiveEnable() { |
| | | Boolean b = assignFileStreamService.getFlowableEnable(); |
| | | return new DataResponseResult<>(CommonCode.SUCCESS, b); |
| | | } |
| | | |
| | | @GetMapping(value = "/selectVoById") |
| | | public Result<AssignFileStream> selectVoById(@RequestParam(name="id") String id){ |
| | | return Result.OK(assignFileStreamService.getAssignFileStreamDetail(id)); |
| | | } |
| | | } |