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
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,sitecode);
pstmt.setString(2,itemcode);
rs = pstmt.executeQuery();
if (rs.next())
{
suppsour = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
suppsour=suppsour.trim();
if(suppsour ==null || suppsour.trim().length()==0)
{
sql="select (case when supp_sour is null then 'P' else supp_sour end) from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemcode);
rs = pstmt.executeQuery();
if (rs.next())
{
suppsour = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
if("M".equalsIgnoreCase(suppsour))
{
errCode = this.isSiteCode(sitecodemfg, modName);
System.out.println("SiteCode Error code is"+errCode);
if (errCode != null && errCode.trim().length() > 0)
{
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
rs = pstmt.executeQuery();
if (rs.next())
{
//changed By Nasruddin [28-10-16]
//suppsour = rs.getString(1);
suppsour = checkNull(rs.getString(1));
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("suppsour ["+ suppsour +"]");
//changed By Nasruddin [28-10-16]
// suppsour=suppsour.trim();
if(suppsour == null || suppsour.trim().length()==0)
{
sql="select (case when supp_sour is null then 'P' else supp_sour end) from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemcode);
rs = pstmt.executeQuery();
if (rs.next())
{
suppsour = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
if("M".equalsIgnoreCase(suppsour))
{
errCode = this.isSiteCode(sitecodemfg, modName);
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
if (childNodeName.equalsIgnoreCase("rate"))
{
......@@ -9175,96 +9179,96 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
{
System.out.println("aslotno["+aslotno+"]");
System.out.println("aslotno length["+aslotno.trim().length()+"]");
if(aslotno== null || aslotno.trim().length()==0)
{
aslotno=" ";
System.out.println("aslotno null ["+aslotno+"]");
}
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 = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asitem);
pstmt.setString(2, assite);
pstmt.setString(3, asloc);
pstmt.setString(4, aslotno);
pstmt.setString(5, aslotsl);
rs = pstmt.executeQuery();
if (rs.next())
{
lsmfgsite = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("Sql1["+sql+"]");
System.out.println(" mfgSIte COde is"+lsmfgsite);
System.out.println("mfgSiteCode Length is"+lsmfgsite.trim().length());
if(lsmfgsite == null || lsmfgsite.trim().length() ==0)
{
sql2="select site_code from item where item_code = ?";
pstmt1 = conn.prepareStatement(sql2);
pstmt1.setString(1, asitem);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
lsmfgsite = checkNull(rs1.getString(1));
}
else
{
lsmfgsite = "NOTFOUND";
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
System.out.println("Sql3["+sql2+"]");
}
//}
}
if(aslotno== null || aslotno.trim().length()==0)
{
aslotno=" ";
System.out.println("aslotno null ["+aslotno+"]");
}
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 = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asitem);
pstmt.setString(2, assite);
pstmt.setString(3, asloc);
pstmt.setString(4, aslotno);
pstmt.setString(5, aslotsl);
rs = pstmt.executeQuery();
if (rs.next())
{
lsmfgsite = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("Sql1["+sql+"]");
System.out.println(" mfgSIte COde is"+lsmfgsite);
System.out.println("mfgSiteCode Length is"+lsmfgsite.trim().length());
if(lsmfgsite == null || lsmfgsite.trim().length() ==0)
{
sql2="select site_code from item where item_code = ?";
pstmt1 = conn.prepareStatement(sql2);
pstmt1.setString(1, asitem);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
lsmfgsite = checkNull(rs1.getString(1));
}
else
{
lsmfgsite = "NOTFOUND";
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
System.out.println("Sql3["+sql2+"]");
}
//}
}
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= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asitem);
pstmt.setString(2, assite);
pstmt.setString(3, asloc);
pstmt.setString(4, aslotno);
pstmt.setString(5, aslotsl);
rs = pstmt.executeQuery();
if (rs.next())
{
lsmfgsite = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("Packing COde is"+lsmfgsite);
System.out.println("Packing COde Length is"+lsmfgsite.trim().length());
if(lsmfgsite== null || lsmfgsite.trim().length() ==0)
{
sql2="select pack_code from item where item_code = ? ";
pstmt1 = conn.prepareStatement(sql2);
pstmt1.setString(1, asitem);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
lsmfgsite = checkNull(rs1.getString(1));
}
else
{
lsmfgsite = "NOTFOUND";
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
}
}
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= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asitem);
pstmt.setString(2, assite);
pstmt.setString(3, asloc);
pstmt.setString(4, aslotno);
pstmt.setString(5, aslotsl);
rs = pstmt.executeQuery();
if (rs.next())
{
lsmfgsite = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("Packing COde is"+lsmfgsite);
System.out.println("Packing COde Length is"+lsmfgsite.trim().length());
if(lsmfgsite== null || lsmfgsite.trim().length() ==0)
{
sql2="select pack_code from item where item_code = ? ";
pstmt1 = conn.prepareStatement(sql2);
pstmt1.setString(1, asitem);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
lsmfgsite = checkNull(rs1.getString(1));
}
else
{
lsmfgsite = "NOTFOUND";
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
}
}
}
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