Commit ab84c13c authored by steurwadkar's avatar steurwadkar

Changes made to check whether to update despacth in DeallocArtPrc or ConsolidatToDoc component


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@43537 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 636bd598
...@@ -4200,6 +4200,11 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -4200,6 +4200,11 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
ResultSet rSet = null ; ResultSet rSet = null ;
//Added by Manish on 29/09/15 for ms sql server. //Added by Manish on 29/09/15 for ms sql server.
String DB = CommonConstants.DB_NAME; String DB = CommonConstants.DB_NAME;
//Added by Santosh on 12/04/2017 to check whether to update despacth in this component or ConsolidatToDoc [Start]
ConsolidatToDoc consolidatToDoc = new ConsolidatToDoc();
HashMap dataMap = null;
boolean isTasksConfirmed = false;
//Added by Santosh on 12/04/2017 to check whether to update despacth in this component or ConsolidatToDoc [End]
try try
{ {
...@@ -4244,24 +4249,33 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -4244,24 +4249,33 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
sql = " UPDATE DESPATCH SET TARE_WEIGHT = TARE_WEIGHT - ? ,FILLER_WEIGHT= FILLER_WEIGHT - ? WHERE PTCN= ?"; //Added by Santosh on 12/04/2017 to check whether to update despacth in this component or ConsolidatToDoc[Start]
pstmt = conn.prepareStatement(sql); dataMap = consolidatToDoc.getAllTaskID(ptcn,conn);
pstmt.setDouble(1, tareWt); System.out.println("dataMap====> in DeallocArtConf["+dataMap+"]");
pstmt.setDouble(2, fillerWt); isTasksConfirmed = consolidatToDoc.isAllTaskConfirmed(dataMap,conn);
pstmt.setString(3, ptcn); System.out.println("Check all task completed for PTCN["+isTasksConfirmed+"]");
int updateCnt=pstmt.executeUpdate(); //Added by Santosh on 12/04/2017 to check whether to update despacth in this component or ConsolidatToDoc[End]
if(updateCnt > 0){ //Added by Santosh on 12/04/2017 to check whether to update despacth in this component or ConsolidatToDoc[Start]
System.out.println("<============Updation done==========>"); if( !isTasksConfirmed)
}
if( pstmt != null )
{ {
pstmt.close(); sql = " UPDATE DESPATCH SET TARE_WEIGHT = TARE_WEIGHT - ? ,FILLER_WEIGHT= FILLER_WEIGHT - ? WHERE PTCN= ?";
pstmt = null; pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, tareWt);
pstmt.setDouble(2, fillerWt);
pstmt.setString(3, ptcn);
int updateCnt=pstmt.executeUpdate();
if(updateCnt > 0){
System.out.println("<============Updation done==========>");
}
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
} }
} }
catch(Exception e) catch(Exception e)
{ {
......
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