Commit 0e666566 authored by ppatro's avatar ppatro

Issue tracker No 110 & 136


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92585 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 48793893
......@@ -20437,7 +20437,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmt2 = conn.prepareStatement(sql1);
pstmt2.setString(1, refId);
rs2 = pstmt2.executeQuery();
if( rs2.next())
//Changed by sumit on 28/01/13 On multiple location status check start
/*if( rs2.next())
{
tempOrder = checkNull(rs2.getString("REPL_ORDER"));
}
......@@ -20490,13 +20491,85 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
else
{
update = pstmt2.executeUpdate();
}*/
Set isReplConfirmed = new HashSet();
while( rs2.next())
{
tempOrder = checkNull(rs2.getString("REPL_ORDER"));
System.out.println(" tempOrder ---**->["+tempOrder+"]");
if(tempOrder.trim().length() > 0)
{
String conf = "";
sql = " SELECT STATUS FROM WAVE_TASK_DET WHERE REF_ID = ?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, tempOrder);
rs1 = pstmt1.executeQuery();
if( rs1.next())
{
conf = checkNull(rs1.getString("STATUS"));
System.out.println(" conf -> ["+conf+"]");
if( "Y".equalsIgnoreCase(conf))
{
//update = pstmt3.executeUpdate();
isReplConfirmed.add("true");
}
else
{
isReplConfirmed.add("false");
}
}
if( pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
if( rs1 != null)
{
rs1.close();
rs1 = null;
}
}
else
{
//update = pstmt3.executeUpdate();
isReplConfirmed.add("true");
}
}
System.out.println(" isReplConfirmed "+isReplConfirmed);
if( !isReplConfirmed.contains("false"))
{
sql1 = "UPDATE WAVE_TASK_DET SET WAVE_STATUS = 'C' WHERE REF_ID = ? AND WAVE_ID = ? AND SALE_ORDER = ?";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, refId);
pstmt1.setString(2, waveId);
pstmt1.setString(3, saleOrder);
if( pstmt1.executeUpdate() > 0 )
{
System.out.println(refId +" is updated successfully ");
}
pstmt1.close(); pstmt1 = null;
}
if(rs2 != null)
{
rs2.close();
rs2 = null;
}
if(pstmt2 != null)
{
pstmt2.close();
pstmt2 = null;
}
if(pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
//Changed by sumit on 28/01/13 On multiple location status check end.
}
else if("R-CAPK".equalsIgnoreCase(refSer) )
{
......
......@@ -29378,7 +29378,32 @@ INSERT INTO MESSAGES (
'BASE ',
NULL,
NULL);
//sumit 28-01-13
create or replace
function fn_wave_status(SI_WAVE_ID IN CHAR)
return CHAR IS STATUS CHAR;
CNT NUMBER;
CNT1 NUMBER;
BEGIN
BEGIN
SELECT count(*) INTO CNT FROM WAVE_TASK_DET WHERE WAVE_ID = SI_WAVE_ID;
SELECT count(*) INTO CNT1 FROM WAVE_TASK_DET WHERE WAVE_ID = SI_WAVE_ID AND WAVE_STATUS = 'V';
IF (CNT = cnt1 ) THEN
STATUS := 'Y';
ELSE
STATUS := 'N';
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
STATUS :='N';
END;
RETURN STATUS;
END;
COMMIT;
......
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