%@page import="sso.org.tempuri.CSSDServiceSoapProxy"%>
<%@page import="com.forgon.security.model.User"%>
<%@page import="com.forgon.disinfectsystem.common.CssdUtils"%>
<%@page import="com.forgon.security.service.UserManager"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page import="com.forgon.tools.SpringBeanManger"%>
<%@page import="com.forgon.tools.Constants"%>
<%@page import="net.sf.json.JSONObject" %>
<%@page import="java.io.File" %>
<%@page import="java.util.ArrayList" %>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="com.forgon.directory.model.LoginInfo"%>
<%@ include file="/common/taglibs.jsp" %>
<%
ArrayList message = new ArrayList();
//票据
String ptickets = request.getParameter("ptickets");
//用户名
String pcode = request.getParameter("pcode");
if(StringUtils.isNotBlank(ptickets) && StringUtils.isNotBlank(pcode)){
String xmlInput=""
+ "Dingxiang"
+ ""+ ptickets +""
+ ""+ pcode +""
+ "";
// 0 成功
//String xmlResult = " 0 成功";
String xmlResult = new CSSDServiceSoapProxy().DHCWebInterface("ValidateTicket" , xmlInput);
try{
JSONObject json = (JSONObject)CssdUtils.xml2JsonCommon(xmlResult);
String resultCode = json.optString("ResultCode");
if(StringUtils.equals("0", resultCode)){
UserManager userManager = (UserManager)SpringBeanManger.getBean("userManager");
User user = userManager.getFirst("name", json.optString("ResultContent"));
if(user == null){
message.add("用户名:"+ json.optString("ResultContent") +"不存在");
}else{
pageContext.setAttribute("barcode", user.getBarcode());
}
}
else{
message.add(json.optString("ResultContent"));
}
}
catch(Exception e) {
message.add("xml的格式有误");
}
}else{
message.add("ptickets或pcode不能为空");
}
pageContext.setAttribute("message", message);
String companyName = CssdUtils.getSystemSetConfigByName("companyName");
String companyNameStr = "";
if(companyName == null || companyName.equals("forgon")){
companyNameStr = "©2016 广州孚峻信息技术有限公司 版权所有";
}else if(companyName.equals("dingxiang")){
companyNameStr = "©2016 广州丁香软件有限公司 版权所有";
}
session.setAttribute("companyName", companyNameStr);
String project = CssdUtils.getConfigProperty("project");
session.setAttribute("profile", project);
String imgPath = "disinfectsystem/config/" + project + "/img/logo_" + project +".png";
//System.out.println(application.getRealPath("/") + imgPath);
File file = new File(application.getRealPath("/") + imgPath);
if(file.exists()){
request.setAttribute("logoPath",imgPath);
}else{
if(companyName == null || companyName.equals("forgon")){
request.setAttribute("logoPath","themes/portalPage/img/logo_Forgon.png");
}else if(companyName.equals("dingxiang")){
request.setAttribute("logoPath","themes/portalPage/img/logo_dingxiangsoft.png");
}
}
%>
消毒供应质量追溯管理系统
<%-- --%>