Commit 9fe36800 authored by smestry's avatar smestry

Updated the java file to generate the item code as a combination of paren_code+color_code+size_code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103541 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 889556fa
...@@ -904,7 +904,6 @@ public class DDProductWizEditPosEJB extends ValidatorEJB implements DDProductWiz ...@@ -904,7 +904,6 @@ public class DDProductWizEditPosEJB extends ValidatorEJB implements DDProductWiz
tradeMarkChild = ""; tradeMarkChild = "";
} }
} }
///System.out.println("tradeMarkChild ==========>>[" + tradeMarkChild + "]");
//Changed by Sneha on 26-09-2019, to add trade mark for child item [End] //Changed by Sneha on 26-09-2019, to add trade mark for child item [End]
} }
...@@ -1309,7 +1308,11 @@ public class DDProductWizEditPosEJB extends ValidatorEJB implements DDProductWiz ...@@ -1309,7 +1308,11 @@ public class DDProductWizEditPosEJB extends ValidatorEJB implements DDProductWiz
{ {
System.out.println("--------- Adding new item ---------"); System.out.println("--------- Adding new item ---------");
tranId = getTransID( "w_dd_productWiz", conn); // Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [Start]
//tranId = getTransID( "w_dd_productWiz", conn);
tranId = getTransID( "w_dd_productWiz", item_parnt, phy_attrib_1, phy_attrib_2, conn);
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [End]
// Changed by samadhan on 19/05/16 [start] // Changed by samadhan on 19/05/16 [start]
String whiteSpace = " "; String whiteSpace = " ";
tranId = tranId + whiteSpace.substring(0,10-tranId.length()); tranId = tranId + whiteSpace.substring(0,10-tranId.length());
...@@ -2156,7 +2159,11 @@ public class DDProductWizEditPosEJB extends ValidatorEJB implements DDProductWiz ...@@ -2156,7 +2159,11 @@ public class DDProductWizEditPosEJB extends ValidatorEJB implements DDProductWiz
} }
// Changed by Sneha on 04-04-2016, for tranId generation and inserting values in priceList [Start] // Changed by Sneha on 04-04-2016, for tranId generation and inserting values in priceList [Start]
private String getTransID( String windowName, Connection conn ) throws ITMException
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [Start]
//private String getTransID( String windowName, Connection conn ) throws ITMException
private String getTransID( String windowName, String item_parnt, String phy_attrib_1, String phy_attrib_2, Connection conn ) throws ITMException
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [End]
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
...@@ -2185,10 +2192,25 @@ public class DDProductWizEditPosEJB extends ValidatorEJB implements DDProductWiz ...@@ -2185,10 +2192,25 @@ public class DDProductWizEditPosEJB extends ValidatorEJB implements DDProductWiz
System.out.println("keyCol :"+keyCol); System.out.println("keyCol :"+keyCol);
System.out.println("tranSer :"+tranSer); System.out.println("tranSer :"+tranSer);
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [Start]
String itemParntStr = "";
if(item_parnt.length() < 5)
{
itemParntStr = "00000".substring(item_parnt.length()) + item_parnt;
}
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [End]
xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>"; xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>"; xmlValues = xmlValues + "<Header></Header>";
xmlValues = xmlValues + "<Detail1>"; xmlValues = xmlValues + "<Detail1>";
xmlValues = xmlValues + "<tran_id></tran_id>"; xmlValues = xmlValues + "<tran_id></tran_id>";
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [Start]
xmlValues = xmlValues + "<item_parnt>" + itemParntStr + "</item_parnt>";
xmlValues = xmlValues + "<phy_attrib_2>" + phy_attrib_2 + "</phy_attrib_2>";
xmlValues = xmlValues + "<phy_attrib_1>" + phy_attrib_1 + "</phy_attrib_1>";
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [End]
xmlValues = xmlValues + "</Detail1></Root>"; xmlValues = xmlValues + "</Detail1></Root>";
System.out.println("xmlValues :["+xmlValues+"]"); System.out.println("xmlValues :["+xmlValues+"]");
TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME); TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME);
......
...@@ -76,7 +76,7 @@ public class DDProductWizPosEJB extends ValidatorEJB implements DDProductWizPosR ...@@ -76,7 +76,7 @@ public class DDProductWizPosEJB extends ValidatorEJB implements DDProductWizPosR
descr, grp_code_desc, site_codes, color_codes, dimension_desc, supp_item_desc, item_barcode, item_category, descr, grp_code_desc, site_codes, color_codes, dimension_desc, supp_item_desc, item_barcode, item_category,
img_path, item_sh_descr, long_desc, meta_desc, meta_keywords, meta_title, loc_code, img_path, item_sh_descr, long_desc, meta_desc, meta_keywords, meta_title, loc_code,
loginSiteCode , language_dtl, categoryId, tax, item_commodity, taxChapParent = "",taxChapChild = "", // Added By Parikshit on 23/02/2015[Added variable language_dtl ] loginSiteCode , language_dtl, categoryId, tax, item_commodity, taxChapParent = "",taxChapChild = "", // Added By Parikshit on 23/02/2015[Added variable language_dtl ]
tradeMarkChild = "", tradeMarkParent = ""; tradeMarkChild = "", tradeMarkParent = "", phy_att1 = "";
//Added by Chetan Mahajan on date:06/02/2015 [Added new fields] Start //Added by Chetan Mahajan on date:06/02/2015 [Added new fields] Start
private Double pur_lead_time ; private Double pur_lead_time ;
...@@ -862,7 +862,11 @@ public class DDProductWizPosEJB extends ValidatorEJB implements DDProductWizPosR ...@@ -862,7 +862,11 @@ public class DDProductWizPosEJB extends ValidatorEJB implements DDProductWizPosR
/*pstmtIns.clearParameters();*/ /*pstmtIns.clearParameters();*/
} }
tranId = getTransID( "w_dd_productWiz", conn); // Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [Start]
//tranId = getTransID( "w_dd_productWiz", conn);
tranId = getTransID( "w_dd_productWiz", item_parnt, phy_attrib_1, phy_attrib_2, conn);
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [End]
// Changed by samadhan on 19/05/16 [start] // Changed by samadhan on 19/05/16 [start]
String whiteSpace = " "; String whiteSpace = " ";
tranId = tranId + whiteSpace.substring(0,10-tranId.length()); tranId = tranId + whiteSpace.substring(0,10-tranId.length());
...@@ -1820,8 +1824,12 @@ public class DDProductWizPosEJB extends ValidatorEJB implements DDProductWizPosR ...@@ -1820,8 +1824,12 @@ public class DDProductWizPosEJB extends ValidatorEJB implements DDProductWizPosR
* @param conn * @param conn
* @throws ITMException * @throws ITMException
*/ */
private String getTransID( String windowName, Connection conn ) throws ITMException // Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [Start]
//private String getTransID( String windowName, Connection conn ) throws ITMException
private String getTransID( String windowName, String item_parnt, String phy_attrib_1, String phy_attrib_2, Connection conn ) throws ITMException
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [End]
{ {
//System.out.println("@@@@@@ Inside getTransID @@@@@@");
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String selSql = ""; String selSql = "";
...@@ -1849,15 +1857,32 @@ public class DDProductWizPosEJB extends ValidatorEJB implements DDProductWizPosR ...@@ -1849,15 +1857,32 @@ public class DDProductWizPosEJB extends ValidatorEJB implements DDProductWizPosR
System.out.println("keyCol :"+keyCol); System.out.println("keyCol :"+keyCol);
System.out.println("tranSer :"+tranSer); System.out.println("tranSer :"+tranSer);
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [Start]
String itemParntStr = "";
if(item_parnt.length() < 5)
{
itemParntStr = "00000".substring(item_parnt.length()) + item_parnt;
}
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [End]
xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>"; xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>"; xmlValues = xmlValues + "<Header></Header>";
xmlValues = xmlValues + "<Detail1>"; xmlValues = xmlValues + "<Detail1>";
xmlValues = xmlValues + "<tran_id></tran_id>"; xmlValues = xmlValues + "<tran_id></tran_id>";
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [Start]
xmlValues = xmlValues + "<item_parnt>" + itemParntStr + "</item_parnt>";
xmlValues = xmlValues + "<phy_attrib_2>" + phy_attrib_2 + "</phy_attrib_2>";
xmlValues = xmlValues + "<phy_attrib_1>" + phy_attrib_1 + "</phy_attrib_1>";
// Changed by Sneha on 30-09-2016, for generating tranid as parent_code, color_code, size_code [End]
xmlValues = xmlValues + "</Detail1></Root>"; xmlValues = xmlValues + "</Detail1></Root>";
System.out.println("xmlValues :["+xmlValues+"]"); System.out.println("xmlValues :["+xmlValues+"]");
TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME); TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME);
tranId = tg.generateTranSeqID(tranSer, keyCol, keyString, conn); tranId = tg.generateTranSeqID(tranSer, keyCol, keyString, conn);
System.out.println("tranId :"+tranId); System.out.println("tranId =======>> " + tranId);
} }
catch (SQLException ex) catch (SQLException ex)
{ {
......
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