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