Commit ca3bced5 authored by prane's avatar prane

Not to update demand/supply in inv_dem_supp for those location having invstat type is 'S'

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@217577 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1e9899f9
...@@ -802,15 +802,32 @@ public class StockUpdate ...@@ -802,15 +802,32 @@ public class StockUpdate
pstmt.setString(40,this.refSerFor); pstmt.setString(40,this.refSerFor);
pstmt.setString(41,this.refIdFor); pstmt.setString(41,this.refIdFor);
int updCnt = update = pstmt.executeUpdate(); update = pstmt.executeUpdate();
System.out.println("No recore Insert invtrace ::- ["+update+"]"); System.out.println("No recore Insert invtrace ::- ["+update+"]");
pstmt.close(); pstmt.close();
/**Added by Pavan Rane 24dec19 start[to update demand/supply in summary table(RunMRP process) related changes]*/ /**Added by Pavan Rane 24dec19 start[to update demand/supply in summary table(RunMRP process) related changes]*/
if(updCnt > 0 ) if(update > 0 )
{ {
InvDemSuppTraceBean invDemSupTrcBean = new InvDemSuppTraceBean(); InvDemSuppTraceBean invDemSupTrcBean = new InvDemSuppTraceBean();
HashMap demandSupplyMap = null; HashMap demandSupplyMap = null;
if( !("D-ISS".equalsIgnoreCase(this.tranSer.trim()) || "S-DSP".equalsIgnoreCase(this.tranSer.trim())) ) if( !("D-ISS".equalsIgnoreCase(this.tranSer.trim()) || "S-DSP".equalsIgnoreCase(this.tranSer.trim())) )
{
int invStCnt = 0;
sql = "select count(*) from location, invstat "
+ " where location.inv_stat = invstat.inv_stat "
+ " and location.loc_code = ? "
+ " and invstat.stat_type <> 'S'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, this.locationCode);
rs = pstmt.executeQuery();
if(rs.next())
{
invStCnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
if( invStCnt > 0 )
{ {
demandSupplyMap = new HashMap(); demandSupplyMap = new HashMap();
demandSupplyMap.put("site_code", this.siteCode); demandSupplyMap.put("site_code", this.siteCode);
...@@ -833,6 +850,7 @@ public class StockUpdate ...@@ -833,6 +850,7 @@ public class StockUpdate
} }
} }
} }
}
/**Added by Pavan Rane 24dec19 end[to update demand/supply in summary table(RunMRP process) related changes]*/ /**Added by Pavan Rane 24dec19 end[to update demand/supply in summary table(RunMRP process) related changes]*/
} }
...@@ -2842,12 +2860,30 @@ public class StockUpdate ...@@ -2842,12 +2860,30 @@ public class StockUpdate
System.out.println("CHG_TERM :"); System.out.println("CHG_TERM :");
int updCnt = pstmt.executeUpdate(); int updCnt = pstmt.executeUpdate();
pstmt.close();
/**Added by Pavan Rane 24dec19 start[to update demand/supply in summary table(RunMRP process) related changes]*/ /**Added by Pavan Rane 24dec19 start[to update demand/supply in summary table(RunMRP process) related changes]*/
if( updCnt > 0 ) if( updCnt > 0 )
{ {
InvDemSuppTraceBean invDemSupTrcBean = new InvDemSuppTraceBean(); InvDemSuppTraceBean invDemSupTrcBean = new InvDemSuppTraceBean();
HashMap demandSupplyMap = null; HashMap demandSupplyMap = null;
if( !("D-ISS".equalsIgnoreCase(this.tranSer.trim()) || "S-DSP".equalsIgnoreCase(this.tranSer.trim())) ) if( !("D-ISS".equalsIgnoreCase(this.tranSer.trim()) || "S-DSP".equalsIgnoreCase(this.tranSer.trim())) )
{
int invStCnt = 0;
sql = "select count(*) from location, invstat "
+ " where location.inv_stat = invstat.inv_stat "
+ " and location.loc_code = ? "
+ " and invstat.stat_type <> 'S'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, this.locationCode);
rs = pstmt.executeQuery();
if(rs.next())
{
invStCnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
if( invStCnt > 0 )
{ {
demandSupplyMap = new HashMap(); demandSupplyMap = new HashMap();
demandSupplyMap.put("site_code", this.siteCode); demandSupplyMap.put("site_code", this.siteCode);
...@@ -2870,6 +2906,7 @@ public class StockUpdate ...@@ -2870,6 +2906,7 @@ public class StockUpdate
} }
} }
} }
}
/**Added by Pavan Rane 24dec19 end[to update demand/supply in summary table(RunMRP process) related changes]*/ /**Added by Pavan Rane 24dec19 end[to update demand/supply in summary table(RunMRP process) related changes]*/
sql = "select fin_entity from site where site_code = '"+this.siteCode+"'"; sql = "select fin_entity from site where site_code = '"+this.siteCode+"'";
......
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