Commit 4e7b9f4c authored by pjain's avatar pjain

changed by dhanraj on 27/08/14 for repl cursor issue


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96092 ce508802-f39f-4f6c-b175-0d175dae99d5
parent af089d20
......@@ -54,7 +54,8 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
return retString;
}
public String confirm( String tranId, String xtraParams,String forcedFlag, Connection conn, boolean connStatus ) throws RemoteException,ITMException
{
{
System.out.println("@@@@@@@@ Call confirm Method of PickIssConf @@@@@@@@");
String replOrder = "";
String confirmed = "";
String retString = "";
......@@ -187,8 +188,20 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
pickOrder = rs.getString( "PICK_ORDER" );
pickType = rs.getString( "PICK_TYPE" );
}
rs.close();rs = null;
pstmt.close();pstmt = null;
//Start Changed by Dhanraj. 23-Aug-14 Check first rs and pstm stmt close or not then close it.
/*rs.close();rs = null;
pstmt.close();pstmt = null;*/
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
//End Changed by Dhanraj. 23-Aug-14 Check first rs and pstm stmt close or not then close it.
if( confirmed.equalsIgnoreCase("Y") )
{
......@@ -229,6 +242,24 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
System.out.println("@@@@ NOT MATCHING ....LINE NUMBER ["+linoNoOrd+" ] AND NO_ART :[ "+noArtOrd +" ] ");
}
}
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open......
if(rsIss != null){
rsIss.close();
rsIss=null;
}
if(pstmtIss !=null){
pstmtIss.close();
pstmtIss=null;
}
if(rs != null){
rs.close();
rs=null;
}
if(pstmt !=null){
pstmt.close();
pstmt=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open......
System.out.println("Current Pick type -->>["+pickType+"]");
if("M".equalsIgnoreCase(pickType))
{
......@@ -578,6 +609,11 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
pstmtUpd.setString(8, lotSl);
updCnt = pstmtUpd.executeUpdate();
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtUpd !=null){
pstmtUpd.close(); pstmtUpd=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
System.out.println("manohar 18/09/12 sordalloc updated updCnt [" + updCnt + "]");
if (expLev == null || expLev.trim().length() == 0)
......@@ -642,6 +678,12 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
pstmtUpd.setString(8, lotSl);
updCnt = pstmtUpd.executeUpdate();
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtUpd !=null){
pstmtUpd.close();
pstmtUpd=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
System.out.println("Pragyan 19/12/12 sordalloc If alrady exist Location Update Inside grater updCnt2nd [" + updCnt + "]");
}
//Changed By Pragyan 17/12/12.end
......@@ -699,6 +741,12 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
pstmtUpd.setString(25, "Y");
updCnt = pstmtUpd.executeUpdate();
System.out.println("manohar 18/09/12 sordalloc inserted updCnt [" + updCnt + "]");
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtUpd != null){
pstmtUpd.close();
pstmtUpd=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
}
}
else
......@@ -748,6 +796,13 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
pstmtUpd.setString(7, lotSl);
updCnt = pstmtUpd.executeUpdate();
System.out.println("manohar 19/12/12 sordalloc If alrady exist Location Update updCnt1st [" + updCnt + "]");
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtUpd !=null)
{
pstmtUpd.close();
pstmtUpd=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
//changed by sankara on 17/10/13 update wave_flag
//updateSql = "UPDATE SORDALLOC SET QTY_ALLOC = QTY_ALLOC + ? ,QUANTITY__STDUOM = QUANTITY__STDUOM + ?"
updateSql = "UPDATE SORDALLOC SET QTY_ALLOC = QTY_ALLOC + ? ,QUANTITY__STDUOM = QUANTITY__STDUOM + ?, WAVE_FLAG = 'Y' "
......@@ -776,6 +831,13 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
updCnt = pstmtUpd.executeUpdate();
System.out.println("Pragyan 19/12/12 sordalloc If alrady exist Location Update updCnt2nd [" + updCnt + "]");
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtUpd != null)
{
pstmtUpd.close();
pstmtUpd=null;
}
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
}
else
{
......@@ -805,6 +867,13 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
pstmtUpd.setString(7, lotSl);
updCnt = pstmtUpd.executeUpdate();
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtUpd !=null)
{
pstmtUpd.close();
pstmtUpd=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
}
//Changed By Pragyan19/12/12.end
......@@ -838,6 +907,17 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
System.out.println("manohar 18/09/12 sordalloc Update updCnt [" + updCnt + "]");
}
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(rsSord != null)
{
rsSord.close();
rsSord=null;
}if(pstmtSord != null)
{
pstmtSord.close();
pstmtSord=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
/* strAllocate = null;
// end 16/10/11 manoharan allocation stock for new location
// 16/10/11 manoharan update sordalloc
......@@ -883,6 +963,13 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
isUpdatehdr = updatePickOrderHeader(replOrder,conn);
}
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtUpdPickOrdDet != null)
{
pstmtUpdPickOrdDet.close();
pstmtUpdPickOrdDet=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
updatePickOrdSql = "UPDATE PICK_ISS_DET SET LOC_CODE = ? "
+ " WHERE TRAN_ID = ? AND LINE_NO = ? ";
......@@ -905,11 +992,30 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
{
isUpdatehdr = updatePickOrderHeader(replOrder,conn);
}
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtUpdPickOrdDet != null)
{
pstmtUpdPickOrdDet.close();
pstmtUpdPickOrdDet=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
}
rs.close();
//Start Changed by Dhanraj.23-Aug-14 add first check rs and pstm null or not then close.
/*rs.close();
rs = null;
pstmt.close();
pstmt = null;
pstmt = null;//While close.*/
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;//While close.
}
//End Changed by Dhanraj.23-Aug-14 add first check rs and pstm null or not then close.
//Changed by Rohan on 21-06-13 for closing prepared statement.start
if(pstmtStock != null)
{
......@@ -1057,6 +1163,13 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
System.out.println(" SORDER UPDATE COUNT ["+updateSorder+"]");
}
pstmtSord.clearParameters();
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtSord != null)
{
pstmtSord.close();
pstmtSord = null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
//Changed By Pragyan WM3DSUN015 To update status in Sorder as InProcess after after start scaning .end
......@@ -1282,6 +1395,13 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
break;
}
}
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtPickOrdHdr != null)
{
pstmtPickOrdHdr.close();
pstmtPickOrdHdr=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(isUpdateHdr)
{
......@@ -1295,6 +1415,13 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
updCntPickOrdHdr = pstmtUpdPickOrdHdr.executeUpdate();
//Start Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(pstmtUpdPickOrdHdr !=null)
{
pstmtUpdPickOrdHdr.close();
pstmtUpdPickOrdHdr=null;
}
//End Changed by Dhanraj.23-Aug-14 Close pstm and rs stmt For Maxinum cursor open.
if(updCntPickOrdHdr > 0)
{
......
......@@ -169,6 +169,8 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
//Changed By Rohan on 29-12-10 to define variables.end
String noArt = "";//Changed by sumit on 25/02/13
DistCommon distCommon = new DistCommon();
//Changed By Pragyan 11-AUG-14 To check and Facility Master implementation.start
ibase.webitm.utility.wms.CommonWmsUtil commonWmsUtility =ibase.webitm.utility.wms.CommonWmsUtil.getInstance();
List<String> lpnNoList;
......@@ -200,8 +202,7 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
double stockalloocqty = 0.0;
double sordallocqty = 0.0;
double activeReplQty = 0.0;
//Changed By Pragyan 11-AUG-14 To check and Facility Master implementation.start
ibase.webitm.utility.wms.CommonWmsUtil commonWmsUtility =ibase.webitm.utility.wms.CommonWmsUtil.getInstance();
try
{
......@@ -3512,8 +3513,8 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
System.out.println("objNameChk["+objNameChk+"]");
System.out.println("replOrderChkInv["+replOrderChkInv+"]");
if("repl_iss".equalsIgnoreCase(objNameChk))
{
{
System.out.println("String call repl_iss1");
//changed by sankara on 18/11/13 for rep order set itm default
//sql =" SELECT REPL_ORDER,LOC_CODE FROM (SELECT DISTINCT R.REPL_ORDER ,L.LOC_CODE" +
sql =" SELECT REPL_ORDER,LOC_CODE,ASSIGN_TO FROM (SELECT DISTINCT R.REPL_ORDER ,L.LOC_CODE,H.ASSIGN_TO" +
......@@ -3527,11 +3528,17 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
//Changed by sankara on 28/11/13 for rep order set itm default start.
/* " AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND L.INV_STAT = ? AND H.ASSIGN_TO = ? " +
" AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1) ORDER BY REPL_ORDER, LOC_CODE "; */
" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND L.INV_STAT = ? AND (H.ASSIGN_TO = ? OR H.ASSIGN_TO IS NULL) " +
" AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1) ORDER BY ASSIGN_TO,REPL_ORDER,LOC_CODE ";
//Start Changed by Dhanraj 11-Aug-14 this condition call by java function's.
//" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' " +
" AND R.LOC_CODE = L.LOC_CODE AND L.INV_STAT = ? AND (H.ASSIGN_TO = ? OR H.ASSIGN_TO IS NULL) " +
//" AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1
" ) "+
//End Changed by Dhanraj 11-Aug-14 this condition call by java function's.
"ORDER BY ASSIGN_TO,REPL_ORDER,LOC_CODE ";
}
else if("active_repl_iss".equalsIgnoreCase(objNameChk))
{
System.out.println("String call Active_repl_iss1");
//changed by sankara on 18/11/13 for rep order set itm default
//sql = " SELECT REPL_ORDER,LOC_CODE FROM (SELECT DISTINCT R.REPL_ORDER ,L.LOC_CODE FROM REPL_ORD_DET R,REPL_ORD_HDR H," +
sql = " SELECT REPL_ORDER,LOC_CODE,ASSIGN_TO FROM (SELECT DISTINCT R.REPL_ORDER ,L.LOC_CODE,H.ASSIGN_TO FROM REPL_ORD_DET R,REPL_ORD_HDR H," +
......@@ -3544,8 +3551,13 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
//changed by sankara on 28/11/13 for rep order set itm default start.
/*" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND L.INV_STAT = ? AND H.ASSIGN_TO = ? " +
" AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1) ORDER BY REPL_ORDER, LOC_CODE "; */
" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND L.INV_STAT = ? AND (H.ASSIGN_TO = ? OR H.ASSIGN_TO IS NULL) " +
" AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1) ORDER BY ASSIGN_TO,REPL_ORDER,LOC_CODE ";
//Start Changed by Dhanraj 11-Aug-14 this condition call by java function's.
//" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' " +
" AND R.LOC_CODE = L.LOC_CODE AND L.INV_STAT = ? AND (H.ASSIGN_TO = ? OR H.ASSIGN_TO IS NULL) " +
//" AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1
" ) "+
//End Changed by Dhanraj 11-Aug-14 this condition call by java function's.
" ORDER BY ASSIGN_TO,REPL_ORDER,LOC_CODE ";
}
System.out.println("CURRENT SQL["+sql+"]");
......@@ -3555,16 +3567,43 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
//pstmt.setString( 2, loginCode );
pstmt.setString( 1, replOrderChkInv );
pstmt.setString( 2, loginCode );
pstmt.setString( 3, loginCode );
//Start Changed by Dhanraj 11-Aug-14
//pstmt.setString( 3, loginCode );
//EndChanged by Dhanraj 11-Aug-14
//Changed by sankara on 18/11/13 for rep order set itm default end.
rs = pstmt.executeQuery();
if( rs.next() )
//Strat Changed by Dhanraj 11-AUG-14 hide if block and work with loop stmt.
/*if( rs.next() )
{
replOrderChk = rs.getString("REPL_ORDER");
//changed by sankara on 18/11/13 for rep order set itm default
assignTo = checkNull(rs.getString("ASSIGN_TO"));
System.out.println("assignTo--->:"+assignTo);
}*/
while(rs.next())
{
replOrderChk = rs.getString("REPL_ORDER");
//changed by sankara on 18/11/13 for rep order set itm default
//Strat Changed by Dhanraj 11-AUG-14 for remove function from where condition.
if(!isCheckReolOrderUser(replOrderChk,loginCode,conn)){//false
replOrderChk=null;
continue;
}
if(isValidRepl(replOrderChk,conn)){//false
replOrderChk=null;
continue;
}
//replOrderChk = rs.getString("REPL_ORDER");
assignTo = checkNull(rs.getString("ASSIGN_TO"));//old if code
System.out.println("assignTo--->:"+assignTo);//old if code
break;
//End Changed by Dhanraj 11-AUG-14 for remove function from where condition.
}
//End Changed by Dhanraj 11-AUG-14 hide if block and work with loop stmt.
if(rs != null )
{
rs.close();
......@@ -3611,6 +3650,7 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
System.out.println("objNameChk:"+objNameChk);
if("repl_iss".equalsIgnoreCase(objNameChk))
{
System.out.println("String call repl_iss2");
sql = " SELECT REPL_ORDER,LOC_CODE,INV_STAT,ASSIGN_TO FROM (SELECT DISTINCT R.REPL_ORDER ,L.LOC_CODE,L.INV_STAT,H.ASSIGN_TO" +
" FROM REPL_ORD_DET R,REPL_ORD_HDR H,WAVE_TASK_DET W,LOCATION L,WAVE_TASK WH" +
" WHERE W.WAVE_ID = WH.WAVE_ID AND R.REPL_ORDER = H.REPL_ORDER AND" +
......@@ -3619,13 +3659,18 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
//changed by sankara on 28-11-13 for set repl order itm default start.
/*" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND H.ASSIGN_TO = ? AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1) "+
" ORDER BY REPL_ORDER,ASSIGN_TO,LOC_CODE ";*/
" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND (H.ASSIGN_TO = ? OR H.ASSIGN_TO IS NULL) AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1) "+
//Start Changed by Dhanraj 11-Aug-14 this condition call by java function's.
//" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' " +
" AND R.LOC_CODE = L.LOC_CODE AND (H.ASSIGN_TO = ? OR H.ASSIGN_TO IS NULL) " +
//" AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1
" ) "+
" ORDER BY ASSIGN_TO,REPL_ORDER,LOC_CODE ";
//End Changed by Dhanraj 11-Aug-14 this condition call by java function's.
//changed by sankara on 28-11-13 for set repl order itm default end.
}
else if("active_repl_iss".equalsIgnoreCase(objNameChk))
{
System.out.println("String call Active_repl_iss2");
sql = " SELECT REPL_ORDER,LOC_CODE,INV_STAT,ASSIGN_TO FROM (SELECT DISTINCT R.REPL_ORDER,L.LOC_CODE,L.INV_STAT,H.ASSIGN_TO" +
" FROM REPL_ORD_DET R,REPL_ORD_HDR H, WAVE_TASK_DET W,LOCATION L ,WAVE_TASK WH" +
" WHERE W.WAVE_ID = WH.WAVE_ID AND R.REPL_ORDER = H.REPL_ORDER AND " +
......@@ -3634,16 +3679,24 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
//changed by sankara on 28-11-13 for set repl order itm default start.
/*" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND H.ASSIGN_TO = ? AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1) "+
" ORDER BY REPL_ORDER,ASSIGN_TO,LOC_CODE ";*/
" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND (H.ASSIGN_TO = ? OR H.ASSIGN_TO IS NULL) AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1) "+
//Start Changed by Dhanraj 11-Aug-14 this condition call by java function's.
//" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' " +
" AND R.LOC_CODE = L.LOC_CODE AND (H.ASSIGN_TO = ? OR H.ASSIGN_TO IS NULL) " +
//" AND FN_CHECK_REPL_ORD_USER(H.REPL_ORDER,?) = 1
" ) "+
//End Changed by Dhanraj 11-Aug-14 this condition call by java function's.
" ORDER BY ASSIGN_TO,REPL_ORDER,LOC_CODE ";
//changed by sankara on 28-11-13 for set repl order itm default end.
}
System.out.println("CURRENT SQL["+sql+"]");
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, loginCode );
pstmt.setString( 2, loginCode );
//Start Changed by Dhanraj 11-Aug-14
//pstmt.setString( 2, loginCode );
//End Changed by Dhanraj 11-Aug-14
rs = pstmt.executeQuery();
if( rs.next() )
//Strat Changed by Dhanraj 11-AUG-14 hide if block and work with loop stmt.
/*if( rs.next() )
{
replOrderChk = rs.getString("REPL_ORDER");
System.out.println("replOrderChk:"+replOrderChk);
......@@ -3651,7 +3704,31 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
System.out.println("invstat:"+invstat);
assignTo = checkNull( rs.getString("ASSIGN_TO"));
System.out.println("assignTo:"+assignTo);
}*/
while( rs.next() )
{
replOrderChk = rs.getString("REPL_ORDER");
//Strat Changed by Dhanraj 11-AUG-14 for remove function from where condition.
if(!isCheckReolOrderUser(replOrderChk,loginCode,conn)){//false
replOrderChk=null;
continue;
}
if(!isValidRepl(replOrderChk,conn)){//false
replOrderChk=null;
continue;
}
//replOrderChk = rs.getString("REPL_ORDER");
System.out.println("replOrderChk:"+replOrderChk);
invstat = checkNull( rs.getString("INV_STAT"));
System.out.println("invstat:"+invstat);
assignTo = checkNull( rs.getString("ASSIGN_TO"));//old if code
System.out.println("assignTo:"+assignTo);//old if code
break;
//End Changed by Dhanraj 11-AUG-14 for remove function from where condition.
}
//End Changed by Dhanraj 11-AUG-14 hide if block and work with loop stmt.
if(rs != null )
{
rs.close();
......@@ -3855,6 +3932,7 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
valueXmlString.append( "<order_type><![CDATA[" ).append( orderType ).append( "]]></order_type>\r\n" );
//Changed By Pragyan 15-sep-12 To add Carton No
valueXmlString.append( "<carton_no><![CDATA[" ).append( cartonNo ).append( "]]></carton_no>\r\n" );
System.out.println(" 07/07/14 carton_no_org IN CASE 2===>"+cartonNo);
// 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
......@@ -4661,6 +4739,109 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
}
return inputVal;
}
//Create by Dhanraj 11-Aug-14 For remove function from where condition in case 1 itemChanged.
private boolean isCheckReolOrderUser(String replOrder,String logingCode,Connection connObject) throws SQLException
{
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
sql="SELECT FN_CHECK_REPL_ORD_USER( ? , ? ) as isPresent from DUAL";
pstmt = connObject.prepareStatement( sql );
pstmt.setString( 1, replOrder );
pstmt.setString( 2, logingCode );
rs = pstmt.executeQuery();
if( rs.next() )
{
if(rs.getInt("isPresent")==1)
{
return true;
}
}
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
try
{
if ( rs != null )
{
rs.close();
rs = null;
}
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
return false;
}
//Create by Dhanraj 11-Aug-14 For remove function from where condition in case 1 itemChanged.
private boolean isValidRepl(String replOrder,Connection connObject)
{
String sql = "";
String isYes="";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
sql="SELECT FN_VALID_REPL( ? ) as isPresent from DUAL";
pstmt = connObject.prepareStatement( sql );
pstmt.setString( 1, replOrder );
rs = pstmt.executeQuery();
if( rs.next() )
{
isYes=rs.getString("isPresent");
if(isYes.equals("Y"))
{
return true;
}
}
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
try
{
if ( rs != null )
{
rs.close();
rs = null;
}
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
return false;
}
private String getSiteCode( String xtraParams, Connection connObject ) throws ITMException
{
String defaultSite = "";
......
......@@ -7047,8 +7047,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
tranCode = (String)transPorterInfoMap.get("TRAN_CODE");
transMode = (String)transPorterInfoMap.get("TRANS_MODE");
}
String mShipType = (String)transPorterInfoMap.get("SHIP_TYPE");
if("N".equalsIgnoreCase(frmDomMasterPackAllow) && "N".equalsIgnoreCase(frmDomParcelPackAllow) && ("P".equalsIgnoreCase(mShipType) || "M".equalsIgnoreCase(mShipType)) )
{
return errString = getError(saleOrder,"VTNOTPARCT",conn);
}
}
else
{
......
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