EAS8.0WEB动态扩展开发中脚本中调用后台代码不生效:
各位老师好:
我使用EAS8.0WEB动态扩展开发平台对报销单据进行了扩展,在“功能扩展里面”自定义了一个Action(helpAction),在Action中使用脚本调用后台java类,本地测试是生效的,但是部署到服务器之后就不生效了,而且我在脚本里面添加的日志在后台也没有记录。
Action脚本如下:
var imp = JavaImporter();
imp.importPackage(Packages.java.util);
imp.importPackage(Packages.com.kingdee.bos.webframework.context);
imp.importPackage(Packages.javax.servlet.http);
imp.importPackage(Packages.com.kingdee.bos.webframework.json);
imp.importPackage(Packages.com.kingdee.eas.custom.cp.bc);
with(imp){
var ctx = WafContext.getInstance().getContext();
log.info("yawei:"+ctx.getClientHostIP());
log.info("yawei:"+request);
var reqJson = new HashMap();
var retJson = new HashMap();
reqJson .put("source",request.getParameter("source"));
reqJson .put("jobId",request.getParameter("jobId"));
reqJson .put("customer",request.getParameter("customer"));
reqJson .put("companyId",request.getParameter("companyId"));
reqJson .put("billType",request.getParameter("billType"));
reqJson .put("costCenterId",request.getParameter("costCenterId"));
reqJson .put("billable",request.getParameter("billable"));
retJson = WebBizaccountHelpFacadeFactory.getRemoteInstance().onAction(reqJson);//此处调用后台Java方法
JSONUtils.SUCCESS(retJson);
}
麻烦各位老师帮忙看一下,谢谢!
QQ图片20151110112823.png(126.24KB)
推荐阅读