Commit d16bdd00 authored by nkhan's avatar nkhan

*** empty log message ***


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103842 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c77fbbb4
...@@ -2734,41 +2734,45 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -2734,41 +2734,45 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,sitecode); pstmt.setString(1,sitecode);
pstmt.setString(2,itemcode); pstmt.setString(2,itemcode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
suppsour = rs.getString(1); //changed By Nasruddin [28-10-16]
} //suppsour = rs.getString(1);
rs.close(); suppsour = checkNull(rs.getString(1));
rs = null; }
pstmt.close(); rs.close();
pstmt = null; rs = null;
suppsour=suppsour.trim(); pstmt.close();
if(suppsour ==null || suppsour.trim().length()==0) pstmt = null;
{ System.out.println("suppsour ["+ suppsour +"]");
sql="select (case when supp_sour is null then 'P' else supp_sour end) from item where item_code = ?"; //changed By Nasruddin [28-10-16]
pstmt = conn.prepareStatement(sql); // suppsour=suppsour.trim();
pstmt.setString(1,itemcode); if(suppsour == null || suppsour.trim().length()==0)
rs = pstmt.executeQuery(); {
if (rs.next()) sql="select (case when supp_sour is null then 'P' else supp_sour end) from item where item_code = ?";
{ pstmt = conn.prepareStatement(sql);
suppsour = rs.getString(1); pstmt.setString(1,itemcode);
} rs = pstmt.executeQuery();
rs.close(); if (rs.next())
rs = null; {
pstmt.close(); suppsour = rs.getString(1);
pstmt = null; }
} rs.close();
if("M".equalsIgnoreCase(suppsour)) rs = null;
{ pstmt.close();
errCode = this.isSiteCode(sitecodemfg, modName); pstmt = null;
System.out.println("SiteCode Error code is"+errCode); }
if (errCode != null && errCode.trim().length() > 0) if("M".equalsIgnoreCase(suppsour))
{ {
errList.add(errCode); errCode = this.isSiteCode(sitecodemfg, modName);
errFields.add(childNodeName.toLowerCase()); System.out.println("SiteCode Error code is"+errCode);
} if (errCode != null && errCode.trim().length() > 0)
} {
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}//end case site_code__mfg }//end case site_code__mfg
if (childNodeName.equalsIgnoreCase("rate")) if (childNodeName.equalsIgnoreCase("rate"))
{ {
...@@ -9175,96 +9179,96 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -9175,96 +9179,96 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
{ {
System.out.println("aslotno["+aslotno+"]"); System.out.println("aslotno["+aslotno+"]");
System.out.println("aslotno length["+aslotno.trim().length()+"]"); System.out.println("aslotno length["+aslotno.trim().length()+"]");
if(aslotno== null || aslotno.trim().length()==0) if(aslotno== null || aslotno.trim().length()==0)
{ {
aslotno=" "; aslotno=" ";
System.out.println("aslotno null ["+aslotno+"]"); System.out.println("aslotno null ["+aslotno+"]");
} }
if("M".equalsIgnoreCase(astype)) if("M".equalsIgnoreCase(astype))
{ {
sql="select site_code__mfg from stock where item_code = ? and site_code = ? and loc_code = ? and lot_no = ? and lot_sl = ? "; sql="select site_code__mfg from stock where item_code = ? and site_code = ? and loc_code = ? and lot_no = ? and lot_sl = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asitem); pstmt.setString(1, asitem);
pstmt.setString(2, assite); pstmt.setString(2, assite);
pstmt.setString(3, asloc); pstmt.setString(3, asloc);
pstmt.setString(4, aslotno); pstmt.setString(4, aslotno);
pstmt.setString(5, aslotsl); pstmt.setString(5, aslotsl);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
lsmfgsite = rs.getString(1); lsmfgsite = rs.getString(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("Sql1["+sql+"]"); System.out.println("Sql1["+sql+"]");
System.out.println(" mfgSIte COde is"+lsmfgsite); System.out.println(" mfgSIte COde is"+lsmfgsite);
System.out.println("mfgSiteCode Length is"+lsmfgsite.trim().length()); System.out.println("mfgSiteCode Length is"+lsmfgsite.trim().length());
if(lsmfgsite == null || lsmfgsite.trim().length() ==0) if(lsmfgsite == null || lsmfgsite.trim().length() ==0)
{ {
sql2="select site_code from item where item_code = ?"; sql2="select site_code from item where item_code = ?";
pstmt1 = conn.prepareStatement(sql2); pstmt1 = conn.prepareStatement(sql2);
pstmt1.setString(1, asitem); pstmt1.setString(1, asitem);
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
if (rs1.next()) if (rs1.next())
{ {
lsmfgsite = checkNull(rs1.getString(1)); lsmfgsite = checkNull(rs1.getString(1));
} }
else else
{ {
lsmfgsite = "NOTFOUND"; lsmfgsite = "NOTFOUND";
} }
rs1.close(); rs1.close();
rs1 = null; rs1 = null;
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
System.out.println("Sql3["+sql2+"]"); System.out.println("Sql3["+sql2+"]");
} }
//} //}
} }
if("P".equalsIgnoreCase(astype)) if("P".equalsIgnoreCase(astype))
{ {
sql="select pack_code from stock where item_code = ? and site_code = ? and loc_code = ? and lot_no = ? and lot_sl= ? "; sql="select pack_code from stock where item_code = ? and site_code = ? and loc_code = ? and lot_no = ? and lot_sl= ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asitem); pstmt.setString(1, asitem);
pstmt.setString(2, assite); pstmt.setString(2, assite);
pstmt.setString(3, asloc); pstmt.setString(3, asloc);
pstmt.setString(4, aslotno); pstmt.setString(4, aslotno);
pstmt.setString(5, aslotsl); pstmt.setString(5, aslotsl);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
lsmfgsite = rs.getString(1); lsmfgsite = rs.getString(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("Packing COde is"+lsmfgsite); System.out.println("Packing COde is"+lsmfgsite);
System.out.println("Packing COde Length is"+lsmfgsite.trim().length()); System.out.println("Packing COde Length is"+lsmfgsite.trim().length());
if(lsmfgsite== null || lsmfgsite.trim().length() ==0) if(lsmfgsite== null || lsmfgsite.trim().length() ==0)
{ {
sql2="select pack_code from item where item_code = ? "; sql2="select pack_code from item where item_code = ? ";
pstmt1 = conn.prepareStatement(sql2); pstmt1 = conn.prepareStatement(sql2);
pstmt1.setString(1, asitem); pstmt1.setString(1, asitem);
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
if (rs1.next()) if (rs1.next())
{ {
lsmfgsite = checkNull(rs1.getString(1)); lsmfgsite = checkNull(rs1.getString(1));
} }
else else
{ {
lsmfgsite = "NOTFOUND"; lsmfgsite = "NOTFOUND";
} }
rs1.close(); rs1.close();
rs1 = null; rs1 = null;
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
} }
} }
} }
catch(Exception e) catch(Exception e)
{ {
......
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