Commit 9715cfcd authored by cpandey's avatar cpandey

add actionStockSplite method


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92164 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6f787df5
...@@ -41,9 +41,9 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -41,9 +41,9 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
{ {
}*/ }*/
public String actionHandler() throws RemoteException,ITMException public String actionHandler() throws RemoteException,ITMException
{ {
return ""; return "";
} }
public String actionHandler(String actionType, String xmlString, String xmlString1, String objContext, String xtraParams) throws RemoteException,ITMException public String actionHandler(String actionType, String xmlString, String xmlString1, String objContext, String xtraParams) throws RemoteException,ITMException
...@@ -90,14 +90,14 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -90,14 +90,14 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
retString = actionDefault3(dom, dom1, objContext, xtraParams); retString = actionDefault3(dom, dom1, objContext, xtraParams);
} }
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception :InvPack :actionHandler(String xmlString):" + e.getMessage() + ":"); System.out.println("Exception :InvPack :actionHandler(String xmlString):" + e.getMessage() + ":");
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
System.out.println("returning String from InvPack : actionHandler"+retString); System.out.println("returning String from InvPack : actionHandler"+retString);
return retString; return retString;
} }
public String actionHandlerTransform(String actionType, String xmlString, String xmlString1, String objContext, String xtraParams, String selDataStr) throws RemoteException,ITMException public String actionHandlerTransform(String actionType, String xmlString, String xmlString1, String objContext, String xtraParams, String selDataStr) throws RemoteException,ITMException
...@@ -134,14 +134,14 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -134,14 +134,14 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
retString = packetTransform(dom, dom1, objContext, xtraParams, selDataDom); retString = packetTransform(dom, dom1, objContext, xtraParams, selDataDom);
} }
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception :InvPack :actionHandlerTransform(String xmlString):" + e.getMessage() + ":"); System.out.println("Exception :InvPack :actionHandlerTransform(String xmlString):" + e.getMessage() + ":");
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
System.out.println("returning String from InvPack : actionHandlerTransform"+retString); System.out.println("returning String from InvPack : actionHandlerTransform"+retString);
return retString; return retString;
} }
...@@ -186,7 +186,6 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -186,7 +186,6 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
//Added by msalam on 21/06/07 to put filter for LotNo int query for req-id:: DI78GIN016 //Added by msalam on 21/06/07 to put filter for LotNo int query for req-id:: DI78GIN016
lotNo = genericUtility.getColumnValue("lot_no", dom); lotNo = genericUtility.getColumnValue("lot_no", dom);
System.out.println("Lot No :: " + lotNo); System.out.println("Lot No :: " + lotNo);
lotSl = genericUtility.getColumnValue("lot_sl", dom); lotSl = genericUtility.getColumnValue("lot_sl", dom);
System.out.println("Lot SL :: " + lotSl); System.out.println("Lot SL :: " + lotSl);
//End of msalam //End of msalam
...@@ -201,9 +200,9 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -201,9 +200,9 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
locCode = locCode.trim() ; locCode = locCode.trim() ;
System.out.println("locCode :"+locCode); System.out.println("locCode :"+locCode);
sql = "SELECT INVSTAT.AVAILABLE " //query modified by rajendra sql = "SELECT INVSTAT.AVAILABLE " //query modified by rajendra
+"FROM INVSTAT, LOCATION " +"FROM INVSTAT, LOCATION "
+"WHERE LOCATION.INV_STAT = INVSTAT.INV_STAT " +"WHERE LOCATION.INV_STAT = INVSTAT.INV_STAT "
+"AND LOCATION.LOC_CODE = '"+locCode+"' "; +"AND LOCATION.LOC_CODE = '"+locCode+"' ";
System.out.println("sql ....:"+sql); System.out.println("sql ....:"+sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
...@@ -216,7 +215,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -216,7 +215,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
} }
sql = "SELECT CASE WHEN TRACK_SHELF_LIFE IS NULL THEN 'N' ELSE TRACK_SHELF_LIFE END " sql = "SELECT CASE WHEN TRACK_SHELF_LIFE IS NULL THEN 'N' ELSE TRACK_SHELF_LIFE END "
+"FROM ITEM WHERE ITEM_CODE = '"+itemCode+"'"; +"FROM ITEM WHERE ITEM_CODE = '"+itemCode+"'";
System.out.println("sql :"+sql); System.out.println("sql :"+sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
if (rs.next()) if (rs.next())
...@@ -248,25 +247,25 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -248,25 +247,25 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
+"AND INVSTAT.AVAILABLE IN ("+available+") " +"AND INVSTAT.AVAILABLE IN ("+available+") "
+"AND INVSTAT.STAT_TYPE = 'M'" +"AND INVSTAT.STAT_TYPE = 'M'"
+"AND (STOCK.PACK_REF IS NULL OR LENGTH(LTRIM(RTRIM(STOCK.PACK_REF))) = 0)"; //add by rajendra +"AND (STOCK.PACK_REF IS NULL OR LENGTH(LTRIM(RTRIM(STOCK.PACK_REF))) = 0)"; //add by rajendra
*/ */
///////////////////////// /////////////////////////
//added by msalam for req-id :: DI78GIN016 as sql will be made as per //added by msalam for req-id :: DI78GIN016 as sql will be made as per
//the values of itemCode, lot_no, loc_code //the values of itemCode, lot_no, loc_code
String tempSqlStr = "SELECT STOCK.ITEM_CODE, " String tempSqlStr = "SELECT STOCK.ITEM_CODE, "
+"STOCK.LOT_NO, " +"STOCK.LOT_NO, "
+"STOCK.LOT_SL, " +"STOCK.LOT_SL, "
+"STOCK.ALLOC_QTY, " +"STOCK.ALLOC_QTY, "
+"STOCK.MFG_DATE, " +"STOCK.MFG_DATE, "
+"STOCK.EXP_DATE, " +"STOCK.EXP_DATE, "
// +"STOCK.QUANTITY, " // +"STOCK.QUANTITY, "
+"STOCK.QUANTITY - STOCK.ALLOC_QTY AS QUANTITY, " +"STOCK.QUANTITY - STOCK.ALLOC_QTY AS QUANTITY, "
+"STOCK.LOC_CODE, " +"STOCK.LOC_CODE, "
+"STOCK.NO_ART, " +"STOCK.NO_ART, "
+"STOCK.RATE, " +"STOCK.RATE, "
+"STOCK.QUANTITY - STOCK.ALLOC_QTY " +"STOCK.QUANTITY - STOCK.ALLOC_QTY "
+"FROM STOCK, INVSTAT " +"FROM STOCK, INVSTAT "
+"WHERE STOCK.INV_STAT = INVSTAT.INV_STAT "; +"WHERE STOCK.INV_STAT = INVSTAT.INV_STAT ";
String filterStr = null; String filterStr = null;
filterStr = ""; filterStr = "";
...@@ -277,7 +276,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -277,7 +276,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
LOC_CODE LOC_CODE
LOT_NO LOT_NO
LOT_SL LOT_SL
*/ */
if(itemCode != null && itemCode.trim().length() > 0) if(itemCode != null && itemCode.trim().length() > 0)
filterStr += " AND STOCK.ITEM_CODE = '"+itemCode+"' "; //added by msalam for req-id :: DI78GIN016 filterStr += " AND STOCK.ITEM_CODE = '"+itemCode+"' "; //added by msalam for req-id :: DI78GIN016
...@@ -293,11 +292,11 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -293,11 +292,11 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
filterStr += " AND STOCK.LOT_SL = '"+lotSl+"' "; //added by msalam for req-id :: DI78GIN016 filterStr += " AND STOCK.LOT_SL = '"+lotSl+"' "; //added by msalam for req-id :: DI78GIN016
tempSqlStr = tempSqlStr + " " tempSqlStr = tempSqlStr + " "
+ filterStr + filterStr
+ " AND STOCK.QUANTITY > 0 " + " AND STOCK.QUANTITY > 0 "
+ " AND INVSTAT.AVAILABLE IN ("+available+") " + " AND INVSTAT.AVAILABLE IN ("+available+") "
+ " AND INVSTAT.STAT_TYPE = 'M' " + " AND INVSTAT.STAT_TYPE = 'M' "
+ " AND ( STOCK.PACK_REF IS NULL or LENGTH(LTRIM(RTRIM(STOCK.PACK_REF))) = 0) "; //add by rajendra + " AND ( STOCK.PACK_REF IS NULL or LENGTH(LTRIM(RTRIM(STOCK.PACK_REF))) = 0) "; //add by rajendra
sql = tempSqlStr; sql = tempSqlStr;
//End added by msalam for req-id :: DI78GIN016 //End added by msalam for req-id :: DI78GIN016
...@@ -324,20 +323,20 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -324,20 +323,20 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
{ {
//TRIM REMOVED BY ALKA 29/05/2007 //TRIM REMOVED BY ALKA 29/05/2007
valueXmlString.append("<Detail>\r\n"); valueXmlString.append("<Detail>\r\n");
// valueXmlString.append("<item_code>").append("<![CDATA[").append(rs.getString(1).trim()).append("]]>").append("</item_code>\r\n"); // valueXmlString.append("<item_code>").append("<![CDATA[").append(rs.getString(1).trim()).append("]]>").append("</item_code>\r\n");
valueXmlString.append("<item_code>").append("<![CDATA[").append(rs.getString(1)).append("]]>").append("</item_code>\r\n"); valueXmlString.append("<item_code>").append("<![CDATA[").append(rs.getString(1)).append("]]>").append("</item_code>\r\n");
// valueXmlString.append("<loc_code>").append("<![CDATA[").append(rs.getString(8).trim()).append("]]>").append("</loc_code>\r\n"); // valueXmlString.append("<loc_code>").append("<![CDATA[").append(rs.getString(8).trim()).append("]]>").append("</loc_code>\r\n");
valueXmlString.append("<loc_code>").append("<![CDATA[").append(rs.getString(8)).append("]]>").append("</loc_code>\r\n"); valueXmlString.append("<loc_code>").append("<![CDATA[").append(rs.getString(8)).append("]]>").append("</loc_code>\r\n");
// valueXmlString.append("<lot_no>").append("<![CDATA[").append(rs.getString(2).trim()).append("]]>").append("</lot_no>\r\n"); // valueXmlString.append("<lot_no>").append("<![CDATA[").append(rs.getString(2).trim()).append("]]>").append("</lot_no>\r\n");
valueXmlString.append("<lot_no>").append("<![CDATA[").append(rs.getString(2)).append("]]>").append("</lot_no>\r\n"); valueXmlString.append("<lot_no>").append("<![CDATA[").append(rs.getString(2)).append("]]>").append("</lot_no>\r\n");
// valueXmlString.append("<lot_sl>").append("<![CDATA[").append(rs.getString(3).trim()).append("]]>").append("</lot_sl>\r\n"); // valueXmlString.append("<lot_sl>").append("<![CDATA[").append(rs.getString(3).trim()).append("]]>").append("</lot_sl>\r\n");
valueXmlString.append("<lot_sl>").append("<![CDATA[").append(rs.getString(3)).append("]]>").append("</lot_sl>\r\n"); valueXmlString.append("<lot_sl>").append("<![CDATA[").append(rs.getString(3)).append("]]>").append("</lot_sl>\r\n");
valueXmlString.append("<quantity>").append("<![CDATA[").append(rs.getDouble(11)).append("]]>").append("</quantity>\r\n"); valueXmlString.append("<quantity>").append("<![CDATA[").append(rs.getDouble(11)).append("]]>").append("</quantity>\r\n");
valueXmlString.append("<rate>").append("<![CDATA[").append(rs.getDouble(10)).append("]]>").append("</rate>\r\n"); valueXmlString.append("<rate>").append("<![CDATA[").append(rs.getDouble(10)).append("]]>").append("</rate>\r\n");
valueXmlString.append("<mfg_date>").append("<![CDATA[").append(mfgDate1).append("]]>").append("</mfg_date>\r\n"); valueXmlString.append("<mfg_date>").append("<![CDATA[").append(mfgDate1).append("]]>").append("</mfg_date>\r\n");
valueXmlString.append("<exp_date>").append("<![CDATA[").append(expDate1).append("]]>").append("</exp_date>\r\n"); valueXmlString.append("<exp_date>").append("<![CDATA[").append(expDate1).append("]]>").append("</exp_date>\r\n");
valueXmlString.append("<no_art>").append("<![CDATA[").append(rs.getInt(9)).append("]]>").append("</no_art>\r\n"); valueXmlString.append("<no_art>").append("<![CDATA[").append(rs.getInt(9)).append("]]>").append("</no_art>\r\n");
// valueXmlString.append("<alloc_qty>").append("<![CDATA[").append(rs.getDouble(4)).append("]]>").append("</alloc_qty>\r\n"); // valueXmlString.append("<alloc_qty>").append("<![CDATA[").append(rs.getDouble(4)).append("]]>").append("</alloc_qty>\r\n");
valueXmlString.append("</Detail>\r\n"); valueXmlString.append("</Detail>\r\n");
// END -- TRIM REMOVED BY ALKA 29/05/2007 // END -- TRIM REMOVED BY ALKA 29/05/2007
} }
...@@ -405,7 +404,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -405,7 +404,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
conn = null; conn = null;
return errString; return errString;
} }
*/ */
if(icQtyOrdStr != null && icQtyOrdStr.trim().length() > 0) if(icQtyOrdStr != null && icQtyOrdStr.trim().length() > 0)
{ {
icQtyOrd = Double.parseDouble(icQtyOrdStr); icQtyOrd = Double.parseDouble(icQtyOrdStr);
...@@ -429,7 +428,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -429,7 +428,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
{ {
valueXmlString.append("<line_no__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(lineNoOrd).append("]]>").append("</line_no__ord>\r\n"); valueXmlString.append("<line_no__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(lineNoOrd).append("]]>").append("</line_no__ord>\r\n");
} }
valueXmlString.append("<order_no isSrvCallOnChg='0'>").append("<![CDATA[").append(orderNo).append("]]>").append("</order_no>\r\n"); valueXmlString.append("<order_no isSrvCallOnChg='0'>").append("<![CDATA[").append(orderNo).append("]]>").append("</order_no>\r\n");
String pickQty = genericUtility.getColumnValueFromNode("quantity", currDetail); String pickQty = genericUtility.getColumnValueFromNode("quantity", currDetail);
String mfgDate = genericUtility.getColumnValueFromNode("mfg_date", currDetail); String mfgDate = genericUtility.getColumnValueFromNode("mfg_date", currDetail);
...@@ -450,7 +449,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -450,7 +449,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
System.out.println("issCriteria :"+issCriteria); System.out.println("issCriteria :"+issCriteria);
if (!issCriteria.equals("W")) if (!issCriteria.equals("W"))
{ {
// if (Double.parseDouble(pickQty) > icQtyOrd) //CHANGED BY ALKA ON 30/07/07 TO RETRIEVE DATA EVEN IF QUANTITY IS 0 // if (Double.parseDouble(pickQty) > icQtyOrd) //CHANGED BY ALKA ON 30/07/07 TO RETRIEVE DATA EVEN IF QUANTITY IS 0
if (icQtyOrd != 0 && Double.parseDouble(pickQty) > icQtyOrd) if (icQtyOrd != 0 && Double.parseDouble(pickQty) > icQtyOrd)
{ {
pickQty = String.valueOf(icQtyOrd); pickQty = String.valueOf(icQtyOrd);
...@@ -517,7 +516,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -517,7 +516,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
{ {
String itemCode = "", siteCode = "", qtyPack = "", noArt = "", packInst = "", grossWtPack = ""; String itemCode = "", siteCode = "", qtyPack = "", noArt = "", packInst = "", grossWtPack = "";
String tareWtPack = "", packCode = "", dimension = "", locCode = "", lotNo = "", grossWt = "", tareWt = ""; String tareWtPack = "", packCode = "", dimension = "", locCode = "", lotNo = "", grossWt = "", tareWt = "";
String maxLotSl = "", lotSl = "", sql = "", value1 = "0", value = "", str = ""; String maxLotSl = "", lotSl = "", sql = "", value1 = "0", value = "", str = "",lineNoOrd = "",orderNo = "";
String orderType = ""; String orderType = "";
char ch = ' '; char ch = ' ';
long retNumber = 0l; long retNumber = 0l;
...@@ -537,13 +536,22 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -537,13 +536,22 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
{ {
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
orderType = genericUtility.getColumnValue("order_type", dom1); orderType = genericUtility.getColumnValue("order_type", dom1);
System.out.println("Order Type :: "+orderType); System.out.println("Order Type ::"+orderType);
if (orderType != null && (orderType.equalsIgnoreCase("P") || orderType.equalsIgnoreCase("R"))) if (orderType != null && (orderType.equalsIgnoreCase("P") || orderType.equalsIgnoreCase("R")))
{ {
stmt = conn.createStatement(); stmt = conn.createStatement();
//changes by cpandey on 07/11/12
lineNoOrd = genericUtility.getColumnValue("line_no__ord", dom);
System.out.println("line no order-->> ["+lineNoOrd+"]");
orderNo = genericUtility.getColumnValue("order_no", dom);
System.out.println("order no--->> ["+orderNo+"]");
//end of changes on 17/11/12
itemCode = genericUtility.getColumnValue("item_code", dom); itemCode = genericUtility.getColumnValue("item_code", dom);
System.out.println("itemCode--->> ["+itemCode+"]");
siteCode = genericUtility.getColumnValue("site_code", dom1); siteCode = genericUtility.getColumnValue("site_code", dom1);
System.out.println("siteCode--->> ["+siteCode+"]");
qtyPack = genericUtility.getColumnValue("qty_pack", dom); qtyPack = genericUtility.getColumnValue("qty_pack", dom);
System.out.println("qtyPack--->> ["+qtyPack+"]");
noArt = genericUtility.getColumnValue("no_art", dom); noArt = genericUtility.getColumnValue("no_art", dom);
packInst = genericUtility.getColumnValue("pack_instr", dom); packInst = genericUtility.getColumnValue("pack_instr", dom);
grossWtPack = genericUtility.getColumnValue("grosswt_pack", dom); grossWtPack = genericUtility.getColumnValue("grosswt_pack", dom);
...@@ -554,26 +562,26 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -554,26 +562,26 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
lotNo = genericUtility.getColumnValue("lot_no", dom); lotNo = genericUtility.getColumnValue("lot_no", dom);
grossWt = genericUtility.getColumnValue("gross_weight", dom); grossWt = genericUtility.getColumnValue("gross_weight", dom);
tareWt = genericUtility.getColumnValue("tare_weight", dom); tareWt = genericUtility.getColumnValue("tare_weight", dom);
System.out.println("tareWt---->>["+tareWt+"]");
sql = "SELECT CASE WHEN MAX(LOT_SL) IS NULL THEN '0' ELSE MAX(LOT_SL) END " sql = "SELECT CASE WHEN MAX(LOT_SL) IS NULL THEN '0' ELSE MAX(LOT_SL) END "
+"FROM STOCK " +"FROM STOCK "
+"WHERE SITE_CODE = '"+siteCode+"' " +"WHERE SITE_CODE = '"+siteCode+"' "
+"AND ITEM_CODE = '"+itemCode+"' " +"AND ITEM_CODE = '"+itemCode+"' "
+"AND LOT_NO = '"+lotNo+"' " +"AND LOT_NO = '"+lotNo+"' "
+"AND ISNUMBER(LOT_SL) = 0"; +"AND ISNUMBER(LOT_SL) = 0";
System.out.println("sql :"+sql); System.out.println("sql :"+sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
if (rs.next()) if (rs.next())
{ {
maxLotSl = rs.getString(1); maxLotSl = rs.getString(1);
System.out.println("maxLotSl :"+maxLotSl); System.out.println("maxLotSl --:"+maxLotSl);
} }
else else
{ {
maxLotSl = "0"; maxLotSl = "0";
} }
lotSl = maxLotSl; lotSl = maxLotSl;
System.out.println("maxLotSl :"+maxLotSl); System.out.println("maxLotSl --:"+maxLotSl);
isCheckNum = checkIsNumber(packInst); isCheckNum = checkIsNumber(packInst);
if (!isCheckNum) if (!isCheckNum)
{ {
...@@ -583,7 +591,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -583,7 +591,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
for (int j = 0; j < str.length(); j++) for (int j = 0; j < str.length(); j++)
{ {
ch = str.charAt(j); ch = str.charAt(j);
System.out.println("ch :"+ch); System.out.println("ch --:"+ch);
if (Character.isDigit(ch)) if (Character.isDigit(ch))
{ {
value1 = value1 + ch; value1 = value1 + ch;
...@@ -596,7 +604,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -596,7 +604,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
retNumber = 1; retNumber = 1;
} }
retTokens = genericUtility.getTokenList(str, String.valueOf(retNumber)); retTokens = genericUtility.getTokenList(str, String.valueOf(retNumber));
System.out.println("retTokens :"+retTokens.size()); System.out.println("retTokens --:"+retTokens.size());
str = retTokens.get(1).toString(); str = retTokens.get(1).toString();
System.out.println("str :"+str); System.out.println("str :"+str);
}//end if }//end if
...@@ -617,13 +625,17 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -617,13 +625,17 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
rs.close(); rs.close();
pstmt = null; pstmt = null;
rs = null; rs = null;
for (int i = 0; i < Integer.parseInt(noArt); i++) for (int i = 0; i < Integer.parseInt(noArt); i++)
{ {
lotSl = String.valueOf(Long.parseLong(lotSl)+1); lotSl = String.valueOf(Long.parseLong(lotSl)+1);
System.out.println("lotSl :"+lotSl); System.out.println("lotSl :"+lotSl);
// 12/03/12 manoharan itemchanged should not happen for any column as it is working very slow // 12/03/12 manoharan itemchanged should not happen for any column as it is working very slow
valueXmlString.append("<Detail>\r\n"); valueXmlString.append("<Detail>\r\n");
//changes done by cpandey on 07/11/12 line_no__ord
valueXmlString.append("<line_no__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(lineNoOrd).append("]]>").append("</line_no__ord>\r\n");
valueXmlString.append("<order_no isSrvCallOnChg='0'>").append("<![CDATA[").append(orderNo).append("]]>").append("</order_no>\r\n");
//end of changes done by cpandey on 07/11/12
valueXmlString.append("<loc_code isSrvCallOnChg='0'>").append("<![CDATA[").append(locCode).append("]]>").append("</loc_code>\r\n"); valueXmlString.append("<loc_code isSrvCallOnChg='0'>").append("<![CDATA[").append(locCode).append("]]>").append("</loc_code>\r\n");
valueXmlString.append("<dimension isSrvCallOnChg='0'>").append("<![CDATA[").append(dimension).append("]]>").append("</dimension>\r\n"); valueXmlString.append("<dimension isSrvCallOnChg='0'>").append("<![CDATA[").append(dimension).append("]]>").append("</dimension>\r\n");
valueXmlString.append("<pack_code isSrvCallOnChg='0'>").append("<![CDATA[").append(packCode).append("]]>").append("</pack_code>\r\n"); valueXmlString.append("<pack_code isSrvCallOnChg='0'>").append("<![CDATA[").append(packCode).append("]]>").append("</pack_code>\r\n");
...@@ -648,7 +660,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -648,7 +660,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
grossTmp = Double.parseDouble(grossWt); grossTmp = Double.parseDouble(grossWt);
netTmp = grossTmp - tareTmp; netTmp = grossTmp - tareTmp;
valueXmlString.append("<net_weight isSrvCallOnChg='0'>").append("<![CDATA[").append(netTmp).append("]]>").append("</net_weight>\r\n"); valueXmlString.append("<net_weight isSrvCallOnChg='0'>").append("<![CDATA[").append(netTmp).append("]]>").append("</net_weight>\r\n");
valueXmlString.append("<location_descr isSrvCallOnChg='0'>").append("<![CDATA[").append(locDescr).append("]]>").append("</location_descr>\r\n"); valueXmlString.append("<location_descr isSrvCallOnChg='0'>").append("<![CDATA[").append(locDescr).append("]]>").append("</location_descr>\r\n");
// end 12/03/12 manoharan // end 12/03/12 manoharan
if (!checkIsNumber(str)) if (!checkIsNumber(str))
...@@ -689,6 +701,272 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -689,6 +701,272 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
System.out.println("valueXmlString return from InvPack :"+valueXmlString.toString()); System.out.println("valueXmlString return from InvPack :"+valueXmlString.toString());
return valueXmlString.toString(); return valueXmlString.toString();
} }
//add by cpandey on 09/11/12
private String splitStockTransform(Document dom,Document dom1, String objContext, String xtraParams, Document selDataDom)throws ITMException
{
System.out.println("stockTransform is calling.............");
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n");
String sql = "", detCnt = "0", errCode = "", errString = "", issCriteria = "";
double tareTmp = 0, grossTmp = 0, netTmp = 0;
Statement stmt = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
Connection conn = null;
ResultSet rset = null;
Node currDetail = null;
ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccess = new ITMDBAccessEJB();
GenericUtility genericUtility = GenericUtility.getInstance();
try
{
String orderType = null;
conn = connDriver.getConnectDB("DriverITM");
stmt = conn.createStatement();
orderType = genericUtility.getColumnValue("order_type", dom1);
//detCnt = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"detCnt"); //Will be Uncommented later - Aviprash 30/01/06
String icQtyOrdStr = genericUtility.getColumnValue("quantity", dom);
System.out.println("icQtyOrdStr............." + icQtyOrdStr);
double icQtyOrd = 0;
/*
if (icQtyOrdStr == null)
{
errCode = "VTREQQTY";
errString = itmDBAccess.getErrorString("",errCode,"","",conn);
conn.close();
conn = null;
return errString;
}*/
String lineNoOrd = "",orderNo = "",itemCode = "",siteCode = "",qtyPack = "",noArt = "",packInst = "",grossWtPack = "",tareWtPack = "";
String packCode = "",dimension = "",locCode = "",lotNo = "",grossWt = "",tareWt = "",locDescr = "";
lineNoOrd = genericUtility.getColumnValue("line_no__ord", dom);
System.out.println("lineNoOrd-->["+lineNoOrd+"]");
orderNo = genericUtility.getColumnValue("order_no", dom);
sql = "SELECT DESCR FROM LOCATION WHERE LOC_CODE = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, locCode);
rs =pstmt.executeQuery();
if (rs.next())
{
locDescr = rs.getString(1)==null?"":rs.getString(1);
}
pstmt.close();
rs.close();
pstmt = null;
rs = null;
System.out.println("orderNo-->["+orderNo+"]");
System.out.println("lineNoOrd :"+lineNoOrd+" orderNo :"+orderNo);
NodeList detailList = selDataDom.getElementsByTagName("Detail");
int noOfDetails = detailList.getLength();
itemCode = genericUtility.getColumnValue("item_code", dom);
System.out.println("itemCode-->["+itemCode+"]");
for(int ctr = 0; ctr < noOfDetails; ctr++)
{
currDetail = detailList.item(ctr);
valueXmlString.append("<Detail>");
lineNoOrd = genericUtility.getColumnValueFromNode("line_no__ord", currDetail);
if (("P").equalsIgnoreCase(orderType) || ("R").equalsIgnoreCase(orderType))
{
valueXmlString.append("<line_no__ord isSrvCallOnChg='1'>").append("<![CDATA[").append(lineNoOrd).append("]]>").append("</line_no__ord>\r\n");
}
else
{
valueXmlString.append("<line_no__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(lineNoOrd).append("]]>").append("</line_no__ord>\r\n");
}
lineNoOrd = genericUtility.getColumnValueFromNode("line_no__ord", currDetail);
System.out.println("line no order-->> ["+lineNoOrd+"]");
orderNo = genericUtility.getColumnValueFromNode("order_no", currDetail);
System.out.println("order no--->> ["+orderNo+"]");
itemCode = genericUtility.getColumnValueFromNode("item_code", currDetail);
System.out.println("itemCode--->> ["+itemCode+"]");
siteCode = genericUtility.getColumnValueFromNode("site_code", currDetail);
System.out.println("siteCode--->> ["+siteCode+"]");
qtyPack = genericUtility.getColumnValueFromNode("qty_pack", currDetail);
System.out.println("qtyPack--->> ["+qtyPack+"]");
noArt = genericUtility.getColumnValueFromNode("no_art", currDetail);
System.out.println("noArt-->>["+noArt+"]");
packInst = genericUtility.getColumnValueFromNode("pack_instr", currDetail);
System.out.println("packInst-->>["+packInst+"]");
grossWtPack = genericUtility.getColumnValueFromNode("grosswt_pack", currDetail);
System.out.println("grossWtPack-->>["+grossWtPack+"]");
tareWtPack = genericUtility.getColumnValueFromNode("tarewt_pack", currDetail);
System.out.println("tareWtPack-->>["+tareWtPack+"]");
packCode = genericUtility.getColumnValueFromNode("pack_code", currDetail);
System.out.println("packCode-->>["+packCode+"]");
dimension = genericUtility.getColumnValueFromNode("dimension", currDetail);
System.out.println("packCode-->>["+dimension+"]");
locCode = genericUtility.getColumnValueFromNode("loc_code", currDetail);
System.out.println("locCode-->>["+locCode+"]");
lotNo = genericUtility.getColumnValueFromNode("lot_no",currDetail);
System.out.println("lotNo-->>["+lotNo+"]");
grossWt = genericUtility.getColumnValueFromNode("gross_weight", currDetail);
System.out.println("grossWt-->>["+grossWt+"]");
tareWt = genericUtility.getColumnValueFromNode("tare_weight", currDetail);
System.out.println("grossWt-->>["+tareWt+"]");
if(icQtyOrdStr != null && icQtyOrdStr.trim().length() > 0)
{
icQtyOrd = Double.parseDouble(icQtyOrdStr);
System.out.println("ic qty ord-->["+icQtyOrd+"]");
}
//end of addition on 09/11/12
//added by for xml appending on 09/11/22
// valueXmlString.append("<line_no__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(lineNoOrd).append("]]>").append("</line_no__ord>\r\n");
valueXmlString.append("<order_no isSrvCallOnChg='0'>").append("<![CDATA[").append(orderNo).append("]]>").append("</order_no>\r\n");
valueXmlString.append("<line_no__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(lineNoOrd).append("]]>").append("</line_no__ord>\r\n");
valueXmlString.append("<item_code isSrvCallOnChg='0'>").append("<![CDATA[").append(itemCode).append("]]>").append("</item_code>\r\n");
// valueXmlString.append("<site_code isSrvCallOnChg='0'>").append("<![CDATA[").append(siteCode).append("]]>").append("</site_code>\r\n");
valueXmlString.append("<qty_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(qtyPack).append("]]>").append("</qty_pack>\r\n");
valueXmlString.append("<pack_instr isSrvCallOnChg='0'>").append("<![CDATA[").append(packInst).append("]]>").append("</pack_instr>\r\n");
valueXmlString.append("<grosswt_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(grossWtPack).append("]]>").append("</grosswt_pack>\r\n");
valueXmlString.append("<gross_weight isSrvCallOnChg='0'>").append("<![CDATA[").append(grossWt).append("]]>").append("</gross_weight>\r\n");
valueXmlString.append("<tarewt_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(tareWtPack).append("]]>").append("</tarewt_pack>\r\n");
valueXmlString.append("<tare_weight isSrvCallOnChg='0'>").append("<![CDATA[").append(tareWt).append("]]>").append("</tare_weight>\r\n");
valueXmlString.append("<pack_code isSrvCallOnChg='0'>").append("<![CDATA[").append(packCode).append("]]>").append("</pack_code>\r\n");
valueXmlString.append("<loc_code isSrvCallOnChg='0'>").append("<![CDATA[").append(locCode).append("]]>").append("</loc_code>\r\n");
valueXmlString.append("<no_art isSrvCallOnChg='0'>").append("<![CDATA[").append(noArt).append("]]>").append("</no_art>\r\n");
valueXmlString.append("<lot_no isSrvCallOnChg='0'>").append("<![CDATA[").append(lotNo).append("]]>").append("</lot_no>\r\n");
if (tareWt == null)
{
tareWt = "0";
}
if (grossWt == null)
{
grossWt = "0";
}
tareTmp = Double.parseDouble(tareWt);
grossTmp = Double.parseDouble(grossWt);
netTmp = grossTmp - tareTmp;
valueXmlString.append("<net_weight isSrvCallOnChg='0'>").append("<![CDATA[").append(netTmp).append("]]>").append("</net_weight>\r\n");
valueXmlString.append("<location_descr isSrvCallOnChg='0'>").append("<![CDATA[").append(netTmp).append("]]>").append("</location_descr>\r\n");
valueXmlString.append("<location_descr isSrvCallOnChg='0'>").append("<![CDATA[").append(locDescr).append("]]>").append("</location_descr>\r\n");
// valueXmlString.append("<order_no isSrvCallOnChg='0'>").append("<![CDATA[").append(orderNo).append("]]>").append("</order_no>\r\n");
// //end of changes done by cpandey on 07/11/12
// valueXmlString.append("<loc_code isSrvCallOnChg='0'>").append("<![CDATA[").append(locCode).append("]]>").append("</loc_code>\r\n");
// valueXmlString.append("<dimension isSrvCallOnChg='0'>").append("<![CDATA[").append(dimension).append("]]>").append("</dimension>\r\n");
// valueXmlString.append("<pack_code isSrvCallOnChg='0'>").append("<![CDATA[").append(packCode).append("]]>").append("</pack_code>\r\n");
// valueXmlString.append("<grosswt_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(grossWtPack).append("]]>").append("</grosswt_pack>\r\n");
// valueXmlString.append("<tarewt_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(tareWtPack).append("]]>").append("</tarewt_pack>\r\n");
// valueXmlString.append("<gross_weight isSrvCallOnChg='0'>").append("<![CDATA[").append(grossWt).append("]]>").append("</gross_weight>\r\n");
// valueXmlString.append("<tare_weight isSrvCallOnChg='0'>").append("<![CDATA[").append(tareWt).append("]]>").append("</tare_weight>\r\n");
// valueXmlString.append("<qty_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(qtyPack).append("]]>").append("</qty_pack>\r\n");
// valueXmlString.append("<quantity isSrvCallOnChg='0'>").append("<![CDATA[").append(qtyPack).append("]]>").append("</quantity>\r\n");
// valueXmlString.append("<no_art isSrvCallOnChg='0'>").append("<![CDATA[").append(1).append("]]>").append("</no_art>\r\n");
// valueXmlString.append("<lot_sl isSrvCallOnChg='0'>").append("<![CDATA[").append(lotSl).append("]]>").append("</lot_sl>\r\n");
// // 12/03/12 manoharan additional values set
// if (tareWt == null)
// {
// tareWt = "0";
// }
// if (grossWt == null)
// {
// grossWt = "0";
// }
// tareTmp = Double.parseDouble(tareWt);
// grossTmp = Double.parseDouble(grossWt);
// netTmp = grossTmp - tareTmp;
// valueXmlString.append("<net_weight isSrvCallOnChg='0'>").append("<![CDATA[").append(netTmp).append("]]>").append("</net_weight>\r\n");
//
// valueXmlString.append("<location_descr isSrvCallOnChg='0'>").append("<![CDATA[").append(locDescr).append("]]>").append("</location_descr>\r\n");
// // end 12/03/12 manoharan
// if (!checkIsNumber(str))
// {
// packInst = str + String.valueOf(retNumber);
// }
// else
// {
// packInst = String.valueOf(retNumber);
// }
// valueXmlString.append("<pack_instr isSrvCallOnChg='0'>").append("<![CDATA[").append(packInst).append("]]>").append("</pack_instr>\r\n");
//end of xml appending on 09/11/12
valueXmlString.append("<order_no isSrvCallOnChg='0'>").append("<![CDATA[").append(orderNo).append("]]>").append("</order_no>\r\n");
String pickQty = genericUtility.getColumnValueFromNode("quantity", currDetail);
String mfgDate = genericUtility.getColumnValueFromNode("mfg_date", currDetail);
String expDate = genericUtility.getColumnValueFromNode("exp_date", currDetail);
//String itemCode = genericUtility.getColumnValue("item_code", dom);
System.out.println("pickQty :"+pickQty+" mfgDate :"+mfgDate+" expDate :"+expDate+" itemCode :"+itemCode);
sql = "SELECT ISS_CRITERIA FROM ITEM WHERE ITEM_CODE = '"+itemCode+"'";
System.out.println("sql :"+sql);
rset = stmt.executeQuery(sql);
if (rset.next())
{
issCriteria = rset.getString(1);
}
if (issCriteria == null)
{
issCriteria = " ";
}
System.out.println("issCriteria :"+issCriteria);
if (!issCriteria.equals("W"))
{
// if (Double.parseDouble(pickQty) > icQtyOrd) //CHANGED BY ALKA ON 30/07/07 TO RETRIEVE DATA EVEN IF QUANTITY IS 0
if (icQtyOrd != 0 && Double.parseDouble(pickQty) > icQtyOrd)
{
pickQty = String.valueOf(icQtyOrd);
}
else if (icQtyOrd == 0)
{
icQtyOrd = Double.parseDouble(pickQty);
}
}
valueXmlString.append("<item_code isSrvCallOnChg='1'>").append("<![CDATA[").append(itemCode == null?"":itemCode).append("]]>").append("</item_code>\r\n");
valueXmlString.append("<quantity isSrvCallOnChg='0'>").append("<![CDATA[").append(pickQty).append("]]>").append("</quantity>\r\n");
icQtyOrd = icQtyOrd - Double.parseDouble(pickQty);
locCode = genericUtility.getColumnValueFromNode("loc_code", currDetail);
//String locCodeDet = genericUtility.getColumnValue("loc_code", dom);
System.out.println("locCode :"+locCode);
/*if (locCodeDet == null || locCodeDet.trim().length() == 0)
{
valueXmlString.append("<loc_code isSrvCallOnChg='0'>").append("<![CDATA[").append(locCode == null?"":locCode).append("</loc_code>");
}*/
valueXmlString.append("<loc_code isSrvCallOnChg='1'>").append("<![CDATA[").append(locCode == null?"":locCode).append("]]>").append("</loc_code>\r\n");
lotNo = genericUtility.getColumnValueFromNode("lot_no", currDetail);
valueXmlString.append("<lot_no isSrvCallOnChg='1'>").append("<![CDATA[").append(lotNo == null?"":lotNo.trim()).append("]]>").append("</lot_no>\r\n");
String lotSl = genericUtility.getColumnValueFromNode("lot_sl", currDetail);
valueXmlString.append("<lot_sl isSrvCallOnChg='1'>").append("<![CDATA[").append(lotSl == null?"":lotSl.trim()).append("]]>").append("</lot_sl>\r\n");
// 17-05-2007 manoharan
//valueXmlString.append("<mfg_date isSrvCallOnChg='0'>").append("<![CDATA[").append(mfgDate == null?"":mfgDate).append("]]>").append("</mfg_date>\r\n");
if (mfgDate != null && mfgDate.trim().length() > 0)
{
valueXmlString.append("<mfg_date isSrvCallOnChg='0'>").append("<![CDATA[").append(mfgDate).append("]]>").append("</mfg_date>\r\n");
}
//valueXmlString.append("<exp_date isSrvCallOnChg='0'>").append("<![CDATA[").append(expDate == null?"":expDate).append("]]>").append("</exp_date>\r\n");
if (expDate != null && expDate.trim().length() > 0)
{
valueXmlString.append("<exp_date isSrvCallOnChg='0'>").append("<![CDATA[").append(expDate).append("]]>").append("</exp_date>\r\n");
}
// end 17-05-2007 manoharan
valueXmlString.append("</Detail>");
}// for end
valueXmlString.append("</Root>");
}// end try
catch(ITMException itme)
{
throw itme;
}
catch(Exception e)
{
throw new ITMException(e);
}
finally
{
try
{
conn.close();
conn = null;
}
catch (Exception e){}
}
System.out.println("valueXmlString return from InvPack :"+valueXmlString.toString());
System.out.println("valueXmlString from Stock:"+valueXmlString.toString());
return valueXmlString.toString();
}
//String actionSplitStockTransform button
//end of addition
private boolean checkIsNumber(String packInst) private boolean checkIsNumber(String packInst)
{ {
...@@ -923,7 +1201,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -923,7 +1201,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
if (cnt > 0) if (cnt > 0)
{ {
sql = " SELECT (QUANTITY - QTY_DESP), ITEM_CODE, LINE_NO FROM SORDITEM " sql = " SELECT (QUANTITY - QTY_DESP), ITEM_CODE, LINE_NO FROM SORDITEM "
+ " WHERE SALE_ORDER = '" + orderNo +"' AND LINE_TYPE = 'I'"; + " WHERE SALE_ORDER = '" + orderNo +"' AND LINE_TYPE = 'I'";
System.out.println("sql :: " + sql); System.out.println("sql :: " + sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
while (rs.next()) while (rs.next())
...@@ -945,7 +1223,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -945,7 +1223,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
else if (orderType.equalsIgnoreCase("D")) else if (orderType.equalsIgnoreCase("D"))
{ {
sql = " SELECT (QTY_CONFIRM - QTY_SHIPPED), ITEM_CODE, LINE_NO FROM DISTORDER_DET " sql = " SELECT (QTY_CONFIRM - QTY_SHIPPED), ITEM_CODE, LINE_NO FROM DISTORDER_DET "
+ " WHERE DIST_ORDER = '" + orderNo +"' ORDER BY LINE_NO"; + " WHERE DIST_ORDER = '" + orderNo +"' ORDER BY LINE_NO";
System.out.println("sql :: " + sql); System.out.println("sql :: " + sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
while (rs.next()) while (rs.next())
...@@ -966,7 +1244,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -966,7 +1244,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
stmt.close(); stmt = null; stmt.close(); stmt = null;
} }
} }
/* else if (orderType.equalsIgnoreCase("P")) /* else if (orderType.equalsIgnoreCase("P"))
{ {
sql = " SELECT A.QUANTITY, A.ITEM_CODE, A.LOT_NO, A.LOT_SL, C.REF_LINE FROM STOCK A, INVTRACE C " sql = " SELECT A.QUANTITY, A.ITEM_CODE, A.LOT_NO, A.LOT_SL, C.REF_LINE FROM STOCK A, INVTRACE C "
+ " WHERE A.ITEM_CODE = C.ITEM_CODE AND A.LOC_CODE = C.LOC_CODE " + " WHERE A.ITEM_CODE = C.ITEM_CODE AND A.LOC_CODE = C.LOC_CODE "
...@@ -1074,18 +1352,18 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1074,18 +1352,18 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
refSer = "D-RCP"; refSer = "D-RCP";
} }
/* sql = " SELECT C.QUANTITY, A.ITEM_CODE, A.LOT_NO, A.LOT_SL, C.REF_LINE, A.LOC_CODE " /* sql = " SELECT C.QUANTITY, A.ITEM_CODE, A.LOT_NO, A.LOT_SL, C.REF_LINE, A.LOC_CODE "
+ " FROM STOCK A, INVTRACE C " + " FROM STOCK A, INVTRACE C "
+ " WHERE A.ITEM_CODE = C.ITEM_CODE AND A.LOC_CODE = C.LOC_CODE " + " WHERE A.ITEM_CODE = C.ITEM_CODE AND A.LOC_CODE = C.LOC_CODE "
+ " AND A.SITE_CODE = C.SITE_CODE AND A.LOT_NO = C.LOT_NO AND A.LOT_SL = C.LOT_SL " + " AND A.SITE_CODE = C.SITE_CODE AND A.LOT_NO = C.LOT_NO AND A.LOT_SL = C.LOT_SL "
+ " AND A.ALLOC_QTY = 0 AND (A.PACK_REF IS NULL OR LENGTH(TRIM(A.PACK_REF)) = 0 ) " + " AND A.ALLOC_QTY = 0 AND (A.PACK_REF IS NULL OR LENGTH(TRIM(A.PACK_REF)) = 0 ) "
+ " AND C.REF_SER = '" + refSer + "' AND A.LOT_NO = C.LOT_NO " + " AND C.REF_SER = '" + refSer + "' AND A.LOT_NO = C.LOT_NO "
+ " AND C.REF_ID = '" + orderNo +"' AND A.SITE_CODE = '" + siteCode +"' ";*/ + " AND C.REF_ID = '" + orderNo +"' AND A.SITE_CODE = '" + siteCode +"' ";*/
// QUERY CHANGED BY ALKA 20/08/07 TO RETRIEVE DATA FROM INVTRACE AND THEN CHECKING FROM STOCK. // QUERY CHANGED BY ALKA 20/08/07 TO RETRIEVE DATA FROM INVTRACE AND THEN CHECKING FROM STOCK.
sql = " SELECT A.QUANTITY, A.ITEM_CODE, A.LOT_NO, A.LOT_SL, A.REF_LINE, A.LOC_CODE " sql = " SELECT A.QUANTITY, A.ITEM_CODE, A.LOT_NO, A.LOT_SL, A.REF_LINE, A.LOC_CODE "
+ " FROM INVTRACE A WHERE A.REF_SER = '" + refSer + "' " + " FROM INVTRACE A WHERE A.REF_SER = '" + refSer + "' "
+ " AND A.REF_ID = '" + orderNo +"' AND A.SITE_CODE = '" + siteCode +"' "; + " AND A.REF_ID = '" + orderNo +"' AND A.SITE_CODE = '" + siteCode +"' ";
System.out.println("sql :: " + sql); System.out.println("sql :: " + sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
while (rs.next()) while (rs.next())
...@@ -1103,12 +1381,12 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1103,12 +1381,12 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
if (reqQty > 0) if (reqQty > 0)
{ {
returnString = getStockDetails(dom, siteCode, orderType, orderNo, lineNoOrd, itemCode, reqQty, lotNo, lotSl, refSer, locCode, conn); returnString = getStockDetails(dom, siteCode, orderType, orderNo, lineNoOrd, itemCode, reqQty, lotNo, lotSl, refSer, locCode, conn);
// ADDED BY ALKA 20/08/07 TO HANDLE RETURNED ERROR // ADDED BY ALKA 20/08/07 TO HANDLE RETURNED ERROR
if (returnString.indexOf("Errors") > -1) if (returnString.indexOf("Errors") > -1)
{ {
return returnString; return returnString;
} }
// ADDITION ENDED BY ALKA 20/08/07 TO HANDLE RETURNED ERROR // ADDITION ENDED BY ALKA 20/08/07 TO HANDLE RETURNED ERROR
valueXmlString.append(returnString); valueXmlString.append(returnString);
} }
} }
...@@ -1173,22 +1451,22 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1173,22 +1451,22 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
if (orderType.equalsIgnoreCase("D") || orderType.equalsIgnoreCase("S")) if (orderType.equalsIgnoreCase("D") || orderType.equalsIgnoreCase("S"))
{ {
sql = " SELECT A.LOT_NO, A.LOT_SL, A.LOC_CODE, A.QUANTITY - A.ALLOC_QTY, A.GROSS_WEIGHT, A.TARE_WEIGHT, " sql = " SELECT A.LOT_NO, A.LOT_SL, A.LOC_CODE, A.QUANTITY - A.ALLOC_QTY, A.GROSS_WEIGHT, A.TARE_WEIGHT, "
// + " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, C.DESCR FROM STOCK A, " //CHANGED BY ALKA 20/08/07 -- ADDED ALLOC_QTY FIELD // + " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, C.DESCR FROM STOCK A, " //CHANGED BY ALKA 20/08/07 -- ADDED ALLOC_QTY FIELD
+ " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, C.DESCR, A.ALLOC_QTY FROM STOCK A, " + " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, C.DESCR, A.ALLOC_QTY FROM STOCK A, "
+ " ITEM B, LOCATION C WHERE A.ITEM_CODE = B.ITEM_CODE AND A.LOC_CODE = C.LOC_CODE " + " ITEM B, LOCATION C WHERE A.ITEM_CODE = B.ITEM_CODE AND A.LOC_CODE = C.LOC_CODE "
+ " AND (A.QUANTITY - A.ALLOC_QTY > 0) AND (A.PACK_REF IS NULL OR LENGTH(TRIM(A.PACK_REF)) = 0 ) " //PACK_REF CONDITION ADDED BY ALKA 20/08/07 + " AND (A.QUANTITY - A.ALLOC_QTY > 0) AND (A.PACK_REF IS NULL OR LENGTH(TRIM(A.PACK_REF)) = 0 ) " //PACK_REF CONDITION ADDED BY ALKA 20/08/07
+ " AND A.ITEM_CODE = '" + itemCode +"' AND A.SITE_CODE = '" + siteCode +"' " + " AND A.ITEM_CODE = '" + itemCode +"' AND A.SITE_CODE = '" + siteCode +"' "
+ " ORDER BY EXP_DATE, RETEST_DATE "; + " ORDER BY EXP_DATE, RETEST_DATE ";
} }
else if (orderType.equalsIgnoreCase("P") || orderType.equalsIgnoreCase("W") || orderType.equalsIgnoreCase("R")) else if (orderType.equalsIgnoreCase("P") || orderType.equalsIgnoreCase("W") || orderType.equalsIgnoreCase("R"))
{ {
/* QUERY CHANGED BY ALKA 02/08/07 TO RETRIEVE THE DATA FROM THE CONCERNED ORDER AND STOCK. /* QUERY CHANGED BY ALKA 02/08/07 TO RETRIEVE THE DATA FROM THE CONCERNED ORDER AND STOCK.
* sql = " SELECT A.LOT_NO, A.LOT_SL, A.LOC_CODE, A.QUANTITY, A.GROSS_WEIGHT, A.TARE_WEIGHT, " * sql = " SELECT A.LOT_NO, A.LOT_SL, A.LOC_CODE, A.QUANTITY, A.GROSS_WEIGHT, A.TARE_WEIGHT, "
+ " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, C.DESCR FROM STOCK A, ITEM B, " + " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, C.DESCR FROM STOCK A, ITEM B, "
+ " LOCATION C WHERE A.ITEM_CODE = B.ITEM_CODE AND A.LOC_CODE = C.LOC_CODE " + " LOCATION C WHERE A.ITEM_CODE = B.ITEM_CODE AND A.LOC_CODE = C.LOC_CODE "
+ " AND A.ITEM_CODE = '" + itemCode +"' AND A.SITE_CODE = '" + siteCode +"' " + " AND A.ITEM_CODE = '" + itemCode +"' AND A.SITE_CODE = '" + siteCode +"' "
+ " AND LOT_NO = '" + lotNo + "' AND LOT_SL = '" + lotSl + "' "; */ + " AND LOT_NO = '" + lotNo + "' AND LOT_SL = '" + lotSl + "' "; */
// QUERY CHANGED BY ALKA 20/08/07 FOR CHECKING IN STOCK THE ITEM // QUERY CHANGED BY ALKA 20/08/07 FOR CHECKING IN STOCK THE ITEM
/*sql = " SELECT A.LOT_NO, A.LOT_SL, A.LOC_CODE, A.QUANTITY, A.GROSS_WEIGHT, A.TARE_WEIGHT, " /*sql = " SELECT A.LOT_NO, A.LOT_SL, A.LOC_CODE, A.QUANTITY, A.GROSS_WEIGHT, A.TARE_WEIGHT, "
+ " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, D.DESCR " + " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, D.DESCR "
+ " FROM STOCK A, ITEM B, INVTRACE C, LOCATION D WHERE A.ITEM_CODE = B.ITEM_CODE " + " FROM STOCK A, ITEM B, INVTRACE C, LOCATION D WHERE A.ITEM_CODE = B.ITEM_CODE "
...@@ -1197,15 +1475,15 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1197,15 +1475,15 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
+ " AND A.ITEM_CODE = '" + itemCode +"' AND A.SITE_CODE = '" + siteCode +"' " + " AND A.ITEM_CODE = '" + itemCode +"' AND A.SITE_CODE = '" + siteCode +"' "
+ " AND A.LOT_NO = '" + lotNo +"' AND A.LOT_SL = '" + lotSl +"' AND A.LOC_CODE = '" + locCode +"' " + " AND A.LOT_NO = '" + lotNo +"' AND A.LOT_SL = '" + lotSl +"' AND A.LOC_CODE = '" + locCode +"' "
+ " AND C.REF_SER = '" + refSer +"' AND C.REF_ID = '" + orderNo +"' ";*/ + " AND C.REF_SER = '" + refSer +"' AND C.REF_ID = '" + orderNo +"' ";*/
sql = " SELECT A.LOT_NO, A.LOT_SL, A.LOC_CODE, A.QUANTITY - A.ALLOC_QTY, A.GROSS_WEIGHT, A.TARE_WEIGHT, " sql = " SELECT A.LOT_NO, A.LOT_SL, A.LOC_CODE, A.QUANTITY - A.ALLOC_QTY, A.GROSS_WEIGHT, A.TARE_WEIGHT, "
+ " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, C.DESCR, A.ALLOC_QTY " + " A.NET_WEIGHT, B.DESCR, B.UNIT, B.PACK_CODE, A.MFG_DATE, A.EXP_DATE, C.DESCR, A.ALLOC_QTY "
+ " FROM STOCK A, ITEM B, LOCATION C WHERE A.ITEM_CODE = B.ITEM_CODE " + " FROM STOCK A, ITEM B, LOCATION C WHERE A.ITEM_CODE = B.ITEM_CODE "
+ " AND (A.QUANTITY - A.ALLOC_QTY > 0) " + " AND (A.QUANTITY - A.ALLOC_QTY > 0) "
+ " AND A.LOC_CODE = C.LOC_CODE AND A.ITEM_CODE = '" + itemCode +"' " + " AND A.LOC_CODE = C.LOC_CODE AND A.ITEM_CODE = '" + itemCode +"' "
+ " AND A.SITE_CODE = '" + siteCode +"' AND A.LOT_NO = '" + lotNo +"' " + " AND A.SITE_CODE = '" + siteCode +"' AND A.LOT_NO = '" + lotNo +"' "
+ " AND A.LOT_SL = '" + lotSl +"' AND A.LOC_CODE = '" + locCode +"' " + " AND A.LOT_SL = '" + lotSl +"' AND A.LOC_CODE = '" + locCode +"' "
+ " AND (A.PACK_REF IS NULL OR LENGTH(TRIM(A.PACK_REF)) = 0 ) "; + " AND (A.PACK_REF IS NULL OR LENGTH(TRIM(A.PACK_REF)) = 0 ) ";
} }
System.out.println("sql in Stock Details :: " + sql); System.out.println("sql in Stock Details :: " + sql);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
...@@ -1236,7 +1514,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1236,7 +1514,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
System.out.println("expDateStr :"+expDateStr); System.out.println("expDateStr :"+expDateStr);
} }
locDescr = rs.getString(13); locDescr = rs.getString(13);
// ADDED BY ALKA 20/08/07 TO CHECK THE REQUIRED QUANTITY IS AVAILABLE IN STOCK // ADDED BY ALKA 20/08/07 TO CHECK THE REQUIRED QUANTITY IS AVAILABLE IN STOCK
stkAllocQty = rs.getDouble(14); stkAllocQty = rs.getDouble(14);
System.out.println("STOCK ========== stkAllocQty :" + stkAllocQty + "::stockQty ==> :" + stockQty + ":"); System.out.println("STOCK ========== stkAllocQty :" + stkAllocQty + "::stockQty ==> :" + stockQty + ":");
...@@ -1247,7 +1525,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1247,7 +1525,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
errString = updateMessage(errString, newMessage); errString = updateMessage(errString, newMessage);
return errString; return errString;
} }
// ADDITION BY ALKA 20/08/07 TO CHECK THE REQUIRED QUANTITY IS AVAILABLE IN STOCK // ADDITION BY ALKA 20/08/07 TO CHECK THE REQUIRED QUANTITY IS AVAILABLE IN STOCK
if (stockQty >= reqQty) if (stockQty >= reqQty)
{ {
...@@ -1259,11 +1537,11 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1259,11 +1537,11 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
inputQty = stockQty; inputQty = stockQty;
reqQty = reqQty - inputQty; reqQty = reqQty - inputQty;
} }
// ADDED BY ALKA 20/08/07 TO UPDATE THE ALLOC_QTY IN STOCK FOR CALCULATION // ADDED BY ALKA 20/08/07 TO UPDATE THE ALLOC_QTY IN STOCK FOR CALCULATION
System.out.println("STOCK ========== reqQty :" + reqQty + ":: inputQty :" + inputQty + ":"); System.out.println("STOCK ========== reqQty :" + reqQty + ":: inputQty :" + inputQty + ":");
sql = " UPDATE STOCK SET ALLOC_QTY = ? WHERE SITE_CODE = ? AND ITEM_CODE = ? AND LOC_CODE = ?" sql = " UPDATE STOCK SET ALLOC_QTY = ? WHERE SITE_CODE = ? AND ITEM_CODE = ? AND LOC_CODE = ?"
+ " AND LOT_NO = ? AND LOT_SL = ? "; + " AND LOT_NO = ? AND LOT_SL = ? ";
pstmtUpdate = conn.prepareStatement(sql); pstmtUpdate = conn.prepareStatement(sql);
pstmtUpdate.setDouble(1, stkAllocQty + inputQty); pstmtUpdate.setDouble(1, stkAllocQty + inputQty);
pstmtUpdate.setString(2, siteCode); pstmtUpdate.setString(2, siteCode);
...@@ -1273,7 +1551,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1273,7 +1551,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
pstmtUpdate.setString(6, lotSl); pstmtUpdate.setString(6, lotSl);
update = pstmtUpdate.executeUpdate(); update = pstmtUpdate.executeUpdate();
System.out.println("Records updated in Stock for alloc_qty :: "+update); System.out.println("Records updated in Stock for alloc_qty :: "+update);
// ADDITION BY ALKA 20/08/07 TO UPDATE THE ALLOC_QTY IN STOCK FOR CALCULATION // ADDITION BY ALKA 20/08/07 TO UPDATE THE ALLOC_QTY IN STOCK FOR CALCULATION
valueXmlString.append("<Detail>\r\n"); valueXmlString.append("<Detail>\r\n");
valueXmlString.append("<order_no isSrvCallOnChg='0'>").append("<![CDATA[").append(orderNo).append("]]>").append("</order_no>\r\n"); valueXmlString.append("<order_no isSrvCallOnChg='0'>").append("<![CDATA[").append(orderNo).append("]]>").append("</order_no>\r\n");
valueXmlString.append("<line_no__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(lineNoOrd).append("]]>").append("</line_no__ord>\r\n"); valueXmlString.append("<line_no__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(lineNoOrd).append("]]>").append("</line_no__ord>\r\n");
...@@ -1391,16 +1669,16 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1391,16 +1669,16 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
for(int ctr = 0; ctr < noOfDetails; ctr++) for(int ctr = 0; ctr < noOfDetails; ctr++)
{ {
currDetail = detailList.item(ctr); currDetail = detailList.item(ctr);
//changed by Alka on 12/09/07 for deleted records not to be considered - REQUEST ID "DI78GIN042,DI78GIN043" - START //changed by Alka on 12/09/07 for deleted records not to be considered - REQUEST ID "DI78GIN042,DI78GIN043" - START
updateFlag = getCurrentUpdateFlag(currDetail); updateFlag = getCurrentUpdateFlag(currDetail);
System.out.println("ctr ::" + ctr + "==== updateFlag :: "+updateFlag); System.out.println("ctr ::" + ctr + "==== updateFlag :: "+updateFlag);
if ("D".equalsIgnoreCase(updateFlag)) if ("D".equalsIgnoreCase(updateFlag))
{ {
continue; continue;
} }
//changed by Alka on 12/09/07 for deleted records not to be considered - REQUEST ID "DI78GIN042,DI78GIN043" - END //changed by Alka on 12/09/07 for deleted records not to be considered - REQUEST ID "DI78GIN042,DI78GIN043" - END
orderNo = genericUtility.getColumnValueFromNode("order_no", currDetail); orderNo = genericUtility.getColumnValueFromNode("order_no", currDetail);
lineNoOrd = genericUtility.getColumnValueFromNode("line_no__ord", currDetail); lineNoOrd = genericUtility.getColumnValueFromNode("line_no__ord", currDetail);
itemCode = genericUtility.getColumnValueFromNode("item_code", currDetail); itemCode = genericUtility.getColumnValueFromNode("item_code", currDetail);
...@@ -1416,7 +1694,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1416,7 +1694,7 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
packCode = genericUtility.getColumnValueFromNode("pack_code", currDetail); packCode = genericUtility.getColumnValueFromNode("pack_code", currDetail);
mfgDate = genericUtility.getColumnValueFromNode("mfg_date", currDetail); mfgDate = genericUtility.getColumnValueFromNode("mfg_date", currDetail);
expDate = genericUtility.getColumnValueFromNode("exp_date", currDetail); expDate = genericUtility.getColumnValueFromNode("exp_date", currDetail);
// changed by ALKA on 11/09/07 for no_art column added in the inv_pack_iss FOR REQUEST ID "DI78GIN042,DI78GIN043,MF78GIN013" // changed by ALKA on 11/09/07 for no_art column added in the inv_pack_iss FOR REQUEST ID "DI78GIN042,DI78GIN043,MF78GIN013"
noArt = genericUtility.getColumnValueFromNode("no_art", currDetail); noArt = genericUtility.getColumnValueFromNode("no_art", currDetail);
valueXmlString.append("<Detail>"); valueXmlString.append("<Detail>");
...@@ -1427,8 +1705,8 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1427,8 +1705,8 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
valueXmlString.append("<unit isSrvCallOnChg='0'>").append("<![CDATA[").append(unit).append("]]>").append("</unit>\r\n"); valueXmlString.append("<unit isSrvCallOnChg='0'>").append("<![CDATA[").append(unit).append("]]>").append("</unit>\r\n");
valueXmlString.append("<pack_instr isSrvCallOnChg='0'>").append("<![CDATA[").append(packInstr==null?"":packInstr).append("]]>").append("</pack_instr>\r\n"); valueXmlString.append("<pack_instr isSrvCallOnChg='0'>").append("<![CDATA[").append(packInstr==null?"":packInstr).append("]]>").append("</pack_instr>\r\n");
valueXmlString.append("<qty_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(quantity).append("]]>").append("</qty_pack>\r\n"); valueXmlString.append("<qty_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(quantity).append("]]>").append("</qty_pack>\r\n");
// changed by ALKA on 11/09/07 for no_art column added in the inv_pack_iss FOR REQUEST ID "DI78GIN042,DI78GIN043,MF78GIN013" // changed by ALKA on 11/09/07 for no_art column added in the inv_pack_iss FOR REQUEST ID "DI78GIN042,DI78GIN043,MF78GIN013"
// valueXmlString.append("<no_art isSrvCallOnChg='0'>").append("<![CDATA[").append("1").append("]]>").append("</no_art>\r\n"); // valueXmlString.append("<no_art isSrvCallOnChg='0'>").append("<![CDATA[").append("1").append("]]>").append("</no_art>\r\n");
valueXmlString.append("<no_art isSrvCallOnChg='0'>").append("<![CDATA[").append(noArt).append("]]>").append("</no_art>\r\n"); valueXmlString.append("<no_art isSrvCallOnChg='0'>").append("<![CDATA[").append(noArt).append("]]>").append("</no_art>\r\n");
valueXmlString.append("<quantity isSrvCallOnChg='0'>").append("<![CDATA[").append(quantity).append("]]>").append("</quantity>\r\n"); valueXmlString.append("<quantity isSrvCallOnChg='0'>").append("<![CDATA[").append(quantity).append("]]>").append("</quantity>\r\n");
valueXmlString.append("<grosswt_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(grossWeight==null?"":grossWeight).append("]]>").append("</grosswt_pack>\r\n"); valueXmlString.append("<grosswt_pack isSrvCallOnChg='0'>").append("<![CDATA[").append(grossWeight==null?"":grossWeight).append("]]>").append("</grosswt_pack>\r\n");
...@@ -1487,28 +1765,28 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv ...@@ -1487,28 +1765,28 @@ public class InvPackAct extends ActionHandlerEJB implements InvPackActLocal, Inv
System.out.println("valueXmlString return from InvPackAct :"+ valueXmlString.toString()); System.out.println("valueXmlString return from InvPackAct :"+ valueXmlString.toString());
return valueXmlString.toString(); return valueXmlString.toString();
} }
private String updateMessage(String resultString,String message) private String updateMessage(String resultString,String message)
{ {
StringBuffer stbf = new StringBuffer(); StringBuffer stbf = new StringBuffer();
try{ try{
System.out.println("resultString : "+resultString); System.out.println("resultString : "+resultString);
stbf.append(resultString.substring(0,resultString.indexOf("<trace>"))); stbf.append(resultString.substring(0,resultString.indexOf("<trace>")));
if(message != null && message.trim().length() > 0){ if(message != null && message.trim().length() > 0){
stbf.append("<trace>"+message+"</trace>"); stbf.append("<trace>"+message+"</trace>");
stbf.append(resultString.substring(resultString.indexOf("</trace>")+8)); stbf.append(resultString.substring(resultString.indexOf("</trace>")+8));
}else{ }else{
stbf.append(resultString.substring(resultString.indexOf("<trace>"))); stbf.append(resultString.substring(resultString.indexOf("<trace>")));
} }
System.out.println("Resulting String : "+stbf.toString()); System.out.println("Resulting String : "+stbf.toString());
}catch(Exception e){ }catch(Exception e){
System.out.println("Exception in updateMessage : "+e); System.out.println("Exception in updateMessage : "+e);
e.printStackTrace(); e.printStackTrace();
} }
return stbf.toString(); return stbf.toString();
} }
private String getCurrentUpdateFlag(Node currDetail) private String getCurrentUpdateFlag(Node currDetail)
{ {
NodeList currDetailList = null; NodeList currDetailList = null;
......
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