Commit 1066f97b authored by pjain's avatar pjain

changed by sankara on 18/07/14 updated source of Deallocartconf,wavegenerationprc,replisssic


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95660 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 75600303
...@@ -3836,7 +3836,8 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC ...@@ -3836,7 +3836,8 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
valueXmlString.append( "<order_type><![CDATA[" ).append( orderType ).append( "]]></order_type>\r\n" ); valueXmlString.append( "<order_type><![CDATA[" ).append( orderType ).append( "]]></order_type>\r\n" );
//Changed By Pragyan 15-sep-12 To add Carton No //Changed By Pragyan 15-sep-12 To add Carton No
valueXmlString.append( "<carton_no><![CDATA[" ).append( cartonNo ).append( "]]></carton_no>\r\n" ); valueXmlString.append( "<carton_no><![CDATA[" ).append( cartonNo ).append( "]]></carton_no>\r\n" );
// Changed By Dhanraj 11-JUL-14 To add Carton No org.
valueXmlString.append( "<carton_no_org><![CDATA[" ).append( cartonNo ).append( "]]></carton_no_org>\r\n" );
//End changes by gulzar on 01/12/11 //End changes by gulzar on 01/12/11
} }
valueXmlString.append("</Detail2>\r\n"); valueXmlString.append("</Detail2>\r\n");
......
...@@ -7440,6 +7440,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -7440,6 +7440,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
PreparedStatement pstmtIssDet = null; PreparedStatement pstmtIssDet = null;
PreparedStatement pstmtUpdWave = null ; PreparedStatement pstmtUpdWave = null ;
PreparedStatement pstmtPickHdr = null; PreparedStatement pstmtPickHdr = null;
//changed by sankara on 15/07/14 update status in pick ord det.
PreparedStatement pstmtPickDet = null;
PreparedStatement pstmtInsertData = null; PreparedStatement pstmtInsertData = null;
PreparedStatement pstmtInsertData1 = null; PreparedStatement pstmtInsertData1 = null;
PreparedStatement pstmtInsertTran = null; PreparedStatement pstmtInsertTran = null;
...@@ -7505,7 +7507,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -7505,7 +7507,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header.end //Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header.end
//Changed By Pragyan 26/02/13 To add direct Pick location for Master/Parcel converting from LTL. //Changed By Pragyan 26/02/13 To add direct Pick location for Master/Parcel converting from LTL.
String directPickLoc = ""; String directPickLoc = "";
String sSQLIssHdr = "",sSQLIssDet = "",sSQlUpdWave = "",sSQLUpdPkHdr = ""; //changed by sankara on 15/07/14 for update sql
String sSQLIssHdr = "",sSQLIssDet = "",sSQlUpdWave = "",sSQLUpdPkHdr = "",sSQLUpdPkDet = "";
String shipType = "",sugPalletNo = ""; String shipType = "",sugPalletNo = "";
//Changed By Pragyan 13/03/13 for Haz Items.start //Changed By Pragyan 13/03/13 for Haz Items.start
String hazardous = "",sugCode = "",transMode = ""; String hazardous = "",sugCode = "",transMode = "";
...@@ -9956,6 +9959,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9956,6 +9959,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
sSQlUpdWave = " UPDATE WAVE_TASK_DET SET STATUS =?,WAVE_STATUS= ? WHERE REF_ID= ? "; sSQlUpdWave = " UPDATE WAVE_TASK_DET SET STATUS =?,WAVE_STATUS= ? WHERE REF_ID= ? ";
sSQLUpdPkHdr = " UPDATE PICK_ORD_HDR SET STATUS ='C' WHERE PICK_ORDER = ?"; sSQLUpdPkHdr = " UPDATE PICK_ORD_HDR SET STATUS ='C' WHERE PICK_ORDER = ?";
//changed by sankara on 15/07/14 update status in pick order det
sSQLUpdPkDet = " UPDATE PICK_ORD_DET SET STATUS = 'C' WHERE PICK_ORDER = ? ";
if(directPickLoc != null && directPickLoc.length() > 0) if(directPickLoc != null && directPickLoc.length() > 0)
{ {
...@@ -10804,6 +10809,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -10804,6 +10809,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtPickHdr.setString(1, pickRefId); pstmtPickHdr.setString(1, pickRefId);
pstmtPickHdr.executeUpdate();*/ pstmtPickHdr.executeUpdate();*/
//changed by sankara on 15/07/14 for update pick ord det status.
pstmtPickDet = conn.prepareStatement(sSQLUpdPkDet);
pstmtPickDet.setString(1, pickRefId);
pstmtPickDet.executeUpdate();
} }
//Changed By Pragyan 26/02/13 For Master/Parcel convert.end //Changed By Pragyan 26/02/13 For Master/Parcel convert.end
...@@ -13445,6 +13454,23 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -13445,6 +13454,23 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtPickHdr = null; pstmtPickHdr = null;
} }
//changed by sankara on 15/07/14 closed prepares stements start.
if(pstmtIssHdr != null)
{
pstmtIssHdr.close();
pstmtIssHdr = null;
}
if(pstmtIssDet != null)
{
pstmtIssDet.close();
pstmtIssDet = null;
}
if(pstmtPickDet != null)
{
pstmtPickDet.close();
pstmtPickDet = null;
}
//changed by sankara on 15/07/14 closed prepares stements end.
} }
...@@ -13488,6 +13514,23 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -13488,6 +13514,23 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtPickHdr = null; pstmtPickHdr = null;
pstmtPickHdr.close(); pstmtPickHdr.close();
} }
//changed by sankara on 15/07/14 closed prepares stements start.
if(pstmtIssHdr != null)
{
pstmtIssHdr.close();
pstmtIssHdr = null;
}
if(pstmtIssDet != null)
{
pstmtIssDet.close();
pstmtIssDet = null;
}
if(pstmtPickDet != null)
{
pstmtPickDet.close();
pstmtPickDet = null;
}
//changed by sankara on 15/07/14 closed prepares stements end.
} }
catch(Exception e) catch(Exception e)
{ {
......
...@@ -45804,7 +45804,157 @@ VALUES ('SRWIZQTY4 ','Invalid Quantity !', 'RMA Quantity cannot be Zero .', 'E', ...@@ -45804,7 +45804,157 @@ VALUES ('SRWIZQTY4 ','Invalid Quantity !', 'RMA Quantity cannot be Zero .', 'E',
--added by kunal on 16-jul-14 end --added by kunal on 16-jul-14 end
commit; commit;
--Changed by Dhanraj 11-07-14 base server pending
alter table
REPL_ISS_HDR
add
(
CARTON_NO_ORG VARCHAR2(20)
);
-- Changed by Dhanraj 14-07-14 three triggers create.
Create or replace TRIGGER dt_PACK_det_chk BEFORE INSERT ON PACK_DET FOR
EACH ROW
DECLARE
ll_pickcount number(3) := 0;
BEGIN
begin
select count(1) into ll_pickcount from pick_ORD_det P
WHERE (P.PICK_ORDER,p.LINE_NO) IN (SELECT PICK_ORDER,LINE_NO__PICK FROM
CARTON_MASTER WHERE CARTON_NO = :NEW.CARTON_NO)
AND (P.QUANTITY - (CASE WHEN P.DEALLOC_QTY IS NULL THEN 0 ELSE
P.DEALLOC_QTY END ) )> 0
AND (CASE WHEN P.STATUS IS NULL THEN 'N' ELSE P.STATUS END ) <> 'C';
exception when others then
ll_pickcount := 0;
end;
if ll_pickcount > 0 then
raise_application_error( -20601, 'All Lines Not Picked From the Picking Order packing not allowed!!!');
end if;
END;
/
Create or replace TRIGGER dt_wavetask_det_chk BEFORE UPDATE OF status ON
WAVE_TASK_DET referencing old as old new as new FOR EACH ROW
DECLARE
ll_pickcount number(3) := 0;
BEGIN
if :new.status = 'Y' and nvl(:old.status,'N') = 'N' and :old.ref_ser
in('C-PICK','P-PICK','M-PICK','P-PICK') then
begin
select count(1) into ll_pickcount from pick_ORD_det P
WHERE P.PICK_ORDER = :old.REF_ID
AND (P.QUANTITY - (CASE WHEN P.DEALLOC_QTY IS NULL THEN 0 ELSE
P.DEALLOC_QTY END ) )> 0
AND (CASE WHEN P.STATUS IS NULL THEN 'N' ELSE P.STATUS END ) <> 'C';
exception when others then
ll_pickcount := 0;
end;
if ll_pickcount > 0 then
raise_application_error( -20601, 'All Lines Not Picked For the Picking Order');
end if;
end if;
END;
/
create or replace
trigger REPL_ISS_HDR_CHK BEFORE INSERT ON REPL_ISS_HDR
FOR EACH ROW
DECLARE
stkQty number(14,3) := 0;
replQty number(14,3) := 0;
ll_refseries varchar2(10) := 0;
BEGIN
select trim(ref_ser) into ll_refseries from wave_task_det where ref_id = :new.repl_order;
if ll_refseries in('RS-DSO','RP-PND','S-DOC','R-DSO','R-PND','R-TASK') then
begin
SELECT QUANTITY INTO replQty FROM REPL_ORD_DET WHERE REPL_ORDER =:NEW.REPL_ORDER;
SELECT QUANTITY INTO stkQty FROM STOCK WHERE (LOC_CODE,ITEM_CODE,LOT_NO,LOT_SL,SITE_CODE)
IN (SELECT LOC_CODE ,ITEM_CODE,LOT_NO,LOT_SL,SITE_CODE FROM REPL_ORD_DET WHERE REPL_ORDER = :NEW.REPL_ORDER);
exception when others then
stkQty := 0;
replQty := 0;
end;
if stkQty <> replQty then
raise_application_error( -20601, 'Replenishment Quantity should be same as Stock available Quantity!!!');
end if;
end if;
END;
/
--Changed by Dhanraj 18-07-2014
--Created by Pragyan for cross verification.[16-07-2014]
create or replace
TRIGGER dt_wavetask_det_chk BEFORE UPDATE OF status ON
WAVE_TASK_DET referencing old as old new as new FOR EACH ROW
DECLARE
ll_pickcount number(3) := 0;
ll_replcount number(3) := 0;
BEGIN
if :new.status = 'Y' and nvl(:old.status,'N') = 'N' and :old.ref_ser
in('C-PICK','P-PICK','M-PICK','P-PICK') then
begin
select count(1) into ll_pickcount from pick_ORD_det P
WHERE P.PICK_ORDER = :old.REF_ID
AND (P.QUANTITY - (CASE WHEN P.DEALLOC_QTY IS NULL THEN 0 ELSE
P.DEALLOC_QTY END ) )> 0
AND (CASE WHEN P.STATUS IS NULL THEN 'N' ELSE P.STATUS END ) <> 'C';
exception when others then
ll_pickcount := 0;
end;
if ll_pickcount > 0 then
raise_application_error( -20601, 'All Lines Not Picked For the Picking Order');
end if;
end if;
if :new.status = 'Y' and nvl(:old.status,'N') = 'N' and :old.ref_ser in('RS-DSO','RP-PND','S-DOC','R-DSO','R-PND','R-TASK','RD-DSA','RN-DSA','RR-DSA','RP-ACT','R-CPA') then
begin
SELECT COUNT(*) into ll_replcount FROM REPL_ISS_HDR R,REPL_ISS_DET D WHERE R.REPL_ORDER=:old.REF_ID
AND R.REPL_ORDER = D.REPL_ORDER AND R.TRAN_ID = D.TRAN_ID AND R.CONFIRMED = 'N';
exception when others then
ll_replcount := 0;
end;
if ll_replcount > 0 then
raise_application_error( -20601, 'Replenishment issue is not confirmed so task can not be verified !!!');
end if;
end if;
END;
/
--Created by Dhanraj thakare for cross verification.[16-07-2014]
create or replace
TRIGGER DT_REPL_ISS_HDR_CHK BEFORE UPDATE OF CONFIRMED ON
REPL_ISS_HDR referencing old as old new as new FOR EACH ROW
DECLARE
ll_replcount number(3) := 0;
BEGIN
if :new.CONFIRMED = 'N' and nvl(:old.CONFIRMED,'Y') = 'Y' then
begin
SELECT COUNT(*) into ll_replcount FROM WAVE_TASK_DET WHERE REF_ID=:old.REPL_ORDER
AND STATUS='Y' ;
exception when others then
ll_replcount := 0;
end;
if ll_replcount > 0 then
raise_application_error( -20601, 'Wave Task Confirmed, so replenishment order can not be cancel !!!');
end if;
end if;
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