Commit 37836896 authored by ssarkar's avatar ssarkar

changed by sumit on 20/03/13 for stock to dock deallocation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92853 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ade7c91f
......@@ -680,6 +680,9 @@ public class DeallocArtIC extends ValidatorEJB implements DeallocArtICRemote, De
String confDate = "";
String pickOrder = "";
String CartonNo = "";
String columnValue = "";
String saleOrderTo = "";
String saleOrderFr = "";
int lineNo = 0;
int count= 0;
......@@ -768,11 +771,82 @@ public class DeallocArtIC extends ValidatorEJB implements DeallocArtICRemote, De
}
else if( currentColumn.trim().equalsIgnoreCase( "sale_order__fr" ) )
{
columnValue = genericUtility.getColumnValue("sale_order__fr",currDom);
saleOrderTo = checkNull(genericUtility.getColumnValue("sale_order__to",currDom));
//valueXmlString.append( "<confirmed><![CDATA[" ).append( "N" ).append( "]]></confirmed>\r\n" );
sql = " SELECT C.CUST_CODE,S.CUST_CODE__DLV FROM SORDER S, CUSTOMER C, WAVE_TYPE W WHERE SALE_ORDER = ? " +
" AND C.CUST_CODE = S.CUST_CODE AND C.WAVE_TYPE = W.WAVE_TYPE ";
System.out.println("queryString="+sql);
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,columnValue);
rs = pstmt.executeQuery();
if(rs.next())
{
if( columnValue.equalsIgnoreCase(saleOrderTo))
{
valueXmlString.append( "<cust_code__fr><![CDATA[" ).append( rs.getString("CUST_CODE") ).append( "]]></cust_code__fr>\r\n" );
valueXmlString.append( "<cust_code__to><![CDATA[" ).append( rs.getString("CUST_CODE") ).append( "]]></cust_code__to>\r\n" );
valueXmlString.append( "<cust_code__dlv_fr><![CDATA[" ).append( rs.getString("CUST_CODE__DLV") ).append( "]]></cust_code__dlv_fr>\r\n" );
valueXmlString.append( "<cust_code__dlv_to><![CDATA[" ).append( rs.getString("CUST_CODE__DLV") ).append( "]]></cust_code__dlv_to>\r\n" );
}
else
{
valueXmlString.append( "<cust_code__fr><![CDATA[" ).append( "00" ).append( "]]></cust_code__fr>\r\n" );
valueXmlString.append( "<cust_code__to><![CDATA[" ).append( "ZZ" ).append( "]]></cust_code__to>\r\n" );
valueXmlString.append( "<cust_code__dlv_fr><![CDATA[" ).append( "00" ).append( "]]></cust_code__dlv_fr>\r\n" );
valueXmlString.append( "<cust_code__dlv_to><![CDATA[" ).append( "ZZ" ).append( "]]></cust_code__dlv_to>\r\n" );
}
}
else
{
valueXmlString.append( "<cust_code__fr><![CDATA[" ).append( "00" ).append( "]]></cust_code__fr>\r\n" );
valueXmlString.append( "<cust_code__to><![CDATA[" ).append( "ZZ" ).append( "]]></cust_code__to>\r\n" );
valueXmlString.append( "<cust_code__dlv_fr><![CDATA[" ).append( "00" ).append( "]]></cust_code__dlv_fr>\r\n" );
valueXmlString.append( "<cust_code__dlv_to><![CDATA[" ).append( "ZZ" ).append( "]]></cust_code__dlv_to>\r\n" );
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
}
else if( currentColumn.trim().equalsIgnoreCase( "sale_order__to" ) )
{
columnValue = genericUtility.getColumnValue("sale_order__to",currDom);
saleOrderFr = checkNull(genericUtility.getColumnValue("sale_order__fr",currDom));
//valueXmlString.append( "<confirmed><![CDATA[" ).append( "N" ).append( "]]></confirmed>\r\n" );
sql = " SELECT C.CUST_CODE,S.CUST_CODE__DLV FROM SORDER S, CUSTOMER C, WAVE_TYPE W WHERE SALE_ORDER = ? " +
" AND C.CUST_CODE = S.CUST_CODE AND C.WAVE_TYPE = W.WAVE_TYPE ";
System.out.println("queryString="+sql);
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,columnValue);
rs = pstmt.executeQuery();
if(rs.next())
{
if( columnValue.equalsIgnoreCase(saleOrderFr))
{
valueXmlString.append( "<cust_code__fr><![CDATA[" ).append( rs.getString("CUST_CODE") ).append( "]]></cust_code__fr>\r\n" );
valueXmlString.append( "<cust_code__to><![CDATA[" ).append( rs.getString("CUST_CODE") ).append( "]]></cust_code__to>\r\n" );
valueXmlString.append( "<cust_code__dlv_fr><![CDATA[" ).append( rs.getString("CUST_CODE__DLV") ).append( "]]></cust_code__dlv_fr>\r\n" );
valueXmlString.append( "<cust_code__dlv_to><![CDATA[" ).append( rs.getString("CUST_CODE__DLV") ).append( "]]></cust_code__dlv_to>\r\n" );
}
else
{
valueXmlString.append( "<cust_code__fr><![CDATA[" ).append( "00" ).append( "]]></cust_code__fr>\r\n" );
valueXmlString.append( "<cust_code__to><![CDATA[" ).append( "ZZ" ).append( "]]></cust_code__to>\r\n" );
valueXmlString.append( "<cust_code__dlv_fr><![CDATA[" ).append( "00" ).append( "]]></cust_code__dlv_fr>\r\n" );
valueXmlString.append( "<cust_code__dlv_to><![CDATA[" ).append( "ZZ" ).append( "]]></cust_code__dlv_to>\r\n" );
}
}
else
{
valueXmlString.append( "<cust_code__fr><![CDATA[" ).append( "00" ).append( "]]></cust_code__fr>\r\n" );
valueXmlString.append( "<cust_code__to><![CDATA[" ).append( "ZZ" ).append( "]]></cust_code__to>\r\n" );
valueXmlString.append( "<cust_code__dlv_fr><![CDATA[" ).append( "00" ).append( "]]></cust_code__dlv_fr>\r\n" );
valueXmlString.append( "<cust_code__dlv_to><![CDATA[" ).append( "ZZ" ).append( "]]></cust_code__dlv_to>\r\n" );
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
}
else if("ptcn".equalsIgnoreCase(currentColumn.trim()))
{
......
......@@ -31898,6 +31898,29 @@ INSERT INTO MESSAGES (
NULL,
NULL);
--Changed by sumit on 20/03/13 for item changed
INSERT INTO obj_itemchange (
obj_name ,
form_no ,
field_name ,
mandatory )
VALUES (
'dealloc_art_proc',
'1 ',
'sale_order__to',
'Y');
INSERT INTO obj_itemchange (
obj_name ,
form_no ,
field_name ,
mandatory )
VALUES (
'dealloc_art_proc',
'1 ',
'sale_order__fr',
'Y');
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