📄 locationstateupdate.jsp
字号:
<jsp:useBean id="locationState" class="src.wuyang.LocationState" scope="page"/>
<jsp:useBean id="inventory" class="src.wuyang.Inventory" scope="page"/>
<jsp:useBean id="product" class="src.wuyang.Production" scope="page"/>
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>
<% if (global.isLogined == false) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="-4" />
</jsp:forward>
<% }
%>
<html>
<head>
<title>盘存</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../pub/style.css">
</head>
<body>
<%!String locationId;%>
<%!String productId;%>
<%
String wearhouseId=request.getParameter("wearhouseId");
String locationId=request.getParameter("locationId");
locationState.setGlobal(global);
String accountId = global.loginName;
%>
<jsp:setProperty name="locationState" property = "*" />
<%
locationState.setAccountId(accountId);
//System.out.println("**quantity"+locationState.getQuantity());
//System.out.println("**counting"+locationState.getCounting());
//System.out.println("**quantity"+locationState.getNewQuantity());
//System.out.println("**counting"+locationState.getNewCounting());
float delQuantity = locationState.getNewQuantity() - locationState.getQuantity();
float delCounting = locationState.getNewCounting() - locationState.getCounting();
System.out.println("delQuantity = "+delQuantity);
System.out.println("delCounting = "+delCounting);
inventory.setProductId(productId);
inventory.setWearhouseId(wearhouseId);
inventory.setLocationId(locationId);
inventory.setQuantity(delQuantity);
inventory.setCounting(delCounting);
inventory.setGlobal(global);
System.out.println("quantity "+inventory.getQuantity());
System.out.println("counting "+inventory.getCounting());
int flag = inventory.insertAdjust();
//System.out.println("insertInventory flag = "+flag);
int rtcode = locationState.update();
System.out.println("update = "+ rtcode);
if(rtcode <= 0) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
<% }
locationId = locationState.getLocationId();
productId = locationState.getProductId();
locationState.load(locationId,productId);
%>
<form>
<table border="1">
<tr>
<td>盘存日期</td>
<td><%= locationState.getStringDate(locationState.getBalanceDate(),0)%></td>
</tr>
<tr>
<td>数量</td>
<td><%=locationState.getQuantity()%></td>
</tr>
<tr>
<td>件数</td>
<td><%= locationState.getCounting()%></td>
</tr>
<tr>
<td>盘存数量</td>
<td><%= locationState.getNewQuantity()%></td>
</tr>
<tr>
<td>盘存件数</td>
<td><%= locationState.getNewCounting()%></td>
</tr>
</table>
<p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -