Commit cb57997f authored by msharma's avatar msharma

Manoj dtd 10/09/2012 to generate key for invalloc trace


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91884 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 95fd6f29
......@@ -549,10 +549,10 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
{
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");
//Commented by Manoj dtd 10/09/2012 to remove connection closing issue
/*ConnDriver connDriver = new ConnDriver();
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;*/
connDriver = null;
parentNodeList = detailDom.getElementsByTagName("Detail2");
parentNodeListLength = parentNodeList.getLength();
System.out.println("parentNodeListLength------------------->"+parentNodeListLength);
......@@ -602,8 +602,6 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
if(allocQty > 0)
{
System.out.println("if calling........");
//Commented by Manoj dtd 10/09/2012 to remove connection closing issue
//errString = sorderAllocate(saleOrder, lineNo, itemCode, allocQty, expLev,conn);
errString = sorderAllocate(saleOrder, lineNo, itemCode, allocQty, expLev);
if (errString != null && errString.trim().length() > 0)
{
......@@ -673,8 +671,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
}
}
//Commented by Manoj dtd 10/09/2012 to remove connection closing issue
//private String sorderAllocate(String saleOrder, String lineNo, String itemCode, double allocQty, String expLev,Connection conn) throws ITMException
private String sorderAllocate(String saleOrder, String lineNo, String itemCode, double allocQty, String expLev) throws ITMException
{
System.out.println("updateSOrder calling ..............");
......@@ -1129,14 +1126,27 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
tranSer1 = rSet.getString(3);
}
java.util.Date date = null;
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
System.out.println(genericUtility.getDBDateFormat());
SimpleDateFormat simpledateformat = new SimpleDateFormat(genericUtility.getDBDateFormat());
date = simpledateformat.parse(timestamp.toString());
timestamp = Timestamp.valueOf(simpledateformat.format(date).toString() + " 00:00:00.0");
String tranDateStr = (new SimpleDateFormat(genericUtility.getApplDateFormat())).format(timestamp).toString();
System.out.println("keyString :"+keyString);
System.out.println("keyCol :"+keyCol);
System.out.println("tranSer1 :"+tranSer1);
String xmlValues = "";
xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>";
xmlValues = xmlValues + "<Detail1>";
//Added by Manoj dtd 10/09/2012 to generate key
xmlValues = xmlValues + "<dummy>D</dummy>";
xmlValues = xmlValues + "<site_code>" + siteCode + "</site_code>";
//Added by Manoj dtd 10/09/2012 to generate key
xmlValues = xmlValues + "<tran_date>" + tranDateStr + "</tran_date>";
xmlValues = xmlValues +"</Detail1></Root>";
System.out.println("xmlValues :["+xmlValues+"]");
TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE", commonConstants.DB_NAME);
......
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