Commit 695cf31a authored by dsawant's avatar dsawant

new column added for edit


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95905 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6e92e225
...@@ -620,12 +620,12 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W ...@@ -620,12 +620,12 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W
System.out.println("DOM111 Elements>>["+genericUtility.serializeDom(dom).toString()+"]"); System.out.println("DOM111 Elements>>["+genericUtility.serializeDom(dom).toString()+"]");
System.out.println("DOM222 Elements>>["+genericUtility.serializeDom(dom1).toString()+"]"); System.out.println("DOM222 Elements>>["+genericUtility.serializeDom(dom1).toString()+"]");
System.out.println("DOM322 Elements>>["+genericUtility.serializeDom(dom2).toString()+"]"); System.out.println("DOM322 Elements>>["+genericUtility.serializeDom(dom2).toString()+"]");
String workOrder = "",itemCode = "",itemDescr="",sql="",unit="",packCode="",qcReqd="",locGrp=""; String workOrder = "",itemCode = "",itemDescr="",sql="",unit="",packCode="",qcReqd="",locGrp="",tranType ="",confirmed="",createStab="",unitStd="",locCodeAprv="";
double totDetQuan = 0.0,totNoArt=0.0; double totDetQuan = 0.0,totNoArt=0.0,potencyPerc=0.0,convQtyStduom=0.0,operation=0.0,stdQty=0.0;
java.sql.Timestamp currDate = null,mfgDateStart = null,startDate=null,expDate=null,tdate = null; java.sql.Timestamp currDate = null,mfgDateStart = null,startDate=null,expDate=null,tdate = null,datCompl=null,confDate=null;
double quantity = 0,grossWeight = 0,tareWeight = 0,netWeight = 0,noOfArt=0,shippsize = 0; double quantity = 0,grossWeight = 0,tareWeight = 0,netWeight = 0,noOfArt=0,shippsize = 0;
SimpleDateFormat sdf = null; SimpleDateFormat sdf = null;
String currAppdate = "",woSiteCode="",sStartDate="",sExpDate="",sMfgDateStart="",stdate=""; String currAppdate = "",woSiteCode="",sStartDate="",sExpDate="",sMfgDateStart="",stdate="",sDatCompl="",sConfDate="";
String tranid =""; String tranid ="";
double rate = 0,conquan,conOldRate,oldAmount,amount,amtdiff,oldRate=0,getquantity=0; double rate = 0,conquan,conOldRate,oldAmount,amount,amtdiff,oldRate=0,getquantity=0;
int cnt = 0; int cnt = 0;
...@@ -656,12 +656,14 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W ...@@ -656,12 +656,14 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W
loginSite = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"); loginSite = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
switch (currentFormNo) { switch (currentFormNo) {
case 1 : case 1 :
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
break; break;
case 2 : case 2 :
parentNodeList = dom.getElementsByTagName("Detail2"); parentNodeList = dom.getElementsByTagName("Detail2");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
...@@ -695,13 +697,15 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W ...@@ -695,13 +697,15 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W
System.out.println(">>>>>>>>>>>SXD"+workOrder); System.out.println(">>>>>>>>>>>SXD"+workOrder);
sql = "select a.tran_id,a.tran_date,a.site_code,a.work_order,a.date__start," sql = "select a.tran_id,a.tran_date,a.site_code,a.work_order,a.date__start,"
+ "a.item_code,b.descr,a.loc_code,a.lot_sl,a.quantity,a.no_art,a.unit,a.lot_no,a.gross_weight,a.net_weight " + "a.item_code,b.descr,a.loc_code,a.lot_sl,a.quantity,a.no_art,a.unit,a.lot_no,a.gross_weight,a.net_weight,"
+" a.qc_reqd,a.tran_type, a.operation, a.date__compl,a.exp_date,a.site_code__own,a.pack_code,a.confirmed,a.mfg_date,"
+ "a.conv__qty_stduom,a.unit__std,a.std_qty,a.create_stab,a.loc_code__aprv,a.potency_perc,a.lock_group,a.conf_date "
+ "FROM workorder_receipt a,item b WHERE a.item_code = b.item_code and CASE WHEN confirmed IS NULL THEN 'N' ELSE CONFIRMED END = 'N' and work_order = ?"; + "FROM workorder_receipt a,item b WHERE a.item_code = b.item_code and CASE WHEN confirmed IS NULL THEN 'N' ELSE CONFIRMED END = 'N' and work_order = ?";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1,workOrder); pstmt.setString(1,workOrder);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while(rs.next()) if(rs.next())
{ {
tranid = rs.getString(1) == null ? "":rs.getString(1); tranid = rs.getString(1) == null ? "":rs.getString(1);
currDate = rs.getTimestamp(2); currDate = rs.getTimestamp(2);
...@@ -719,7 +723,24 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W ...@@ -719,7 +723,24 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W
grossWeight = rs.getDouble(14); grossWeight = rs.getDouble(14);
netWeight = rs.getDouble(15); netWeight = rs.getDouble(15);
qcReqd = rs.getString("qc_reqd") == null ? "":rs.getString("qc_reqd");
tranType = rs.getString("tran_type") == null ? "":rs.getString("tran_type");
operation = rs.getDouble("operation");
datCompl = rs.getTimestamp("date__compl");
expDate = rs.getTimestamp("exp_date");
woSiteCode = rs.getString("site_code__own") == null ? "":rs.getString("site_code__own");
packCode = rs.getString("pack_code") == null ? "":rs.getString("pack_code");
confirmed = rs.getString("confirmed") == null ? "":rs.getString("confirmed");
mfgDateStart = rs.getTimestamp("mfg_date");
convQtyStduom = rs.getDouble("conv__qty_stduom");
unitStd = rs.getString("unit__std") == null ? "":rs.getString("unit__std");
stdQty = rs.getDouble("std_qty");
createStab = rs.getString("create_stab") == null ? "":rs.getString("create_stab");
locCodeAprv = rs.getString("loc_code__aprv") == null ? "":rs.getString("loc_code__aprv");
potencyPerc = rs.getDouble("potency_perc");
locGrp = rs.getString("lock_group") == null ? "":rs.getString("lock_group");
confDate = rs.getTimestamp("conf_date");
tareWeight = grossWeight - netWeight; tareWeight = grossWeight - netWeight;
simpleDateFormat=new SimpleDateFormat(genutility.getApplDateFormat()); simpleDateFormat=new SimpleDateFormat(genutility.getApplDateFormat());
...@@ -731,12 +752,27 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W ...@@ -731,12 +752,27 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W
{ {
sStartDate = simpleDateFormat.format(startDate); sStartDate = simpleDateFormat.format(startDate);
} }
if(datCompl != null)
{
sDatCompl = simpleDateFormat.format(datCompl);
}
if(expDate != null)
{
sExpDate = simpleDateFormat.format(expDate);
}
if(mfgDateStart != null)
{
sMfgDateStart = simpleDateFormat.format(mfgDateStart);
}
if(confDate != null)
{
sConfDate = simpleDateFormat.format(confDate);
}
sdf=new SimpleDateFormat(genutility.getApplDateFormat()); sdf=new SimpleDateFormat(genutility.getApplDateFormat());
tdate = new java.sql.Timestamp(System.currentTimeMillis()) ; tdate = new java.sql.Timestamp(System.currentTimeMillis()) ;
stdate = simpleDateFormat.format(tdate); stdate = simpleDateFormat.format(tdate);
valueXmlString.append("<Detail2 domID='1' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n"); valueXmlString.append("<Detail2 domID='1' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n");
valueXmlString.append("<attribute selected=\"Y\" updateFlag=\"E\" status=\"O\" pkNames=\"\"/>\r\n"); valueXmlString.append("<attribute selected=\"Y\" updateFlag=\"E\" status=\"O\" pkNames=\"\"/>\r\n");
valueXmlString.append("<tran_id>").append("<![CDATA[" + tranid + "]]>").append("</tran_id>"); valueXmlString.append("<tran_id>").append("<![CDATA[" + tranid + "]]>").append("</tran_id>");
...@@ -758,6 +794,36 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W ...@@ -758,6 +794,36 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W
valueXmlString.append("<chg_user>").append("<![CDATA[" + chgUser + "]]>").append("</chg_user>"); valueXmlString.append("<chg_user>").append("<![CDATA[" + chgUser + "]]>").append("</chg_user>");
valueXmlString.append("<chg_term>").append("<![CDATA[" + chgTerm + "]]>").append("</chg_term>"); valueXmlString.append("<chg_term>").append("<![CDATA[" + chgTerm + "]]>").append("</chg_term>");
valueXmlString.append("<chg_date>").append("<![CDATA[" + stdate + "]]>").append("</chg_date>"); valueXmlString.append("<chg_date>").append("<![CDATA[" + stdate + "]]>").append("</chg_date>");
//-- Added 13-Aug-2014
valueXmlString.append("<qc_reqd>").append("<![CDATA[" + qcReqd + "]]>").append("</qc_reqd>");
valueXmlString.append("<tran_type>").append("<![CDATA[F]]>").append("</tran_type>");
valueXmlString.append("<operation>").append("<![CDATA[0]]>").append("</operation>");
valueXmlString.append("<date__compl>").append("<![CDATA[" + sDatCompl + "]]>").append("</date__compl>");
valueXmlString.append("<exp_date>").append("<![CDATA[" + sExpDate + "]]>").append("</exp_date>");
valueXmlString.append("<site_code__own>").append("<![CDATA[" + woSiteCode + "]]>").append("</site_code__own>");
valueXmlString.append("<pack_code>").append("<![CDATA[" + packCode + "]]>").append("</pack_code>");
valueXmlString.append("<date__start>").append("<![CDATA[" + sStartDate + "]]>").append("</date__start>");
valueXmlString.append("<confirmed>").append("<![CDATA[" + confirmed + "]]>").append("</confirmed>");
valueXmlString.append("<conf_date>").append("<![CDATA[" + sConfDate + "]]>").append("</conf_date>");
valueXmlString.append("<mfg_date>").append("<![CDATA[" + sMfgDateStart + "]]>").append("</mfg_date>");
valueXmlString.append("<conv__qty_stduom>").append("<![CDATA[" + convQtyStduom + "]]>").append("</conv__qty_stduom>");
valueXmlString.append("<unit__std>").append("<![CDATA[" + unitStd + "]]>").append("</unit__std>");
valueXmlString.append("<std_qty>").append("<![CDATA[" + stdQty + "]]>").append("</std_qty>");
valueXmlString.append("<create_stab>").append("<![CDATA[" + createStab + "]]>").append("</create_stab>");
/*valueXmlString.append("<yield_with_reco>").append("<![CDATA[0]]>").append("</yield_with_reco>");
valueXmlString.append("<yield_without_reco>").append("<![CDATA[0]]>").append("</yield_without_reco>");*/
valueXmlString.append("<loc_code__aprv>").append("<![CDATA[" + locCodeAprv + "]]>").append("</loc_code__aprv>");
//valueXmlString.append("<canc_bo>").append("<![CDATA[N]]>").append("</canc_bo>");
//valueXmlString.append("<process_hours>").append("<![CDATA[0]]>").append("</process_hours>");
valueXmlString.append("<potency_perc>").append("<![CDATA[" + potencyPerc + "]]>").append("</potency_perc>");
/*valueXmlString.append("<emp_code__aprv>").append("<![CDATA[" + userId + "]]>").append("</emp_code__aprv>");
valueXmlString.append("<add_user>").append("<![CDATA[" + chgUser + "]]>").append("</add_user>"); //changes done by deepak
valueXmlString.append("<add_term>").append("<![CDATA[" + chgTerm + "]]>").append("</add_term>");
valueXmlString.append("<add_date>").append("<![CDATA[" + currAppdate + "]]>").append("</add_date>");*/
valueXmlString.append("<lock_group>").append("<![CDATA[" + locGrp + "]]>").append("</lock_group>");
valueXmlString.append("</Detail2>"); valueXmlString.append("</Detail2>");
...@@ -878,6 +944,7 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W ...@@ -878,6 +944,7 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W
valueXmlString.append("<unit>").append("<![CDATA[" + unit + "]]>").append("</unit>"); valueXmlString.append("<unit>").append("<![CDATA[" + unit + "]]>").append("</unit>");
valueXmlString.append("<pack_code>").append("<![CDATA[" + packCode + "]]>").append("</pack_code>"); valueXmlString.append("<pack_code>").append("<![CDATA[" + packCode + "]]>").append("</pack_code>");
valueXmlString.append("<confirmed>").append("<![CDATA[N]]>").append("</confirmed>"); valueXmlString.append("<confirmed>").append("<![CDATA[N]]>").append("</confirmed>");
valueXmlString.append("<conf_date>").append("<![CDATA[" + currAppdate + "]]>").append("</conf_date>");
valueXmlString.append("<mfg_date>").append("<![CDATA[" + sMfgDateStart + "]]>").append("</mfg_date>"); valueXmlString.append("<mfg_date>").append("<![CDATA[" + sMfgDateStart + "]]>").append("</mfg_date>");
sql = "select qc_reqd from siteitem where site_code = ? and item_code = ?"; sql = "select qc_reqd from siteitem where site_code = ? and item_code = ?";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
...@@ -977,19 +1044,19 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W ...@@ -977,19 +1044,19 @@ public class WorkOrdRcpDet extends ValidatorEJB implements WorkOrdRcpDetLocal, W
valueXmlString.append("<tare_weight>").append("<![CDATA[0]]>").append("</tare_weight>"); valueXmlString.append("<tare_weight>").append("<![CDATA[0]]>").append("</tare_weight>");
valueXmlString.append("<net_weight>").append("<![CDATA[0]]>").append("</net_weight>"); valueXmlString.append("<net_weight>").append("<![CDATA[0]]>").append("</net_weight>");
*/ */
valueXmlString.append("<yield_with_reco>").append("<![CDATA[0]]>").append("</yield_with_reco>"); // valueXmlString.append("<yield_with_reco>").append("<![CDATA[0]]>").append("</yield_with_reco>");
valueXmlString.append("<yield_without_reco>").append("<![CDATA[0]]>").append("</yield_without_reco>"); // valueXmlString.append("<yield_without_reco>").append("<![CDATA[0]]>").append("</yield_without_reco>");
valueXmlString.append("<loc_code__aprv>").append("<![CDATA[ ]]>").append("</loc_code__aprv>"); valueXmlString.append("<loc_code__aprv>").append("<![CDATA[ ]]>").append("</loc_code__aprv>");
valueXmlString.append("<canc_bo>").append("<![CDATA[N]]>").append("</canc_bo>"); // valueXmlString.append("<canc_bo>").append("<![CDATA[N]]>").append("</canc_bo>");
valueXmlString.append("<process_hours>").append("<![CDATA[0]]>").append("</process_hours>"); // valueXmlString.append("<process_hours>").append("<![CDATA[0]]>").append("</process_hours>");
valueXmlString.append("<potency_perc>").append("<![CDATA[0]]>").append("</potency_perc>"); valueXmlString.append("<potency_perc>").append("<![CDATA[0]]>").append("</potency_perc>");
valueXmlString.append("<emp_code__aprv>").append("<![CDATA[" + userId + "]]>").append("</emp_code__aprv>"); // valueXmlString.append("<emp_code__aprv>").append("<![CDATA[" + userId + "]]>").append("</emp_code__aprv>");
valueXmlString.append("<add_user>").append("<![CDATA[" + chgUser + "]]>").append("</add_user>"); //changes done by deepak // valueXmlString.append("<add_user>").append("<![CDATA[" + chgUser + "]]>").append("</add_user>"); //changes done by deepak
valueXmlString.append("<add_term>").append("<![CDATA[" + chgTerm + "]]>").append("</add_term>"); // valueXmlString.append("<add_term>").append("<![CDATA[" + chgTerm + "]]>").append("</add_term>");
valueXmlString.append("<add_date>").append("<![CDATA[" + currAppdate + "]]>").append("</add_date>"); // valueXmlString.append("<add_date>").append("<![CDATA[" + currAppdate + "]]>").append("</add_date>");
......
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