Commit 0fa41980 authored by cshah's avatar cshah

MF90MAC001 - add code for item change in descr field


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91358 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b1acb1f7
......@@ -166,7 +166,7 @@ public class QcOrderAct extends ActionHandlerEJB implements QcOrderActLocal , Q
*/
private String actionStock(Document dom, Document dom1, String xtraParams)throws RemoteException, ITMException
{
String siteCode = "", itemCode = "", lotNo = "";
String siteCode = "", itemCode = "", lotNo = "" ,descr ="" ;
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
......@@ -187,6 +187,20 @@ public class QcOrderAct extends ActionHandlerEJB implements QcOrderActLocal , Q
itemCode = genericUtility.getColumnValue("item_code", dom1);
siteCode = genericUtility.getColumnValue("site_code", dom1);
lotNo = genericUtility.getColumnValue("lot_no",dom1);
if (itemCode != null)
{
sql = " select descr from item where item_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
descr = rs.getString(1);
}
pstmt.close();
System.out.println("DESCRIPTION IS ==========" + descr);
}
sql = " SELECT stock.item_ser,stock.item_code,stock.unit,stock.loc_code,stock.lot_no, stock.lot_sl, "
+ " stock.site_code, stock.exp_date, stock.retest_date, stock.pack_code, stock.quantity - case "
......@@ -213,6 +227,7 @@ public class QcOrderAct extends ActionHandlerEJB implements QcOrderActLocal , Q
valueXmlString.append("<line_no>").append("<![CDATA[").append(counter).append("]]>").append("</line_no>\r\n");
valueXmlString.append("<item_ser>").append("<![CDATA[").append(rs.getString(1).trim()).append("]]>").append("</item_ser>\r\n");
valueXmlString.append("<item_code>").append("<![CDATA[").append(rs.getString(2).trim()).append("]]>").append("</item_code>\r\n");
valueXmlString.append("<descr>").append("<![CDATA[").append(descr).append("]]>").append("</descr>\r\n");
valueXmlString.append("<unit>").append("<![CDATA[").append(rs.getString(3)).append("]]>").append("</unit>\r\n");
valueXmlString.append("<loc_code>").append("<![CDATA[").append(rs.getString(4).trim()).append("]]>").append("</loc_code>\r\n");
valueXmlString.append("<lot_no>").append("<![CDATA[").append(rs.getString(5).trim()).append("]]>").append("</lot_no>\r\n");
......@@ -276,7 +291,7 @@ public class QcOrderAct extends ActionHandlerEJB implements QcOrderActLocal , Q
ResultSet rs = null;
String selectedrow = "";
String quantity = "", qtyPassed = "", qtyRej = "", qtySample = "", qty = "";
String qcOrder ="", itemCode ="", lotNo ="", lotSl ="",locCode ="", unit ="";
String qcOrder ="", itemCode ="", lotNo ="", lotSl ="",locCode ="", unit ="" ,itemDescr = "";
String locType="",locLogic ="",site ="",locUdf ="",loc ="";
int count = 0 , line = 0;
Node currDetail1 = null;
......@@ -311,6 +326,7 @@ public class QcOrderAct extends ActionHandlerEJB implements QcOrderActLocal , Q
qtyRej = "0";
}
itemCode = genericUtility.getColumnValue("item_code", selDataDom);
itemDescr = genericUtility.getColumnValue("descr", selDataDom);
qtySample = genericUtility.getColumnValue("qty_sample", dom1);
if (qtySample == null)
{
......@@ -402,6 +418,7 @@ public class QcOrderAct extends ActionHandlerEJB implements QcOrderActLocal , Q
currDetail1 = detailList.item(ctr);
qcOrder = genericUtility.getColumnValue("qorder_no", dom1);
itemCode = genericUtility.getColumnValueFromNode("item_code", currDetail1);
//itemDescr = genericUtility.getColumnValueFromNode("descr", currDetail1);
lotNo = genericUtility.getColumnValueFromNode("lot_no", currDetail1);
lotSl = genericUtility.getColumnValueFromNode("lot_sl", currDetail1);
loc = genericUtility.getColumnValueFromNode("loc_code", currDetail1);
......@@ -460,9 +477,11 @@ public class QcOrderAct extends ActionHandlerEJB implements QcOrderActLocal , Q
return errString;
}
}
valueXmlString.append("<qorder_no isSrvCallOnChg='0'>").append("<![CDATA[").append(qcOrder).append("]]>").append("</qorder_no>\r\n");
valueXmlString.append("<line_no isSrvCallOnChg='0'>").append("<![CDATA[").append(line).append("]]>").append("</line_no>\r\n");
valueXmlString.append("<item_code isSrvCallOnChg='0'>").append("<![CDATA[").append(itemCode).append("]]>").append("</item_code>\r\n");
valueXmlString.append("<item_descr isSrvCallOnChg='0'>").append("<![CDATA[").append(itemDescr).append("]]>").append("</item_descr>\r\n");
valueXmlString.append("<lot_no isSrvCallOnChg='0'>").append("<![CDATA[").append(lotNo).append("]]>").append("</lot_no>\r\n");
valueXmlString.append("<lot_sl isSrvCallOnChg='0'>").append("<![CDATA[").append(lotSl).append("]]>").append("</lot_sl>\r\n");
valueXmlString.append("<loc_code isSrvCallOnChg='0'>").append("<![CDATA[").append(locCode).append("]]>").append("</loc_code>\r\n");
......
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