|
@@ -1,5 +1,6 @@
|
|
|
package org.springblade.manager.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -11,6 +12,8 @@ import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.constant.RoleConstant;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.manager.entity.FormulaBase;
|
|
|
+import org.springblade.manager.entity.WbsTreeContract;
|
|
|
+import org.springblade.manager.service.IWbsTreeContractService;
|
|
|
import org.springblade.manager.service.impl.FormulaBaseService;
|
|
|
import org.springblade.manager.vo.FormulaBaseVo;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -34,6 +37,7 @@ import java.util.Map;
|
|
|
public class FormulaBaseController extends BladeController {
|
|
|
|
|
|
private final FormulaBaseService service;
|
|
|
+ private final IWbsTreeContractService wbsTreeContractService;
|
|
|
/**
|
|
|
* 新增或修改
|
|
|
*/
|
|
@@ -82,7 +86,11 @@ public class FormulaBaseController extends BladeController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/get-file")
|
|
|
- public void getFile(HttpServletResponse response, String url) throws IOException {
|
|
|
+ public void getFile(HttpServletResponse response, String url,String pkeyId) throws IOException {
|
|
|
+ if(Func.isNotEmpty(pkeyId)){
|
|
|
+ WbsTreeContract one =this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId,pkeyId));
|
|
|
+ url=one.getHtmlUrl();
|
|
|
+ }
|
|
|
this.service.download(response,url);
|
|
|
}
|
|
|
|