Commit cacc24c1 authored by prane's avatar prane

changes reverted

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@214783 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a164ae39
......@@ -1472,11 +1472,7 @@ public class PorderClosePrc extends ProcessEJB implements PorderClosePrcLocal,
//Calling confirm function of purchase order confirm
String forcedFlag = "";
/**Modified by Pavan Rane 24dec19 start[to update demand/supply in summary table(RunMRP process) related changes]
[changed method signature to pass xtraParams to update login user and login terminal]*/
//errString = Conf.ConfirmPordAmd(tranIdPe, conn);//(tranIdPe, xtraParams, forcedFlag);
errString = Conf.ConfirmPordAmd(tranIdPe, xtraParams,conn);//(tranIdPe, xtraParams, forcedFlag);
/**Modified by Pavan Rane 24dec19 end[changed the mtheod signature in POrderAmdConf component]*/
errString = Conf.ConfirmPordAmd(tranIdPe, conn);//(tranIdPe, xtraParams, forcedFlag);
System.out.println("errString@conf@"+errString);
if(errString==null||errString.trim().length()==0 || errString.indexOf("Success")>-1 || errString.equalsIgnoreCase("PRCUSUCCES")||errString.equals("PRCUSUCCES")||errString.equals("PRCUSUCCES"))
{
......
......@@ -18,7 +18,6 @@ import ibase.webitm.ejb.MasterStatefulLocal;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.dis.DistCommon;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.ejb.mfg.InvDemSuppTraceBean;
import ibase.webitm.ejb.sys.CreateRCPXML;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.ITMException;
......@@ -353,14 +352,10 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
String indnoHdr = "",indNo = "",unitStd = "", enqNo = "", userid = "";
PreparedStatement pstmt2=null;
double totAmtProj=0.0,oqty = 0.0 ,quantity = 0.0 , ordqty = 0.0 ,totOrdQty = 0.0;
Timestamp reqDate = null;
String itemCode = "";
String siteCode = "";
try
{
loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
InvDemSuppTraceBean invDemSupTrcBean = new InvDemSuppTraceBean();
HashMap demandSupplyMap = new HashMap();
if(loginEmpCode == null || loginEmpCode.trim().length() == 0)
{
userid = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
......@@ -454,34 +449,6 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
}
}
/**Modified by Pavan Rane 24dec19 start[to update demand/supply in summary table(RunMRP process) related changes]*/
sql = "select site_code, line_no, item_code, quantity__stduom, dlv_date from porddet where purc_order = ?" ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pOrder);
rs = pstmt.executeQuery();
while(rs.next())
{
demandSupplyMap.put("site_code", rs.getString("site_code"));
demandSupplyMap.put("item_code", rs.getString("item_code"));
demandSupplyMap.put("ref_ser", "P-ORD");
demandSupplyMap.put("ref_id", pOrder);
demandSupplyMap.put("ref_line", rs.getString("line_no"));
demandSupplyMap.put("due_date", rs.getTimestamp("dlv_date"));
demandSupplyMap.put("demand_qty", 0.0);
demandSupplyMap.put("supply_qty", rs.getDouble("quantity__stduom"));
demandSupplyMap.put("change_type", "A");
demandSupplyMap.put("chg_process", "T");
demandSupplyMap.put("chg_user", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode"));
demandSupplyMap.put("chg_term", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId"));
errString = invDemSupTrcBean.updateDemandSupply(demandSupplyMap, conn);
demandSupplyMap.clear();
if(errString != null && errString.trim().length() > 0)
{
System.out.println("errString["+errString+"]");
return errString;
}
}
/**Modified by Pavan Rane 24dec19 end[to update demand/supply in summary table(RunMRP process) related changes]*/
if(errString == null || errString.trim().length() == 0)
{
sql = " update porder set confirmed = 'Y',conf_date = ?,emp_code__aprv = ? ,status = 'O',status_date = ? " +
......@@ -610,10 +577,7 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
if(indNo != null && indNo.trim().length() > 0)
{
/**Modified by Pavan Rane 24dec19 start[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
//sql1 = "select quantity__stduom, ord_qty, from indent where ind_no = ? ";
sql1 = "select quantity__stduom, ord_qty, req_date, item_code, site_code from indent where ind_no = ? ";
/**Modified by Pavan Rane 24dec19 end[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
sql1 = "select quantity__stduom, ord_qty from indent where ind_no = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, indNo);
rs1 = pstmt1.executeQuery();
......@@ -622,11 +586,6 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
cnt = 0;
quantity = rs1.getDouble("quantity__stduom") ;
ordqty = rs1.getDouble("ord_qty") ;
/**Modified by Pavan Rane 24dec19 start[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
reqDate = rs1.getTimestamp("req_date");
itemCode = rs1.getString("item_code");
siteCode = rs1.getString("site_code");
/**Modified by Pavan Rane 24dec19 end[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
cnt++;
}
rs1.close();rs1 = null;
......@@ -660,27 +619,6 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
pstmt1.close();
pstmt1 = null;
}
/**Added by Pavan Rane 24dec19 start[to update with demand/supply in summary table(RunMRP process) related changes]*/
demandSupplyMap.put("site_code", siteCode);
demandSupplyMap.put("item_code", itemCode);
demandSupplyMap.put("ref_ser", "IND");
demandSupplyMap.put("ref_id", checkNullTrim(indNo));
demandSupplyMap.put("ref_line", "NA");
demandSupplyMap.put("due_date", reqDate);
demandSupplyMap.put("demand_qty", 0.0);
demandSupplyMap.put("supply_qty", totOrdQty *(-1));
demandSupplyMap.put("change_type", "C");
demandSupplyMap.put("chg_process", "T");
demandSupplyMap.put("chg_user", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode"));
demandSupplyMap.put("chg_term", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId"));
errString = invDemSupTrcBean.updateDemandSupply(demandSupplyMap, conn);
demandSupplyMap.clear();
if(errString != null && errString.trim().length() > 0)
{
System.out.println("errString["+errString+"]");
return errString;
}
/**Added by Pavan Rane 24dec19 end[to update with demand/supply in summary table(RunMRP process) related changes]*/
}
}
......@@ -755,10 +693,8 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
if(indNo != null && indNo.trim().length() > 0)
{
/**Modified by Pavan Rane 24dec19 start[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
//sql1 = "select quantity__stduom, ord_qty from indent where ind_no = ? ";
sql1 = "select quantity__stduom, ord_qty, req_date, item_code, site_code from indent where ind_no = ? ";
/**Modified by Pavan Rane 24dec19 end[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
sql1 = "select quantity__stduom, ord_qty from indent where ind_no = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, indNo);
rs1 = pstmt1.executeQuery();
......@@ -767,11 +703,6 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
cnt = 0;
quantity = rs1.getDouble("quantity__stduom") ;
ordqty = rs1.getDouble("ord_qty") ;
/**Modified by Pavan Rane 24dec19 start[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
reqDate = rs1.getTimestamp("req_date");
itemCode = rs1.getString("item_code");
siteCode = rs1.getString("site_code");
/**Modified by Pavan Rane 24dec19 end[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
cnt++;
}
rs1.close();rs1 = null;
......@@ -805,27 +736,6 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
pstmt1.close();
pstmt1 = null;
}
/**Added by Pavan Rane 24dec19 start[to update with demand/supply in summary table(RunMRP process) related changes]*/
demandSupplyMap.put("site_code", siteCode);
demandSupplyMap.put("item_code", itemCode);
demandSupplyMap.put("ref_ser", "IND");
demandSupplyMap.put("ref_id", checkNullTrim(indNo));
demandSupplyMap.put("ref_line", "NA");
demandSupplyMap.put("due_date", reqDate);
demandSupplyMap.put("demand_qty", 0.0);
demandSupplyMap.put("supply_qty", totOrdQty *(-1));
demandSupplyMap.put("change_type", "C");
demandSupplyMap.put("chg_process", "T");
demandSupplyMap.put("chg_user", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode"));
demandSupplyMap.put("chg_term", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId"));
errString = invDemSupTrcBean.updateDemandSupply(demandSupplyMap, conn);
demandSupplyMap.clear();
if(errString != null && errString.trim().length() > 0)
{
System.out.println("errString["+errString+"]");
return errString;
}
/**Added by Pavan Rane 24dec19 end[to update with demand/supply in summary table(RunMRP process) related changes]*/
}
}
......@@ -951,10 +861,7 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
if(indNo != null && indNo.trim().length() > 0)
{
/**Modified by Pavan Rane 24dec19 start[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
//sql1 = "select quantity__stduom, ord_qty from indent where ind_no = ? ";
sql1 = "select quantity__stduom, ord_qty, req_date, item_code, site_code from indent where ind_no = ? ";
/**Modified by Pavan Rane 24dec19 end[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
sql1 = "select quantity__stduom, ord_qty from indent where ind_no = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, indNo);
rs1 = pstmt1.executeQuery();
......@@ -963,11 +870,6 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
cnt = 0;
quantity = rs1.getDouble("quantity__stduom") ;
ordqty = rs1.getDouble("ord_qty") ;
/**Modified by Pavan Rane 24dec19 start[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
reqDate = rs1.getTimestamp("req_date") ;
itemCode = rs1.getString("item_code") ;
siteCode = rs1.getString("site_code") ;
/**Modified by Pavan Rane 24dec19 end[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
cnt++;
}
rs1.close();rs1 = null;
......@@ -1001,27 +903,6 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
pstmt1.close();
pstmt1 = null;
}
/**Added by Pavan Rane 24dec19 start[to update with demand/supply in summary table(RunMRP process) related changes]*/
demandSupplyMap.put("site_code", siteCode);
demandSupplyMap.put("item_code", itemCode);
demandSupplyMap.put("ref_ser", "IND");
demandSupplyMap.put("ref_id", checkNullTrim(indNo));
demandSupplyMap.put("ref_line", "NA");
demandSupplyMap.put("due_date", reqDate);
demandSupplyMap.put("demand_qty", 0.0);
demandSupplyMap.put("supply_qty", totOrdQty *(-1));
demandSupplyMap.put("change_type", "C");
demandSupplyMap.put("chg_process", "T");
demandSupplyMap.put("chg_user", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode"));
demandSupplyMap.put("chg_term", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId"));
errString = invDemSupTrcBean.updateDemandSupply(demandSupplyMap, conn);
demandSupplyMap.clear();
if(errString != null && errString.trim().length() > 0)
{
System.out.println("errString["+errString+"]");
return errString;
}
/**Added by Pavan Rane 24dec19 end[to update with demand/supply in summary table(RunMRP process) related changes]*/
}
}
......@@ -1088,13 +969,8 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
quantity = 0.0 , ordqty = 0.0 ,totOrdQty = 0.0;
java.sql.Timestamp currDate = null;
currDate = new java.sql.Timestamp(System.currentTimeMillis()) ;
Timestamp reqDate = null;
String itemCode = "";
String sitecode = "";
try
{
InvDemSuppTraceBean invDemSupTrcBean = new InvDemSuppTraceBean();
HashMap demandSupplyMap = new HashMap();
sql = "select count(*) from porddet where purc_order = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pOrder);
......@@ -1317,10 +1193,7 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
rs1.close();rs1 = null;
pstmt1.close();pstmt1 = null;
/**Modified by Pavan Rane 24dec19 start[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
//sql1 = "select quantity__stduom, ord_qty from indent where ind_no = ? ";
sql1 = "select quantity__stduom, ord_qty, req_date, item_code, site_code from indent where ind_no = ? ";
/**Modified by Pavan Rane 24dec19 end[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
sql1 = "select quantity__stduom, ord_qty from indent where ind_no = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, indNo);
rs1 = pstmt1.executeQuery();
......@@ -1329,11 +1202,6 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
cnt = 0;
quantity = rs1.getDouble("quantity__stduom") ;
ordqty = rs1.getDouble("ord_qty") ;
/**Modified by Pavan Rane 24dec19 start[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
reqDate = rs1.getTimestamp("req_date") ;
itemCode = rs1.getString("item_code") ;
sitecode = rs1.getString("site_code");
/**Modified by Pavan Rane 24dec19 end[fetching extra columns to update with demand/supply in summary table(RunMRP process) related changes]*/
cnt++;
}
rs1.close();rs1 = null;
......@@ -1372,27 +1240,7 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
pstmt1.close();
pstmt1 = null;
}
/**Added by Pavan Rane 24dec19 start[to update with demand/supply in summary table(RunMRP process) related changes]*/
demandSupplyMap.put("site_code", sitecode);
demandSupplyMap.put("item_code", itemCode);
demandSupplyMap.put("ref_ser", "IND");
demandSupplyMap.put("ref_id", checkNullTrim(indNo));
demandSupplyMap.put("ref_line", "NA");
demandSupplyMap.put("due_date", reqDate);
demandSupplyMap.put("demand_qty", 0.0);
demandSupplyMap.put("supply_qty", totOrdQty *(-1));
demandSupplyMap.put("change_type", "C");
demandSupplyMap.put("chg_process", "T");
demandSupplyMap.put("chg_user", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode"));
demandSupplyMap.put("chg_term", genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId"));
errString = invDemSupTrcBean.updateDemandSupply(demandSupplyMap, conn);
demandSupplyMap.clear();
if(errString != null && errString.trim().length() > 0)
{
System.out.println("errString["+errString+"]");
return errString;
}
/**Added by Pavan Rane 24dec19 end[to update with demand/supply in summary table(RunMRP process) related changes]*/
}
......
......@@ -1221,11 +1221,7 @@ public class PorderOpenPrc extends ProcessEJB implements PorderOpenPrcLocal,Pord
// String tranIdPe;
String forcedFlag="";
/**Modified by Pavan Rane 24dec19 start[to update demand/supply in summary table(RunMRP process) related changes]
[changed method signature to pass xtraParams to update login user and login terminal]*/
//errString = Conf.ConfirmPordAmd(tranIdPe, conn);//(tranIdPe, xtraParams, forcedFlag);
errString = Conf.ConfirmPordAmd(tranIdPe, xtraParams, conn);
/**Modified by Pavan Rane 24dec19 end[changed the mtheod signature in POrderAmdConf component]*/
errString = Conf.ConfirmPordAmd(tranIdPe, conn);//(tranIdPe, xtraParams, forcedFlag);
System.out.println("errString@conf@"+errString);
if(errString==null||errString.trim().length()==0 || errString.indexOf("Success")>-1 || errString.equalsIgnoreCase("PRCUSUCCES")||errString.equals("PRCUSUCCES")||errString.equals("PRCUSUCCES"))
{
......
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