nidapeng
2024-03-20 c9f07c1f79e7ea9eb00925975d3ae2c9e8dcbd25
server/company/src/main/java/com/doumee/api/common/PublicController.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONObject;
import com.doumee.api.BaseController;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.annotation.excel.ExcelToPdfTool;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
@@ -16,6 +17,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@@ -45,7 +47,12 @@
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @ApiOperation("测试")
    @PostMapping("/testPdf")
    public String testPdf(@RequestParam Map<String,String> req, HttpServletResponse response) {
        ExcelToPdfTool.excelToPdf(req.get("f1"),req.get("f2"));
        return JSONObject.toJSONString(req);
    }
    @ApiOperation(value = "上传", notes = "上传", httpMethod = "POST", position = 6)
    @ApiImplicitParams({
@@ -298,7 +305,6 @@
                    if (true) {
                        // 关闭FTP流
                        // 移动成功,返回文件名
                        /*context.put("error", 0);
                        context.put("url", remoteFileName);
                        context.put("fullurl", remoteFileName);