Commit ef1a21c5 authored by ngunjal's avatar ngunjal

0 actual visited showing in case of floating dashboard

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@197304 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a6e9b13a
......@@ -659,20 +659,20 @@ public class CalendarDBR extends ValidatorEJB implements CalendarDBRLocal, Calen
queryBuilder.append("SELECT stan_type, sum(planned_visit) as planned_visit, sum(actual_visit) as actual_visit ");
queryBuilder.append("from(select det.stan_type as stan_type , trunc(sysdate) as plan_date, det.work_days as planned_visit, 0 as actual_visit ");
queryBuilder.append("from SF_PLAN_PARAM hdr, SF_PLAN_PARAM_STAN det where det.param_table = hdr.param_table ");
queryBuilder.append("and det.prd_code = hdr.prd_code and hdr.prd_code = '"+period+"' union all ");
queryBuilder.append("and det.prd_code = hdr.prd_code and hdr.prd_code = '"+period+"' and det.work_days > 0 union all ");//Added By nilesh for Blank actual visited Start :: 18-02-19
queryBuilder.append("select distinct sr.station_type as stan_type, trunc(sp.plan_date) as plan_date, 0 as planned_visit,1 as actual_visit from sprs_plan_place spp, sprs_plan_hdr sp, period prd, sprs_route sr ");
queryBuilder.append("where spp.plan_id = sp.plan_id and sr.sprs_code = sp.sprs_code__plan and spp.work_stan_code = sr.stan_code and prd.code = '"+period+"' ");
queryBuilder.append("and sp.plan_date >=prd.fr_date and sp.plan_date<=prd.to_date and sp.sprs_code__plan = '"+loginCode+"') where planned_visit > 0 group by stan_type"); // added condition of planned visit by rupali on 03/04/18
queryBuilder.append("and sp.plan_date >=prd.fr_date and sp.plan_date<=prd.to_date and sp.sprs_code__plan = '"+loginCode+"') group by stan_type"); // added condition of planned visit by rupali on 03/04/18 //Commented By nilesh Start :: 18-02-19
}
else if("DB2".equalsIgnoreCase(CommonConstants.DB_NAME))
{
queryBuilder.append("SELECT stan_type, sum(planned_visit) as planned_visit, sum(actual_visit) as actual_visit ");
queryBuilder.append("from(select det.stan_type as stan_type , date(current date) as plan_date, det.work_days as planned_visit, 0 as actual_visit ");
queryBuilder.append("from SF_PLAN_PARAM hdr, SF_PLAN_PARAM_STAN det where det.param_table = hdr.param_table ");
queryBuilder.append("and det.prd_code = hdr.prd_code and hdr.prd_code = '"+period+"' union all ");
queryBuilder.append("and det.prd_code = hdr.prd_code and hdr.prd_code = '"+period+"' and det.work_days > 0 union all ");//Added By nilesh for Blank actual visited Start :: 18-02-19
queryBuilder.append("select distinct sr.station_type as stan_type, date(sp.plan_date) as plan_date, 0 as planned_visit,1 as actual_visit from sprs_plan_place spp, sprs_plan_hdr sp, period prd, sprs_route sr ");
queryBuilder.append("where spp.plan_id = sp.plan_id and sr.sprs_code = sp.sprs_code__plan and spp.work_stan_code = sr.stan_code and prd.code = '"+period+"' ");
queryBuilder.append("and sp.plan_date >=prd.fr_date and sp.plan_date<=prd.to_date and sp.sprs_code__plan = '"+loginCode+"') as caldash where planned_visit > 0 group by stan_type"); // added condition of planned visit by rupali on 03/04/18
queryBuilder.append("and sp.plan_date >=prd.fr_date and sp.plan_date<=prd.to_date and sp.sprs_code__plan = '"+loginCode+"') as caldash group by stan_type"); // added condition of planned visit by rupali on 03/04/18 //Commented By nilesh Start :: 18-02-19
}
......
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