Commit 430223ab authored by dsawant's avatar dsawant

updated


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96034 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d4248646
...@@ -109,7 +109,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -109,7 +109,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
PreparedStatement pstmt = null ; PreparedStatement pstmt = null ;
ResultSet rs = null; ResultSet rs = null;
String sql = "",locCode ="",invstat="",aval="",avalyn=""; String sql = "",locCode ="",invstat="",aval="",avalyn="";
double qtyConf=0,qtyShip=0,totQty=0;
String distOrder = "",itemCode="",confirmed="",tranId="",siteCode="",lotSl="",addUser="",tranCode=""; String distOrder = "",itemCode="",confirmed="",tranId="",siteCode="",lotSl="",addUser="",tranCode="";
try { try {
...@@ -253,6 +253,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -253,6 +253,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
{ {
addUser = genericUtility.getColumnValue("add_user",dom2); addUser = genericUtility.getColumnValue("add_user",dom2);
chgUser = genericUtility.getColumnValue("chg_user",dom2); chgUser = genericUtility.getColumnValue("chg_user",dom2);
System.out.println("addUser><><"+addUser+"chgUserDD"+chgUser);
if ((addUser != null && addUser.trim().length() > 0) && (chgUser != null && chgUser.trim().length() > 0)) if ((addUser != null && addUser.trim().length() > 0) && (chgUser != null && chgUser.trim().length() > 0))
{ {
if(!addUser.equalsIgnoreCase(chgUser)) if(!addUser.equalsIgnoreCase(chgUser))
...@@ -322,6 +323,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -322,6 +323,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
{ {
siteCode = genericUtility.getColumnValue("site_code",dom2); siteCode = genericUtility.getColumnValue("site_code",dom2);
lotSl = genericUtility.getColumnValue("lot_sl",dom2); lotSl = genericUtility.getColumnValue("lot_sl",dom2);
distOrder = genericUtility.getColumnValue("dist_order",dom2);
if (lotSl == null || lotSl.trim().length() == 0) if (lotSl == null || lotSl.trim().length() == 0)
{ {
...@@ -354,6 +356,31 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -354,6 +356,31 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
} }
sql = "select qty_confirm,qty_shipped from distorder_det where dist_order = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,distOrder);
rs = pstmt.executeQuery();
if(rs.next())
{
qtyConf = rs.getDouble(1);
qtyShip = rs.getDouble(2);
}
pstmt.close();
rs.close();
pstmt = null;
rs = null;
totQty = qtyConf - qtyShip;
if(totQty <= 0)
{
errCode = "DIDOTQLTZ";
errString = getErrorString("lot_sl",errCode,userId);
break;
}
} }
else if(childNodeName.equalsIgnoreCase("item_code")) else if(childNodeName.equalsIgnoreCase("item_code"))
{ {
...@@ -537,7 +564,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -537,7 +564,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
System.out.println("DOM322 Elements>>["+genericUtility.serializeDom(dom2).toString()+"]"); System.out.println("DOM322 Elements>>["+genericUtility.serializeDom(dom2).toString()+"]");
String distOrder = "",itemCode = "",itemDescr="",sql="",unit="",packCode="",tranType =""; String distOrder = "",itemCode = "",itemDescr="",sql="",unit="",packCode="",tranType ="";
java.sql.Timestamp currDate = null; java.sql.Timestamp currDate = null;
double grossWeight = 0; double grossWeight = 0,netWeight=0,tareWeight=0,noOfArt=0;
SimpleDateFormat sdf = null; SimpleDateFormat sdf = null;
String currAppdate = ""; String currAppdate = "";
String tranid =""; String tranid ="";
...@@ -1657,7 +1684,8 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -1657,7 +1684,8 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
String currDomStr = genericUtility.serializeDom(dom); String currDomStr = genericUtility.serializeDom(dom);
if(lotSl != null && lotSl.trim().length() > 0) if(lotSl != null && lotSl.trim().length() > 0)
{ {
sql = "select LOC_CODE,LOT_NO,ITEM_CODE,QUANTITY,GROSS_WEIGHT from stock where site_code = ? AND LOT_SL = ? AND QUANTITY > 0"; //item_code,no_art,quantity,amount,net_amt,discount,tax_amt,gross_weight,tare_weight,net_weight
sql = "select LOC_CODE,LOT_NO,ITEM_CODE,QUANTITY,GROSS_WEIGHT,NET_WEIGHT,TARE_WEIGHT,NO_ART from stock where site_code = ? AND LOT_SL = ? AND QUANTITY > 0";
pstmt1=conn.prepareStatement(sql); pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1,siteCode); pstmt1.setString(1,siteCode);
pstmt1.setString(2,lotSl); pstmt1.setString(2,lotSl);
...@@ -1669,10 +1697,11 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -1669,10 +1697,11 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
lotNo = rs1.getString("lot_no")==null?"":rs1.getString("lot_no").trim(); lotNo = rs1.getString("lot_no")==null?"":rs1.getString("lot_no").trim();
itemCode = rs1.getString("item_code")==null?"":rs1.getString("item_code").trim(); itemCode = rs1.getString("item_code")==null?"":rs1.getString("item_code").trim();
squantity = rs1.getDouble("quantity"); squantity = rs1.getDouble("quantity");
grossWeight = rs1.getDouble("gross_weight"); grossWeight = rs1.getDouble("gross_weight");
netWeight = rs1.getDouble("net_weight");
tareWeight = rs1.getDouble("tare_weight");
noOfArt = rs1.getDouble("no_art");
} }
pstmt1.close(); pstmt1.close();
...@@ -1735,6 +1764,15 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -1735,6 +1764,15 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
valueXmlString.append("<gross_weight protect=\"0\">").append("<![CDATA[" + grossWeight + "]]>").append("</gross_weight>"); valueXmlString.append("<gross_weight protect=\"0\">").append("<![CDATA[" + grossWeight + "]]>").append("</gross_weight>");
setNodeValue( dom, "gross_weight", getAbsString(""+grossWeight)); setNodeValue( dom, "gross_weight", getAbsString(""+grossWeight));
valueXmlString.append("<net_weight protect=\"0\">").append("<![CDATA[" + netWeight + "]]>").append("</net_weight>");
setNodeValue( dom, "net_weight", getAbsString(""+netWeight));
valueXmlString.append("<tare_weight protect=\"0\">").append("<![CDATA[" + tareWeight + "]]>").append("</tare_weight>");
setNodeValue( dom, "tare_weight", getAbsString(""+tareWeight));
valueXmlString.append("<no_art protect=\"0\">").append("<![CDATA[" + noOfArt + "]]>").append("</no_art>");
setNodeValue( dom, "no_art", getAbsString(""+noOfArt));
currDomStr = currDomStr.replace("</Detail3>", valueXmlString.toString() + "</Detail3>"); currDomStr = currDomStr.replace("</Detail3>", valueXmlString.toString() + "</Detail3>");
...@@ -1764,6 +1802,15 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -1764,6 +1802,15 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
valueXmlString.append("<gross_weight protect=\"0\">").append("<![CDATA[]]>").append("</gross_weight>"); valueXmlString.append("<gross_weight protect=\"0\">").append("<![CDATA[]]>").append("</gross_weight>");
setNodeValue( dom, "gross_weight", getAbsString("")); setNodeValue( dom, "gross_weight", getAbsString(""));
valueXmlString.append("<net_weight protect=\"0\">").append("<![CDATA[]]>").append("</net_weight>");
setNodeValue( dom, "net_weight", getAbsString(""));
valueXmlString.append("<tare_weight protect=\"0\">").append("<![CDATA[]]>").append("</tare_weight>");
setNodeValue( dom, "tare_weight", getAbsString(""));
valueXmlString.append("<no_art protect=\"0\">").append("<![CDATA[]]>").append("</no_art>");
setNodeValue( dom, "no_art", getAbsString(""));
currDomStr = currDomStr.replace("</Detail3>", valueXmlString.toString() + "</Detail3>"); currDomStr = currDomStr.replace("</Detail3>", valueXmlString.toString() + "</Detail3>");
System.out.println("after currDomStr[" + currDomStr + "]"); System.out.println("after currDomStr[" + currDomStr + "]");
valueXmlString.append(currDomStr); valueXmlString.append(currDomStr);
......
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