| | |
| | | import com.lf.server.annotation.SysLog; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.helper.HttpHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.service.data.DirService; |
| | | import com.lf.server.service.sys.RoleService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import com.lf.server.service.sys.UserService; |
| | | import com.lf.server.service.data.FmeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @RequestMapping("/crds") |
| | | public class CrdsController extends BaseController { |
| | | @Autowired |
| | | UserService userService; |
| | | |
| | | @Autowired |
| | | RoleService roleService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @Autowired |
| | | DirService dirService; |
| | | |
| | | @Autowired |
| | | protected FmeService fmeService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "鏌ヨ椤圭洰") |
| | |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "璇锋眰鎵撳寘") |
| | | @GetMapping(value = "/uploadReqPackaging") |
| | | public ResponseMsg<Object> uploadReqPackaging() { |
| | | try { |
| | | List<DirEntity> list = dirService.selectDirsForPrj(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "涓嬭浇鏂囦欢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "浠诲姟ID", dataType = "String", paramType = "query", example = "29db09ee-2aae-4c62-bec0-0b5c5d8084e4") |
| | | }) |
| | | @GetMapping(value = "/downloadFile") |
| | | public void downloadResult(String id, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | if (!StringHelper.isEmpty(id)) { |
| | | String url = fmeService.getDownloadUrl(id, req); |
| | | |
| | | HttpHelper httpHelper = new HttpHelper(); |
| | | // res.sendRedirect(url) |
| | | httpHelper.service(req, res, url, null); |
| | | } |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | } |