| | |
| | | DirService dirService; |
| | | |
| | | @Autowired |
| | | protected FmeService fmeService; |
| | | FmeService fmeService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询项目") |
| | |
| | | @ApiOperation(value = "请求打包") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "dirId", value = "目录ID", dataType = "Integer", paramType = "57"), |
| | | @ApiImplicitParam(name = "major", value = "专业", dataType = "String", paramType = "穿跨越") |
| | | @ApiImplicitParam(name = "major", value = "专业", dataType = "String", paramType = "穿跨越"), |
| | | @ApiImplicitParam(name = "isCut", value = "是否裁剪", dataType = "String", paramType = "NO") |
| | | }) |
| | | @GetMapping(value = "/uploadReqPackaging") |
| | | public ResponseMsg<Object> uploadReqPackaging(Integer dirId, String major, HttpServletRequest req) { |
| | | public ResponseMsg<Object> uploadReqPackaging(Integer dirId, String major, String isCut, 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) { |
| | | if (!isMajor) { |
| | | return fail("专业只能是“穿跨越”或“线路”"); |
| | | } |
| | | |
| | | List<DirEntity> list = dirService.selectDirsForPrj(); |
| | | boolean bCut = StaticData.YES.equals(isCut) || StaticData.NO.equals(isCut); |
| | | if (!bCut) { |
| | | return fail("是否裁剪只能是“YES”或“NO”"); |
| | | } |
| | | |
| | | return success(list); |
| | | DirEntity dir = dirService.selectDir(dirId); |
| | | if (null == dir) { |
| | | return fail("目录(id = " + dirId + ")不存在"); |
| | | } |
| | | |
| | | String id = fmeService.crdsPackaging(dir.getFullName(), major, isCut, req); |
| | | |
| | | return success(id); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |