Commit 0181e987 authored by agaikwad's avatar agaikwad

Multiple sales order club on the cust_code_bill

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@165253 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6ec71201
......@@ -170,8 +170,10 @@ public class PostOrdDespatchGen
+ "WHERE ( SORDER . SALE_ORDER = SORDDET . SALE_ORDER ) "
+ "and ( sorder.sale_order >= ? ) "
+ "AND ( sorder.sale_order <= ? )"
+ "AND ( sorder.cust_code >= ?)"
+ "AND ( sorder.cust_code <= ?) "
//+ "AND ( sorder.cust_code >= ?)" commented by abhijit Gaikwad
+ "AND ( sorder.cust_code__bil >= ?)"
//+ "AND ( sorder.cust_code <= ?) " commented by abhijit Gaikwad
+ "AND ( sorder.cust_code__bil <= ?) "
+ "AND ( sorder.due_date >= ?) "
+ "AND ( sorder.due_date <= ?) "
+ "AND ( sorder.confirmed = 'Y' )"
......@@ -376,10 +378,13 @@ public class PostOrdDespatchGen
if (count > 0)
{
tempSplitCode = custCode + "@" + custCodeDlv + "@" + itemSer
/*tempSplitCode = custCode + "@" + custCodeDlv + "@" + itemSer commented by abhijit Gaikwad
+ "@" + crTerm + "@" + dlvTerm + "@" + orderType + "@"
+ siteCode + "@" + transMode;*/
System.out.println("custCodeBill["+custCodeBill+"]");
tempSplitCode = custCodeBill + "@" + custCodeDlv + "@" + itemSer
+ "@" + crTerm + "@" + dlvTerm + "@" + orderType + "@"
+ siteCode + "@" + transMode;
//System.out.println("splitCodeWiseMap===" + splitCodeWiseMap);
//System.out.println("tempSplitCode Combo===" + tempSplitCode);
if (splitCodeWiseMap.containsKey(tempSplitCode))
......@@ -1315,10 +1320,6 @@ public class PostOrdDespatchGen
pstmt2.close();
pstmt2 = null;
lrNo=null;
tempMap.put("desp_date", sysDate);
tempMap.put("sord_no", saleOrder);
......@@ -1329,7 +1330,9 @@ public class PostOrdDespatchGen
}
tempMap.put("cust_code", custCode);
tempMap.put("cust_code__dlv", custCodeDlv);
tempMap.put("cust_code__dlv", custCodeDlv); //CUST_CODE__BIL Added by abhijit Gaikwad
System.out.println("CUST_CODE__BIL["+custCodeBill+"]");
tempMap.put("cust_code__bil", custCodeBill);
tempMap.put("site_code", siteCode);
tempMap.put("dlv_add1", dlvAdd1);
tempMap.put("dlv_add2", dlvAdd2);
......@@ -1459,7 +1462,8 @@ public class PostOrdDespatchGen
if (splitCode.split("@").length != 0)
{
String spiltArr[]=splitCode.split("@");
custCode = checkNull(spiltArr[0]);
//custCode = checkNull(spiltArr[0]);
custCodeBill = checkNull(spiltArr[0]);
custCodeDlv = checkNull(spiltArr[1]);
itemSer = checkNull(spiltArr[2]);
crTerm = checkNull(spiltArr[3]);
......
......@@ -391,7 +391,11 @@ public class PostOrderProcess extends ProcessEJB implements PostOrderProcessLoca
if(clubOrder != null && clubOrder.equalsIgnoreCase("Y"))
{
sql="select distinct cust_code from sorder " +
/* sql="select distinct cust_code from sorder " +
"where sale_order >= ? and sale_order <= ? and cust_code >= ? and cust_code <= ? " +
"and due_date >= ? and due_date <= ? and confirmed ='Y' and status ='P' " +
"and site_code__ship = ? "; commented by abhijit Gaikwad */
sql="select distinct cust_code__bil from sorder " +
"where sale_order >= ? and sale_order <= ? and cust_code >= ? and cust_code <= ? " +
"and due_date >= ? and due_date <= ? and confirmed ='Y' and status ='P' " +
"and site_code__ship = ? ";
......@@ -419,7 +423,7 @@ public class PostOrderProcess extends ProcessEJB implements PostOrderProcessLoca
// ArrayList<String> a = new ArrayList<String>();
while(rs.next())
{
custCodeList.add(rs.getString("cust_code"));
custCodeList.add(rs.getString("cust_code__bil"));
}
rs.close();
rs = null;
......@@ -438,6 +442,7 @@ public class PostOrderProcess extends ProcessEJB implements PostOrderProcessLoca
{
//Changed By Nasruddin Start 04-11-16
startTime2 = System.currentTimeMillis();
System.out.println("");
retString = postOrder( headerDom, custCodeList.get(custCdIndex),"",xtraParams,conn);
//System.out.println("cust post ord retString :"+retString);
endTime2 = System.currentTimeMillis();
......@@ -511,7 +516,7 @@ public class PostOrderProcess extends ProcessEJB implements PostOrderProcessLoca
retString = postOrder(headerDom, "",saleOrderList.get(sordIndex),xtraParams,conn);
endTime2 = System.currentTimeMillis();
System.out.println("Posting time taken for SO [" + saleOrderList.get(sordIndex) + "] ["+(endTime2-startTime2)/1000+"] seconds");
//System.out.println("postOrder return:::::::::::[["+retString+"]]......");
System.out.println("postOrder return:::::::::::[["+retString+"]]......");
if(retString== null || retString.trim().length()==0)
{
......@@ -1597,8 +1602,10 @@ public class PostOrderProcess extends ProcessEJB implements PostOrderProcessLoca
//sqlstatement = sqlstatement + " from sorder " ;
sqlstatement = sqlstatement + " where sale_order >= ? " ;
sqlstatement = sqlstatement + " and sale_order <= ? " ;
sqlstatement = sqlstatement + " and cust_code >= ? " ;
sqlstatement = sqlstatement + " and cust_code <= ? " ;
//sqlstatement = sqlstatement + " and cust_code >= ? " ; commented by abhijit Gaikwad
//sqlstatement = sqlstatement + " and cust_code <= ? " ;
sqlstatement = sqlstatement + " and cust_code__bil >= ? " ;
sqlstatement = sqlstatement + " and cust_code__bil <= ? " ;
sqlstatement = sqlstatement + " and due_date >= ? " ;
sqlstatement = sqlstatement + " and due_date <= ? " ;
sqlstatement = sqlstatement + " and confirmed = 'Y' and status = 'P' " ;
......
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