| | |
| | | import com.lf.server.service.data.DownloadService; |
| | | import com.lf.server.service.data.MetaService; |
| | | import com.lf.server.service.data.VerService; |
| | | import com.lf.server.service.show.CadService; |
| | | import com.lf.server.service.sys.DepService; |
| | | import com.lf.server.service.sys.DownlogService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | |
| | | @RestController |
| | | @RequestMapping("/meta") |
| | | public class MetaController extends BaseController { |
| | | @Autowired |
| | | @Resource |
| | | MetaService metaService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | TokenService tokenService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | BaseQueryService baseQueryService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | DownlogService downlogService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | DownloadService downloadService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | VerService verService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | DepService depService; |
| | | |
| | | @Resource |
| | | CadService cadService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "分页查询并返回记录数") |
| | |
| | | List<MetaEntity> rs = metaService.selectByPage(depcode, dircode, verid, name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "根据GUID查询GDB") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "guid", value = "GUID", dataType = "String", paramType = "query", example = "d58e66d9606a4b85e7c8ab43b3db0b55") |
| | | }) |
| | | @GetMapping(value = "/selectGdbByGuid") |
| | | public ResponseMsg<Object> selectGdbByGuid(String guid) { |
| | | try { |
| | | if (StringHelper.isEmpty(guid)) { |
| | | return fail("文件GUID值不能为空", null); |
| | | } |
| | | |
| | | List<MetaEntity> rs = metaService.selectGdbByGuid(guid); |
| | | |
| | | return success(null == rs ? 0 : rs.size(), rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询Dwg转换") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "元数据ID", dataType = "int", paramType = "query", example = "7715"), |
| | | @ApiImplicitParam(name = "isAttach", value = "是否为附件", dataType = "Boolean", paramType = "query", example = "false") |
| | | }) |
| | | @GetMapping(value = "/selectConvertToDwg") |
| | | public ResponseMsg<Object> selectConvertToDwg(int id, Boolean isAttach) { |
| | | try { |
| | | String rs = cadService.convert(id, isAttach); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "MetaEntity", paramType = "body") |