第一次提交

This commit is contained in:
2025-09-12 17:38:40 +08:00
commit 20924e08dd
1476 changed files with 367896 additions and 0 deletions

View File

@@ -0,0 +1,192 @@
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import com.zcsoft.util.*;
import com.zcsoft.dbvisit.DB;
import com.wxzd.wms.util.ServerUtil;
import com.zcsoft.purview.data.Purview;
import com.wxzd.wms.sys.data.ModuleConstant;
import com.wxzd.wms.cpgl.data.WlRkzlItem;
import com.wxzd.wms.cpgl.server.CprkglManager;
import com.wxzd.wms.stock.server.CkczManager;
import com.zcsoft.stock.*;
import com.zcsoft.client.*;
public final class cppxx_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/xml; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("<?xml version=\"1.0\" encoding=\"gb2312\"?>\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
com.zcsoft.dbvisit.DB db1 = null;
synchronized (application) {
db1 = (com.zcsoft.dbvisit.DB) _jspx_page_context.getAttribute("db1", PageContext.APPLICATION_SCOPE);
if (db1 == null){
db1 = new com.zcsoft.dbvisit.DB();
_jspx_page_context.setAttribute("db1", db1, PageContext.APPLICATION_SCOPE);
}
}
out.write('\r');
out.write('\n');
com.zcsoft.purview.data.UserInfoData userInfo = null;
synchronized (session) {
userInfo = (com.zcsoft.purview.data.UserInfoData) _jspx_page_context.getAttribute("userInfo", PageContext.SESSION_SCOPE);
if (userInfo == null){
userInfo = new com.zcsoft.purview.data.UserInfoData();
_jspx_page_context.setAttribute("userInfo", userInfo, PageContext.SESSION_SCOPE);
}
}
out.write('\r');
out.write('\n');
String errorInfo = null, code=null;
String[] items = null;
if (userInfo.getYhm() == null)
{
out.write("<redirect href=\"sm.jsp\"/>");
return;
}
code = request.getParameter("code");
String sql;
Map info = null;
String sl = null;
String cpbh = null, tpbh = code;
StringBuffer remainderItems = new StringBuffer();
System.out.print("code>"+code);
try
{
//可以做到后台调用,临时处理。
if (code.length()==24)//成品库箱条码
{
sql = "SELECT a.tpbh,a.sl,b.cpmc FROM cprkzl a JOIN cpxx b ON a.cpbh=b.cpbh WHERE a.zt!=2 AND a.tpbh=?";
info = db1.getSingleRow(sql, code);
if (info == null)//无记录需要自动插入记录
{
// 检查托盘是否在库
sql = "SELECT kwbh FROM cpkcxx WHERE tpbh=? AND sl>0";
String kw = (String)db1.getSingleField(sql, code);
if (!ServerUtil.isNull(kw)) {
throw new RuntimeException(code + "记录在库,存放库位 " + kw);
}
cpbh = code.substring(0, 10);
// 数量
sl = code.substring(20, 24);
//空箱条码后面四个0数量需要转换成1
if (sl.equals("0000")){
sl = "1";
}
}//之前已经存在的记录 20171106
else
{
throw new RuntimeException(code + "已经有任务指令生成!");
}
}else if (code.length()==10){
//如果长度是10位的物料编码。
sl = "1";
cpbh = code;
}else {//塑件库使用的箱条码,是在打印条码的时候就生成了组盘记录,之后只是扫码入库分配库位
info = db1.getSingleRow("SELECT a.tpbh,a.sl,b.cpmc FROM cprkzl a JOIN cpxx b ON a.cpbh=b.cpbh WHERE a.zt!=2 AND a.tpbh=?", code);
if(info==null){
throw new RuntimeException("无此条码 " + code + " 的组盘记录");
}
}
if (info == null){
// 效验 物料档案是否有这种物料编码
sql = "SELECT cpbh,cpmc FROM cpxx WHERE cpbh=?";
info = db1.getSingleRow(sql, cpbh);
if (info == null) {
throw new RuntimeException("物料编码 " + cpbh + "不存在");
}
info.put("sl", sl);
info.put("tpbh", tpbh);
}
remainderItems.append("cpmc="+info.get("cpmc"));
remainderItems.append(";sl="+info.get("sl"));
remainderItems.append(";tpbh="+info.get("tpbh"));
}
catch (Exception ex)
{
//ex.printStackTrace();
errorInfo = ex.getMessage();
if (errorInfo == null) errorInfo = ex.toString();
}
//返回结果
if (errorInfo != null)
{
out.write("<result status=\"false\" exception=\"");
out.write(errorInfo);
out.write("\">");
}
else
{
out.write("<result status=\"true\" remainder=\">");
//out.write("cpp=12345678901234567890;cpbh=abc;lpxx=yui;sl=100");
out.write(remainderItems.toString());
out.write("\">");
}
out.write("\r\n");
out.write("</result>\r\n");
out.write("\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}

View File

@@ -0,0 +1,187 @@
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import com.zcsoft.dbvisit.DB;
import com.wxzd.wms.sys.data.ModuleConstant;
import com.zcsoft.purview.data.Purview;
import com.wxzd.wms.util.ServerUtil;
import java.util.*;
import com.usun.web.http.ParameterConvertor;
public final class login_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/xml; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("<?xml version=\"1.0\" encoding=\"gb2312\"?>\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
com.zcsoft.purview.data.UserInfoData userInfo = null;
synchronized (session) {
userInfo = (com.zcsoft.purview.data.UserInfoData) _jspx_page_context.getAttribute("userInfo", PageContext.SESSION_SCOPE);
if (userInfo == null){
userInfo = new com.zcsoft.purview.data.UserInfoData();
_jspx_page_context.setAttribute("userInfo", userInfo, PageContext.SESSION_SCOPE);
}
}
out.write('\r');
out.write('\n');
com.zcsoft.dbvisit.DB db1 = null;
synchronized (application) {
db1 = (com.zcsoft.dbvisit.DB) _jspx_page_context.getAttribute("db1", PageContext.APPLICATION_SCOPE);
if (db1 == null){
db1 = new com.zcsoft.dbvisit.DB();
_jspx_page_context.setAttribute("db1", db1, PageContext.APPLICATION_SCOPE);
}
}
out.write('\r');
out.write('\n');
//Google Chrome
db1.DEBUG = false;
db1.reserveTrailingZero = false;
//为了方便创建和升级子账套程序,通过命名约定确定
//子账套连接数据库的名称。默认的数据库配置文件中,
//连接的数据库名字符串中有用于替换成子账套代号的
//占位符{0}。
String connectUrl =
//"jdbc:sqlserver://localhost:1433;databaseName=ASRS_WXZD_JYMH_CPK;lockTimeout=10000;applicationName=WMS;";
db1.getPool().getProperty("url");
System.out.print("connectUrl>"+connectUrl);
if (connectUrl.lastIndexOf("{0}") >= 0)
{//对于SQL Server数据库不同账套连接不同数据库
//按照命名约定“标准数据库名称_子账套代号”是子账套
//连接的数据库名称
String contextPath = getServletContext().getRealPath("");
String lastPart = java.io.File.separator + "wms";
int index = contextPath.lastIndexOf(lastPart);
String accountId = "";
if (index > 0)
{
if (index + lastPart.length() < contextPath.length())
{
accountId = contextPath.substring(index + lastPart.length());
index = accountId.indexOf(java.io.File.separator);
if (index > 0) accountId = accountId.substring(0, index);
}
}
connectUrl = connectUrl.replace("{0}",
accountId.length() == 0?accountId:("_" + accountId));
//System.out.println(connectUrl);
db1.getPool().setConnectionURL(connectUrl);
}
String yhm = request.getParameter("yhm");
yhm = ParameterConvertor.convertString(request, yhm, response);
String mm = request.getParameter("mm");
String errorInfo = null;
if (yhm != null && yhm.trim().length() > 0
&& mm != null && mm.trim().length() > 0)
{
mm = new String(com.usun.security.PwdEncryptor.encyptBySubClass(mm.toCharArray()));
userInfo.setMm(mm);
try
{
//访问数据库检查,用户名密码有效性
userInfo = ServerUtil.getUser(db1, yhm, mm);
//检查模块权限,出入库单据的模块权限必须具有‘审核’权限
//盘点单据具有使用‘设定现有数量’权限(=512)
//库存查询要有‘查询’权限(=16)
Object[] fieldsValue = new Object[]{yhm,
ModuleConstant.入库作业管理,
ModuleConstant.出库作业管理,
ModuleConstant.仓库盘点,
ModuleConstant.当前库存,
ModuleConstant.转库指令,
"10300002"};
List res = db1.getVDataWithPrepareStatement("SELECT A.mkbm,B.mkmc,A.qx"
+ " FROM ZC_YHMKQX A JOIN ZC_MODULE B ON A.mkbm=B.mkbm"
+ " WHERE A.yhm=? AND B.mkzt=1 AND B.mkbm IN("
+ new String(DB.createQuestionMarks(fieldsValue.length - 1))
+ ")"
, fieldsValue);
java.util.Map moduleNameMap = new Hashtable();
for(int i = 0;i<res.size();i++)
{
List v = (List)res.get(i);
Purview purview = new Purview();//构造一个权限对象
String mkbm = v.get(0).toString();
String mkmc = v.get(1).toString();
moduleNameMap.put(mkbm, mkmc);
purview.setMkbm(mkbm);//设置该对象的模块编码
purview.setQx(Integer.parseInt(v.get(2).toString()));
userInfo.addUserPurview(purview);//设置到该用户的权限表中
}
userInfo.put("moduleNameMap", moduleNameMap);
session.setAttribute("userInfo", userInfo);
}
catch(Exception e)
{
errorInfo = e.getMessage() != null?e.getMessage():e.toString();
}
}
else
{
errorInfo = "非法调用";
}
out.write("<result status=\"");
if (errorInfo != null)
{
out.write("false\" exception=\"" + errorInfo + "\">");
}
else
{
out.write("true\" redirect=\"rk.jsp\">");
}
out.write("</result>");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}

View File

@@ -0,0 +1,108 @@
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import com.wxzd.wms.util.ServerUtil;
public final class rk_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<html><head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=GBK\">\r\n");
out.write("<title>入库组盘扫描</title>\r\n");
out.write("<META HTTP-EQUIV=\"pragma\" CONTENT=\"no-cache\">\r\n");
out.write("<META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\">\r\n");
out.write("<META HTTP-EQUIV=\"expires\" CONTENT=\"0\">\r\n");
out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/sm.css\"> \r\n");
out.write("<script type=\"text/javascript\" src=\"script/ajax.js\"></script>\r\n");
out.write("<script type=\"text/javascript\" src=\"script/rk.js\"></script>\r\n");
out.write("<script type=\"text/javascript\" src=\"script/logic.js\"></script>\r\n");
out.write("</head>\r\n");
out.write("<body onload=\"check();\">\r\n");
com.zcsoft.dbvisit.DB db1 = null;
synchronized (application) {
db1 = (com.zcsoft.dbvisit.DB) _jspx_page_context.getAttribute("db1", PageContext.APPLICATION_SCOPE);
if (db1 == null){
db1 = new com.zcsoft.dbvisit.DB();
_jspx_page_context.setAttribute("db1", db1, PageContext.APPLICATION_SCOPE);
}
}
out.write('\r');
out.write('\n');
String errorInfo = "";
session = request.getSession(false);
if (session == null || session.getAttribute("userInfo") == null)
{
response.sendRedirect("sm.jsp");
return;
}
out.write("\r\n");
out.write("\r\n");
out.write("<form onsubmit=\"return check();\">\r\n");
out.write("<table id=content style=\"width: 285px\">\r\n");
out.write("<tr><td colspan=2 class=title>请依次扫描产品箱条码,入库位置条码\r\n");
out.write("<tr><td>扫描框<input size=26 maxlength=30 name=code id=code class=cellField onkeydown=\"save();\" autocomplete=\"off\">\r\n");
out.write("<input id=cmdDel type=button value=\"删除\" onclick=\"delone();\">\r\n");
out.write("<tr><td colspan=2>\r\n");
out.write("<table border=1 style=\"white-space:pre-wrap;\">\r\n");
out.write("<tr><td class=errorMsg id=msg colspan=\"4\">&nbsp;</td></tr>\r\n");
out.write("<tr><th style=\"width:28px\">选择</th><th style=\"width:100px\">品名</th><th style=\"width:30px\">数量</th><th style=\"width:130px\">条码</th>\r\n");
out.write("<tbody id=\"drkxx\">\r\n");
out.write("</tbody>\r\n");
out.write("</table>\r\n");
out.write("</td></tr>\r\n");
out.write("</table>\r\n");
out.write("</form>\r\n");
out.write("</body>\r\n");
out.write("</html>");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}

