Commit 17e85f5d authored by rtiwari's avatar rtiwari

COLUMN SEQ: CHANGE FOR SCM issue tracker point # 195-N


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94232 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 49936e52
......@@ -128,7 +128,6 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
public String getData(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException
{
String errCode = "";
String errString = "";
String getDataSql= "" ;
......@@ -169,7 +168,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//added by kunal on 15/NOV/13 DI3ESUN009
resrvLoc = checkNull(dComm.getDisparams("999999","RESERV_LOCATION",conn));
resrvLoc = checkNull(dComm.getDisparams("999999","RESERV_LOCATION",conn)); // marked
casePickLoc = checkNull(dComm.getDisparams("999999","CASE_PICK_INVSTAT",conn));
activePickLoc = checkNull(dComm.getDisparams("999999","ACTIVE_PICK_INVSTAT",conn));
deepStoreLoc = checkNull(dComm.getDisparams("999999","DEEP_STORE_INVSTAT",conn));
......@@ -629,72 +628,34 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
{
retTabSepStrBuff.append("<Detail2>");
//DUE_DATE
//retTabSepStrBuff.append(rs.getTimestamp(5)).append("\t");
if(rs.getTimestamp(5) != null)
{
retTabSepStrBuff.append("<due_date>").append("<![CDATA[" + sdf.format(rs.getTimestamp(5)) +"]]>").append("</due_date>");
}
else
{
retTabSepStrBuff.append("<due_date>").append("<![CDATA[]]>").append("</due_date>");
}
dueDate = rs.getTimestamp(5);
//PROM_DATE
if(rs.getTimestamp("PROM_DATE") != null)
{
retTabSepStrBuff.append("<prom_date>").append("<![CDATA[" + sdf.format(rs.getTimestamp("PROM_DATE")) +"]]>").append("</prom_date>");
}
else
{
retTabSepStrBuff.append("<prom_date>").append("<![CDATA[]]>").append("</prom_date>");
}
//DLV CUST_CODE
retTabSepStrBuff.append("<cust_code__dlv>").append("<![CDATA[" + checkNull(rs.getString("CUST_CODE__DLV")) +"]]>").append("</cust_code__dlv>");
//DLV CUST_CODE NAME
retTabSepStrBuff.append("<cust_name>").append("<![CDATA[" + checkNull(rs.getString("CUST_CODE__DLV_NAME")) +"]]>").append("</cust_name>");
//DLV CUST_CODE STATE
retTabSepStrBuff.append("<state_code__dlv>").append("<![CDATA[" + checkNull(rs.getString("STATE_CODE__DLV")) +"]]>").append("</state_code__dlv>");
// COLUMN SEQ: CHANGE BY RITESH ON 11/FEB/2014 FOR SCM issue tracker point # 195-N
//SALE_ORDER
//retTabSepStrBuff.append(rs.getString(4)).append("\t");
retTabSepStrBuff.append("<sale_order>").append("<![CDATA[" + rs.getString(4) +"]]>").append("</sale_order>");
//DLV CUST_CODE NAME
retTabSepStrBuff.append("<cust_name>").append("<![CDATA[" + checkNull(rs.getString("CUST_CODE__DLV_NAME")) +"]]>").append("</cust_name>");
//LINE_NO
//retTabSepStrBuff.append(rs.getString(3)).append("\t");
retTabSepStrBuff.append("<line_no>").append("<![CDATA[" + rs.getString(3) +"]]>").append("</line_no>");
//change done by kunal on 27/NOV/13 ,change the display order
//Hold Flag
//retTabSepStrBuff.append(rs.getString(14) == null?"N":rs.getString(14)).append("\t");// ADDED BY AKHILESH
retTabSepStrBuff.append("<hold_flag>").append("<![CDATA[" + (rs.getString(14) == null? " ":rs.getString(14)) +"]]>").append("</hold_flag>");
//ITEM_CODE
//retTabSepStrBuff.append(rs.getString(6)).append("\t");
retTabSepStrBuff.append("<item_code>").append("<![CDATA[" + rs.getString(6) +"]]>").append("</item_code>");
//DESCR
//retTabSepStrBuff.append(rs.getString(7)).append("\t");
retTabSepStrBuff.append("<item_descr>").append("<![CDATA[" + rs.getString(7) +"]]>").append("</item_descr>");
//QUANTITY
//retTabSepStrBuff.append(rs.getDouble(8)).append("\t");
retTabSepStrBuff.append("<quantity>").append("<![CDATA[" + rs.getDouble(8) +"]]>").append("</quantity>");
//UNIT
retTabSepStrBuff.append("<unit>").append("<![CDATA[" + rs.getString("UNIT") +"]]>").append("</unit>");
//UNIT__STD
retTabSepStrBuff.append("<unit__std>").append("<![CDATA[" + rs.getString("UNIT__STD") +"]]>").append("</unit__std>");
//UNIT__STD
retTabSepStrBuff.append("<conv__qty_stduom>").append("<![CDATA[" + rs.getString("CONV__QTY_STDUOM") +"]]>").append("</conv__qty_stduom>");
//STOCK QTY
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + balStockQty +"]]>").append("</stock_quantity>");
//Hold Qty
//retTabSepStrBuff.append(holdQty).append("\t");// added by Kunal on 22/10/12
retTabSepStrBuff.append("<hold_qty>").append("<![CDATA[" + holdQty +"]]>").append("</hold_qty>");
//STOCK QTY
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + balStockQty +"]]>").append("</stock_quantity>");
//active_pick_allow
retTabSepStrBuff.append("<active_pick_allow>").append("<![CDATA[" + activeAllow +"]]>").append("</active_pick_allow>");
//QUANTITY
//retTabSepStrBuff.append(rs.getDouble(8)).append("\t");
retTabSepStrBuff.append("<quantity>").append("<![CDATA[" + rs.getDouble(8) +"]]>").append("</quantity>");
//QTY__STD
retTabSepStrBuff.append("<quantity__stduom>").append("<![CDATA[" + rs.getString("QUANTITY__STDUOM") +"]]>").append("</quantity__stduom>");
//PENDING_QUANTITY
......@@ -702,22 +663,10 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
//retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + rs.getDouble(9) +"]]>").append("</pending_quantity>");
//Manoj dtd 18/06/2013 Pending Quantity in standard unit
retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + (rs.getDouble(9)) +"]]>").append("</pending_quantity>");
//STOCK_QUANTITY
pendQty = rs.getDouble(9);
//***** check itemhashmap wheather current item_code already exists
// if not add to itemhashmap and get the stock as follows and set in
// tabdelimited string else nothing is to be done just consider the stock as 0
///////////////////////////////////////////////////////////////////////////////////
// alloc_qty to be set based on stock availability
// it should not be more than pending quantity
// the balance quantity to be updated in itemCodeMap
// and to be used for the item's next iteration
pendQty = rs.getDouble(9);
//QTY_ALLOC
if(balStockQty >= pendQty)
{
......@@ -739,13 +688,66 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
//retTabSepStrBuff.append("0").append("\t");
retTabSepStrBuff.append("<qty_alloc>").append("<![CDATA[" + 0 +"]]>").append("</qty_alloc>");
}
//active_pick_allow
retTabSepStrBuff.append("<active_pick_allow>").append("<![CDATA[" + activeAllow +"]]>").append("</active_pick_allow>");
//qty allocated
//retTabSepStrBuff.append(rs.getDouble(10)).append("\t");// ADDED BY AKHILESH
retTabSepStrBuff.append("<qty_allocated>").append("<![CDATA[" + (rs.getDouble(10)) +"]]>").append("</qty_allocated>");
//Hold Flag
//retTabSepStrBuff.append(rs.getString(14) == null?"N":rs.getString(14)).append("\t");// ADDED BY AKHILESH
retTabSepStrBuff.append("<hold_flag>").append("<![CDATA[" + (rs.getString(14) == null? " ":rs.getString(14)) +"]]>").append("</hold_flag>");
//PROM_DATE
if(rs.getTimestamp("PROM_DATE") != null)
{
retTabSepStrBuff.append("<prom_date>").append("<![CDATA[" + sdf.format(rs.getTimestamp("PROM_DATE")) +"]]>").append("</prom_date>");
}
else
{
retTabSepStrBuff.append("<prom_date>").append("<![CDATA[]]>").append("</prom_date>");
}
//DUE_DATE
//retTabSepStrBuff.append(rs.getTimestamp(5)).append("\t");
if(rs.getTimestamp(5) != null)
{
retTabSepStrBuff.append("<due_date>").append("<![CDATA[" + sdf.format(rs.getTimestamp(5)) +"]]>").append("</due_date>");
}
else
{
retTabSepStrBuff.append("<due_date>").append("<![CDATA[]]>").append("</due_date>");
}
dueDate = rs.getTimestamp(5);
//DLV CUST_CODE STATE
retTabSepStrBuff.append("<state_code__dlv>").append("<![CDATA[" + checkNull(rs.getString("STATE_CODE__DLV")) +"]]>").append("</state_code__dlv>");
//change done by kunal on 27/NOV/13 ,change the display order
//DLV CUST_CODE
retTabSepStrBuff.append("<cust_code__dlv>").append("<![CDATA[" + checkNull(rs.getString("CUST_CODE__DLV")) +"]]>").append("</cust_code__dlv>");
//UNIT
retTabSepStrBuff.append("<unit>").append("<![CDATA[" + rs.getString("UNIT") +"]]>").append("</unit>");
//UNIT__STD
retTabSepStrBuff.append("<unit__std>").append("<![CDATA[" + rs.getString("UNIT__STD") +"]]>").append("</unit__std>");
//UNIT__STD
retTabSepStrBuff.append("<conv__qty_stduom>").append("<![CDATA[" + rs.getString("CONV__QTY_STDUOM") +"]]>").append("</conv__qty_stduom>");
//***** check itemhashmap wheather current item_code already exists
// if not add to itemhashmap and get the stock as follows and set in
// tabdelimited string else nothing is to be done just consider the stock as 0
///////////////////////////////////////////////////////////////////////////////////
// alloc_qty to be set based on stock availability
// it should not be more than pending quantity
// the balance quantity to be updated in itemCodeMap
// and to be used for the item's next iteration
//PARENT CUST_CODE
retTabSepStrBuff.append("<group_code>").append("<![CDATA[" + checkNull(rs.getString("GROUP_CODE")) +"]]>").append("</group_code>");
......
......@@ -117,6 +117,7 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocat
public String getData(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException
{
System.out.println(" change done by RK.");
String errCode = "" ;
String errString = "";
......@@ -148,7 +149,7 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocat
String sql1="",waveType="";
PreparedStatement pstmt2 = null;
ResultSet rs2 = null;
String activeAllow ="";
Connection conn = null;
ResultSet rs=null,rsDealloc= null,rs1=null;
PreparedStatement pstmt = null ,pstmtDeAlloc=null;
......@@ -309,6 +310,7 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocat
//Changed by sumit on 27/11/12 getting value of wave_flag end
//added by Kunal on 22/10/12
if( saleOrderFr.trim().length()>0 && saleOrderTo.trim().length()>0)
{
......@@ -401,49 +403,8 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocat
rs1.close();
retTabSepStrBuff.append("<Detail2>");
System.out.println("1111111WW111144");
//SALE_ORDER
retTabSepStrBuff.append("<sale_order>").append("<![CDATA[" + rs.getString(1) +"]]>").append("</sale_order>");
//LINE_NO
retTabSepStrBuff.append("<line_no>").append("<![CDATA[" + rs.getString(2) +"]]>").append("</line_no>");
//wave_flag
retTabSepStrBuff.append("<wave_flag>").append("<![CDATA[" + rs.getString("WAVE_FLAG") +"]]>").append("</wave_flag>");
//EXP_LEV
retTabSepStrBuff.append("<exp_lev>").append("<![CDATA[" + rs.getString(3) +"]]>").append("</exp_lev>");
//CUST_CODE
retTabSepStrBuff.append("<cust_code>").append("<![CDATA[ ]]>").append("</cust_code>");
//ITEM_CODE
retTabSepStrBuff.append("<item_code>").append("<![CDATA[" + rs.getString(4) +"]]>").append("</item_code>");
//ITEM_DESCR
retTabSepStrBuff.append("<item_descr>").append("<![CDATA[" + rs.getString(5) +"]]>").append("</item_descr>");
//QUANTITY
retTabSepStrBuff.append("<quantity>").append("<![CDATA[" + rs.getString(6) +"]]>").append("</quantity>");
//
//retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + rs.getDouble(9) +"]]>").append("</pending_quantity>");
//unit
retTabSepStrBuff.append("<unit>").append("<![CDATA[" + rs.getString("UNIT") +"]]>").append("</unit>");
//unit__std
retTabSepStrBuff.append("<unit__std>").append("<![CDATA[" + rs.getString("UNIT__STD") +"]]>").append("</unit__std>");
//conv__qty_stduom
retTabSepStrBuff.append("<conv__qty_stduom>").append("<![CDATA[" + rs.getString("CONV__QTY_STDUOM") +"]]>").append("</conv__qty_stduom>");
//quantity__stduom
retTabSepStrBuff.append("<quantity__stduom>").append("<![CDATA[" + rs.getString("QUANTITY__STDUOM") +"]]>").append("</quantity__stduom>");
//Total allocated Qty added by kunal on 19/NOV/13
retTabSepStrBuff.append("<tot_alloc_qty>").append("<![CDATA[" + rs.getDouble(7) +"]]>").append("</tot_alloc_qty>");
//dealloc_qty
retTabSepStrBuff.append("<dealloc_qty>").append("<![CDATA[" + rs.getDouble(7) +"]]>").append("</dealloc_qty>");
//ADD BY RITESH ON 10/10/13 FOR REQUEST DI3GSUN017 START
//active_pick_allow
// change for arrange column sequence : on 11/feb/14
sql1 = " select wave_type from customer where cust_code = ? ";
pstmt2 = conn.prepareStatement(sql1);
pstmt2.setString(1,rs.getString("CUST_CODE__DLV"));
......@@ -462,21 +423,72 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocat
rs2 = pstmt2.executeQuery();
if(rs2.next())
{
retTabSepStrBuff.append("<active_pick_allow>").append("<![CDATA[" + rs2.getString("ACTIVE_PICK_ALLOW") +"]]>").append("</active_pick_allow>");
activeAllow = rs2.getString("ACTIVE_PICK_ALLOW");
}
else
{
retTabSepStrBuff.append("<active_pick_allow>").append("<![CDATA[Y]]>").append("</active_pick_allow>");
activeAllow = "Y";
}
rs2.close();
rs2 = null;
pstmt2.close();
pstmt2 = null;
//ADD BY RITESH ON 10/10/13 FOR REQUEST DI3GSUN017 END
// COLUMN SEQ: CHANGE BY RITESH ON 11/FEB/2014 FOR SCM issue tracker point # 195-N
//SALE_ORDER
retTabSepStrBuff.append("<sale_order>").append("<![CDATA[" + rs.getString(1) +"]]>").append("</sale_order>");
//LINE_NO
retTabSepStrBuff.append("<line_no>").append("<![CDATA[" + rs.getString(2) +"]]>").append("</line_no>");
//ITEM_CODE
retTabSepStrBuff.append("<item_code>").append("<![CDATA[" + rs.getString(4) +"]]>").append("</item_code>");
//ITEM_DESCR
retTabSepStrBuff.append("<item_descr>").append("<![CDATA[" + rs.getString(5) +"]]>").append("</item_descr>");
//STOCK QTY
//retTabSepStrBuff.append("<stock_qty>").append("<![CDATA[" + allocStockQty +"]]>").append("</stock_qty>");
//HOLD_QTY
retTabSepStrBuff.append("<hold_qty>").append("<![CDATA[" + holdQty +"]]>").append("</hold_qty>");
//QUANTITY
retTabSepStrBuff.append("<quantity>").append("<![CDATA[" + rs.getString(6) +"]]>").append("</quantity>");
//quantity__stduom
retTabSepStrBuff.append("<quantity__stduom>").append("<![CDATA[" + rs.getString("QUANTITY__STDUOM") +"]]>").append("</quantity__stduom>");
//Total allocated Qty added by kunal on 19/NOV/13
retTabSepStrBuff.append("<tot_alloc_qty>").append("<![CDATA[" + rs.getDouble(7) +"]]>").append("</tot_alloc_qty>");
//dealloc_qty
retTabSepStrBuff.append("<dealloc_qty>").append("<![CDATA[" + rs.getDouble(7) +"]]>").append("</dealloc_qty>");
//ADD BY RITESH ON 10/10/13 FOR REQUEST DI3GSUN017 START
//active_pick_allow
retTabSepStrBuff.append("<active_pick_allow>").append("<![CDATA[" + activeAllow +"]]>").append("</active_pick_allow>");
//ADD BY RITESH ON 10/10/13 FOR REQUEST DI3GSUN017 END
//unit
retTabSepStrBuff.append("<unit>").append("<![CDATA[" + rs.getString("UNIT") +"]]>").append("</unit>");
//unit__std
retTabSepStrBuff.append("<unit__std>").append("<![CDATA[" + rs.getString("UNIT__STD") +"]]>").append("</unit__std>");
//conv__qty_stduom
retTabSepStrBuff.append("<conv__qty_stduom>").append("<![CDATA[" + rs.getString("CONV__QTY_STDUOM") +"]]>").append("</conv__qty_stduom>");
//wave_flag
retTabSepStrBuff.append("<wave_flag>").append("<![CDATA[" + rs.getString("WAVE_FLAG") +"]]>").append("</wave_flag>");
//EXP_LEV
retTabSepStrBuff.append("<exp_lev>").append("<![CDATA[" + rs.getString(3) +"]]>").append("</exp_lev>");
//CUST_CODE
retTabSepStrBuff.append("<cust_code>").append("<![CDATA[ ]]>").append("</cust_code>");
//
//retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + rs.getDouble(9) +"]]>").append("</pending_quantity>");
//gtin_case
// retTabSepStrBuff.append(rs.getString(11)== null ?"": rs.getString(11)).append("\t");
retTabSepStrBuff.append("<gtin_case>").append("<![CDATA[" + (rs.getString(11)== null ?"": rs.getString(11)) +"]]>").append("</gtin_case>");
......@@ -494,10 +506,6 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocat
retTabSepStrBuff.append("<loc_code>").append("<![CDATA[" + rs.getString(10) +"]]>").append("</loc_code>");
//ALLOC_TRANID
// retTabSepStrBuff.append(" ").append("\t");
retTabSepStrBuff.append("<tranid>").append("<![CDATA[ ]]>").append("</tranid>");
......@@ -1398,5 +1406,13 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocat
{
invallocTraceMap.clear();
}
private String checkNull( String input )
{
if ( input == null )
{
input = "";
}
return input;
}
}
\ No newline at end of file
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