Commit ef2b00df authored by ppatro's avatar ppatro

consoldation val,bifruc case pick,now to user scan val


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92552 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2e4d7aaf
......@@ -601,7 +601,7 @@ public class ConsolidatToDoc {
else
{
grossWeight = (grossWtPerArt * noArt);
totalGrossWeight = totalGrossWeight + grossWeight; //added by Kunal on 08/09/12
//totalGrossWeight = totalGrossWeight + grossWeight; //added by Kunal on 08/09/12
tareWeight = (tareWtPerArt * noArt);
netWeight = grossWeight - tareWeight ;
}
......
......@@ -202,7 +202,7 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
//Changes by gulzar on 12/28/2011
intrLocInvstat = distCommon.getDisparams( "999999", "INTR_LOCATION", conn );
//End changes by gulzar on 12/28/2011
switch ( currentFormNo ) // Switch Case for form number
{
case 1:
......@@ -235,7 +235,7 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
// end 26/10/11 manoharan all the errors should be returned so that warnings can be processed
}
pickOrder = genericUtility.getColumnValue( "pick_order", currFormDataDom );
//Changed by sumit on 22/01/13 adding validation where user going to do this task which is already processing by other user start
sql = "SELECT CONFIRMED, CHG_USER FROM PICK_ISS_HDR WHERE PICK_ORDER = ? ";
pstmt = conn.prepareStatement( sql );
......@@ -254,9 +254,9 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
rs = null;
pstmt.close();
pstmt = null;
//Changed by sumit on 22/01/13 adding validation where user going to do this task which is already processing by other user start
//Changed by sumit on 22/01/13 adding validation where user going to do this task which is already processing by other user END
// added by cpatil on 11-sept-12 start for pick_id validate
sql = "SELECT count(1) FROM PICK_ORD_HDR WHERE PICK_ORDER = ?";
pstmt = conn.prepareStatement( sql );
......@@ -765,6 +765,26 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
// end 26/10/11 manoharan all the errors should be returned so that warnings can be processed
}
pickOrder = genericUtility.getColumnValue( "pick_order", currFormDataDom );
//Changed by sumit on 22/01/13 adding validation where user going to do this task which is already processing by other user start
sql = "SELECT CONFIRMED, CHG_USER FROM PICK_ISS_HDR WHERE PICK_ORDER = ? ";
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, pickOrder );
rs = pstmt.executeQuery();
if( rs.next() )
{
System.out.println(" confirmed ["+rs.getString("CONFIRMED")+"] userid ["+rs.getString("CHG_USER")+"]");
if( "N".equalsIgnoreCase(rs.getString("CONFIRMED")) && !userId.trim().equalsIgnoreCase(rs.getString("CHG_USER").trim()))
{
errList.add( "VMPICKORDU" );
errFields.add( childNodeName.toLowerCase() );
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//Changed by sumit on 22/01/13 adding validation where user going to do this task which is already processing by other user END
sql = "SELECT COUNT(*) AS COUNT FROM PICK_ORD_HDR WHERE PICK_ORDER = ?";
pstmt = conn.prepareStatement( sql );
......
......@@ -24,6 +24,8 @@ import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Document;
......@@ -101,7 +103,8 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
String childNodeName = "";
Node childNode =null;
String userId = "",tranCodeHdr="";
ArrayList arrayList = null;//Added by sumit on 23/01/13
int cnt = 0;
int ctr2 = 0;
int lineNo = 0;
......@@ -480,7 +483,7 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
noOfChilds = childList.getLength();
for (int ctr = 0; ctr < noOfChilds; ctr++)
{
childNode = childList.item( ctr );
childNode = childList.item( ctr );
childNodeName = childNode.getNodeName();
if ( childNode != null && childNode.getFirstChild() != null )
{
......@@ -552,6 +555,20 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
}
}
// end
//Changed by sumit on 23/01/13 validating repeat ptcn start
arrayList = checkDuplicaterecord(dom2);
Set s = new HashSet(arrayList);
System.out.println("Size of arrayList ["+arrayList.size()+"]");
System.out.println("Size of Set ["+s.size()+"]");
if(s.size() < arrayList.size())
{
errList.add( "DUPPTCNNO" );
errFields.add( childNodeName.toLowerCase() );
}
s.clear();
//Changed by sumit on 23/01/13 validating repeat ptcn end
}
}
......@@ -611,7 +628,9 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
pstmt.close();
pstmt = null;
parentNodeList = dom2.getElementsByTagName("Detail2");
//Changed by sumit 22/01/13 this validation is not required ( By Ashish Sir) start.
/*parentNodeList = dom2.getElementsByTagName("Detail2");
parentNodeListLength = parentNodeList.getLength();
System.out.println("PARENT NODE LENGTH [ "+parentNodeListLength+"]");
if("S-DSP".equalsIgnoreCase(refSer.trim()))
......@@ -644,7 +663,8 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
errFields.add( childNodeName.toLowerCase() );
}
}
}
}*/
//Changed by sumit 22/01/13 this validation is not required ( By Ashish Sir) end.
}
else
......@@ -2042,5 +2062,96 @@ private String checkNull( String input )
}
//Changed by sumit on 23/01/13 getting attribute value start.
private String getAttribValue(Node detailNode, String nodeName, String attribStr)
{
String attribValue = "";
try
{
String domStr = GenericUtility.getInstance().serializeDom(detailNode);
Document dom = GenericUtility.getInstance().parseString(domStr);
if( dom != null /*&& dom.getAttributes() != null*/)
{
Node attributeNode = dom.getElementsByTagName( nodeName ).item(0);
attribValue = getAttribValue(attributeNode, attribStr);
}
}
catch(Exception e)
{
System.out.println("Exception : getAttribValue :" + e.getMessage());
}
return attribValue;
}
private String getAttribValue(Node detailNode, String attribStr)
{
String attribValue = "";
try
{
if( detailNode != null && detailNode.getAttributes() != null)
{
Node attribNode = detailNode.getAttributes().getNamedItem( attribStr );
if( attribNode != null )
{
attribValue = checkNull( attribNode.getNodeValue() );
}
}
}
catch(Exception e)
{
System.out.println("Exception : getAttribValue :" + e.getMessage());
}
return attribValue;
}
//Changed by sumit on 23/01/13 getting attribute value end.
//Changed by sumit on 23/01/13 checking duplicate PTCN start.
private ArrayList checkDuplicaterecord(Document dom) throws ITMException
{
ArrayList arryList = new ArrayList();
NodeList parentNodeList = null, childNodeList = null;
Node parentNode = null, childNode = null;
int parentNodeListLength = 0;
String childNodeName = "";
try {
parentNodeList = dom.getElementsByTagName("Detail2");
parentNodeListLength = parentNodeList.getLength();
for (int row = 0; row < parentNodeList.getLength(); row++)
{
parentNode = parentNodeList.item(row);
String updateFlag = getAttribValue(parentNode,"attribute", "updateFlag"); //(parentNode, "attribute", "status"));
System.out.println(" sumit updateFlag ["+updateFlag+"]");
childNodeList = parentNode.getChildNodes();
//System.out.println("************* first For loop *************["+ parentNode.getNodeName() + "]");
for (int col = 0; col < childNodeList.getLength(); col++) {
childNode = childNodeList.item(col);
if (childNode.getNodeType() == childNode.ELEMENT_NODE) {
childNodeName = childNode.getNodeName();
//System.out.println("childNodeNamechildNodeName ** ["+childNodeName+"]");
if( !"D".equalsIgnoreCase(updateFlag))
{
if ("ptcn".equalsIgnoreCase(childNodeName))
{
arryList.add(childNode.getFirstChild().getNodeValue().trim());
//arrayList.add(i,childNode.getFirstChild().getNodeValue());
//map = sprsCode != null ? sprsCode : "";
System.out.println("=====ptcn-->[" + arryList+ "]");
}
}
}
}
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
return arryList;
}
//Changed by sumit on 23/01/13 checking duplicate PTCN end.
}
\ No newline at end of file
/**
* PURPOSE : Pre Save Logic implementation for SHIPMENT component.
* AUTHOR : Sumit Sarkar
*/
package ibase.webitm.ejb.wms;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.utility.GenericUtility;
import java.rmi.RemoteException;
import java.sql.*;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.w3c.dom.*;
import javax.ejb.*;
@javax.ejb.Stateless
public class ShipmentPrs extends ValidatorEJB implements ShipmentPrsLocal, ShipmentPrsRemote
{
public String preSave() throws RemoteException,ITMException
{
return "";
}
public String preSave(String xmlString, String editFlag, String xtraParams, Connection conn)throws RemoteException,ITMException
{
String errString = "";
System.out.println("ShipmentPrs EJB called");
Document dom = null;
try
{
System.out.println("xmlString in ShipmentPrs : preSaveRec \n"+xmlString);
if (xmlString != null && xmlString.trim().length() > 0)
{
dom = GenericUtility.getInstance().parseString(xmlString);
errString = executepreSave( dom, editFlag, xtraParams, conn );
}
}
catch(Exception e)
{
System.out.println("Exception :ShipmentPrs :" + e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e);
}
return errString;
}
private String executepreSave( Document dom, String editFlag, String xtraParams, Connection conn ) throws RemoteException, ITMException
{
System.out.println("executepreSave method called");
String sql = "";
String tranId = "";
String transMode = "";
Set ptcn = null;
int deleteCount = 0;
boolean isSameWave = false;
ResultSet rs = null;
PreparedStatement pstmt = null;
String errString = "";
HashMap ptcnAndConsingnee = new HashMap();
HashMap newPtcnAndNewConsingnee = new HashMap();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
try
{
conn.setAutoCommit(false);
GenericUtility genericUtility = GenericUtility.getInstance();
ptcn = new HashSet();
NodeList parentNodeList = null;
NodeList childList = null;
int parentNodeListLength ;
int detLine = 0;
Node parentNode = null;
String updateFlag = "";
parentNodeList = dom.getElementsByTagName("Detail2");
parentNodeListLength = parentNodeList.getLength();
for(int row = 0; row < parentNodeListLength; row++)
{
parentNode = parentNodeList.item(row);
updateFlag = getAttribValue(parentNode,"attribute", "updateFlag"); //(parentNode, "attribute", "status"));
//System.out.println(" update flag ["+updateFlag+"]");
if(!"D".equalsIgnoreCase(updateFlag))
{
ptcn.add(GenericUtility.getInstance().getColumnValueFromNode("ptcn", dom.getElementsByTagName("Detail2").item(row)));
}
}
System.out.println(" ptcn ["+ptcn+"]");
if( !isConsingneeSameOfEnteredPTCN( ptcn, conn )) // is ship consignee are same for entered ptcn
{
System.out.println(" isConsingneeSameOfAllPTCN ");
errString = itmDBAccessEJB.getErrorString("","INVSHIPCON","","",conn);
return errString;
}
isSameWave = isSameWaveId(ptcn, conn);
System.out.println(" isSameWave ["+isSameWave+"]");
if( isSameWave )
{
if( !isAllPtcnTaken(ptcn, conn))
{
System.out.println(" isAllPtcnTaken ");
System.out.println(" else sumit ");
ptcnAndConsingnee = getConsigneAgainstPTCN(ptcn, conn);
newPtcnAndNewConsingnee = getConsigneAgainstNewPTCN(ptcn, conn);
System.out.println(" ptcnAndConsingnee "+ptcnAndConsingnee);
System.out.println(" newPtcnAndNewConsingnee "+newPtcnAndNewConsingnee);
Iterator iterator = ptcnAndConsingnee.keySet().iterator();
while(iterator.hasNext())
{
/*HashMap tempHash = new HashMap();
tempHash = (HashMap) iterator.next();*/
String key = (String)iterator.next();
String val = (String)ptcnAndConsingnee.get(key);
System.out.println("key ["+key+"] and value ["+val+"]");
if( newPtcnAndNewConsingnee.containsValue(val))
{
errString = itmDBAccessEJB.getErrorString("","ALLPTCNNTA","","",conn);
return errString;
}
}
//}
}
}
else
{
ptcnAndConsingnee.clear();
newPtcnAndNewConsingnee.clear();
ptcnAndConsingnee = getConsigneAgainstPTCN(ptcn, conn);
newPtcnAndNewConsingnee = getConsigneAgainstNewPTCN(ptcn, conn);
System.out.println(" * ptcnAndConsingnee "+ptcnAndConsingnee);
System.out.println(" * newPtcnAndNewConsingnee "+newPtcnAndNewConsingnee);
Iterator iterator = ptcnAndConsingnee.keySet().iterator();
while(iterator.hasNext())
{
/*HashMap tempHash = new HashMap();
tempHash = (HashMap) iterator.next();*/
String key = (String)iterator.next();
String val = (String)ptcnAndConsingnee.get(key);
System.out.println("key ["+key+"] and value ["+val+"]");
if( newPtcnAndNewConsingnee.containsValue(val))
{
errString = itmDBAccessEJB.getErrorString("","ALLPTCNNTA","","",conn);
return errString;
}
}
}
//errString = getErrorString("PTCN","ALLPTCNNTA","");
System.out.println(" errString -->["+errString+"]");
}
catch (SQLException sqe)
{
System.out.println("The SQLException occurs in ShipmentPrs :"+sqe);
sqe.printStackTrace();
throw new ITMException(sqe);
}
catch(Exception e)
{
System.out.println("The Exception occurs in ShipmentPrs :"+e);
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e)
{
System.err.println("Exception :ShipmentPrs :\n"+e.getMessage());
e.printStackTrace();
throw new ITMException(e);
}
}
return errString;
}
private String checkNull( String input )
{
if ( input == null )
{
input = "";
}
return input;
}
private boolean isSameWaveId (Set ptcn, Connection conn) throws ITMException
{
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
Set setWaveId = null;
boolean isSame = false;
int count = 0;
StringBuffer buffer = new StringBuffer();
String inputString = "";
try
{
Iterator iterator = ptcn.iterator();
while ( iterator.hasNext())
{
buffer.append(iterator.next()).append("','");
}
inputString = buffer.toString();
inputString = inputString.substring(0, inputString.length() - 3 );
System.out.println(" input - string "+inputString);
/*sql = " SELECT DISTINCT WT.WAVE_ID FROM WAVE_TASK_DET WTD, WAVE_TASK WT " +
" WHERE WT.WAVE_ID IN (SELECT DISTINCT WAVE_ID FROM WAVE_TASK_DET WHERE PTCN IN (?) ) " +
" AND WTD.WAVE_ID = WT.WAVE_ID ";*/
sql = " SELECT DISTINCT WAVE_ID FROM WAVE_TASK_DET WHERE PTCN IN ('"+inputString+"') ";
pstmt = conn.prepareStatement(sql);
//pstmt.setString(1, inputString);
rs = pstmt.executeQuery();
while( rs.next() )
{
count++;
}
System.out.println(" count : ["+count+"]");
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if( count == 1 )
{
isSame = true ;
}
else
{
isSame = false;
}
//System.out.println(" isSame ["+isSame+"]");
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if( rs != null)
{
rs.close(); rs = null;
}
if( pstmt != null)
{
pstmt.close(); pstmt = null;
}
}
catch( Exception es)
{
es.printStackTrace();
throw new ITMException(es);
}
}
return isSame;
}
private boolean isAllPtcnTaken(Set ptcn, Connection conn) throws ITMException
{
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
Set setWaveId = null;
boolean isPTCNTaken = false;
int count = 0;
StringBuffer buffer = new StringBuffer();
String inputString = "";
try
{
Iterator iterator = ptcn.iterator();
while ( iterator.hasNext())
{
buffer.append(iterator.next()).append("','");
}
inputString = buffer.toString();
inputString = inputString.substring(0, inputString.length() - 3 );
System.out.println(" input string "+inputString);
sql = " SELECT WTD.PTCN FROM WAVE_TASK_DET WTD, WAVE_TASK WT WHERE WT.WAVE_ID IN " +
" (SELECT DISTINCT WAVE_ID FROM WAVE_TASK_DET WHERE PTCN IN ('"+inputString+"') ) " +
" AND WTD.WAVE_ID = WT.WAVE_ID GROUP BY WTD.PTCN ";
pstmt = conn.prepareStatement(sql);
//pstmt.setString(1, inputString);
rs = pstmt.executeQuery();
while( rs.next() )
{
count++;
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if( count == ptcn.size() )
{
isPTCNTaken = true ;
}
else
{
isPTCNTaken = false;
}
System.out.println(" isAllPtcnTaken: isPTCNTaken ["+isPTCNTaken+"]");
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if( rs != null)
{
rs.close(); rs = null;
}
if( pstmt != null)
{
pstmt.close(); pstmt = null;
}
}
catch( Exception es)
{
es.printStackTrace();
throw new ITMException(es);
}
}
return isPTCNTaken;
}
private boolean isConsingneeSameOfEnteredPTCN(Set ptcn, Connection conn) throws ITMException
{
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
Set setWaveId = null;
boolean isAllCngSame = false;
int count = 0;
StringBuffer buffer = new StringBuffer();
String inputString = "";
Set sipConsignee = new HashSet();
try
{
Iterator iterator = ptcn.iterator();
while ( iterator.hasNext())
{
buffer.append(iterator.next()).append("','");
}
inputString = buffer.toString();
inputString = inputString.substring(0, inputString.length() - 3 );
System.out.println(" input string "+inputString);
sql = "SELECT DISTINCT SHIP_CONS_GRP FROM CUSTOMER WHERE CUST_CODE IN " +
" ( SELECT CUST_CODE FROM DESPATCH D,WAVE_TASK_DET WTD WHERE WTD.WAVE_ID = D.WAVE_ID" +
" AND WTD.REF_ID = D.DESP_ID AND WTD.PTCN IN ('"+inputString+"') AND WTD.SALE_ORDER = D.SORD_NO )";
pstmt = conn.prepareStatement(sql);
//pstmt.setString(1, inputString);
rs = pstmt.executeQuery();
while( rs.next() )
{
count++;
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
System.out.println(" count ["+count+"]");
if( count == 1 )
{
isAllCngSame = true ;
}
else
{
isAllCngSame = false;
}
System.out.println(" isConsingneeSameOfEnteredPTCN: isAllCngSame ["+isAllCngSame+"]");
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if( rs != null)
{
rs.close(); rs = null;
}
if( pstmt != null)
{
pstmt.close(); pstmt = null;
}
}
catch( Exception es)
{
es.printStackTrace();
throw new ITMException(es);
}
}
return isAllCngSame;
}
private HashMap getConsigneAgainstNewPTCN(Set ptcn, Connection conn) throws ITMException
{
String sql = "", sql1 = "";
PreparedStatement pstmt = null, pstmt1 =null;
ResultSet rs = null, rs1 = null;
Set setWaveId = null;
boolean isAllCngSame = false;
int count = 0;
StringBuffer buffer = new StringBuffer();
String inputString = "";
HashMap sipConsignee = new HashMap();
String stPTCN = "";
try
{
Iterator iterator = ptcn.iterator();
while ( iterator.hasNext())
{
buffer.append(iterator.next()).append("','");
}
inputString = buffer.toString();
inputString = inputString.substring(0, inputString.length() - 3 );
System.out.println(" input *- string "+inputString);
///sql = "SELECT DISTINCT PTCN FROM WAVE_TASK_DET WHERE WAVE_ID IN ( SELECT WAVE_ID FROM WAVE_TASK_DET WHERE PTCN IN ? )";
//For different ptcn
/*sql = " SELECT DISTINCT WTD.PTCN FROM CUSTOMER C, DESPATCH D, WAVE_TASK_DET WTD WHERE C.CUST_CODE = D.CUST_CODE " +
" AND WTD.WAVE_ID = D.WAVE_ID AND WTD.REF_ID = D.DESP_ID AND WTD.PTCN NOT IN '"+inputString+"' " +
" AND WTD.WAVE_ID IN ( SELECT DISTINCT WAVE_ID FROM WAVE_TASK_DET WHERE PTCN IN '"+inputString+"' )";*/
sql = " SELECT DISTINCT WTD.PTCN FROM CUSTOMER C, DESPATCH D, WAVE_TASK_DET WTD WHERE C.CUST_CODE = D.CUST_CODE " +
" AND WTD.WAVE_ID = D.WAVE_ID AND WTD.REF_ID = D.DESP_ID AND WTD.PTCN NOT IN ('"+inputString+"') " +
" AND WTD.WAVE_ID IN ( SELECT DISTINCT WAVE_ID FROM WAVE_TASK_DET WHERE PTCN IN ('"+inputString+"') )";
pstmt = conn.prepareStatement(sql);
sql1 = " SELECT C.SHIP_CONS_GRP FROM CUSTOMER C, DESPATCH D, WAVE_TASK_DET WTD WHERE WTD. PTCN = ? " +
" AND D.WAVE_ID = WTD.WAVE_ID AND C.CUST_CODE = D.CUST_CODE AND WTD.REF_ID = D.DESP_ID ";
pstmt1 = conn.prepareStatement(sql1);
/*pstmt.setString(1, inputString);
pstmt.setString(2, inputString);*/
rs = pstmt.executeQuery();
while( rs.next() )
{
stPTCN = rs.getString("PTCN");
pstmt1.setString(1, stPTCN);
rs1 = pstmt1.executeQuery();
if( rs1.next())
{
// PTCN, "SHIP_CONS_GRP";
sipConsignee.put(stPTCN, rs1.getString("SHIP_CONS_GRP"));
}
pstmt1.clearParameters();
rs1.close(); rs1 = null;
count++;
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if( pstmt1 != null )
{
pstmt1.close(); pstmt1 = null;
}
System.out.println("getConsigneAgainstNewPTCN: sipConsignee "+sipConsignee);
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if( rs != null)
{
rs.close(); rs = null;
}
if( pstmt != null)
{
pstmt.close(); pstmt = null;
}
}
catch( Exception es)
{
es.printStackTrace();
throw new ITMException(es);
}
}
return sipConsignee;
}
private HashMap getConsigneAgainstPTCN(Set ptcn, Connection conn) throws ITMException
{
String sql = "", sql1 = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
//Set setWaveId = null;
//boolean isAllCngSame = false;
//int count = 0;
//StringBuffer buffer = new StringBuffer();
//String inputString = "";
HashMap sipConsignee = new HashMap();
String stPTCN = "";
try
{
sql1 = " SELECT C.SHIP_CONS_GRP FROM CUSTOMER C, DESPATCH D, WAVE_TASK_DET WTD WHERE WTD. PTCN = ? " +
" AND D.WAVE_ID = WTD.WAVE_ID AND C.CUST_CODE = D.CUST_CODE AND WTD.REF_ID = D.DESP_ID ";
pstmt = conn.prepareStatement(sql1);
Iterator iterator = ptcn.iterator();
while ( iterator.hasNext())
{
stPTCN = iterator.next().toString();
pstmt.setString(1, stPTCN);
rs = pstmt.executeQuery();
if( rs.next())
{
// PTCN, "SHIP_CONS_GRP";
sipConsignee.put(stPTCN, rs.getString("SHIP_CONS_GRP"));
}
pstmt.clearParameters();
rs.close(); rs = null;
//count++;
}
if( pstmt != null )
{
pstmt.close(); pstmt = null;
}
System.out.println(" sipConsignee "+sipConsignee);
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if( rs != null)
{
rs.close(); rs = null;
}
if( pstmt != null)
{
pstmt.close(); pstmt = null;
}
}
catch( Exception es)
{
es.printStackTrace();
throw new ITMException(es);
}
}
return sipConsignee;
}
private String getAttribValue(Node detailNode, String nodeName, String attribStr)
{
String attribValue = "";
try
{
String domStr = GenericUtility.getInstance().serializeDom(detailNode);
Document dom = GenericUtility.getInstance().parseString(domStr);
if( dom != null /*&& dom.getAttributes() != null*/)
{
Node attributeNode = dom.getElementsByTagName( nodeName ).item(0);
attribValue = getAttribValue(attributeNode, attribStr);
}
}
catch(Exception e)
{
System.out.println("Exception : getAttribValue :" + e.getMessage());
}
return attribValue;
}
private String getAttribValue(Node detailNode, String attribStr)
{
String attribValue = "";
try
{
if( detailNode != null && detailNode.getAttributes() != null)
{
Node attribNode = detailNode.getAttributes().getNamedItem( attribStr );
if( attribNode != null )
{
attribValue = checkNull( attribNode.getNodeValue() );
}
}
}
catch(Exception e)
{
System.out.println("Exception : getAttribValue :" + e.getMessage());
}
return attribValue;
}
}
/**
* PURPOSE : Local Interface
* Author :Sumit Sarkar
*/
package ibase.webitm.ejb.wms;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import java.sql.*;
import java.rmi.RemoteException;
// The local interface declares all the utility functions to be used in your EJB component
@javax.ejb.Local
public interface ShipmentPrsLocal extends ValidatorLocal
{
public String preSave()throws RemoteException,ITMException;
public String preSave(String xmlString, String editFlag, String xtraParams, Connection conn)throws RemoteException,ITMException;
}
/**
* PURPOSE : Remote Interface
* Author : Sumit Sarkar
*/
package ibase.webitm.ejb.wms;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import java.sql.*;
import java.rmi.RemoteException;
// The remote interface declares all the utility functions to be used in your EJB component
@javax.ejb.Remote
public interface ShipmentPrsRemote extends ValidatorRemote//, EJBObject
{
public String preSave()throws RemoteException,ITMException;
public String preSave(String xmlString, String editFlag, String xtraParams, Connection conn)throws RemoteException,ITMException;
}
......@@ -131,6 +131,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
double qtyActual=0.0;
//private Calendar mapWeightVolume;
//Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header.start
String prevsLocCode = "";
int replCnt = 0;
boolean isReplHdr = false;
String replOrdCpy = "";
......@@ -2842,37 +2844,64 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String lastReplenishmentID="",locCodeTo="";
int lineNoRepl=0;
if(itemInfoMapForRepl.containsKey(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode))
if((invStat.equalsIgnoreCase(resrvLoc) || invStat.equalsIgnoreCase(deepStoreLoc)) && (lotQtyToBeAllocated > packSizeActive) )
{
isStockToDock = false;
ArrayList tempListTestForRepl = (ArrayList)itemInfoMapForRepl.get(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode);
}
else
{
tempListForRepl = new ArrayList();
qtyActual=0.0;
if(lotQtyToBeAllocated < packSizeActive)
{
tempMapReplenishment.put("QTY_AVAIL",packSizeActive);
}
else
{
tempMapReplenishment.put("QTY_AVAIL",qtyAvailAlloc);
}
tempMapReplenishment.put("QTY_ACTUAL", qtyActual);
tempMapReplenishment.put("LAST_REPL_ID", lastReplenishmentID);
tempMapReplenishment.put("REPL_LINE_NO", lineNoRepl);
tempMapReplenishment.put("REPL_LOC_TO",locCodeTo);
//Change by Rohan on 26/08/12 to remove flag
//tempMapReplenishment.put("IS_REPLAINSH","Y");
//Changed by rohan to add stock quantity in list
tempMapReplenishment.put("STOCK_QTY",qtyAvailAlloc);
tempListForRepl.add(tempMapReplenishment);
itemInfoMapForRepl.put(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode, tempListForRepl);
System.out.println("itemInfoMapForReplPPPPPPPPPPPPPPPPPPP"+itemInfoMapForRepl);
}
if(itemInfoMapForRepl.containsKey(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode))
{
isStockToDock = false;
ArrayList tempListTestForRepl = (ArrayList)itemInfoMapForRepl.get(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode);
locCodeTo = (String)((HashMap)tempListTestForRepl.get(0)).get("REPL_LOC_TO");
System.out.println("Location Code To Found as Replenishment Exist ["+locCodeTo+"]");
}
else
{
tempListForRepl = new ArrayList();
qtyActual=0.0;
System.out.println("Location Code To Found To Create Replenishment Before ["+locCodeTo+"]");
ArrayList locCodeToList = getAvilableCasePickLocationList("C", conn, locType,locZonePref,locCode,itemCode,siteCode,lotNo,lotSl);
int suggestLocLen = locCodeToList.size();
if( suggestLocLen > 0)
{
int prvLocIndex = locCodeToList.indexOf(prevsLocCode);
if( prvLocIndex != -1 && (prvLocIndex + 1) < suggestLocLen)
{
locCodeTo = (String)locCodeToList.get((prvLocIndex + 1));
}
else
{
locCodeTo = (String)locCodeToList.get(0);
}
}
prevsLocCode = locCodeTo;
System.out.println("Location Code To Found To Create Replenishment After ["+locCodeTo+"]");
if(lotQtyToBeAllocated < packSizeActive)
{
tempMapReplenishment.put("QTY_AVAIL",packSizeActive);
}
else
{
tempMapReplenishment.put("QTY_AVAIL",qtyAvailAlloc);
}
tempMapReplenishment.put("QTY_ACTUAL", qtyActual);
tempMapReplenishment.put("LAST_REPL_ID", lastReplenishmentID);
tempMapReplenishment.put("REPL_LINE_NO", lineNoRepl);
tempMapReplenishment.put("REPL_LOC_TO",locCodeTo);
//Change by Rohan on 26/08/12 to remove flag
//tempMapReplenishment.put("IS_REPLAINSH","Y");
//Changed by rohan to add stock quantity in list
tempMapReplenishment.put("STOCK_QTY",qtyAvailAlloc);
tempListForRepl.add(tempMapReplenishment);
itemInfoMapForRepl.put(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode, tempListForRepl);
System.out.println("itemInfoMapForReplPPPPPPPPPPPPPPPPPPP"+itemInfoMapForRepl);
}
}
System.out.println("Finally Loc Code["+locCode+"]Loc Code To["+locCodeTo+"]");
strAllocate = new HashMap();
strAllocate.put("tran_date",tranDate);
......@@ -3193,6 +3222,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
tempMap.put("sord_lineNo", lineNo);
tempMap.put("item_weight", itemWeight);
locCodeTo = locCodeTo != null && locCodeTo.length() > 0 ?locCodeTo:locCode;
tempMap.put("sugg_loc", locCodeTo);
tempList.add(tempMap);
//saleOrderWiseMap.put(saleOrder,tempList);
//saleOrderWiseMap.put(saleOrder+":"+locType,tempList);
......@@ -3557,6 +3588,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String itemCode = "";
String lotNo = "";
String locCode = "";
String suggLoc = "";
String sLocCode = "";
double quantity = 0.0;
double itemWeight = 0.0;
......@@ -3658,6 +3690,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
lotNo = (String)loadMap.get("lot_no");
quantity = (Double)loadMap.get("alloc_qty");
locCode = (String)loadMap.get("loc_code");
suggLoc = (String)loadMap.get("sugg_loc");
HashMap dataTempMap = getItemVoumeMap(itemCode, lotNo, conn);
itemWeight = (Double)dataTempMap.get("ITEM_WEIGHT");
itemVolume = (Double)dataTempMap.get("ITEM_SIZE");
......@@ -3666,7 +3699,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
caseVolume = (Double)dataTempMap.get("LOT_SIZE");
System.out.println("current item code"+itemCode+"]quantity["+quantity+"]itemWeight["+itemWeight+"]caseWeight"+caseWeight+"]caseVolume["+caseVolume+"]Loc Code["+locCode+"]");
locSet.add(locCode);
locSet.add(suggLoc);
if(quantity < packSize)
{
actCount = quantity;
......@@ -3851,7 +3884,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
for(int i =0;i<itemMapListLen;i++)
{
HashMap loadMap = (HashMap)itemMapList.get(i);
locCode = (String)loadMap.get("loc_code");
locCode = (String)loadMap.get("sugg_loc");
if(sLocCode.equalsIgnoreCase(locCode))
{
System.out.println("Found Location ["+locCode+"]index["+i+"]");
......@@ -16202,6 +16235,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//+ " AND A.INV_STAT = ? ORDER BY LOC_CODE ";
//Changed by Sankara on 08/11/12 To get absolute value of suggested Location
//+ " AND A.INV_STAT = ? AND A.LOC_TYPE = ? ORDER BY LOC_CODE ";
//+ " AND A.INV_STAT = ? AND A.LOC_TYPE = ? ORDER BY ABS( A.LOC_ZONE - ?), A.LOC_CODE ";
+ " AND A.INV_STAT = ? AND A.LOC_TYPE = ? ORDER BY ABS( A.LOC_ZONE - ?), A.LOC_CODE ";
......@@ -16235,7 +16269,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
+ " AND (CASE WHEN B.STAT_TYPE IS NULL THEN ' ' ELSE B.STAT_TYPE END) <> 'S' "
//Changed By Sankara 08/04/12 To pass the argument items Location Type.
//+ " AND A.INV_STAT = ? ORDER BY LOC_CODE ";
+ " AND A.INV_STAT = ? AND A.LOC_TYPE = ? AND A.LOC_GROUP = (SELECT DROP_GROUP FROM LOCATION WHERE LOC_CODE = ? )"
//+ " AND A.INV_STAT = ? AND A.LOC_TYPE = ? AND A.LOC_GROUP = (SELECT DROP_GROUP FROM LOCATION WHERE LOC_CODE = ? )"
+ " AND A.INV_STAT = ? AND A.LOC_TYPE = ? AND A.LOC_GROUP = (SELECT DROP_GROUP FROM LOCATION WHERE LOC_CODE = ? )"
+ " ORDER BY ABS( A.LOC_ZONE - ?) ,A.LOC_CODE ";
System.out.println(" pnd sql -> ["+sql+"]");
......@@ -16267,6 +16302,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//Changed By Sankara 08/04/12 To pass the argument items Location Type.
pstmt.setString(2, itemLocType);
pstmt.setInt(3, locPrefZone);
}
//Changed by sumit on 06/08/12 apply 3 parameter in case of pnd location end.
......@@ -16634,6 +16670,403 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
System.out.println("Return Suggested Location will throw error == >["+suggLocCode+"]");
return suggLocCode;
}
//Changed by sumit on 06/08/12 changing method parameter
//private String getAvilablePickLocation(String pickType,Connection conn,String itemLocType) throws ITMException
private ArrayList getAvilableCasePickLocationList(String pickType,Connection conn,String itemLocType,int locPrefZone, String locCode,String itemCode,String siteCode,String lotNo,String lpnNo) throws ITMException
{
String sql = "";
String stockSql = "";
ResultSet rs = null;
ResultSet rs1 = null;
ResultSet rs2 = null;
ResultSet rsStock = null;
ResultSet rsOrder = null;
PreparedStatement pstmt = null;
PreparedStatement pstmtStock = null;
PreparedStatement pstmtOrder = null;
PreparedStatement pstmtItemLotOpt0 = null;
PreparedStatement pstmtItemLotOpt1 = null;
double stockQty = 0d;
String suggLocCode = "";
String singleLotSl = "";
String itemLotOpt = "";
ArrayList sugstLocList = new ArrayList();
String orderSql = "";
String sqlItemLotOpt0 = "";
String sqlItemLotOpt1 = "";
String invStat = "";
String invStatDisparmVar = "";
double quantity = 0;
int count = 0;
ArrayList suggestedLocList = new ArrayList();
try
{
sql ="SELECT A.LOC_CODE AS LOC_CODE,A.SINGLE_LOT_SL AS SINGLE_LOT_SL,A.ITEM_LOT_OPT AS ITEM_LOT_OPT"
+ " FROM LOCATION A, INVSTAT B WHERE A.INV_STAT = B.INV_STAT AND B.AVAILABLE = 'Y' "
+ " AND (CASE WHEN B.STAT_TYPE IS NULL THEN ' ' ELSE B.STAT_TYPE END) <> 'S' "
+ " AND A.INV_STAT = ? AND A.LOC_TYPE = ? ORDER BY ABS( A.LOC_ZONE - ?), A.LOC_CODE ";
stockSql = "SELECT QUANTITY FROM STOCK WHERE LOC_CODE = ? " ;
sqlItemLotOpt0 = "SELECT COUNT(*) AS COUNT FROM STOCK WHERE (ITEM_CODE <> ? OR LOT_NO <> ?) AND SITE_CODE = ? AND LOC_CODE = ? AND QUANTITY > 0"; //AND LOT_NO <> ?"
sqlItemLotOpt1 = "SELECT COUNT(*) AS COUNT FROM STOCK WHERE ITEM_CODE <> ? AND SITE_CODE = ? AND LOC_CODE = ? AND QUANTITY > 0";
orderSql = "SELECT COUNT(*) AS COUNT FROM REPL_ORD_DET O WHERE O.LOC_CODE__TO = ? AND NOT EXISTS (SELECT 1 FROM REPL_ISS_HDR I WHERE I.REPL_ORDER = O.REPL_ORDER AND I.CONFIRMED = 'Y') "; //changes done by Ashish Sonawane on 10-jul-12
if ( "A".equalsIgnoreCase(pickType.trim()) )
{
invStatDisparmVar = "ACTIVE_PICK_INVSTAT";
}
else if ( "C".equalsIgnoreCase(pickType.trim()) || "M".equalsIgnoreCase(pickType.trim()) )
{
invStatDisparmVar = "CASE_PICK_INVSTAT";
}
else if ( "N".equalsIgnoreCase(pickType.trim()))
{
invStatDisparmVar = "PND_INVSTAT";
sql = "SELECT A.LOC_CODE AS LOC_CODE,A.SINGLE_LOT_SL AS SINGLE_LOT_SL,A.ITEM_LOT_OPT AS ITEM_LOT_OPT"
+ " FROM LOCATION A, INVSTAT B WHERE A.INV_STAT = B.INV_STAT AND B.AVAILABLE = 'Y' "
+ " AND (CASE WHEN B.STAT_TYPE IS NULL THEN ' ' ELSE B.STAT_TYPE END) <> 'S' "
+ " AND A.INV_STAT = ? AND A.LOC_TYPE = ? AND A.LOC_GROUP = (SELECT DROP_GROUP FROM LOCATION WHERE LOC_CODE = ? )"
+ " ORDER BY ABS( A.LOC_ZONE - ?) ,A.LOC_CODE ";
System.out.println(" pnd sql -> ["+sql+"]");
}
invStat = discommon.getDisparams("999999",invStatDisparmVar,conn);
pstmtStock = conn.prepareStatement(stockSql);
pstmt = conn.prepareStatement(sql);
pstmtOrder = conn.prepareStatement(orderSql);
pstmtItemLotOpt0 = conn.prepareStatement( sqlItemLotOpt0 );
pstmtItemLotOpt1 = conn.prepareStatement( sqlItemLotOpt1);
if("N".equalsIgnoreCase(pickType.trim()))
{
pstmt.setString(1, invStat);
pstmt.setString(2, itemLocType);
pstmt.setString(3, locCode);
pstmt.setInt(4, locPrefZone);
}
else
{
pstmt.setString(1, invStat);
pstmt.setString(2, itemLocType);
pstmt.setInt(3, locPrefZone);
}
rs = pstmt.executeQuery();
while (rs.next())
{
suggLocCode = checkNull(rs.getString("LOC_CODE") );
singleLotSl = checkNull(rs.getString("SINGLE_LOT_SL") );
itemLotOpt = checkNull(rs.getString("ITEM_LOT_OPT") );
quantity = 0;
count = 0;
if( singleLotSl.trim().equalsIgnoreCase("Y") )
{
pstmtStock.setString( 1, suggLocCode );
rs1 = pstmtStock.executeQuery();
if( rs1.next() )
{
quantity = rs1.getDouble("QUANTITY");
}
rs1.close();
rs1 = null;
pstmtOrder.setString(1, suggLocCode);
rsOrder = pstmtOrder.executeQuery();
if( quantity != 0 )
{
suggLocCode = "";
continue;
}
if(rsOrder.next())
{
count = rsOrder.getInt("COUNT");
}
System.out.println("Current Count From Repl Order Location Exist Count["+count+"]");
pstmtOrder.clearParameters();
if(rsOrder != null)
{
rsOrder.close();
rsOrder = null;
}
if(count > 0)
{
suggLocCode = "";
continue;
}
else
{
suggestedLocList.add(suggLocCode) ;
}
}
else
{
if( itemLotOpt.trim().equals("0") )
{
pstmtItemLotOpt0.setString( 1, itemCode );
pstmtItemLotOpt0.setString( 2, lotNo );
pstmtItemLotOpt0.setString( 3, siteCode );
pstmtItemLotOpt0.setString( 4, suggLocCode );
rs2 = pstmtItemLotOpt0.executeQuery();
if( rs2.next() )
{
count = rs2.getInt("COUNT");
}
rs2.close();
rs2 = null;
if( count > 0 )
{
suggLocCode = "";
continue;
}
pstmtOrder.setString(1, suggLocCode);
rsOrder = pstmtOrder.executeQuery();
if(rsOrder.next())
{
count = rsOrder.getInt("COUNT");
}
if(rsOrder != null)
{
rsOrder.close();
rsOrder = null;
}
if(count > 0)
{
suggLocCode = "";
continue;
}
else
{
if("A".equalsIgnoreCase(pickType.trim()))
{
suggLocCode = getPickLocForSameItemLotNo(invStat,pickType.trim(),itemCode,lotNo, lpnNo, suggLocCode, conn);
suggestedLocList.add(suggLocCode) ;
}
else
{
suggestedLocList.add(suggLocCode) ;
}
}
}
else if( itemLotOpt.trim().equals("1") )
{
pstmtItemLotOpt1.setString( 1, itemCode );
pstmtItemLotOpt1.setString( 2, siteCode );
pstmtItemLotOpt1.setString( 3, suggLocCode );
rs2 = pstmtItemLotOpt1.executeQuery();
if( rs2.next() )
{
count = rs2.getInt("COUNT");
}
rs2.close();
rs2 = null;
if( count > 0 )
{
continue;
}
pstmtOrder.setString(1, suggLocCode);
rsOrder = pstmtOrder.executeQuery();
if(rsOrder.next())
{
count = rsOrder.getInt("COUNT");
}
if(rsOrder != null)
{
rsOrder.close();
rsOrder = null;
}
if(count > 0)
{
suggLocCode = "";
continue;
}
else
{
if("A".equalsIgnoreCase(pickType.trim()))
{
suggLocCode = getPickLocForSameItemLotNo(invStat,pickType.trim(),itemCode,lotNo, lpnNo, suggLocCode, conn);
suggestedLocList.add(suggLocCode) ;
}
else
{
suggestedLocList.add(suggLocCode) ;
}
}
}
else
{
if("A".equalsIgnoreCase(pickType.trim()))
{
suggLocCode = getPickLocForSameItemLotNo(invStat,pickType.trim(),itemCode,lotNo, lpnNo, suggLocCode, conn);
suggestedLocList.add(suggLocCode) ;
}
else
{
suggestedLocList.add(suggLocCode) ;
}
}
}
}
if( rs != null )
{
rs.close();
rs = null;
}
if( rs1 != null )
{
rs1.close();
rs1 = null;
}
if( rs2 != null )
{
rs2.close();
rs2 = null;
}
if( rsStock != null )
{
rsStock.close();
rsStock = null;
}
if( rsOrder != null )
{
rsOrder.close();
rsOrder = null;
}
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if( pstmtStock != null )
{
pstmtStock.close();
pstmtStock = null;
}
if( pstmtOrder != null )
{
pstmtOrder.close();
pstmtOrder = null;
}
if(pstmtItemLotOpt0 != null)
{
pstmtItemLotOpt0.close();
pstmtItemLotOpt0 = null;
}
if(pstmtItemLotOpt1 != null)
{
pstmtItemLotOpt1.close();
pstmtItemLotOpt1 = null;
}
}
catch(Exception e)
{
System.out.println("Exception in == >"+e);
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if( rs != null )
{
rs.close();
rs = null;
}
if( rs1 != null )
{
rs1.close();
rs1 = null;
}
if( rs2 != null )
{
rs2.close();
rs2 = null;
}
if( rsStock != null )
{
rsStock.close();
rsStock = null;
}
if( rsOrder != null )
{
rsOrder.close();
rsOrder = null;
}
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if( pstmtStock != null )
{
pstmtStock.close();
pstmtStock = null;
}
if( pstmtOrder != null )
{
pstmtOrder.close();
pstmtOrder = null;
}
if(pstmtItemLotOpt0 != null)
{
pstmtItemLotOpt0.close();
pstmtItemLotOpt0 = null;
}
if(pstmtItemLotOpt1 != null)
{
pstmtItemLotOpt1.close();
pstmtItemLotOpt1 = null;
}
}
catch (Exception e1)
{
}
}
System.out.println("Return Suggested Location will throw error == >["+suggLocCode+"]");
return suggestedLocList;
}
private HashMap getTransportInfo(String saleOrder,double perShipWeight ,double noArt,Connection conn) throws ITMException
{
String sql = "";
......
......@@ -29068,6 +29068,285 @@ INSERT INTO MESSAGES (
NULL);
update messages set msg_descr ='The pallet is already transferred'
where msg_no = 'VTPLTTRF';
//Changed By Sumit 23/01/12
INSERT INTO MESSAGES (
msg_no ,
msg_str ,
msg_descr,
msg_type ,
msg_opt ,
msg_time ,
alarm ,
err_source,
chg_date ,
chg_user ,
chg_term ,
override_input ,
mail_option )
VALUES (
'INVSHIPCON',
'Invalid Pallet Number',
'Ship consignee group are not same of entered pallet numbers. ',
'E',
'Y',
NULL,
NULL,
NULL,
TO_DATE('8-05-2012 16:36:55','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE ',
NULL,
NULL);
INSERT INTO MESSAGES (
msg_no ,
msg_str ,
msg_descr,
msg_type ,
msg_opt ,
msg_time ,
alarm ,
err_source,
chg_date ,
chg_user ,
chg_term ,
override_input ,
mail_option )
VALUES (
'ALLPTCNNTA',
'Incomplete Shipment',
'Please enter all PTCN number''s whose ship consignee group are same on the wave of entered PTCN',
'E',
'Y',
NULL,
NULL,
NULL,
TO_DATE('8-05-2012 16:36:55','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE ',
NULL,
NULL);
INSERT INTO MESSAGES (
msg_no ,
msg_str ,
msg_descr,
msg_type ,
msg_opt ,
msg_time ,
alarm ,
err_source,
chg_date ,
chg_user ,
chg_term ,
override_input ,
mail_option )
VALUES (
'DUPPTCNNO',
'Invalid PTCN',
'Duplicate PTCN number',
'E',
'Y',
NULL,
NULL,
NULL,
TO_DATE('8-05-2012 16:36:55','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE ',
NULL,
NULL);
INSERT INTO SYSTEM_EVENTS (
obj_name ,
event_code ,
event_context ,
service_code ,
method_rule ,
overwrite_core ,
chg_date,
chg_user ,
chg_term ,
result_handle ,
comp_type ,
comp_name ,
comm_format )
VALUES (
'shipment',
'pre_save',
'1',
'prsr_shipment',
NULL,
'0',
TO_DATE('18-01-2013 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE',
'2',
'EJB',
'ShipmentPrs',
NULL);
INSERT INTO SYSTEM_SERVICE_ARGS (
service_code ,
line_no ,
arg_name ,
arg_mode,
descr ,
arg_type ,
arg_xfrm,
chg_date ,
chg_user ,
chg_term ,
arg_value )
VALUES (
'prsr_shipment',
1,
'COMPONENT_TYPE',
'I',
NULL,
'C.String',
NULL,
TO_DATE('18-01-2013 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE',
'EJB');
INSERT INTO SYSTEM_SERVICE_ARGS (
service_code ,
line_no ,
arg_name ,
arg_mode,
descr ,
arg_type ,
arg_xfrm,
chg_date ,
chg_user ,
chg_term ,
arg_value )
VALUES (
'prsr_shipment',
2,
'COMPONENT_NAME',
'I',
NULL,
'C.String',
NULL,
TO_DATE('18-01-2013 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE',
'ShipmentPrs');
INSERT INTO SYSTEM_SERVICE_ARGS (
service_code ,
line_no ,
arg_name ,
arg_mode,
descr ,
arg_type ,
arg_xfrm,
chg_date ,
chg_user ,
chg_term ,
arg_value )
VALUES (
'prsr_shipment',
3,
'XML_DATA_ALL',
'I',
NULL,
'S',
NULL,
TO_DATE('18-01-2013 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE',
NULL);
INSERT INTO SYSTEM_SERVICE_ARGS (
service_code ,
line_no ,
arg_name ,
arg_mode,
descr ,
arg_type ,
arg_xfrm,
chg_date ,
chg_user ,
chg_term ,
arg_value )
VALUES (
'prsr_shipment',
4,
'EDIT_FLAG',
'I',
NULL,
'S',
NULL,
TO_DATE('18-01-2013 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE',
NULL);
INSERT INTO SYSTEM_SERVICE_ARGS (
service_code ,
line_no ,
arg_name ,
arg_mode,
descr ,
arg_type ,
arg_xfrm,
chg_date ,
chg_user ,
chg_term ,
arg_value )
VALUES (
'prsr_shipment',
5,
'XTRA_PARAMS',
'I',
NULL,
'S',
NULL,
TO_DATE('18-01-2013 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE',
NULL);
INSERT INTO SYSTEM_SERVICE_ARGS (
service_code ,
line_no ,
arg_name ,
arg_mode,
descr ,
arg_type ,
arg_xfrm,
chg_date ,
chg_user ,
chg_term ,
arg_value )
VALUES (
'prsr_shipment',
6,
'DB_CONN',
'I',
NULL,
'S.Connection',
NULL,
TO_DATE('18-01-2013 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE ',
'BASE',
NULL);
COMMIT;
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