Commit ef5c3488 authored by pchavan's avatar pchavan

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@200647 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 03d91965
...@@ -4403,7 +4403,24 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4403,7 +4403,24 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
} }
if((suppcode != null && suppcode.trim().length() >0) && (sitecode != null && sitecode.trim().length() >0)) if((suppcode != null && suppcode.trim().length() >0) && (sitecode != null && sitecode.trim().length() >0))
{ {
sql=" select (case when qc_reqd is null then ' ' else qc_reqd end) from site_supplier where site_code = ? and supp_code = ?"; //Added by PriyankaC on 09MAY2019 to get qc_reqd from itemser [START].
sql="select case when qc_reqd is null then 'N' else qc_reqd end from itemser where item_ser = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,itemser);;
rs=pstmt.executeQuery();
if(rs.next())
{
lsqcreqd=checkNull(rs.getString(1));
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
if(lsqcreqd.trim().length()==0)
{
//Added by PriyankaC on 09MAY2019 to get qc_reqd from itemser [END].
sql=" select (case when qc_reqd is null then 'N' else qc_reqd end) from site_supplier where site_code = ? and supp_code = ?";
pstmt= conn.prepareStatement( sql ); pstmt= conn.prepareStatement( sql );
pstmt.setString( 1,sitecode); pstmt.setString( 1,sitecode);
pstmt.setString( 2,suppcode); pstmt.setString( 2,suppcode);
...@@ -4416,9 +4433,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4416,9 +4433,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
}
if (lsqcreqd == null || lsqcreqd.trim().length() == 0) if (lsqcreqd == null || lsqcreqd.trim().length() == 0)
{ {
sql="select (case when qc_reqd is null then ' ' else qc_reqd end) from supplier where supp_code =?"; sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from supplier where supp_code =?";
pstmt= conn.prepareStatement( sql ); pstmt= conn.prepareStatement( sql );
pstmt.setString(1,suppcode); pstmt.setString(1,suppcode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -4798,11 +4816,32 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4798,11 +4816,32 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
valueXmlString.append("<exch_rate__ins protect =\"1\">").append("<![CDATA[" + lcexchrate + "]]>").append("</exch_rate__ins>"); valueXmlString.append("<exch_rate__ins protect =\"1\">").append("<![CDATA[" + lcexchrate + "]]>").append("</exch_rate__ins>");
//valueXmlString.append("<exch_rate__ins>").append("<![CDATA[" + lcexchrate + "]]>").append("</exch_rate__ins>"); //valueXmlString.append("<exch_rate__ins>").append("<![CDATA[" + lcexchrate + "]]>").append("</exch_rate__ins>");
} }
String qcSiteCode =""; String qcSiteCode ="" ,itemser="";
qcSiteCode= genericUtility.getColumnValue("site_code", dom); qcSiteCode= genericUtility.getColumnValue("site_code", dom);
System.out.println("Supp COde["+mScode+"]"); System.out.println("Supp COde["+mScode+"]");
System.out.println("Site Code["+qcSiteCode+"]"); System.out.println("Site Code["+qcSiteCode+"]");
sql=" select (case when qc_reqd is null then ' ' else qc_reqd end) from site_supplier where site_code = ? and supp_code = ?";
//Added by PriyankaC on 09MAY2019 to get qc_reqd from itemser [START].
itemser = genericUtility.getColumnValue("itemser", dom);
System.out.println("itemser["+itemser+"]");
sql="select case when qc_reqd is null then 'N' else qc_reqd end from itemser where item_ser = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,itemser);;
rs=pstmt.executeQuery();
if(rs.next())
{
lsqcreqd=checkNull(rs.getString(1));
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
if(lsqcreqd == null ||lsqcreqd.trim().length()==0)
{
//Added by PriyankaC on 09MAY2019 to get qc_reqd from itemser [END].
sql=" select (case when qc_reqd is null then 'N' else qc_reqd end) from site_supplier where site_code = ? and supp_code = ?";
pstmt= conn.prepareStatement( sql ); pstmt= conn.prepareStatement( sql );
pstmt.setString( 1,qcSiteCode); pstmt.setString( 1,qcSiteCode);
pstmt.setString( 2,mScode); pstmt.setString( 2,mScode);
...@@ -4815,9 +4854,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4815,9 +4854,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
}
if (lsqcreqd == null || lsqcreqd.trim().length() == 0) if (lsqcreqd == null || lsqcreqd.trim().length() == 0)
{ {
sql="select (case when qc_reqd is null then ' ' else qc_reqd end) from supplier where supp_code =?"; sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from supplier where supp_code =?";
pstmt= conn.prepareStatement( sql ); pstmt= conn.prepareStatement( sql );
pstmt.setString(1,mScode); pstmt.setString(1,mScode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
......
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