Commit 55bbaade authored by jshinde's avatar jshinde

Request ID:[W15JSUN008] Update PalletizationIC as requirement changes for BSR location inv_stat.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100189 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7426bc01
...@@ -104,8 +104,10 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca ...@@ -104,8 +104,10 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
StringBuffer errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root><Errors>"); StringBuffer errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root><Errors>");
String loginSite = "", userId = "", childNodeName = "", errorType = "", errCode = "", errString = "",locGroupDisp="", String loginSite = "", userId = "", childNodeName = "", errorType = "", errCode = "", errString = "",locGroupDisp="",
itemSql="",StatusSql="",status ="",itemRgSql="",locSql="",locGroup="",itemSer="",itemSerRgDisparm="",itemCode="",lotNo=""; itemSql="",StatusSql="",status ="",itemRgSql="",locSql="",locGroup="",itemSer="",itemSerRgDisparm="",itemCode="",lotNo="",
locSuffixDisp="",stkSql="",lastCharS="";
int currentFormNo = 0, childNodeListLength = 0, cnt = 0, ctr = 0; int currentFormNo = 0, childNodeListLength = 0, cnt = 0, ctr = 0;
char lastChar ;
ArrayList <String> errList = new ArrayList<String>(); ArrayList <String> errList = new ArrayList<String>();
ArrayList <String> errFields = new ArrayList <String> (); ArrayList <String> errFields = new ArrayList <String> ();
...@@ -143,13 +145,13 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca ...@@ -143,13 +145,13 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
String palletNo = "", sql = ""; String palletNo = "", sql = "";
PreparedStatement pstmt = null ; PreparedStatement pstmt = null ;
ResultSet rs = null ; ResultSet rs = null ;
int palletNoCount = 0, palletAWMSCount = 0,cntLoc =0; int palletNoCount = 0, palletAWMSCount = 0,cntLoc =0,palcnt=0;
double palletQty = 0; double palletQty = 0;
//Change by Jagruti Shinde Request Id:[W15JSUN008] requirement change for Exempted/BSR location inv_stat[start] //Change by Jagruti Shinde Request Id:[W15JSUN008] requirement change for Exempted/BSR location inv_stat[start]
locGroupDisp = checkNullAndTrim(discommon.getDisparams("999999", "EXTEMP_LOC_PARM", conn)); locSuffixDisp = checkNullAndTrim(discommon.getDisparams("999999", "AWMS_LOCATION_SUFFIX", conn));
System.out.println("EXTEMP_LOC_PARM["+locGroupDisp+"]"); System.out.println("AWMS_LOCATION_SUFFIX["+locSuffixDisp+"]");
String[] locG = locGroupDisp.split(","); String[] locS = locSuffixDisp.split(",");
System.out.println("Disparm Lenght EXTEMP_LOC_PARM="+locG.length); System.out.println("Disparm Lenght for locSuffixDisp="+locS.length);
//Change by Jagruti Shinde Request Id:[W15JSUN008] requirement change for Exempted/BSR location inv_stat[end] //Change by Jagruti Shinde Request Id:[W15JSUN008] requirement change for Exempted/BSR location inv_stat[end]
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
...@@ -206,37 +208,28 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca ...@@ -206,37 +208,28 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
if(cntLoc > 0) if(cntLoc > 0)
{ {
locSql="SELECT LOC_GROUP FROM LOCATION WHERE LOC_CODE = ?"; for (int z = 0; z < locS.length; z++)
pstmt = conn.prepareStatement(locSql);
pstmt.setString(1, palletNo);
rs = pstmt.executeQuery();
if(rs.next())
{ {
locGroup = checkNullAndTrim(rs.getString("LOC_GROUP")); locSuffixDisp = locS[z].trim();
System.out.println( "locGroup:::"+locGroup); lastChar=palletNo.charAt(palletNo.trim().length()-1);
} lastCharS = Character.toString(lastChar);
if(pstmt != null){ pstmt.close(); pstmt = null; } System.out.println("lastChar"+lastChar);
if(rs != null){ rs.close(); rs = null; } System.out.println("locSuffix disparm=["+locSuffixDisp+"] and lastChar["+lastChar+"]");
for (int x = 0; x < locG.length; x++)
{
locGroupDisp = locG[x].trim();
System.out.println("locGroup disparm=["+locGroupDisp+"] and locGroup["+locGroup+"]");
if(locGroupDisp.equalsIgnoreCase(locGroup)) if(locSuffixDisp.equalsIgnoreCase(lastCharS))
{ {
System.out.println("****Match found in disparm for"+locGroup); System.out.println("****Match found in disparm for"+lastChar);
System.out.println("exempted location found"); System.out.println("location with suffix");
errCode = "VMPALPEEXT";//pallet errCode = "VMPALPEEXT";
errList.add( errCode ); errList.add( errCode );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
break; break;
} }
} }
} }
else else
{ {
System.out.println("pallet not in AWMS::" +cntLoc); System.out.println("pallet not in AWMS" +cntLoc);
errCode = "VMPALPEEXT";//pallet errCode = "VMPALPEEXT";//pallet
errList.add( errCode ); errList.add( errCode );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
......
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