View File

@@ -0,0 +1,94 @@
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class sm_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("<html><head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=GBK\">\r\n");
out.write("<title>手持终端软件登录</title>\r\n");
out.write("<script type=\"text/javascript\" src=\"script/ajax.js\"></script>\r\n");
out.write("<script type=\"text/javascript\" src=\"script/login.js\"></script>\r\n");
out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/sm.css\">\r\n");
out.write("</head>\r\n");
out.write("\r\n");
com.zcsoft.purview.data.UserInfoData userInfo = null;
synchronized (session) {
userInfo = (com.zcsoft.purview.data.UserInfoData) _jspx_page_context.getAttribute("userInfo", PageContext.SESSION_SCOPE);
if (userInfo == null){
userInfo = new com.zcsoft.purview.data.UserInfoData();
_jspx_page_context.setAttribute("userInfo", userInfo, PageContext.SESSION_SCOPE);
}
}
out.write("\r\n");
out.write("<body onload=\"check(document.login, 1);\">\r\n");
out.write("<div align=\"center\">\r\n");
out.write("<TABLE width=\"100%\" cellspacing=0 cellpadding=0>\r\n");
out.write("<TR><TD align=\"center\">\r\n");
out.write("<form name=\"login\" onsubmit=\"return check(this);\">\r\n");
out.write("<table>\r\n");
out.write(" <tr><td><img src=\"images/al_top.gif\" border=0></td>\r\n");
out.write("\t\t<td background=\"images/al_end_bg.gif\" class=errorMsg id=msg>&nbsp;</td>\r\n");
out.write(" <tr><td><img src=\"images/al_username.gif\"></td>\r\n");
out.write("\t\t<td class=inputContainer><input name=\"yhm\" class=input_login size=\"12\" maxlength=\"20\"");
out.print((userInfo.getYhm() != null)?(" value=" + userInfo.getYhm()):"");
out.write("></td>\r\n");
out.write(" <tr><td><img src=\"images/al_password.gif\"></td>\r\n");
out.write("\t\t<td class=inputContainer><input name=\"mm\" class=input_login size=\"12\" type=\"password\"></td>\r\n");
out.write(" <tr><td colspan=2 align=center><input type=\"submit\" id=\"submit\" class=button value=\" 登 录 \"></td>\r\n");
out.write("</table>\r\n");
out.write("</form>\r\n");
out.write("</TD></TR>\r\n");
out.write("<TR><TD class=\"HR\">&nbsp;</TD>\r\n");
out.write("<TR><TD class=\"copyRight\">无锡中鼎集成技术有限公司<br>版权所有 &copy;</TD>\r\n");
out.write("</TABLE>\r\n");
out.write("</div>\r\n");
out.write("</body>\r\n");
out.write("</html>");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}

