package com.chinaweal.aiccs.aiccs.revoke.controller;

import com.chinaweal.aiccs.common.base.controller.BaseController;
import com.chinaweal.aiccs.common.util.PoiUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.net.URLDecoder;

/**
 * @author Lee
 * @since 2021/5/24 17:17
 */
@RestController
@RequestMapping("/poitest")
public class PoiController extends BaseController {

    @PostMapping("saveCaseFinalTemplate")
    public void saveCaseFinalTemplate(@RequestBody String html) throws Exception {
        String decode = URLDecoder.decode(html, "UTF-8");
        System.out.println(decode);
        PoiUtils.htmltoDocx(decode);
    }
}
