Commit cc368252 authored by dsawant's avatar dsawant

updated


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96083 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8055a6fc
...@@ -116,7 +116,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -116,7 +116,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,detquantity=0,stkquantity=0,quantity=0,totquantity=0; double qtyConf=0,qtyShip=0,totQty=0,detquantity=0,stkquantity=0,quantity=0,totquantity=0,dodetquantity=0;
String squantity="",distOrder = "",itemCode="",confirmed="",tranId="",siteCode="",lotSl="",addUser="",tranCode=""; String squantity="",distOrder = "",itemCode="",confirmed="",tranId="",siteCode="",lotSl="",addUser="",tranCode="";
try { try {
...@@ -431,6 +431,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -431,6 +431,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
distOrder = genericUtility.getColumnValue("dist_order",dom2); distOrder = genericUtility.getColumnValue("dist_order",dom2);
squantity = genericUtility.getColumnValue("quantity",dom2); squantity = genericUtility.getColumnValue("quantity",dom2);
siteCode = genericUtility.getColumnValue("site_code",dom2); siteCode = genericUtility.getColumnValue("site_code",dom2);
itemCode = genericUtility.getColumnValue("item_code",dom2);
lotSl = genericUtility.getColumnValue("lot_sl",dom2); lotSl = genericUtility.getColumnValue("lot_sl",dom2);
System.out.println("squantity"+squantity+"workOrder<><><>"+distOrder+">>D"+siteCode+"FDFf"+lotSl); System.out.println("squantity"+squantity+"workOrder<><><>"+distOrder+">>D"+siteCode+"FDFf"+lotSl);
if (squantity == null || squantity.trim().length() == 0) if (squantity == null || squantity.trim().length() == 0)
...@@ -441,8 +442,8 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -441,8 +442,8 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
{ {
quantity = Double.parseDouble(squantity); quantity = Double.parseDouble(squantity);
} }
System.out.println("quantity>>>>>>{{{"+quantity);
sql = "select quantity from stock where site_code = ? AND LOT_SL = ? AND QUANTITY > 0"; /*sql = "select quantity from stock where site_code = ? AND LOT_SL = ? AND QUANTITY > 0";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1,siteCode); pstmt.setString(1,siteCode);
pstmt.setString(2,lotSl); pstmt.setString(2,lotSl);
...@@ -455,10 +456,12 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -455,10 +456,12 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
rs.close(); rs.close();
pstmt = null; pstmt = null;
rs = null; rs = null;
System.out.println("stkquantity>>"+stkquantity); System.out.println("stkquantity>>"+stkquantity);*/
sql = "select sum(quantity) from distord_issdet where dist_order = ?"; sql = "select sum(quantity) from distord_issdet where dist_order = ? and lot_sl = ? and item_code = ?";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1,distOrder); pstmt.setString(1,distOrder);
pstmt.setString(2,lotSl);
pstmt.setString(3,itemCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) if(rs.next())
{ {
...@@ -469,13 +472,39 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -469,13 +472,39 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
pstmt = null; pstmt = null;
rs = null; rs = null;
System.out.println("detquantity>>"+detquantity); System.out.println("detquantity>>"+detquantity);
totquantity = detquantity + quantity; totquantity = detquantity + quantity;
sql = "select sum(qty_order) from distorder_det where dist_order = ? and item_code = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,distOrder);
pstmt.setString(2,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
dodetquantity = rs.getDouble(1);
}
pstmt.close();
rs.close();
pstmt = null;
rs = null;
if(totquantity > dodetquantity)
{
errCode = "DIDOQUANDT";
errString = getErrorString("quantity",errCode,userId);
break;
}
/*else
{
if(totquantity > stkquantity) if(totquantity > stkquantity)
{ {
errCode = "DIDOQUANST"; errCode = "DIDOQUANST";
errString = getErrorString("quantity",errCode,userId); errString = getErrorString("quantity",errCode,userId);
break; break;
} }
}*/
} }
...@@ -541,6 +570,13 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -541,6 +570,13 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
break; break;
} }
} }
else
{
errCode = "DIDOAVLN";
errString = getErrorString("loc_code",errCode,userId);
break;
}
} }
} }
...@@ -818,6 +854,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -818,6 +854,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
valueXmlString.append("<site_state_code_bill><![CDATA[]]></site_state_code_bill>"); valueXmlString.append("<site_state_code_bill><![CDATA[]]></site_state_code_bill>");
valueXmlString.append("<pallet_wt><![CDATA[]]></pallet_wt>"); valueXmlString.append("<pallet_wt><![CDATA[]]></pallet_wt>");
valueXmlString.append("<auto_receipt><![CDATA[N]]></auto_receipt>"); valueXmlString.append("<auto_receipt><![CDATA[N]]></auto_receipt>");
System.out.println("chgUser>>"+rs.getString("add_user")==null?"":rs.getString("add_user")+">>>chgTerm"+rs.getString("add_term")==null?"":rs.getString("add_term")+"currAppdate>>>"+currAppdate);
valueXmlString.append("<add_user><![CDATA["+(rs.getString("add_user")==null?"":rs.getString("add_user").trim())+"]]></add_user>"); valueXmlString.append("<add_user><![CDATA["+(rs.getString("add_user")==null?"":rs.getString("add_user").trim())+"]]></add_user>");
valueXmlString.append("<add_term><![CDATA["+(rs.getString("add_term")==null?"":rs.getString("add_term").trim())+"]]></add_term>"); valueXmlString.append("<add_term><![CDATA["+(rs.getString("add_term")==null?"":rs.getString("add_term").trim())+"]]></add_term>");
valueXmlString.append("<add_date>").append("<![CDATA[" + currAppdate + "]]>").append("</add_date>"); valueXmlString.append("<add_date>").append("<![CDATA[" + currAppdate + "]]>").append("</add_date>");
...@@ -934,6 +971,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -934,6 +971,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
valueXmlString.append("<site_state_code_bill><![CDATA[]]></site_state_code_bill>"); valueXmlString.append("<site_state_code_bill><![CDATA[]]></site_state_code_bill>");
valueXmlString.append("<pallet_wt><![CDATA[]]></pallet_wt>"); valueXmlString.append("<pallet_wt><![CDATA[]]></pallet_wt>");
valueXmlString.append("<auto_receipt><![CDATA[N]]></auto_receipt>"); valueXmlString.append("<auto_receipt><![CDATA[N]]></auto_receipt>");
System.out.println("chgUser>>"+chgUser+">>>chgTerm"+chgTerm+"currAppdate>>>"+currAppdate);
valueXmlString.append("<add_user>").append("<![CDATA[" + chgUser + "]]>").append("</add_user>"); //changes done by deepak valueXmlString.append("<add_user>").append("<![CDATA[" + chgUser + "]]>").append("</add_user>"); //changes done by deepak
valueXmlString.append("<add_term>").append("<![CDATA[" + chgTerm + "]]>").append("</add_term>"); valueXmlString.append("<add_term>").append("<![CDATA[" + chgTerm + "]]>").append("</add_term>");
valueXmlString.append("<add_date>").append("<![CDATA[" + currAppdate + "]]>").append("</add_date>"); valueXmlString.append("<add_date>").append("<![CDATA[" + currAppdate + "]]>").append("</add_date>");
...@@ -2023,13 +2061,13 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss ...@@ -2023,13 +2061,13 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
if(! lsTranTypeParent.equalsIgnoreCase(lsTranType.trim())) if(! lsTranTypeParent.equalsIgnoreCase(lsTranType.trim()))
{ {
detail2hdr.append("<quantity>"+lcQty+"</quantity>"); // detail2hdr.append("<quantity>"+lcQty+"</quantity>");
detail2hdr.append("<qty_order__alt>"+lcQty+"</qty_order__alt>"); detail2hdr.append("<qty_order__alt>"+lcQty+"</qty_order__alt>");
lcQty = lcQty; lcQty = lcQty;
} }
else else
{ {
detail2hdr.append("<quantity>"+mQty+"</quantity>"); // detail2hdr.append("<quantity>"+mQty+"</quantity>");
detail2hdr.append("<qty_order__alt>"+mQty+"</qty_order__alt>"); detail2hdr.append("<qty_order__alt>"+mQty+"</qty_order__alt>");
lcQty = mQty; lcQty = mQty;
} }
......
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