View File

@@ -0,0 +1,183 @@
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import com.zcsoft.dbvisit.DB;
import com.wxzd.wms.util.ServerUtil;
import com.zcsoft.purview.data.Purview;
import com.wxzd.wms.sys.data.ModuleConstant;
import com.wxzd.wms.cpgl.data.WlRkzlItem;
import com.zcsoft.stock.*;
import com.zcsoft.client.*;
import com.wxzd.wms.stock.server.CkczManager;
public final class zpwc_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/xml; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("<?xml version=\"1.0\" encoding=\"gb2312\"?>\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
com.zcsoft.dbvisit.DB db1 = null;
synchronized (application) {
db1 = (com.zcsoft.dbvisit.DB) _jspx_page_context.getAttribute("db1", PageContext.APPLICATION_SCOPE);
if (db1 == null){
db1 = new com.zcsoft.dbvisit.DB();
_jspx_page_context.setAttribute("db1", db1, PageContext.APPLICATION_SCOPE);
}
}
out.write('\r');
out.write('\n');
com.zcsoft.purview.data.UserInfoData userInfo = null;
synchronized (session) {
userInfo = (com.zcsoft.purview.data.UserInfoData) _jspx_page_context.getAttribute("userInfo", PageContext.SESSION_SCOPE);
if (userInfo == null){
userInfo = new com.zcsoft.purview.data.UserInfoData();
_jspx_page_context.setAttribute("userInfo", userInfo, PageContext.SESSION_SCOPE);
}
}
out.write('\r');
out.write('\n');
String errorInfo = null, kw = null, tp = null,ck=null,rkk=null, info = "";
if (userInfo.getYhm() == null)
{
out.write("<redirect href=\"sm.jsp\"/>");
return;
}
tp = request.getParameter("txm");
rkk = request.getParameter("rkk");
try
{
//再次检查权限
String module = "10300002";
Purview p = userInfo.getUserPurview(module);
if (p == null || (p.getQx() & 128) == 0)
{
throw new IllegalArgumentException("无入库指令模块的送入托盘权限");
}
if (rkk != null && tp != null)
{
Instruction inst = new CkczManager(db1).获取指定托盘号的组盘任务(rkk, tp, new Integer(0), new Integer(0), "");
if (inst != null){
if (inst.getTo() == null){
errorInfo = "未分配可入空库位";
}else{
//向立体仓库监控系统提交执行指令请求
if (RemoteAccesser.countServletURLs() == 0)
{
RemoteAccesser.setUser("");
String wmcsServer = (String)db1.getSingleField("SELECT dqz FROM sys_config WHERE ID_pzx=?", "wmcs-server");
if (wmcsServer == null || wmcsServer.length() == 0)
{
wmcsServer = "localhost";
}
String port = (String)db1.getSingleField("SELECT dqz FROM sys_config WHERE ID_pzx=?", "wmcs-server-port");
if (port == null || port.length() == 0)
{
port = "8080";
}
String wcsServicePath = (String)db1.getSingleField("SELECT dqz FROM sys_config WHERE ID_pzx=?", "wcs.service.path");
if (wcsServicePath == null || wcsServicePath.length() == 0)
{
port = "wcs/servlet/server";
}
RemoteAccesser.setRootServlet("http://" + wmcsServer + ":" + port + wcsServicePath);
}
inst.setProducer(rkk);
ObjectFromServlet ofs = RemoteAccesser.commitRequest(99
, 5
, inst);
if (!ofs.isSuccess())
{
errorInfo = "下发指令给WCS执行时出错" + ofs.getReturnedValue();
}
else {
info = "入库库位 " + inst.getTo().getKwbh() + " 指令编号 " + inst.getNo();
}
}
}else{
errorInfo = ("未找到 " + tp + " 的组盘任务");
}
}
else
{
errorInfo = "无效参数";
}
}
catch (Exception ex)
{
//ex.printStackTrace();
errorInfo = ex.getMessage();
if (errorInfo == null) errorInfo = ex.toString();
}
//返回结果
if (errorInfo != null)
{
out.write("<result status=\"false\" exception=\"");
out.write(errorInfo);
out.write("\">");
}
else
{
out.write("<result status=\"true\" info=\"");
out.write(info);
out.write("\">");
}
out.write("\r\n");
out.write("</result>\r\n");
out.write("\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}

Binary file not shown.