Commit 5761dd4a authored by cpatil's avatar cpatil

modified @urse


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99121 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2706a4d5
......@@ -210,7 +210,7 @@ public class MRPWizardAllocateQtyBean
{
Node detail4Node = detail4List.item(cntr);
//NodeList detail4NodeList = detail4Node.getChildNodes();
System.out.println("@@@@@@@@@node name[" + detail4Node.getNodeName()+"]");
//System.out.println("@@@@@@@@@node name[" + detail4Node.getNodeName()+"]");
// if( detail4Node != null && detail4Node.getNodeValue() != null )
{
......
......@@ -34,7 +34,9 @@ public class MRPWizardXmlDataBean
System.out.println("@@@@@@@ getXmlData === xmlString1::::::["+xmlString1+"]@@@@@@@");
if (xmlString1 != null && xmlString1.trim().length() > 0)
{
dom = GenericUtility.getInstance().parseString(xmlString1);
GenericUtility genericUtility= new GenericUtility();
// dom = GenericUtility.getInstance().parseString(xmlString1);
dom = genericUtility.parseString(xmlString1);
xmldata = getXmlData(dom);
}
}
......
......@@ -79,7 +79,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
// added for ejb3
//added for ejb3
//12/04/10 manoharan MF90BHU003
//import org.apache.poi.xssf.usermodel.*;
//import org.apache.poi.ss.util.CellRangeAddress;
......@@ -7394,6 +7394,12 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
sqlMpsOrder = "DELETE FROM MPS_ORDER " + "WHERE SITE_CODE = ? " + "AND ITEM_CODE = ? "+ " AND STATUS in ('M')";//Manoj dtd 14/07/2014 Status Changed from N to M
sqlWorkOrder = "DELETE FROM WORKORDER " + "WHERE SITE_CODE = ? " + "AND ITEM_CODE = ? " + " AND STATUS in ('M')"; // replace ORDER_TYPE inplace of STATUS column ... 17/06/14...
if( isDetailReq ) // added for remove FK_WORKORDER_CAMGIAN constrainst when already allocation against campwise
{
sqlWorkOrder = sqlWorkOrder + " and campgn_no is null ";
}
sqlDistDemand = "DELETE FROM DIST_DEMAND " + " WHERE STATUS = 'P' " + "AND SITE_CODE = ? " + "AND ITEM_CODE = ? ";
if (matPlan.equals("Y"))
......@@ -7429,6 +7435,18 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
pstmt.close();
pstmt = null;
// comment code for not deleting workorder
if( isDetailReq ) //added for supreme on 02/11/15 for delete both workorder
{
pstmt = conn.prepareStatement(sqlWorkOrder);
pstmt.setString(1, siteCode);
pstmt.setString(2, itemCode);
rowsDeleted = pstmt.executeUpdate();
System.out.println("Rows Deleted in WorkOrder :" + rowsDeleted);
conn.commit();
pstmt.close();
}
else
{
if (mfgType != null && ((mfgType.trim()).equalsIgnoreCase("O")))
{
pstmt = conn.prepareStatement(sqlWorkOrder);
......@@ -7439,7 +7457,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
conn.commit();
pstmt.close();
}
}
}
if (disPlan.equals("Y"))
......@@ -9559,7 +9577,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
if( tranIdList.size() > 0)
{
//errString = mpsToWorkOrder.calWorkorderPrc( tranIdList, conn);
errString = mpsToWorkOrder.calWorkorderPrc( tranIdList, conn,xtraParams);
errString = mpsToWorkOrder.calWorkorderPrc( tranIdList, conn,xtraParams, true);
}
System.out.println("@@@@@@ errString["+errString+"]");
}
......@@ -10064,6 +10082,12 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
for (int ctr3=0; ctr3 < IPD_MPS_ORDER.size();ctr3++)
{
count1++;
/*if( count1 == count) // added for remove same dbid occure in detail2 and detail4 ... on @urse 04/11/15 by cpatil
{
System.out.println("@@@@@10087::count1["+count1+"]count["+count+"]");
count1++;
System.out.println("@@@@@10124::count1["+count1+"]");
}*/
HashMap tempMap = new HashMap();
tempMap = (HashMap) IPD_MPS_ORDER.get(ctr3);
......@@ -10100,6 +10124,12 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
for (int ctr3=0; ctr3 < IPD_INDENT.size();ctr3++)
{
count1++;
/*if( count1 == count) // added for remove same dbid occure in detail2 and detail4 ... on @urse 04/11/15 by cpatil
{
System.out.println("@@@@@10124::count1["+count1+"]count["+count+"]");
count1++;
System.out.println("@@@@@10124::count1["+count1+"]");
}*/
HashMap tempMap = new HashMap();
tempMap = (HashMap) IPD_INDENT.get(ctr3);
......@@ -10132,6 +10162,12 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
for (int ctr3=0; ctr3 < IPD_DIST.size();ctr3++)
{
count1++;
/*if( count1 == count) // added for remove same dbid occure in detail2 and detail4 ... on @urse 04/11/15 by cpatil
{
System.out.println("@@@@@10167::count1["+count1+"]count["+count+"]");
count1++;
System.out.println("@@@@@10124::count1["+count1+"]");
}*/
HashMap tempMap = new HashMap();
tempMap = (HashMap) IPD_DIST.get(ctr3);
......@@ -10164,6 +10200,12 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
for (int ctr3=0; ctr3 < IPD_INDEPENDENT.size();ctr3++)
{
count1++;
/*if( count1 == count) // added for remove same dbid occure in detail2 and detail4 ... on @urse 04/11/15 by cpatil
{
System.out.println("@@@@@10203::count1["+count1+"]count["+count+"]");
count1++;
System.out.println("@@@@@10124::count1["+count1+"]");
}*/
HashMap tempMap = new HashMap();
tempMap = (HashMap) IPD_INDEPENDENT.get(ctr3);
......@@ -10978,6 +11020,13 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
{
System.out.println("@@@@@@@@@@@ inside dettimeCtr["+dettimeCtr+"]");
count1++;
/*if( count1 == count) // added for remove same dbid occure in detail2 and detail4 ... on @urse 04/11/15 by cpatil
{
System.out.println("@@@@@11025::count1["+count1+"]count["+count+"]");
count1++;
System.out.println("@@@@@10124::count1["+count1+"]");
}*/
valueXmlString.append("<Detail4 domID='" + count1 + "' >\r\n");
String altItemPerc = detadpElement.getAltitemPerc();
......
......@@ -357,6 +357,8 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
String itemCodeInv=""; double quantityInv=0,issueQtyInv=0; // added by cpatil
double noArt = 0,netWeight = 0, grossWeight=0, stkQty=0; // added by cpatil on 02/04/15 urse
String lineNoInvAllocDet="";
try
{
......@@ -537,7 +539,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
if(flag == false)
{
//sql2 = " SELECT LOC_CODE,LOT_NO,LOT_SL FROM INV_ALLOC_DET WHERE TRAN_ID IN (SELECT TRAN_ID FROM INV_ALLOCATE WHERE WORK_ORDER = ? ) AND ITEM_CODE = ? ";
sql2 = " SELECT LOC_CODE,LOT_NO,LOT_SL,ITEM_CODE,SITE_CODE, quantity , issue_qty " +
sql2 = " SELECT LOC_CODE,LOT_NO,LOT_SL,ITEM_CODE,SITE_CODE, quantity , issue_qty, line_no " +
" FROM INV_ALLOC_DET " +
" WHERE TRAN_ID IN (SELECT TRAN_ID FROM INV_ALLOCATE WHERE WORK_ORDER = ? ) " +
" and 'Y' <> case when deallocated is null then 'N' else deallocated end " +
......@@ -557,10 +559,13 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
siteCode =rs2.getString("SITE_CODE");
quantityInv =rs2.getDouble("quantity");
issueQtyInv =rs2.getDouble("issue_qty");
String propReqQtyStr = df.format(propReqQty);
lineNoInvAllocDet =rs2.getString("LINE_NO"); // added by cpatil for line_no not set in update querry @urse 14/10/15
//String propReqQtyStr = df.format(propReqQty);
System.out.println("@@@@lineNoInvAllocDet["+lineNoInvAllocDet+"]quantityInv["+quantityInv+"]");
String propReqQtyStr = df.format(quantityInv);
System.out.println("@@@@propReqQtyStr["+propReqQtyStr+"]");
propReqQty = Double.parseDouble(propReqQtyStr);
System.out.println("propReqQty @@@::["+propReqQty+"]for item["+itemCode + "]quantityInv["+quantityInv+"]issueQtyInv["+issueQtyInv+"]");
System.out.println("propReqQty @@@::["+propReqQty+"]for item["+itemCode + "]quantityInv["+quantityInv+"]issueQtyInv["+issueQtyInv+"]lineNoInvAllocDet["+lineNoInvAllocDet+"]");
/*
stockSql ="select a.lot_no, a.loc_code, a.lot_sl, a.rate, a.gross_rate,a.supp_code__mfg "
+" ,(a.quantity-a.alloc_qty) as stockBalQty "
......@@ -823,7 +828,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
+ " dealloc_qty = (CASE WHEN dealloc_qty IS NULL THEN 0 ELSE dealloc_qty END) + ?"
+ " where tran_id in (select tran_id from inv_allocate where work_order = ? )"
+ " and item_code = ? and lot_sl= ? and lot_no = ? and site_code= ? and loc_code = ? "
+ " and exp_lev = ? ";
+ " and exp_lev = ? and line_no = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setDouble(1,propReqQty);
pstmt1.setDouble(2,propReqQty);
......@@ -834,6 +839,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
pstmt1.setString(7,siteCode);
pstmt1.setString(8,locCode);
pstmt1.setString(9,expLev);
pstmt1.setString(10,lineNoInvAllocDet); // added by cpatil for line_no not set in update querry @urse 14/10/15
int cnt=pstmt1.executeUpdate();
System.out.println("Count after PSTM is:- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%["+cnt+"]");
pstmt1.close();pstmt1=null;
......
......@@ -1608,7 +1608,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
actualPropQty=Double.parseDouble(""+hashMap.get("alloc_qty"));//Changed by Manoj dtd 20/08/15 Set value from map instead of dom value
int count = 0,recIn=0 ;
sql = " select count(*) from inv_alloc_det where tran_id = ? and item_code = ? and lot_no = ? "
+ "and lot_sl = ? and loc_code = ? and site_code = ? and exp_lev=? and case when deallocated is null then 'N' else deallocated end <> 'Y' ";
+ "and lot_sl = ? and loc_code = ? and site_code = ? and exp_lev=? " +
" and case when deallocated is null then 'N' else deallocated end <> 'Y' ";
pstmt = connOne.prepareStatement(sql);
pstmt.setString(1,tranId);
pstmt.setString(2,itemCode);
......
......@@ -2727,7 +2727,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
}
return retVal;
}
@Override
public ArrayList getDetails(String woCode) throws ITMException
{
System.out.println("---getDetails method called12345-------------------");
......
......@@ -479,15 +479,16 @@ public class WorkorderPrc extends ProcessEJB implements WorkorderPrcLocal,Worko
public String calWorkorderPrc(ArrayList tranList,Connection conn) throws Exception,ITMException
{
String errString="", xtraParams="";
errString=calWorkorderPrc(tranList,conn,xtraParams);
boolean fromMRP= false;
errString=calWorkorderPrc(tranList,conn,xtraParams,fromMRP);
System.out.println("calWorkorderPrc(tranList,conn,xtraParams)@@@errString["+errString+"]");
return errString;
}
public String calWorkorderPrc(ArrayList tranList,Connection conn, String xtraParams) throws Exception,ITMException
public String calWorkorderPrc(ArrayList tranList,Connection conn, String xtraParams, boolean fromMRP) throws Exception,ITMException
{
System.out.println("@@@@@@@@@@@ calWorkorderPrc()............");
System.out.println("@@@@@@@@@@@ calWorkorderPrc()...........fromMRP["+fromMRP+"]");
ResultSet rs1 = null,rsSql1=null,rsSql2=null;
PreparedStatement pstmt = null,pstmtInsert=null,pstmtUpdate=null,pstmtSql1=null,pstmtSql2=null;
......@@ -510,6 +511,7 @@ public class WorkorderPrc extends ProcessEJB implements WorkorderPrcLocal,Worko
this.chgTerm = blanknull(this.chgTerm).trim();
}
System.out.println("[WorkorderPrc][calWorkorderPrc][loginCode]=>["+loginCode+"]this.loginCode["+this.loginCode+"]");
System.out.println("[WorkorderPrc][calWorkorderPrc][chgTerm]=>["+chgTerm+"]this.chgTerm ["+this.chgTerm +"]");
......@@ -730,7 +732,16 @@ public class WorkorderPrc extends ProcessEJB implements WorkorderPrcLocal,Worko
System.out.println("[WorkorderPrc]=>"+java.sql.Timestamp.valueOf(getCurrdateAppFormat().toString()));
pstmtInsert.setTimestamp(16,java.sql.Timestamp.valueOf(getCurrdateAppFormat().toString()));//for ord_date
pstmtInsert.setTimestamp(17,java.sql.Timestamp.valueOf(dueDate.trim()));//for due_date
if( fromMRP ) // added for delete workworder created from mrp. // if true means wo crete from mrp otherwise normal MPS to WO // status M help at the time of delete WO.
{
pstmtInsert.setString(18,"M");//for status
}
else
{
pstmtInsert.setString(18,"P");//for status
}
pstmtInsert.setTimestamp(19,new Timestamp(System.currentTimeMillis()));//for status_date
if("Y".equalsIgnoreCase(feedbackReqd)) // added for feedback req 'Y' for supreme on 23/09/15 by cpatil
......
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