Commit 0b15ea4a authored by sankara.rao's avatar sankara.rao

changed by sankara on 25/11/13 update shipmentprs for clubbing ptcn warning...

changed by sankara on 25/11/13 update shipmentprs for clubbing ptcn warning message handled in messages_level


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93898 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b4287d0c
...@@ -182,12 +182,17 @@ public class ShipmentPrs extends ValidatorEJB implements ShipmentPrsLocal, Shipm ...@@ -182,12 +182,17 @@ public class ShipmentPrs extends ValidatorEJB implements ShipmentPrsLocal, Shipm
{ {
System.out.println("all ptcns in one wave"); System.out.println("all ptcns in one wave");
errString = itmDBAccessEJB.getErrorString("","ALLPTCNNTA","","",conn); errString = itmDBAccessEJB.getErrorString("","ALLPTCNNTA","","",conn);
} //changed by sankara on 25/11/13 for clubing all ptcn as message level
errString = findError(errString,xtraParams, conn);
//}
if(errString != null && errString.indexOf("W") != -1) if(errString != null && errString.indexOf("W") != -1)
{ {
System.out.println("all ptcns in one wave1"); System.out.println("all ptcns in one wave1");
CommonWmsUtil.ALL_PTCN_EX_COUNT++; CommonWmsUtil.ALL_PTCN_EX_COUNT++;
} }
//changed by sankara on 25/11/13 for clubing all ptcn as message level
return errString;
}
//changed by sankara on 15/10/13 for clubing multiple ptcn end. //changed by sankara on 15/10/13 for clubing multiple ptcn end.
} }
} }
...@@ -222,12 +227,17 @@ public class ShipmentPrs extends ValidatorEJB implements ShipmentPrsLocal, Shipm ...@@ -222,12 +227,17 @@ public class ShipmentPrs extends ValidatorEJB implements ShipmentPrsLocal, Shipm
{ {
System.out.println("all ptcns in diff wave"); System.out.println("all ptcns in diff wave");
errString = itmDBAccessEJB.getErrorString("","ALLPTCNNTA","","",conn); errString = itmDBAccessEJB.getErrorString("","ALLPTCNNTA","","",conn);
} //changed by sankara on 25/11/13 for clubing all ptcn as message level
errString = findError(errString,xtraParams, conn);
//}
if(errString != null && errString.indexOf("W") != -1) if(errString != null && errString.indexOf("W") != -1)
{ {
System.out.println("all ptcns in diff wave1"); System.out.println("all ptcns in diff wave1");
CommonWmsUtil.ALL_PTCN_EX_COUNT++; CommonWmsUtil.ALL_PTCN_EX_COUNT++;
} }
//changed by sankara on 25/11/13 for clubing all ptcn as message level
return errString;
}
//changed by sankara on 15/10/13 for clubing multiple ptcn end. //changed by sankara on 15/10/13 for clubing multiple ptcn end.
} }
} }
...@@ -914,5 +924,94 @@ public class ShipmentPrs extends ValidatorEJB implements ShipmentPrsLocal, Shipm ...@@ -914,5 +924,94 @@ public class ShipmentPrs extends ValidatorEJB implements ShipmentPrsLocal, Shipm
return servicceCode; return servicceCode;
} }
//changed by sankara on 10/04/13 for getting service code end. //changed by sankara on 10/04/13 for getting service code end.
//changed by sankara on 25/11/13 for display allptcn handled at mesages level start.
private String findError(String errString, String xtraParams, Connection conn) throws ITMException
{
Document errDomObj = null;
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
String msgType = "";
String winName = "";
GenericUtility genericUtility = GenericUtility.getInstance();
String userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
String errorString = "";
try
{
//sql = " SELECT MSG_TYPE FROM MESSAGES_LEVEL WHERE PROFILE_ID = ? AND WIN_NAME = 'w_shipment' AND MSG_NO = 'ALLPTCNNTA' ";
sql = " SELECT MSG_TYPE, WIN_NAME FROM MESSAGES_LEVEL WHERE PROFILE_ID = ? AND MSG_NO = 'ALLPTCNNTA' ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, userId);
rs = pstmt.executeQuery();
if(rs.next())
{
msgType = checkNull(rs.getString("MSG_TYPE"));
winName = checkNull(rs.getString("WIN_NAME"));
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if(winName == null || winName.trim().length() == 0 )
{
winName = "X";
}
System.out.println("msgType->"+msgType);
System.out.println("winName->"+winName);
if((winName.trim().equalsIgnoreCase("w_shipment") || winName.trim().equalsIgnoreCase("X")) && msgType.trim().equalsIgnoreCase("W"))
{
if(errString != null && errString.trim().length()!=0)
{
System.out.println("errString:->"+errString);
errDomObj = genericUtility.parseString(errString);
System.out.println("errDomObj:->"+errDomObj);
NodeList errorNodeList = errDomObj.getElementsByTagName("error");
System.out.println("errorNodeList:->"+errorNodeList);
errDomObj.getElementsByTagName("error").item(0).getAttributes().getNamedItem("type").setNodeValue("W");
errDomObj.getElementsByTagName("type").item(0).getFirstChild().setNodeValue("W");
errDomObj.getElementsByTagName("trace").item(0).getFirstChild().getNodeValue().contains("Error");
errDomObj.getElementsByTagName("trace").item(0).getFirstChild().getNodeValue();
String mainString = errDomObj.getElementsByTagName("trace").item(0).getFirstChild().getNodeValue();
System.out.println("mainString:->"+mainString);
mainString = mainString.substring(mainString.indexOf(":"), mainString.indexOf("Shipment")+8);
System.out.println("mainString1:->"+mainString);
errDomObj.getElementsByTagName("trace").item(0).getFirstChild().setNodeValue("Warning"+mainString);
errorString = GenericUtility.getInstance().serializeDom(errDomObj);
System.out.println("errString of trace:->"+errorString);
if(errorString != null && errorString.trim().length() > 0 )
{
errString = errorString;
}
}
}
}
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 errString;
}
//changed by sankara on 25/11/13 for display allptcn handled at mesages level end.
} }
...@@ -40,53 +40,47 @@ ...@@ -40,53 +40,47 @@
<color>536870912</color> <color>536870912</color>
</Summary> </Summary>
<Footer> <Footer>
<height>1</height> <height>0</height>
<color>536870912</color> <color>536870912</color>
</Footer> </Footer>
<Detail> <Detail>
<height>22</height> <height>23</height>
<color>536870912</color> <color>536870912</color>
</Detail> </Detail>
<TableDefinition> <TableDefinition>
<table_column> <table_column>
<type size="10">char</type> <type size="10">char</type>
<updatewhereclause>no</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>pick_order</name> <name>pick_order</name>
<dbname>pick_order</dbname> <dbname>pick_order</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="10">char</type> <type size="10">char</type>
<updatewhereclause>no</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>sale_order</name> <name>sale_order</name>
<dbname>sale_order</dbname> <dbname>sale_order</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="12">char</type> <type size="12">char</type>
<updatewhereclause>no</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>wave_id</name> <name>wave_id</name>
<dbname>wave_id</dbname> <dbname>wave_id</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="10">char</type> <type size="10">char</type>
<updatewhereclause>no</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>ptcn</name> <name>ptcn</name>
<dbname>ptcn</dbname> <dbname>ptcn</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="10">char</type> <type size="10">char</type>
<updatewhereclause>no</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>assign_to</name> <name>assign_to</name>
<dbname>assign_to</dbname> <dbname>assign_to</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="1">char</type> <type size="1">char</type>
<updatewhereclause>no</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>status</name>
<dbname>status</dbname>
</table_column>
<table_column>
<type size="1">char</type>
<updatewhereclause>no</updatewhereclause>
<name>pick_repl_status</name> <name>pick_repl_status</name>
<dbname>pick_repl_status</dbname> <dbname>pick_repl_status</dbname>
</table_column> </table_column>
...@@ -100,7 +94,7 @@ ...@@ -100,7 +94,7 @@
<x>2</x> <x>2</x>
<y>2</y> <y>2</y>
<height>16</height> <height>16</height>
<width>114</width> <width>132</width>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
...@@ -115,8 +109,8 @@ ...@@ -115,8 +109,8 @@
<charset>0</charset> <charset>0</charset>
</font> </font>
<background> <background>
<mode>1</mode> <mode>2</mode>
<color>536870912</color> <color>67108864</color>
</background> </background>
</TextObject> </TextObject>
<TextObject> <TextObject>
...@@ -125,10 +119,10 @@ ...@@ -125,10 +119,10 @@
<text>Sale Order</text> <text>Sale Order</text>
<border>6</border> <border>6</border>
<color>0</color> <color>0</color>
<x>118</x> <x>136</x>
<y>2</y> <y>2</y>
<height>16</height> <height>16</height>
<width>130</width> <width>145</width>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
...@@ -143,8 +137,8 @@ ...@@ -143,8 +137,8 @@
<charset>0</charset> <charset>0</charset>
</font> </font>
<background> <background>
<mode>1</mode> <mode>2</mode>
<color>536870912</color> <color>67108864</color>
</background> </background>
</TextObject> </TextObject>
<TextObject> <TextObject>
...@@ -153,10 +147,10 @@ ...@@ -153,10 +147,10 @@
<text>Wave Id</text> <text>Wave Id</text>
<border>6</border> <border>6</border>
<color>0</color> <color>0</color>
<x>250</x> <x>283</x>
<y>2</y> <y>2</y>
<height>16</height> <height>16</height>
<width>157</width> <width>149</width>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
...@@ -171,8 +165,8 @@ ...@@ -171,8 +165,8 @@
<charset>0</charset> <charset>0</charset>
</font> </font>
<background> <background>
<mode>1</mode> <mode>2</mode>
<color>536870912</color> <color>67108864</color>
</background> </background>
</TextObject> </TextObject>
<TextObject> <TextObject>
...@@ -181,10 +175,10 @@ ...@@ -181,10 +175,10 @@
<text>PTCN</text> <text>PTCN</text>
<border>6</border> <border>6</border>
<color>0</color> <color>0</color>
<x>409</x> <x>434</x>
<y>2</y> <y>2</y>
<height>16</height> <height>16</height>
<width>157</width> <width>139</width>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
...@@ -199,8 +193,8 @@ ...@@ -199,8 +193,8 @@
<charset>0</charset> <charset>0</charset>
</font> </font>
<background> <background>
<mode>1</mode> <mode>2</mode>
<color>536870912</color> <color>67108864</color>
</background> </background>
</TextObject> </TextObject>
<TextObject> <TextObject>
...@@ -209,10 +203,10 @@ ...@@ -209,10 +203,10 @@
<text>Assign To</text> <text>Assign To</text>
<border>6</border> <border>6</border>
<color>0</color> <color>0</color>
<x>568</x> <x>575</x>
<y>2</y> <y>2</y>
<height>16</height> <height>16</height>
<width>321</width> <width>147</width>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
...@@ -227,20 +221,20 @@ ...@@ -227,20 +221,20 @@
<charset>0</charset> <charset>0</charset>
</font> </font>
<background> <background>
<mode>1</mode> <mode>2</mode>
<color>536870912</color> <color>67108864</color>
</background> </background>
</TextObject> </TextObject>
<TextObject> <TextObject>
<band>Header</band> <band>Header</band>
<alignment>0</alignment> <alignment>0</alignment>
<text>Pick/Repl</text> <text>Pick / Repl</text>
<border>6</border> <border>6</border>
<color>0</color> <color>0</color>
<x>891</x> <x>724</x>
<y>2</y> <y>2</y>
<height>16</height> <height>16</height>
<width>322</width> <width>429</width>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
...@@ -255,8 +249,8 @@ ...@@ -255,8 +249,8 @@
<charset>0</charset> <charset>0</charset>
</font> </font>
<background> <background>
<mode>1</mode> <mode>2</mode>
<color>536870912</color> <color>67108864</color>
</background> </background>
</TextObject> </TextObject>
<ColumnObject> <ColumnObject>
...@@ -269,7 +263,7 @@ ...@@ -269,7 +263,7 @@
<x>2</x> <x>2</x>
<y>2</y> <y>2</y>
<height>19</height> <height>19</height>
<width>114</width> <width>132</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
...@@ -304,10 +298,10 @@ ...@@ -304,10 +298,10 @@
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>5</border> <border>5</border>
<color>33554432</color> <color>33554432</color>
<x>118</x> <x>136</x>
<y>2</y> <y>2</y>
<height>19</height> <height>19</height>
<width>130</width> <width>145</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
...@@ -342,10 +336,10 @@ ...@@ -342,10 +336,10 @@
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>5</border> <border>5</border>
<color>33554432</color> <color>33554432</color>
<x>250</x> <x>283</x>
<y>2</y> <y>2</y>
<height>19</height> <height>19</height>
<width>157</width> <width>149</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
...@@ -380,10 +374,10 @@ ...@@ -380,10 +374,10 @@
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>5</border> <border>5</border>
<color>33554432</color> <color>33554432</color>
<x>409</x> <x>434</x>
<y>2</y> <y>2</y>
<height>19</height> <height>19</height>
<width>157</width> <width>139</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
...@@ -418,10 +412,10 @@ ...@@ -418,10 +412,10 @@
<tabsequence>10</tabsequence> <tabsequence>10</tabsequence>
<border>5</border> <border>5</border>
<color>33554432</color> <color>33554432</color>
<x>568</x> <x>575</x>
<y>2</y> <y>2</y>
<height>19</height> <height>19</height>
<width>321</width> <width>147</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
...@@ -451,26 +445,27 @@ ...@@ -451,26 +445,27 @@
</ColumnObject> </ColumnObject>
<ColumnObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<id>7</id> <id>6</id>
<alignment>0</alignment> <alignment>0</alignment>
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>5</border> <border>5</border>
<color>33554432</color> <color>33554432</color>
<x>891</x> <x>724</x>
<y>2</y> <y>2</y>
<height>19</height> <height>19</height>
<width>322</width> <width>429</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
<name>pick_repl_status</name> <name>pick_repl_status</name>
<visible>1</visible> <visible>1</visible>
<hidesnaked>1</hidesnaked>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>0</limit> <limit>0</limit>
<case>any</case> <case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect> <autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode> <imemode>0</imemode>
</EditStyle> </EditStyle>
<font> <font>
......
...@@ -44813,3 +44813,61 @@ VALUES ( ...@@ -44813,3 +44813,61 @@ VALUES (
NULL, NULL,
NULL); NULL);
commit; commit;
--changed by sankara on 25/11/13 for clubing ptcn at messages level
INSERT INTO messages_level (
profile_id ,
msg_no ,
win_name ,
msg_type )
VALUES (
'BASE ',
'ALLPTCNNTA',
'w_shipment',
'W');
INSERT INTO genmst (
fld_name ,
mod_name ,
descr ,
error_cd ,
blank_opt ,
fld_type ,
fld_min ,
fld_max ,
val_type ,
chg_date ,
chg_user ,
chg_term ,
val_table ,
sql_input ,
fld_width ,
udf_usage_1 ,
udf_usage_2 ,
udf_usage_3 ,
val_stage ,
obj_name )
VALUES (
'LOC_CODE__TO',
'W_STOCK_TRANSFER',
'Validation for Pending Replineshment',
'VTREPLPEND',
'N',
'C',
'select count(1) from repl_ord_det d,wave_task w,wave_task_det k
where d.repl_order = k.ref_id and w.wave_id = k.wave_id and w.cancel <>
''Y'' and k.status <>''Y'' AND d.cancel_mode IS NULL AND site_code = ? and
d.item_code=? and d.loc_code = ? and d.lot_no = ? and d.lot_sl = ? ',
'0',
'Q',
fn_sysdate(),
'TARO ',
'jbnitashishm',
NULL,
':0.SITE_CODE,:1.ITEM_CODE,:1.LOC_CODE__FR,:1.LOT_NO__FR,:1.LOT_SL__FR',
10,
NULL,
NULL,
NULL,
NULL,
NULL);
commit;
\ No newline at end of file
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