fixes bug #8906
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@68147 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
418e1c2c3f
commit
083c024e65
|
@ -26,6 +26,7 @@ public class Constantes {
|
||||||
public static final Long MVO_CANCEL_BOLETO_AGRUPAMENTO = new Long(17);
|
public static final Long MVO_CANCEL_BOLETO_AGRUPAMENTO = new Long(17);
|
||||||
public static final Long MVO_CANCEL_GERACAO_OCD = new Long(99);
|
public static final Long MVO_CANCEL_GERACAO_OCD = new Long(99);
|
||||||
public static final Long MVO_CANCEL_QUITACAO_OCD = new Long(35);
|
public static final Long MVO_CANCEL_QUITACAO_OCD = new Long(35);
|
||||||
|
public static final Long MVO_CANCEL_VENDA_PACOTE = new Long(33);
|
||||||
|
|
||||||
public static Long TPV_DIRECTO_NORMAL = new Long(1);
|
public static Long TPV_DIRECTO_NORMAL = new Long(1);
|
||||||
public static Long TPV_MANUAL = new Long(3);
|
public static Long TPV_MANUAL = new Long(3);
|
||||||
|
|
|
@ -5,10 +5,13 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||||
import com.rjconsultores.ventaboletos.dao.sqlbuilder.SQLBuilder;
|
import com.rjconsultores.ventaboletos.dao.sqlbuilder.SQLBuilder;
|
||||||
import com.rjconsultores.ventaboletos.dao.util.DBUtil;
|
import com.rjconsultores.ventaboletos.dao.util.DBUtil;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
|
import com.rjconsultores.ventaboletos.enums.TipoFormapago;
|
||||||
|
|
||||||
public class SQLBuilderOracle implements SQLBuilder {
|
public class SQLBuilderOracle implements SQLBuilder {
|
||||||
private static final Integer HORAS_NO_DIA = Integer.valueOf(24);
|
private static final Integer HORAS_NO_DIA = Integer.valueOf(24);
|
||||||
private static final Integer RED_PAGO_FORMAPAGO_ID = Integer.valueOf(95);
|
private static final Integer RED_PAGO_FORMAPAGO_ID = Integer.valueOf(95);
|
||||||
|
@ -959,7 +962,6 @@ public class SQLBuilderOracle implements SQLBuilder {
|
||||||
sb.append(" inner join forma_pago fp on fp.formapago_id = cfp.FORMAPAGO_ID ");
|
sb.append(" inner join forma_pago fp on fp.formapago_id = cfp.FORMAPAGO_ID ");
|
||||||
sb.append(" inner join categoria ca on ca.categoria_id = c.categoria_id ");
|
sb.append(" inner join categoria ca on ca.categoria_id = c.categoria_id ");
|
||||||
sb.append(" left join motivo_cancelacion mc on mc.motivocancelacion_id = c.motivocancelacion_id ");
|
sb.append(" left join motivo_cancelacion mc on mc.motivocancelacion_id = c.motivocancelacion_id ");
|
||||||
sb.append(" left join tarifa_venda_pacote tvp on tvp.boleto_id = c.transacao_id ");
|
|
||||||
sb.append(" left join ocd ocd on ocd.ocd_id = cdp.ocd_id ");
|
sb.append(" left join ocd ocd on ocd.ocd_id = cdp.ocd_id ");
|
||||||
sb.append(" left join secretaria sec on sec.secretaria_id = cdp.opcional1 ");
|
sb.append(" left join secretaria sec on sec.secretaria_id = cdp.opcional1 ");
|
||||||
sb.append(" left join convenio_det cDet on cDet.conveniodet_id = c.conveniodet_id ");
|
sb.append(" left join convenio_det cDet on cDet.conveniodet_id = c.conveniodet_id ");
|
||||||
|
@ -969,7 +971,11 @@ public class SQLBuilderOracle implements SQLBuilder {
|
||||||
sb.append(" trunc(fechorventa) between to_date('").append(sdf.format(fechaDesde)).append("','yyyy-MM-dd') and ").append(" to_date('").append(sdf.format(fechaHasta)).append("','yyyy-MM-dd')");
|
sb.append(" trunc(fechorventa) between to_date('").append(sdf.format(fechaDesde)).append("','yyyy-MM-dd') and ").append(" to_date('").append(sdf.format(fechaHasta)).append("','yyyy-MM-dd')");
|
||||||
|
|
||||||
if(sembilhetesPacote != null && sembilhetesPacote) {
|
if(sembilhetesPacote != null && sembilhetesPacote) {
|
||||||
sb.append("and tvp.tarifavendapacote_id is null ");
|
sb.append("and fp.tipo_pago != ")
|
||||||
|
.append(TipoFormapago.PACOTE.getValor())
|
||||||
|
.append("and (c.motivocancelacion_id is null or c.motivocancelacion_id != ")
|
||||||
|
.append(Constantes.MVO_CANCEL_VENDA_PACOTE.intValue())
|
||||||
|
.append(" ) ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(" order by c.fechorventa,c.usuario_id,c.caja_id asc ");
|
sb.append(" order by c.fechorventa,c.usuario_id,c.caja_id asc ");
|
||||||
|
|
Loading…
Reference in New Issue