Commit 7aeb6526 authored by msharma's avatar msharma

Work Order Deletion contition Changed


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91727 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2d822504
......@@ -4108,7 +4108,7 @@ private String bomExplode(String siteCode, String bomCode) throws ITMException
sqlWorkOrder = "DELETE FROM WORKORDER "
+ "WHERE SITE_CODE = ? "
+ "AND ITEM_CODE = ? "
+ " AND STATUS in ('M','P')";
+ " AND STATUS in ('M')";
sqlDistDemand = "DELETE FROM DIST_DEMAND "
+ " WHERE STATUS = 'P' "
+ "AND SITE_CODE = ? "
......@@ -4146,7 +4146,7 @@ private String bomExplode(String siteCode, String bomCode) throws ITMException
rs=null;
pstmt.close();
pstmt=null;
if(mfgType!=null && (!(mfgType.trim()).equalsIgnoreCase("O")))
if(mfgType!=null && ((mfgType.trim()).equalsIgnoreCase("O")))
{
pstmt = conn.prepareStatement(sqlWorkOrder);
pstmt.setString(1,siteCode);
......@@ -6186,11 +6186,12 @@ private String bomExplode(String siteCode, String bomCode) throws ITMException
int count = 0;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
System.out.println("Printing adpeList.size()---"+adpeList.size());
for(int adpeCount=0; adpeCount<adpeList.size(); adpeCount++)
{
flag = true;
adpElement = (ADPElement)adpeList.get(adpeCount);
System.out.println("Printing adpeCount---"+adpeCount);
siteCode = adpElement.getSiteCode();
itemCode = adpElement.getItemCode();
maxQty = adpElement.getMaxQty();
......@@ -6213,9 +6214,12 @@ private String bomExplode(String siteCode, String bomCode) throws ITMException
desc = adpElement.getItemDescr();
ArrayList timeMRParr = adpElement.getTimeMrpList();
System.out.println("Printing timeMRParr.size()---"+timeMRParr.size());
for (int timeCtr = 0; timeCtr < timeMRParr.size() ; timeCtr++)
{
System.out.println("Printing timeCtr---"+timeCtr);
TimeMRP timeMrp = (TimeMRP)timeMRParr.get(timeCtr);
System.out.println("Printing timeMrp---"+timeMrp);
demand = timeMrp.getDemand();
supply = timeMrp.getSupply();
......@@ -6321,6 +6325,7 @@ private String bomExplode(String siteCode, String bomCode) throws ITMException
}
valueXmlString.append("</Detail"+context+">");
System.out.println("valueXmlString----"+valueXmlString);
//ended by akhilesh
......@@ -6436,6 +6441,8 @@ private String bomExplode(String siteCode, String bomCode) throws ITMException
}
}
valueXmlString.append("</Root>");
System.out.println("valueXmlString----2---"+valueXmlString);
System.out.println("context-------"+context);
if ( context!= null && context.trim().length() > 0 && context.equals("3") )
{
resultString = valueXmlString.toString();
......@@ -6655,13 +6662,13 @@ private String bomExplode(String siteCode, String bomCode) throws ITMException
cell = row.createCell((short)j);
}
if(flag)
{
//if(flag)
//{
row.getCell(0).setCellValue(siteCode);
row.getCell(1).setCellValue(itemCode);
row.getCell(2).setCellValue(desc);
row.getCell(3).setCellValue(suppSour);
}
//}
row.getCell(4).setCellValue(demand);
row.getCell(5).setCellValue(supply);
......@@ -6686,8 +6693,8 @@ private String bomExplode(String siteCode, String bomCode) throws ITMException
row.getCell(16).setCellValue(runningPlanSupply);
row.getCell(17).setCellValue(independentDemand);
if(flag)
{
//if(flag)
//{
row.getCell(18).setCellValue(bomCode);
row.getCell(19).setCellValue(orderOpt);
row.getCell(20).setCellValue(batchQtyType);
......@@ -6704,7 +6711,7 @@ private String bomExplode(String siteCode, String bomCode) throws ITMException
row.getCell(31).setCellValue(purLeadTime);
row.getCell(32).setCellValue(qcLeadTime);
row.getCell(33).setCellValue(mfgLeadTime);
}
//}
//flag = false; // 25/02/11 manoharan commented as BTPL want the same to be repeated in the excel 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