Commit afa28ed1 authored by prane's avatar prane

change to clear the data before rebuild the summary data

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@213599 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 763615c2
...@@ -209,7 +209,6 @@ public class UpdateDemSuppSummaryPrc extends ProcessEJB implements UpdateDemSupp ...@@ -209,7 +209,6 @@ public class UpdateDemSuppSummaryPrc extends ProcessEJB implements UpdateDemSupp
} }
BaseLogger.log("3", null, null,"Final standingOrdTypes :" + standingOrdTypes); BaseLogger.log("3", null, null,"Final standingOrdTypes :" + standingOrdTypes);
sqlFileName = CommonConstants.JBOSSHOME + File.separator + "sql" + File.separator + "demandSupplyOverwriteOracle.sql"; sqlFileName = CommonConstants.JBOSSHOME + File.separator + "sql" + File.separator + "demandSupplyOverwriteOracle.sql";
BaseLogger.log("9", null, null, "Reading SQL.....adpQuery >>> "+sqlFileName);//NLSQLINPUT BaseLogger.log("9", null, null, "Reading SQL.....adpQuery >>> "+sqlFileName);//NLSQLINPUT
adpQuery = checkNull(readFile(sqlFileName)); adpQuery = checkNull(readFile(sqlFileName));
...@@ -224,6 +223,51 @@ public class UpdateDemSuppSummaryPrc extends ProcessEJB implements UpdateDemSupp ...@@ -224,6 +223,51 @@ public class UpdateDemSuppSummaryPrc extends ProcessEJB implements UpdateDemSupp
adpQuery = adpQuery.replaceAll("@todate@", dbDateTo); adpQuery = adpQuery.replaceAll("@todate@", dbDateTo);
adpQuery = adpQuery.replaceAll("@ordtypes@", standingOrdTypes); adpQuery = adpQuery.replaceAll("@ordtypes@", standingOrdTypes);
BaseLogger.log("9", null, null, "Replacing Values.in SQL.....adpQuery >>> "+adpQuery+"\n\n\n\n"); BaseLogger.log("9", null, null, "Replacing Values.in SQL.....adpQuery >>> "+adpQuery+"\n\n\n\n");
//Pavan Rane 16DEC19 [to clear the data before rebuild the summary data] START
pstmt = conn.prepareStatement(adpQuery);
rs = pstmt.executeQuery();
while (rs.next())
{
itemCode = checkNull(rs.getString("item_code"));
dueDate = rs.getTimestamp("due_date");
demand = rs.getDouble("demand");
supply = rs.getDouble("supply");
tranId = checkNull(rs.getString("tran_id"));
lineNo = checkNull(rs.getString("line_no"));
tranSer = checkNull(rs.getString("tran_ser"));
siteCode = checkNull(rs.getString("site_code"));
demandSupplyMap.put("site_code", siteCode);
demandSupplyMap.put("item_code", itemCode);
demandSupplyMap.put("ref_ser", tranSer);
demandSupplyMap.put("ref_id", tranId);
demandSupplyMap.put("ref_line", lineNo);
demandSupplyMap.put("due_date", dueDate);
demandSupplyMap.put("demand_qty", demand);
demandSupplyMap.put("supply_qty", supply);
demandSupplyMap.put("change_type", "D");
demandSupplyMap.put("chg_process", "P");
demandSupplyMap.put("chg_user", chgUser);
demandSupplyMap.put("chg_term", chgTerm);
//Common component called to overwrite Demand/Supply
errString = invDemSuppTraceBean.updateDemandSupply(demandSupplyMap, conn);
demandSupplyMap.clear();
if(errString != null && errString.trim().length() > 0)
{
BaseLogger.log("2", null, null, "Pavan Afer delete errString::>>"+errString+"<<");
rs.close();
rs = null;
pstmt.close();
pstmt = null;
return errString;
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//Pavan Rane 16DEC19 [to clear the data before rebuild the summary data] END
pstmt = conn.prepareStatement(adpQuery); pstmt = conn.prepareStatement(adpQuery);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while (rs.next()) while (rs.next())
......
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