| | |
| | | package com.lf.server.controller.show; |
| | | |
| | | import com.lf.server.annotation.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.HttpStatus; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.StaticData; |
| | |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.entity.show.PipelineEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.PathHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.helper.WebHelper; |
| | | import com.lf.server.mapper.show.MarkMapper; |
| | | import com.lf.server.service.all.BaseQueryService; |
| | | import com.lf.server.service.all.BaseUploadService; |
| | | import com.lf.server.service.all.UploadAttachService; |
| | | import com.lf.server.service.data.DataQueryService; |
| | | import com.lf.server.service.data.DownloadService; |
| | | import com.lf.server.service.show.MarkService; |
| | | import com.lf.server.service.show.PipelineService; |
| | |
| | | @Api(tags = "综合展示\\首页") |
| | | @RestController |
| | | @RequestMapping("/comprehensive") |
| | | public class ComprehensiveController extends BaseController { |
| | | public class ComprehensiveController extends ModelController { |
| | | @Autowired |
| | | BaseQueryService baseQueryService; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | UploadAttachService uploadAttachService; |
| | | |
| | | @Autowired |
| | | DataQueryService dataQueryService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询管线") |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "上传文件") |
| | | @ResponseBody |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "tabName", value = "表名", dataType = "String", paramType = "query", example = "lf.sys_style"), |
| | | @ApiImplicitParam(name = "eventid", value = "主键", dataType = "String", paramType = "query", example = "fa25979a5ef8b43ba82a0be35b3fb0d4") |
| | | }) |
| | | @PostMapping(value = "/uploadFiles") |
| | | public ResponseMsg<Integer> uploadFiles(String tabName, String eventid, @RequestParam("file") MultipartFile[] files, HttpServletRequest req) { |
| | | try { |
| | | if (StringHelper.isEmpty(tabName) || StringHelper.isEmpty(eventid)) { |
| | | return fail("参数不能为空", null); |
| | | } |
| | | if (null == files || files.length == 0) { |
| | | return fail("文件上传为空", 0); |
| | | } |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | Integer count = dataQueryService.uploadFiles(ue, tabName, eventid, files, req); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex, 0); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "下载文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "guid", value = "文件GUID", dataType = "String", paramType = "query") |