Commit c89ab8c6 authored by pchavan's avatar pchavan

to change qc_req condition.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@200768 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7d601b54
...@@ -4404,22 +4404,6 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4404,22 +4404,6 @@ 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))
{ {
//Added by PriyankaC on 09MAY2019 to get qc_reqd from itemser [START]. //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 = ?"; 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);
...@@ -4433,7 +4417,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4433,7 +4417,7 @@ 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 'N' 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 =?";
...@@ -4449,6 +4433,22 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4449,6 +4433,22 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if(lsqcreqd.trim().length()==0)
{
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;
}
//Added by PriyankaC on 09MAY2019 to get qc_reqd from itemser [END].
if (lsqcreqd != null && lsqcreqd.trim().length()>0) if (lsqcreqd != null && lsqcreqd.trim().length()>0)
{ {
if("Y".equalsIgnoreCase(lsqcreqd)) if("Y".equalsIgnoreCase(lsqcreqd))
...@@ -4824,23 +4824,6 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4824,23 +4824,6 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
//Added by PriyankaC on 09MAY2019 to get qc_reqd from itemser [START]. //Added by PriyankaC on 09MAY2019 to get qc_reqd from itemser [START].
itemser = genericUtility.getColumnValue("itemser", dom); itemser = genericUtility.getColumnValue("itemser", dom);
System.out.println("itemser["+itemser+"]"); 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 = ?"; 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);
...@@ -4854,7 +4837,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4854,7 +4837,7 @@ 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 'N' 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 =?";
...@@ -4870,6 +4853,22 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -4870,6 +4853,22 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (lsqcreqd == null || lsqcreqd.trim().length() == 0)
{
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;
}
//Added by PriyankaC on 09MAY2019 to get qc_reqd from itemser [END].
if (lsqcreqd != null && lsqcreqd.trim().length()>0) if (lsqcreqd != null && lsqcreqd.trim().length()>0)
{ {
if("Y".equalsIgnoreCase(lsqcreqd)) if("Y".equalsIgnoreCase(lsqcreqd))
...@@ -7127,7 +7126,42 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -7127,7 +7126,42 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
{ {
//mcode = dw_detedit[ii_currformno].GetItemString(dw_detedit[ii_currformno].getrow(), '') //mcode = dw_detedit[ii_currformno].GetItemString(dw_detedit[ii_currformno].getrow(), '')
mcode=checkNull(genericUtility.getColumnValue( "item_code", dom )); mcode=checkNull(genericUtility.getColumnValue( "item_code", dom ));
//PriyankaC On 13MAY2019. TO SET loc code from siteItem.
sql="select qc_reqd from siteitem where item_code = ? and site_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsitemcode);
pstmt.setString(2, lssite);
rs = pstmt.executeQuery();
if (rs.next())
{
lsqcreqd = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(lsqcreqd == null || lsqcreqd.trim().length() == 0)
{
sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from item where item_code = ?"; sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsitemcode);
rs = pstmt.executeQuery();
if (rs.next())
{
lsqcreqd = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
if(lsqcreqd == null || lsqcreqd.trim().length() == 0)
{
lsqcreqd="N";
}
/*sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from item where item_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, mcode); pstmt.setString(1, mcode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -7137,7 +7171,8 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -7137,7 +7171,8 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();*/
// PriyankaC END
pstmt = null; pstmt = null;
if("Y".equalsIgnoreCase(lsqcreqd)) if("Y".equalsIgnoreCase(lsqcreqd))
...@@ -7962,19 +7997,54 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -7962,19 +7997,54 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
{ {
//mcode = dw_detedit[ii_currformno].GetItemString(dw_detedit[ii_currformno].getrow(), '') //mcode = dw_detedit[ii_currformno].GetItemString(dw_detedit[ii_currformno].getrow(), '')
mcode=checkNull(genericUtility.getColumnValue( "item_code", dom )); mcode=checkNull(genericUtility.getColumnValue( "item_code", dom ));
//PriyankaC on 13MAy2019 to set loc code from siteitem.
sql="select qc_reqd from siteitem where item_code = ? and site_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsitemcode);
pstmt.setString(2, lssite);
rs = pstmt.executeQuery();
if (rs.next())
{
lsqcreqd = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(lsqcreqd == null || lsqcreqd.trim().length() == 0)
{
sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from item where item_code = ?"; sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from item where item_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, mcode); pstmt.setString(1, lsitemcode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
lsqcreqd = checkNull(rs.getString(1)); lsqcreqd = rs.getString(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
}
if(lsqcreqd == null || lsqcreqd.trim().length() == 0)
{
lsqcreqd="N";
}
/*sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, mcode);
rs = pstmt.executeQuery();
if (rs.next())
{
lsqcreqd = checkNull(rs.getString(1));
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;*/
//Priyankac [END]
if("Y".equalsIgnoreCase(lsqcreqd)) if("Y".equalsIgnoreCase(lsqcreqd))
{ {
lscctrloccode = lscostctr.trim()+"Q"; lscctrloccode = lscostctr.trim()+"Q";
......
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