Commit 43f7f545 authored by caluka's avatar caluka

ejb changes done for requirement wizard transaction[MF3KSUN005]


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95733 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 817500d8
......@@ -213,11 +213,10 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
* null) { dueDate1 = sdf.format(dueDate); } else {
* dueDate1 = ""; }
*/
valueXmlString.append("<Detail2 domID='" + lineNo + "' objContext = '" + currentFormNo + "' selected=\"N\">\r\n");
valueXmlString.append("<attribute selected=\"N\" updateFlag=\"E\" status=\"O\" pkNames=\"\"/>\r\n");
valueXmlString.append("<site_code>").append("<![CDATA[" + rs.getString("SITE_CODE") + "]]>").append("</site_code>\r\n");
valueXmlString.append("<item_code>").append("<![CDATA[" + rs.getString("ITEM_CODE") + "]]>").append("</item_code>\r\n");
valueXmlString.append("<item_code>").append("<![CDATA[" + rs.getString("ITEM_CODE").trim() + "]]>").append("</item_code>\r\n");
valueXmlString.append("<item_descr protect = '1'>").append("<![CDATA[" + rs.getString("DESCR") + "]]>").append("</item_descr>\r\n");
valueXmlString.append("<unit protect = '1'>").append("<![CDATA[" + rs.getString("UNIT") + "]]>").append("</unit>\r\n");
valueXmlString.append("<no_of_batch protect = '1'>").append("<![CDATA[" + batchReq + "]]>").append("</no_of_batch>\r\n");
......@@ -235,8 +234,8 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
// valueXmlString.append("<Detail2>\r\n");
valueXmlString.append("<Detail2 domID='" + lineNo + "' objContext = '" + currentFormNo + "' selected=\"N\">\r\n");
valueXmlString.append("<attribute selected=\"N\" updateFlag=\"E\" status=\"O\" pkNames=\"\"/>\r\n");
valueXmlString.append("<site_code>").append("").append("</site_code>\r\n");
valueXmlString.append("<site_code>").append("<![CDATA[" + siteCodeFr + "]]>").append("</site_code>\r\n");
//valueXmlString.append("<site_code>").append("").append("</site_code>\r\n");
valueXmlString.append("<item_code>").append("").append("</item_code>\r\n");
valueXmlString.append("<item_descr protect = '1'>").append("").append("</item_descr>\r\n");
valueXmlString.append("<quantity>").append("0").append("</quantity>\r\n");
......@@ -905,7 +904,7 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
System.out.println("search cal------------------["+search+"]");
System.out.println("dbID cal------------------["+dbID+"]");
System.out.println("siteCode cal------------------["+siteCode+"]");
String sql = "";
String sql = "",sql1="";
String selectSql = "";
int detCnt=0;
......@@ -913,7 +912,9 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
StringBuffer valueXmlString = new StringBuffer("<Root>\r\n");
Connection conn = null;
PreparedStatement pstmt = null;
PreparedStatement pstmt1 = null;
ResultSet rs = null;
ResultSet rs1 = null;
GenericUtility genericUtility = GenericUtility.getInstance();
try
{
......@@ -934,6 +935,22 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
while (rs.next())
{
detCnt++;
System.out.println("bomcode["+rs.getString("BOM_CODE"));
if(rs.getString("BOM_CODE") != null)
{
sql1 = " SELECT BATCH_QTY FROM BOM WHERE BOM_CODE = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1,rs.getString("BOM_CODE"));
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
batchQty = rs1.getDouble("BATCH_QTY");
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
}
valueXmlString.append("<ITEM domID='" + num + "' selected = 'N'>\r\n");
valueXmlString.append("<ITEM_CODE>").append("<![CDATA[" + rs.getString("ITEM_CODE") + "]]>").append("</ITEM_CODE>\r\n");
......@@ -942,6 +959,7 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
valueXmlString.append("<DOMID><![CDATA[").append(dbID).append("]]></DOMID>\r\n");
valueXmlString.append("<site_code><![CDATA[").append(siteCode).append("]]></site_code>\r\n");
valueXmlString.append("<BOM_CODE protect = '1'>").append("<![CDATA[" + rs.getString("BOM_CODE") + "]]>").append("</BOM_CODE>\r\n");
valueXmlString.append("<BATCH_QTY><![CDATA[").append(batchQty).append("]]></BATCH_QTY>\r\n");
valueXmlString.append("</ITEM>\r\n");
num++;
}
......@@ -966,6 +984,22 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
while (rs.next())
{
detCnt++;
System.out.println("bomcode["+rs.getString("BOM_CODE"));
if(rs.getString("BOM_CODE") != null)
{
sql1 = " SELECT BATCH_QTY FROM BOM WHERE BOM_CODE = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1,rs.getString("BOM_CODE"));
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
batchQty = rs1.getDouble("BATCH_QTY");
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
}
valueXmlString.append("<ITEM domID='" + num + "' selected = 'N'>\r\n");
valueXmlString.append("<ITEM_CODE>").append("<![CDATA[" + rs.getString("ITEM_CODE") + "]]>").append("</ITEM_CODE>\r\n");
valueXmlString.append("<ITEM_DESCR protect = '1'>").append("<![CDATA[" + rs.getString("DESCR") + "]]>").append("</ITEM_DESCR>\r\n");
......@@ -973,6 +1007,7 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
valueXmlString.append("<DOMID><![CDATA[").append(dbID).append("]]></DOMID>\r\n");
valueXmlString.append("<site_code><![CDATA[").append(siteCode).append("]]></site_code>\r\n");
valueXmlString.append("<BOM_CODE protect = '1'>").append("<![CDATA[" + rs.getString("BOM_CODE") + "]]>").append("</BOM_CODE>\r\n");
valueXmlString.append("<BATCH_QTY><![CDATA[").append(batchQty).append("]]></BATCH_QTY>\r\n");
valueXmlString.append("</ITEM>\r\n");
num++;
}
......@@ -997,6 +1032,22 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
while (rs.next())
{
detCnt++;
System.out.println("bomcode["+rs.getString("BOM_CODE"));
if(rs.getString("BOM_CODE") != null)
{
sql1 = " SELECT BATCH_QTY FROM BOM WHERE BOM_CODE = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1,rs.getString("BOM_CODE"));
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
batchQty = rs1.getDouble("BATCH_QTY");
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
}
valueXmlString.append("<ITEM domID='" + num + "' selected = 'N'>\r\n");
valueXmlString.append("<ITEM_CODE>").append("<![CDATA[" + rs.getString("ITEM_CODE") + "]]>").append("</ITEM_CODE>\r\n");
valueXmlString.append("<ITEM_DESCR protect = '1'>").append("<![CDATA[" + rs.getString("DESCR") + "]]>").append("</ITEM_DESCR>\r\n");
......@@ -1004,6 +1055,7 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
valueXmlString.append("<BOM_CODE protect = '1'>").append("<![CDATA[" + rs.getString("BOM_CODE") + "]]>").append("</BOM_CODE>\r\n");
valueXmlString.append("<DOMID><![CDATA[").append(dbID).append("]]></DOMID>\r\n");
valueXmlString.append("<site_code><![CDATA[").append(siteCode).append("]]></site_code>\r\n");
valueXmlString.append("<BATCH_QTY><![CDATA[").append(batchQty).append("]]></BATCH_QTY>\r\n");
valueXmlString.append("</ITEM>\r\n");
num++;
}
......
......@@ -548,7 +548,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
return errString;
}
/* Added by sachin on 26/6/13
/*// Added by sachin on 26/6/13
if (wnName.equals("w_requirement"))
{
......@@ -558,7 +558,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
return xmlDataString.toString();
}
}
End Added by sachin on 26/6/13
//End Added by sachin on 26/6/13
*/
errString = generatePlanDemand();
if (errString != null && errString.trim().length() > 0)
......@@ -7509,7 +7509,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
sorderItemSet.add( siteCode+itemCode ); //+saleOrder
}
}
if(isRequirement) // Chandrashekar
/*if(isRequirement) // Chandrashekar
{
System.out.println("@@@@@@@@@["+siteCode+"]["+itemCode+ "]@@@@@@@@@sorderItemSet["+sorderItemSet+"]saleOrder["+saleOrder+"]isRequirement["+isRequirement+"]");
......@@ -7525,7 +7525,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
}
}
System.out.println("@@@@@@@@ test continue not found--["+siteCode+"]-["+itemCode+"]--@@sorderItemSet["+sorderItemSet+"]");
System.out.println("@@@@@@@@ test continue not found--["+siteCode+"]-["+itemCode+"]--@@sorderItemSet["+sorderItemSet+"]");*/
//valueXmlString.append("<Detail" + context + " domID='" + count + "' >\r\n");
if(!(isDetailReq))
......
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