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,10 +325,33 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -325,10 +325,33 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
cntLoc = rs.getInt(1); cntLoc = rs.getInt(1);
System.out.println( "cntLoc:::"+cntLoc); System.out.println( "cntLoc:::"+cntLoc);
} }
if(pstmt != null){pstmt.close();pstmt = null;} if(pstmt != null)
if(rs != null){rs.close();rs = null;} {
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(cntLoc > 0) if(cntLoc > 0)
{
lastChar=palletNo.charAt(palletNo.trim().length()-1);
System.out.println("lastChar:"+lastChar);
System.out.println("locSuffix disparm=["+locSuffixDisp+"] and lastChar["+lastChar+"]");
if(locSuffixDisp.contains(String.valueOf(lastChar)))
{
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"; stkSql = "SELECT COUNT(1) FROM STOCK WHERE INV_STAT IN(?,?) AND LOC_CODE IN (?,?,?,?,?,?,?,?) AND SITE_CODE=? AND QUANTITY>0";
...@@ -349,32 +372,18 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -349,32 +372,18 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
{ {
palcnt = rs.getInt(1); palcnt = rs.getInt(1);
} }
if (pstmt != null) { pstmt.close(); pstmt = null; } if (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); pstmt.close();
System.out.println("location with suffix"); pstmt = null;
errCode = "VMPALLEEXT";
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
break;
}
} }
if (rs != null)
{
rs.close();
rs = null;
} }
else
if(palcnt == 0)
{ {
System.out.println("awms pallet count" +palcnt); System.out.println("awms pallet count" +palcnt);
errCode = "VMPALLETQN";//pallet quantity should be more than zero errCode = "VMPALLETQN";//pallet quantity should be more than zero
...@@ -383,19 +392,21 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -383,19 +392,21 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
break; break;
} }
} }
}
else else
{ {
System.out.println("pallet not in AWMS" +cntLoc); System.out.println("pallet not in AWMS" +cntLoc);
errCode = "VMPALLEEXT";//pallet errCode = "VTPALLEEXT";//pallet
errList.add( errCode ); errList.add( errCode );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
break; break;
} }
//Change by Jagruti Shinde Request Id:[W15JSUN017] requirement change for Exempted/BSR location inv_stat[End]
if ("pallet_req_stk".equalsIgnoreCase(objName)) 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 "; sql = "SELECT FN_CHK_PRS(TRIM(?),?) FROM DUAL ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo); pstmt.setString(1, palletNo);
...@@ -405,8 +416,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -405,8 +416,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
{ {
palTcnt = rs.getInt(1); palTcnt = rs.getInt(1);
} }
if (pstmt != null) { pstmt.close(); pstmt = null; } if (pstmt != null)
if (rs != null) { rs.close(); rs = null; } {
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if (palTcnt > 0) if (palTcnt > 0)
{ {
System.out.println("PRESENT IN SWMS FOR DETAILS" + palTcnt); System.out.println("PRESENT IN SWMS FOR DETAILS" + palTcnt);
...@@ -426,7 +446,7 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -426,7 +446,7 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
} }
else else
{ {
sql = "select fn_chk_prs(trim(?),?) from dual "; sql = "SELECT FN_CHK_PRS(TRIM(?),?) FROM DUAL ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo); pstmt.setString(1, palletNo);
pstmt.setString(2, tranId); pstmt.setString(2, tranId);
...@@ -435,8 +455,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -435,8 +455,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
{ {
palTcnt = rs.getInt(1); palTcnt = rs.getInt(1);
} }
if (pstmt != null) { pstmt.close(); pstmt = null; } if (pstmt != null)
if (rs != null) { rs.close(); rs = null; } {
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if (palTcnt > 0) if (palTcnt > 0)
{ {
System.out.println("PRESENT IN SWMS" + palTcnt); System.out.println("PRESENT IN SWMS" + palTcnt);
...@@ -547,8 +576,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -547,8 +576,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
System.out.println("ITEM CODE COUNT FOR AWMS" +itemCodecnt); System.out.println("ITEM CODE COUNT FOR AWMS" +itemCodecnt);
} }
if (pstmt != null) { pstmt.close(); pstmt = null; } if (pstmt != null)
if (rs != null) { rs.close(); rs = null; } {
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if(itemCodecnt==0) if(itemCodecnt==0)
{ {
System.out.println("item code exist"); System.out.println("item code exist");
...@@ -598,8 +636,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -598,8 +636,17 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
System.out.println("lot number for awms" +lotNocnt); System.out.println("lot number for awms" +lotNocnt);
} }
if (pstmt != null) { pstmt.close(); pstmt = null; } if (pstmt != null)
if (rs != null) { rs.close(); rs = null; } {
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if(lotNocnt==0) if(lotNocnt==0)
{ {
System.out.println("lot number not exist"); System.out.println("lot number not exist");
...@@ -649,8 +696,16 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -649,8 +696,16 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
lotSlcnt = rs.getInt(1); lotSlcnt = rs.getInt(1);
System.out.println("lot sl count for awms" +lotSlcnt); System.out.println("lot sl count for awms" +lotSlcnt);
} }
if (pstmt != null) { pstmt.close(); pstmt = null; } if (pstmt != null)
if (rs != null) { rs.close(); rs = null; } {
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if(lotSlcnt==0) if(lotSlcnt==0)
{ {
System.out.println("lot sl exist"); System.out.println("lot sl exist");
...@@ -741,8 +796,16 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -741,8 +796,16 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
break; break;
} }
} }
if (pstmt != null) { pstmt.close(); pstmt = null; } if (pstmt != null)
if (rs != null) { rs.close(); rs = null; } {
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
} }
} }
if("quantity".equalsIgnoreCase(childNodeName)) if("quantity".equalsIgnoreCase(childNodeName))
...@@ -807,8 +870,16 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -807,8 +870,16 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
break; break;
} }
} }
if (pstmt != null) { pstmt.close(); pstmt = null; } if (pstmt != null)
if (rs != null) { rs.close(); rs = null; } {
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
} }
}//Changed for pallet request with stock details [End]Request Id:W15HSUN003 }//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