添加接口调用pdf生成

This commit is contained in:
gityjf 2021-01-19 09:41:34 +08:00
parent 868594b8d7
commit bd2f223c4a

View File

@ -5,6 +5,7 @@ import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.JavaMethod;
import com.amarsoft.context.ASUser;
import com.tenwa.channelportal.action.generativecontract.WordToPDFUtil;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.stereotype.Controller;
import javax.servlet.ServletException;
@ -77,6 +78,15 @@ public class FlowController extends HttpServlet {
flowAction.setFlowNo(request.getParameter("flowno"));
flowAction.delete(tx);
tx.commit();
}else if ("pdf".equals(type)){
String srcPath = request.getParameter("srcPath");
String desPath = request.getParameter("desPath");
Boolean aboolean = WordToPDFUtil.Word2Pdf(srcPath,desPath);
if(aboolean){
sResult = "SUCCESS";
}else{
sResult = "ERROR";
}
}
result = sResult==null?"SUCCESS":sResult;
} catch ( Exception e ) {