Commit c4b9db79 authored by sbade's avatar sbade

updated source as at client side


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97305 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6c7b563f
...@@ -373,10 +373,19 @@ public class CustomerInfoEJB extends ValidatorEJB implements CustomerInfoRemote, ...@@ -373,10 +373,19 @@ public class CustomerInfoEJB extends ValidatorEJB implements CustomerInfoRemote,
totMonth = (toMonth-frmMonth); totMonth = (toMonth-frmMonth);
} }
//end date conversion form
/** start of Customer name top custoer code conversion**/ /** start of Customer name top custoer code conversion**/
custCode = dashbordUtil.getCommaSeparated(custCode); custCode = dashbordUtil.getCommaSeparated(custCode);
/** end of Customer name top custoer code conversion**/ /** end of Customer name top custoer code conversion**/
/*if(custCode!=null && custCode.trim().length()>0)
{
custCode = dashbordUtil.getCommaSeparated(custCode);
custCodeSorder ="and A.CUST_CODE IN ("+custCode+")";
System.out.println("in custcode block :: custCodeSorder-->"+custCodeSorder );
}*/
if (custCode != null && custCode.trim().length() > 0 && frmDate != null && toDate != null ) if (custCode != null && custCode.trim().length() > 0 && frmDate != null && toDate != null )
{ {
/** Start of rawDataPendingOrderJson object for GRID Chart**/ /** Start of rawDataPendingOrderJson object for GRID Chart**/
...@@ -416,7 +425,6 @@ public class CustomerInfoEJB extends ValidatorEJB implements CustomerInfoRemote, ...@@ -416,7 +425,6 @@ public class CustomerInfoEJB extends ValidatorEJB implements CustomerInfoRemote,
while (rs.next()) while (rs.next())
{ {
rowData = new JSONObject(); rowData = new JSONObject();
qntyStduom=(checkNull( rs.getString("QUANTITY__STDUOM"))); qntyStduom=(checkNull( rs.getString("QUANTITY__STDUOM")));
qntyDesp=(checkNull(rs.getString("QTY_DESP"))); qntyDesp=(checkNull(rs.getString("QTY_DESP")));
rate =(checkNull(rs.getString("rate"))); rate =(checkNull(rs.getString("rate")));
...@@ -761,7 +769,7 @@ public class CustomerInfoEJB extends ValidatorEJB implements CustomerInfoRemote, ...@@ -761,7 +769,7 @@ public class CustomerInfoEJB extends ValidatorEJB implements CustomerInfoRemote,
rowData.put("order_date",checkNull (rs.getString("ORDER_DATE"))); rowData.put("order_date",checkNull (rs.getString("ORDER_DATE")));
} }
rowData.put("cust_code", checkNull(rs.getString("CUST_CODE"))); rowData.put("CUST_CODE_SUNUSA", checkNull(rs.getString("CUST_CODE")));
rowData.put("cust_name", checkNull(rs.getString("CUST_NAME"))); rowData.put("cust_name", checkNull(rs.getString("CUST_NAME")));
rowData.put("cust_order__no", checkNull(rs.getString("CUST_ORDER__NO"))); rowData.put("cust_order__no", checkNull(rs.getString("CUST_ORDER__NO")));
rowData.put("order_status", checkNull(rs.getString("ORDER_STATUS"))); rowData.put("order_status", checkNull(rs.getString("ORDER_STATUS")));
...@@ -781,8 +789,8 @@ public class CustomerInfoEJB extends ValidatorEJB implements CustomerInfoRemote, ...@@ -781,8 +789,8 @@ public class CustomerInfoEJB extends ValidatorEJB implements CustomerInfoRemote,
rowData.put("dsp_date",checkNull(rs.getString("DSP_DATE"))); rowData.put("dsp_date",checkNull(rs.getString("DSP_DATE")));
} }
rowData.put("delay_days","100");
rowData.put("delay_days",checkNull(rs.getString("DELAY_DAYS"))); //rowData.put("delay_days",checkNull(rs.getString("DELAY_DAYS")));
rowData.put("hold_flag", checkNull(rs.getString("HOLD_FLAG"))); rowData.put("hold_flag", checkNull(rs.getString("HOLD_FLAG")));
rawDataOrderHistoryJson.put(count, rowData); rawDataOrderHistoryJson.put(count, rowData);
count++; count++;
......
...@@ -106,12 +106,12 @@ public class OrderVsShipmentEJB extends ValidatorEJB implements OrderVsShipmentR ...@@ -106,12 +106,12 @@ public class OrderVsShipmentEJB extends ValidatorEJB implements OrderVsShipmentR
+" count(sorder.sale_order) as orders,0 as despatches from sorder " +" count(sorder.sale_order) as orders,0 as despatches from sorder "
+" where sorder.order_date between trunc(to_date(TO_CHAR(ADD_MONTHS(SYSDATE, -"+lastMonth+"), 'ddMONyyyy'),'DD-MON-YYYY'),'MM') and " +" where sorder.order_date between trunc(to_date(TO_CHAR(ADD_MONTHS(SYSDATE, -"+lastMonth+"), 'ddMONyyyy'),'DD-MON-YYYY'),'MM') and "
+" last_day(trunc(sysdate)) "+custCodeSorder + " "+custCodeDlvSorder + " " +" last_day(trunc(sysdate)) "+custCodeSorder + " "+custCodeDlvSorder + " "
+" and sorder.site_code in ("+siteCode+") " //+" and sorder.site_code in ("+siteCode+") "
+" and sorder.confirmed = 'Y' group by to_char(sorder.order_date, 'Mon-yy'),to_char(sorder.order_date, 'MM') " +" and sorder.confirmed = 'Y' group by to_char(sorder.order_date, 'Mon-yy'),to_char(sorder.order_date, 'MM') "
+" union all select to_char(despatch.desp_date, 'Mon-yy') as month,to_char (despatch.desp_date, 'MM') as month1, " +" union all select to_char(despatch.desp_date, 'Mon-yy') as month,to_char (despatch.desp_date, 'MM') as month1, "
+" 0 as orders,count(despatch.desp_id) as despatches from despatch where despatch.desp_date between trunc(to_date(TO_CHAR(ADD_MONTHS(SYSDATE, -"+lastMonth+"), 'ddMONyyyy'),'DD-MON-YYYY'),'MM') and " +" 0 as orders,count(despatch.desp_id) as despatches from despatch where despatch.desp_date between trunc(to_date(TO_CHAR(ADD_MONTHS(SYSDATE, -"+lastMonth+"), 'ddMONyyyy'),'DD-MON-YYYY'),'MM') and "
+" last_day(trunc(sysdate)) "+custCodeDespatch + " "+custCodeDlvDespatch + " " +" last_day(trunc(sysdate)) "+custCodeDespatch + " "+custCodeDlvDespatch + " "
+" and despatch.site_code in ("+siteCode+") " //+" and despatch.site_code in ("+siteCode+") "
+" and despatch.confirmed = 'Y' group by to_char(despatch.desp_date, 'Mon-yy'),to_char(despatch.desp_date, 'MM') ) " +" and despatch.confirmed = 'Y' group by to_char(despatch.desp_date, 'Mon-yy'),to_char(despatch.desp_date, 'MM') ) "
+" group by month,month1 order by month1"; +" group by month,month1 order by month1";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
package ibase.dashboard.scm.ejb; package ibase.dashboard.scm.ejb;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import ibase.webitm.ejb.ValidatorLocal; import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import javax.ejb.Local; import javax.ejb.Local;
import org.json.simple.JSONObject; import org.json.simple.JSONObject;
...@@ -17,9 +19,13 @@ public interface SalesPerformanceLocal extends ValidatorLocal ...@@ -17,9 +19,13 @@ public interface SalesPerformanceLocal extends ValidatorLocal
public JSONObject getMnthlySalesGraphData(String dataSourceName,String month) throws RemoteException, ITMException; public JSONObject getMnthlySalesGraphData(String dataSourceName,String month) throws RemoteException, ITMException;
public JSONObject getYTDSalesGraphData(String dataSourceName,String month) throws RemoteException, ITMException; public JSONObject getYTDSalesGraphData(String dataSourceName,String month) throws RemoteException, ITMException;
public JSONObject getMnthSalesDivWiseGraphData(String dataSourceName,String month) throws RemoteException, ITMException; public JSONObject getMnthSalesDivWiseGraphData(String dataSourceName,String month) throws RemoteException, ITMException;
public JSONObject getDivisionWiseGraph(String dataSourceName,String month,String divGrp) throws RemoteException, ITMException;
public JSONObject getTopBrandYTD(String dataSourceName,String month,String divCode) throws RemoteException, ITMException;
public JSONObject getZoneWiseDetail(String dataSourceName,String month,String divCode) throws RemoteException, ITMException;
public JSONObject getZoneWiseMetroDetail(String dataSourceName, String month, String divGrp,String divCode, String zoneDescr) throws RemoteException, ITMException;
public JSONObject getBrandWiseZoneDetail(String dataSourceName,String month,String brandName) throws RemoteException, ITMException;
public JSONObject getBrandZoneWiseMetroDetail(String dataSourceName,String month,String brandName,String zoneDescr,String divDescr) throws RemoteException, ITMException;
public JSONObject getTopBrandMTH(String dataSourceName,String month,String divCode) throws RemoteException, ITMException;
public JSONObject getProfitYTDGraphData(String dataSourceName, String month) throws RemoteException, ITMException;
public JSONObject getExpenseYTDGraphData(String dataSourceName, String month) throws RemoteException, ITMException;
} }
package ibase.dashboard.scm.ejb; package ibase.dashboard.scm.ejb;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import ibase.webitm.ejb.ValidatorRemote; import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import javax.ejb.Remote; import javax.ejb.Remote;
import org.json.simple.JSONObject; import org.json.simple.JSONObject;
@Remote @Remote
...@@ -15,6 +18,13 @@ public interface SalesPerformanceRemote extends ValidatorRemote ...@@ -15,6 +18,13 @@ public interface SalesPerformanceRemote extends ValidatorRemote
public JSONObject getMnthlySalesGraphData(String dataSourceName,String month) throws RemoteException, ITMException; public JSONObject getMnthlySalesGraphData(String dataSourceName,String month) throws RemoteException, ITMException;
public JSONObject getYTDSalesGraphData(String dataSourceName,String month) throws RemoteException, ITMException; public JSONObject getYTDSalesGraphData(String dataSourceName,String month) throws RemoteException, ITMException;
public JSONObject getMnthSalesDivWiseGraphData(String dataSourceName,String month) throws RemoteException, ITMException; public JSONObject getMnthSalesDivWiseGraphData(String dataSourceName,String month) throws RemoteException, ITMException;
public JSONObject getDivisionWiseGraph(String dataSourceName,String month,String divGrp) throws RemoteException, ITMException ;
public JSONObject getTopBrandYTD(String dataSourceName,String month,String divCode) throws RemoteException, ITMException;
public JSONObject getZoneWiseDetail(String dataSourceName,String month,String divCode) throws RemoteException, ITMException;
public JSONObject getZoneWiseMetroDetail(String dataSourceName, String month, String divGrp,String divCode, String zoneDescr) throws RemoteException, ITMException;
public JSONObject getTopBrandMTH(String dataSourceName,String month,String divCode) throws RemoteException, ITMException;
public JSONObject getBrandWiseZoneDetail(String dataSourceName,String month,String brandName) throws RemoteException, ITMException;
public JSONObject getBrandZoneWiseMetroDetail(String dataSourceName,String month,String brandName,String zoneDescr,String divDescr) throws RemoteException, ITMException;
public JSONObject getProfitYTDGraphData(String dataSourceName, String month) throws RemoteException, ITMException;
public JSONObject getExpenseYTDGraphData(String dataSourceName, String month) throws RemoteException, ITMException;
} }
package ibase.dashboard.scm.ejb; package ibase.dashboard.scm.ejb;
import ibase.system.config.ConnDriver; import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.ValidatorEJB; import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
......
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