| | |
| | | |
| | | import com.lf.server.annotation.SysLog; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.helper.HttpHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "请求打包") |
| | | @GetMapping(value = "/uploadReqPackaging") |
| | | public ResponseMsg<Object> uploadReqPackaging() { |
| | | @ApiOperation(value = "查询任务状态") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "任务ID", dataType = "String", paramType = "query", example = "29db09ee-2aae-4c62-bec0-0b5c5d8084e4") |
| | | }) |
| | | @GetMapping(value = "/selectTaskStatus") |
| | | public Object selectTaskStatus(String id, HttpServletRequest req) { |
| | | try { |
| | | if (StringHelper.isEmpty(id)) { |
| | | return fail("id不能为空"); |
| | | } |
| | | |
| | | return fmeService.getTaskStatus(id, req); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "请求打包") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "dirId", value = "目录ID", dataType = "Integer", paramType = "57"), |
| | | @ApiImplicitParam(name = "major", value = "专业", dataType = "String", paramType = "穿跨越") |
| | | }) |
| | | @GetMapping(value = "/uploadReqPackaging") |
| | | public ResponseMsg<Object> uploadReqPackaging(Integer dirId, String major, HttpServletRequest req) { |
| | | try { |
| | | if (null == dirId || dirId < StaticData.TWO) { |
| | | return fail("目录ID不能为空且大于1"); |
| | | } |
| | | |
| | | boolean isMajor = StaticData.CROSSING.equals(major) || StaticData.ROUTE.equals(major); |
| | | if (StringHelper.isEmpty(major) || !isMajor) { |
| | | return fail("专业只能是“穿跨越”或“线路”"); |
| | | } |
| | | |
| | | List<DirEntity> list = dirService.selectDirsForPrj(); |
| | | |
| | | return success(list); |
| | |
| | | String url = fmeService.getDownloadUrl(id, req); |
| | | |
| | | HttpHelper httpHelper = new HttpHelper(); |
| | | // res.sendRedirect(url) |
| | | httpHelper.service(req, res, url, null); |
| | | } |
| | | } catch (Exception ex) { |