📄 updateoutstoreservlet.java
字号:
}
continue;
}
updateoutstoredbbean.setStatusCode(8480);
} else
{
updateoutstoredbbean.setStatusCode(8480);
}
break;
}
if(vector1.elementAt(i).toString().equals("1") && vector1.elementAt(i + 1).toString().equals("0"))
{
updateoutstoredbbean.setOutstorenum(vector1.elementAt(6).toString().trim());
updateoutstoredbbean.setGoodsname((String)vector1.elementAt(i + 4));
updateoutstoredbbean.setGoodsstyle((String)vector1.elementAt(i + 5));
updateoutstoredbbean.setGoodsnum((String)vector1.elementAt(i + 6));
updateoutstoredbbean.setGoodsunit((String)vector1.elementAt(i + 7));
updateoutstoredbbean.setNote2((String)vector1.elementAt(i + 8));
updateoutstoredbbean.setDelflag("0");
updateoutstoredbbean.setTableName("outstorelist");
updateoutstoredbbean.setInsertSQL02("INSERT INTO " + updateoutstoredbbean.getTableName() + " (NUMBER, OUTSTORENUM, GOODSNAME, GOODSSTYLE, GOODSNUM, GOODSUNIT, NOTE, DELFLAG ) VALUES (?, ?, ?, ?, ?, ?, ? ,?)");
try
{
updateoutstoredbbean.selectMaxnum();
updateoutstoredbbean.insert02();
}
catch(Exception exception9)
{
throw new Exception("[finance.UpdateOutstoreServlet][" + datetimebean.getDate() + " " + datetimebean.getTime() + "]" + exception9.getMessage());
}
updateoutstoredbbean.setTableName("store");
updateoutstoredbbean.setSelectSQL02(" SELECT BALANCE FROM " + updateoutstoredbbean.getTableName() + " WHERE (NAME = ? AND STYLE = ? AND DELFLAG = '0')");
updateoutstoredbbean.setName((String)vector1.elementAt(i + 4));
updateoutstoredbbean.setStyle((String)vector1.elementAt(i + 5));
try
{
updateoutstoredbbean.select02();
updateoutstoredbbean.getDataFromResult02();
}
catch(Exception exception10)
{
throw new Exception("[finance.UpdateOutstoreServlet][" + datetimebean.getDate() + " " + datetimebean.getTime() + "]" + exception10.getMessage());
}
if(updateoutstoredbbean.getStatusCode() != 8477)
{
int l = Integer.parseInt(updateoutstoredbbean.vecQB1.toString());
int l1 = Integer.parseInt((String)vector1.elementAt(i + 6));
int l2 = l - l1;
if(l2 > 0)
{
updateoutstoredbbean.setName((String)vector1.elementAt(i + 4));
updateoutstoredbbean.setStyle((String)vector1.elementAt(i + 5));
updateoutstoredbbean.setBanlance(String.valueOf(l2));
updateoutstoredbbean.setTableName("store");
updateoutstoredbbean.setUpdateSQL03(" UPDATE " + updateoutstoredbbean.getTableName() + " SET BALANCE = ? WHERE ( NAME = ? AND STYLE = ? ) ");
try
{
updateoutstoredbbean.update03();
}
catch(Exception exception17)
{
throw new Exception("[finance.AddOutStoreServlet][" + datetimebean.getDate() + " " + datetimebean.getTime() + "]" + exception17.getMessage());
}
continue;
}
if(l2 == 0)
{
updateoutstoredbbean.setName((String)vector1.elementAt(i + 4));
updateoutstoredbbean.setStyle((String)vector1.elementAt(i + 5));
updateoutstoredbbean.setDelflag("1");
updateoutstoredbbean.setTableName("store");
updateoutstoredbbean.setUpdateSQL05(" UPDATE " + updateoutstoredbbean.getTableName() + " SET DELFLAG = ? WHERE (NAME = ? AND STYLE = ? ) ");
try
{
updateoutstoredbbean.update05();
}
catch(Exception exception18)
{
throw new Exception("[finance.AddOutStoreServlet][" + datetimebean.getDate() + " " + datetimebean.getTime() + "]" + exception18.getMessage());
}
continue;
}
updateoutstoredbbean.setStatusCode(8480);
} else
{
updateoutstoredbbean.setStatusCode(8480);
}
break;
}
if(!vector1.elementAt(i).toString().equals("0") || !vector1.elementAt(i + 1).toString().equals("1"))
continue;
updateoutstoredbbean.setNumber(vector1.elementAt(i + 2).toString().trim());
updateoutstoredbbean.setDelflag("0");
updateoutstoredbbean.setTableName("outstorelist");
updateoutstoredbbean.setSelectSQL01(" SELECT GOODSNAME, GOODSSTYLE, GOODSNUM ,GOODSUNIT FROM " + updateoutstoredbbean.getTableName() + " WHERE( NUMBER = ? AND DELFLAG = ?)");
try
{
updateoutstoredbbean.select01();
updateoutstoredbbean.getDataFromResult01();
}
catch(Exception exception11)
{
throw new Exception("[finance.UpdateOutstoreServlet][" + datetimebean.getDate() + " " + datetimebean.getTime() + "]" + exception11.getMessage());
}
if(updateoutstoredbbean.getStatusCode() != 8473)
{
updateoutstoredbbean.setName(updateoutstoredbbean.vecQ1.toString().trim());
updateoutstoredbbean.setStyle(updateoutstoredbbean.vecQ2.toString().trim());
updateoutstoredbbean.setTableName("store");
updateoutstoredbbean.setSelectSQL02(" SELECT BALANCE FROM " + updateoutstoredbbean.getTableName() + " WHERE( NAME = ? AND STYLE = ? AND DELFLAG = '0')");
try
{
updateoutstoredbbean.select02();
updateoutstoredbbean.getDataFromResult02();
}
catch(Exception exception12)
{
throw new Exception("[finance.UpdateOutstoreServlet][" + datetimebean.getDate() + " " + datetimebean.getTime() + "]" + exception12.getMessage());
}
if(updateoutstoredbbean.getStatusCode() != 8477)
{
int i1 = Integer.parseInt(updateoutstoredbbean.vecQB1);
int i2 = Integer.parseInt(updateoutstoredbbean.vecQ3.toString());
int i3 = i1 + i2;
updateoutstoredbbean.setName(updateoutstoredbbean.vecQ1.toString().trim());
updateoutstoredbbean.setStyle(updateoutstoredbbean.vecQ2.toString().trim());
updateoutstoredbbean.setBanlance(String.valueOf(i3));
updateoutstoredbbean.setTableName("store");
updateoutstoredbbean.setUpdateSQL03(" UPDATE " + updateoutstoredbbean.getTableName() + " SET BALANCE = ? WHERE ( NAME = ? AND STYLE = ? ) ");
try
{
updateoutstoredbbean.update03();
}
catch(Exception exception19)
{
throw new Exception("[finance.UpdateOutstoreServlet][" + datetimebean.getDate() + " " + datetimebean.getTime() + "]" + exception19.getMessage());
}
} else
{
updateoutstoredbbean.setTableName("store");
updateoutstoredbbean.setInsertSQL01("INSERT INTO " + updateoutstoredbbean.getTableName() + " (NUMBER, NAME, STYLE, BALANCE, UNIT, FLAG ,DELFLAG) VALUES (?, ?, ?, ?, ?, ?, ?)");
updateoutstoredbbean.setName(updateoutstoredbbean.vecQ1.toString().trim());
updateoutstoredbbean.setStyle(updateoutstoredbbean.vecQ2.toString().trim());
updateoutstoredbbean.setBanlance(updateoutstoredbbean.vecQ3.toString().trim());
updateoutstoredbbean.setUnit(updateoutstoredbbean.vecQ4.toString().trim());
updateoutstoredbbean.setFlag("0");
updateoutstoredbbean.setDelflag("0");
try
{
updateoutstoredbbean.selectMaxnum();
updateoutstoredbbean.insert01();
}
catch(Exception exception13)
{
throw new Exception("[finance.UpdateOutstoreServlet][" + datetimebean.getDate() + " " + datetimebean.getTime() + "]" + exception13.getMessage());
}
}
} else
{
updateoutstoredbbean.setStatusCode(8480);
break;
}
updateoutstoredbbean.setNumber(vector1.elementAt(i + 2).toString().trim());
updateoutstoredbbean.setDelflag("1");
updateoutstoredbbean.setTableName("outstorelist");
updateoutstoredbbean.setUpdateSQL04("UPDATE " + updateoutstoredbbean.getTableName() + " SET DELFLAG = ? WHERE NUMBER = ?");
updateoutstoredbbean.update04();
}
if(updateoutstoredbbean.getStatusCode() == 8480)
{
updateoutstoredbbean.setStatusCode(8488);
updateoutstoredbbean.setStatusMessage("对不起,您要修改的出库物品信息有误或库存物品表中库存数量不足,请核对后再做修改!");
} else
{
updateoutstoredbbean.commitToDB();
updateoutstoredbbean.setStatusCode(8489);
updateoutstoredbbean.setStatusMessage("成功修改物料出库信息!");
}
}
catch(Exception exception3)
{
updateoutstoredbbean.rollbackFromDB();
throw exception3;
}
finally
{
updateoutstoredbbean.releaseConnection();
}
httpservletrequest.setAttribute("statusMessage", updateoutstoredbbean.getStatusMessage());
httpservletrequest.setAttribute("flag", (new Integer(updateoutstoredbbean.getStatusCode())).toString());
httpservletrequest.setAttribute("rnum", s1);
httpservletrequest.setAttribute("ruser", s2);
httpservletrequest.setAttribute("routstoredate_year", s3);
httpservletrequest.setAttribute("routstoredate_month", s4);
httpservletrequest.setAttribute("routstoredate_day", s5);
httpservletrequest.setAttribute("currentpage", s6);
RequestDispatcher requestdispatcher1 = getServletContext().getRequestDispatcher("/finance/UpdateOutstoreResult.jsp");
requestdispatcher1.forward(httpservletrequest, httpservletresponse);
}
catch(Throwable throwable)
{
System.out.println(throwable.getMessage());
try
{
RequestDispatcher requestdispatcher = getServletContext().getRequestDispatcher("/common/Error.jsp");
requestdispatcher.forward(httpservletrequest, httpservletresponse);
}
catch(Exception _ex) { }
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -