Commit 8c89eaa2 authored by jshinde's avatar jshinde

Request ID:[W15JSUN017] Update PalletReqIC for validation sequence and msg_no update .


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100219 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3ef11e78
......@@ -325,77 +325,88 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
cntLoc = rs.getInt(1);
System.out.println( "cntLoc:::"+cntLoc);
}
if(pstmt != null){pstmt.close();pstmt = null;}
if(rs != null){rs.close();rs = null;}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(cntLoc > 0)
{
stkSql = "SELECT COUNT(1) FROM STOCK WHERE INV_STAT IN(?,?) AND LOC_CODE IN (?,?,?,?,?,?,?,?) AND SITE_CODE=? AND QUANTITY>0";
lastChar=palletNo.charAt(palletNo.trim().length()-1);
System.out.println("lastChar:"+lastChar);
System.out.println("locSuffix disparm=["+locSuffixDisp+"] and lastChar["+lastChar+"]");
pstmt = conn.prepareStatement(stkSql);
pstmt.setString(1, "AWMS");
pstmt.setString(2, "AWMSQ");
pstmt.setString(3, palletNo);
pstmt.setString(4, palletNo+"Q");
pstmt.setString(5, palletNo+"B");
pstmt.setString(6, palletNo+"X");
pstmt.setString(7, palletNo+"M");
pstmt.setString(8, palletNo+"U");
pstmt.setString(9, palletNo+"P");
pstmt.setString(10,palletNo+"S");
pstmt.setString(11, loginSite);
rs = pstmt.executeQuery();
if(rs.next())
{
palcnt = rs.getInt(1);
}
if (pstmt != null) { pstmt.close(); pstmt = null; }
if (rs != null) { rs.close(); rs = null; }
System.out.println("awms pallet quantity" +palcnt);
if(palcnt > 0)
{
for (int z = 0; z < locS.length; z++)
{
locSuffixDisp = locS[z].trim();
lastChar=palletNo.charAt(palletNo.trim().length()-1);
lastCharS = Character.toString(lastChar);
System.out.println("lastChar"+lastChar);
System.out.println("locSuffix disparm=["+locSuffixDisp+"] and lastChar["+lastChar+"]");
if(locSuffixDisp.equalsIgnoreCase(lastCharS))
{
System.out.println("****Match found in disparm for"+lastChar);
System.out.println("location with suffix");
errCode = "VMPALLEEXT";
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
break;
}
}
}
else
if(locSuffixDisp.contains(String.valueOf(lastChar)))
{
System.out.println("awms pallet count" +palcnt);
errCode = "VMPALLETQN";//pallet quantity should be more than zero
System.out.println("****Match found in disparm for"+lastChar);
System.out.println("location with suffix");
errCode = "VTPALLEEXT";
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
break;
}
else
{
stkSql = "SELECT COUNT(1) FROM STOCK WHERE INV_STAT IN(?,?) AND LOC_CODE IN (?,?,?,?,?,?,?,?) AND SITE_CODE=? AND QUANTITY>0";
pstmt = conn.prepareStatement(stkSql);
pstmt.setString(1, "AWMS");
pstmt.setString(2, "AWMSQ");
pstmt.setString(3, palletNo);
pstmt.setString(4, palletNo+"Q");
pstmt.setString(5, palletNo+"B");
pstmt.setString(6, palletNo+"X");
pstmt.setString(7, palletNo+"M");
pstmt.setString(8, palletNo+"U");
pstmt.setString(9, palletNo+"P");
pstmt.setString(10,palletNo+"S");
pstmt.setString(11, loginSite);
rs = pstmt.executeQuery();
if(rs.next())
{
palcnt = rs.getInt(1);
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if(palcnt == 0)
{
System.out.println("awms pallet count" +palcnt);
errCode = "VMPALLETQN";//pallet quantity should be more than zero
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
break;
}
}
}
else
{
System.out.println("pallet not in AWMS" +cntLoc);
errCode = "VMPALLEEXT";//pallet
errCode = "VTPALLEEXT";//pallet
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
break;
}
//Change by Jagruti Shinde Request Id:[W15JSUN017] requirement change for Exempted/BSR location inv_stat[End]
if ("pallet_req_stk".equalsIgnoreCase(objName))
{
//sql = "select fn_chk_prs(trim(?)) from dual ";
sql = "select fn_chk_prs(trim(?),?) from dual ";
sql = "SELECT FN_CHK_PRS(TRIM(?),?) FROM DUAL ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo);
......@@ -405,8 +416,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
{
palTcnt = rs.getInt(1);
}
if (pstmt != null) { pstmt.close(); pstmt = null; }
if (rs != null) { rs.close(); rs = null; }
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if (palTcnt > 0)
{
System.out.println("PRESENT IN SWMS FOR DETAILS" + palTcnt);
......@@ -426,7 +446,7 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
}
else
{
sql = "select fn_chk_prs(trim(?),?) from dual ";
sql = "SELECT FN_CHK_PRS(TRIM(?),?) FROM DUAL ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo);
pstmt.setString(2, tranId);
......@@ -435,8 +455,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
{
palTcnt = rs.getInt(1);
}
if (pstmt != null) { pstmt.close(); pstmt = null; }
if (rs != null) { rs.close(); rs = null; }
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if (palTcnt > 0)
{
System.out.println("PRESENT IN SWMS" + palTcnt);
......@@ -547,8 +576,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
System.out.println("ITEM CODE COUNT FOR AWMS" +itemCodecnt);
}
if (pstmt != null) { pstmt.close(); pstmt = null; }
if (rs != null) { rs.close(); rs = null; }
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if(itemCodecnt==0)
{
System.out.println("item code exist");
......@@ -598,8 +636,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
System.out.println("lot number for awms" +lotNocnt);
}
if (pstmt != null) { pstmt.close(); pstmt = null; }
if (rs != null) { rs.close(); rs = null; }
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if(lotNocnt==0)
{
System.out.println("lot number not exist");
......@@ -649,8 +696,16 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
lotSlcnt = rs.getInt(1);
System.out.println("lot sl count for awms" +lotSlcnt);
}
if (pstmt != null) { pstmt.close(); pstmt = null; }
if (rs != null) { rs.close(); rs = null; }
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if(lotSlcnt==0)
{
System.out.println("lot sl exist");
......@@ -741,8 +796,16 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
break;
}
}
if (pstmt != null) { pstmt.close(); pstmt = null; }
if (rs != null) { rs.close(); rs = null; }
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
}
}
if("quantity".equalsIgnoreCase(childNodeName))
......@@ -807,8 +870,16 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
break;
}
}
if (pstmt != null) { pstmt.close(); pstmt = null; }
if (rs != null) { rs.close(); rs = null; }
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
}
}//Changed for pallet request with stock details [End]Request Id:W15HSUN003
......
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