Commit 853159bd authored by wansari's avatar wansari

Changed by wasim to parametarize department code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100424 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bf36ffa5
......@@ -452,6 +452,8 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
ResultSet rs = null;
PreparedStatement pstmt = null ;
String deptCodeDisparm = "",deptDescription = "";//Changed by wasim on 15-03-2016
try
{
conn = connDriver.getConnectDB("DriverITM");
......@@ -467,6 +469,8 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
currDate = sdf.format(new java.util.Date());
System.out.println("Extra Params is="+xtraParams);
userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
String chgTerm = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "chgTerm" );
String siteCode = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode" );
......@@ -491,6 +495,28 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
/************************************************************/
//Changed by wasim on 15-03-2016 to get department code [START]
deptCodeDisparm = checkNullAndTrim(distComm.getDisparams("999999", "DEFAULT_DEPT_CODE", conn));
System.out.println("Deprtment code from disparm["+deptCodeDisparm+"]");
sql = "SELECT DESCR FROM DEPARTMENT WHERE DEPT_CODE = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, deptCodeDisparm);
rs = pstmt.executeQuery();
if ( rs.next() )
{
deptDescription = checkNullAndTrim(rs.getString("DESCR"));
}
if(rs!=null)
{
rs.close();rs = null;
}
if(pstmt!=null)
{
pstmt.close();pstmt = null;
}
//Changed by wasim on 15-03-2016 to get department code [END]
switch(currentFormNo)
{
case 1:
......@@ -519,8 +545,8 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
//Changed by wasim on 15-03-2016 to set the department bydefault [START]
/*valueXmlString.append("<dept_code>").append("<![CDATA[DEP03]]>").append("</dept_code>\r\n");
valueXmlString.append("<department_descr>").append("<![CDATA[Creative Department]]>").append("</department_descr>\r\n");*/
valueXmlString.append("<dept_code>").append("<![CDATA[DEP01]]>").append("</dept_code>\r\n");
valueXmlString.append("<department_descr>").append("<![CDATA[Fulfillment Department]]>").append("</department_descr>\r\n");
valueXmlString.append("<dept_code>").append("<![CDATA["+deptCodeDisparm+"]]>").append("</dept_code>\r\n");
valueXmlString.append("<department_descr>").append("<![CDATA["+deptDescription+"]]>").append("</department_descr>\r\n");
//Changed by wasim on 15-03-2016 to set the department bydefault [END]
valueXmlString.append("<trans_mode>").append("<![CDATA[]]>").append("</trans_mode>\r\n");
valueXmlString.append("<item_code>").append("<![CDATA[]]>").append("</item_code>\r\n");
......
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