Commit 37cf42bb by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents 80a0bad5 3f7172ba
......@@ -63,14 +63,14 @@ public class Iplat4jUtils {
* @return
*/
public static Map getDoc02ById(String docId) {
Map dbDm02 = Iplat4jTools.EuDm02.getByDocId(docId);
if (MapUtils.isEmpty(dbDm02)) {
Map document = platFileUploader.getDocument(docId);
if (MapUtils.isEmpty(document)) {
return null;
}
String chgName = dbDm02.get("chgName").toString();
String docPath = dbDm02.get("realPath").toString();
dbDm02.put("url", docPath + "/" + chgName);
return dbDm02;
String chgName = document.get("chgName").toString();
String docPath = document.get("realPath").toString();
document.put("url", docPath + "/" + chgName);
return document;
}
}
......@@ -162,7 +162,7 @@ public class ServiceHGSC101 extends ServiceEPBase {
Map updateMap = new HashMap();
updateMap.put(HGSC001.FIELD_proj_code, projCode);
updateMap.put(HGSC001.FIELD_proj_name, dcContractList.getTitle());
DaoUtils.insert(HgScSqlConstant.HgSc001.UPDATE_PROJ_NAME, dbSc001);
DaoUtils.update(HgScSqlConstant.HgSc001.UPDATE_PROJ_NAME, dbSc001);
}
}
}
......
......@@ -132,7 +132,7 @@
<script src="${iPlatStaticURL}/iplatui/assets/js/polyfills/iplat.ui.ie8.polyfills.min.js"></script>
<![endif]-->
<script src="${iPlatStaticURL}/iPlatV6-login.js"></script>
<script src="${iPlatStaticURL}/iPlatV7-login.js"></script>
<%--引入RSA加密js--%>
<script src="${iPlatStaticURL}/iplatui/js/jsencrypt.js"></script>
<%
......
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.baosight.iplat4j.core.FrameworkInfo" %>
<%@ page import="java.io.File" %>
<%
String domain = FrameworkInfo.getProjectAppTopDomain();
if (domain != null && domain.startsWith(".")) {
domain = domain.substring(1);
%>
<script type="text/javascript">
try {
document.domain = '<%= domain %>';
} catch (ex) {
alert('model not valid[<%= domain %>]');
}
</script>
<%
}
%>
<%
String directmode = request.getParameter("maintain") != null ? request.getParameter("maintain").toString() : "";
RequestDispatcher rd;
String appName = FrameworkInfo.getProjectAppName();
org.springframework.security.core.context.SecurityContextHolder.clearContext();
session.setAttribute("iplat.logout", "1");
session.invalidate();
String entryChoice = FrameworkInfo.getText("entryChoice");
String url = "/DispatchAction.do?efFormEname=ECTM40&nodeId=0000000099999999&nodeType=s&templateType=0";
if (entryChoice.equals("template")) {
//从模板进入登录页面
rd = request.getRequestDispatcher(url);
try {
rd.forward(request, response);
} catch (ServletException e1) {
e1.printStackTrace();
} finally {
out.clear();
out = pageContext.pushBody();
}
} else if (entryChoice.equals("static")) {
// 从静态页面进入登录页面
// 判断缓存文件是否存在
String requestURL = request.getRequestURL().toString();
String _url = requestURL.substring(0, requestURL.indexOf(request.getContextPath())) + request.getContextPath();
String _urlHtml = "/login.html";
java.io.File file = new java.io.File(request.getRealPath("") + _urlHtml);
if (!file.exists()) {
//生成对应的html静态文件
try {
//+url;
java.io.FileOutputStream blankFile = new java.io.FileOutputStream(request.getRealPath("") + _urlHtml);
blankFile.write(new byte[0]);
java.net.URL requestUrl = new java.net.URL(_url);
System.out.println(_url);
java.net.HttpURLConnection con = (java.net.HttpURLConnection) requestUrl.openConnection();
con.connect();
java.io.FileOutputStream fileout = new java.io.FileOutputStream(request.getRealPath("") + _urlHtml);
byte[] bytes = new byte[1024];
int len = 0;
while ((len = con.getInputStream().read(bytes)) != -1) {
fileout.write(bytes, 0, len);
}
} catch (Exception e) {
e.printStackTrace();
out.print("生成静态html文件出错!");
}
}
File _file = new File(request.getRealPath("") + _urlHtml);
if (_file.length() == 0) {
rd = request.getRequestDispatcher(url);
try {
rd.forward(request, response);
} catch (ServletException e1) {
e1.printStackTrace();
} finally {
out.clear();
out = pageContext.pushBody();
}
} else {
response.sendRedirect(request.getContextPath() + _urlHtml);
}
} else {
//以正常方式进入登录首页
rd = request.getRequestDispatcher("iPlatV7-login.jsp");
try {
rd.forward(request, response);
} catch (ServletException e1) {
e1.printStackTrace();
} finally {
out.clear();
out = pageContext.pushBody();
}
}
%>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment