edgar 2017-06-02 18:22:33 +00:00
parent 8eae090a59
commit dda3feed15
5 changed files with 26 additions and 28 deletions

View File

@ -35,5 +35,5 @@ public interface PuntoVentaDAO extends GenericDAO<PuntoVenta, Integer> {
public List<PuntoVenta> buscarPuntoVentaPorTipoEstoque(PtovtaTipoEstoque tipoEstoque); public List<PuntoVenta> buscarPuntoVentaPorTipoEstoque(PtovtaTipoEstoque tipoEstoque);
public Integer quantidadeECFPorPuntoVenta(Integer empresaID, Integer puntoVentaID); public List<String> quantidadeECFPorPuntoVenta(Integer puntoVentaID);
} }

View File

@ -237,22 +237,17 @@ public class PuntoVentaHibernateDAO extends GenericHibernateDAO<PuntoVenta, Inte
return puntosVenta; return puntosVenta;
} }
@Override @Override
public Integer quantidadeECFPorPuntoVenta(Integer empresaID, Integer puntoVentaID) { @SuppressWarnings("unchecked")
String query = "SELECT sum(NECF) numeroECF " public List<String> quantidadeECFPorPuntoVenta(Integer puntoVentaID) {
+ " FROM (SELECT count(e.ESTACION_ID) AS NECF " String query = " select DISTINCT NUMSERIE20 from FISCAL_R4 f"
+ " FROM ESTACION e " +" join Boleto b on b.BOLETO_ID=f.BOLETO_ID"
+ " INNER JOIN ESTACION_IMPRESORA ei ON ei.ESTACION_ID = e.ESTACION_ID " +" WHERE b.PUNTOVENTA_ID=:puntoVentaId"
+ " WHERE ei.TIPOIMPRESSORA = 1 " +" GROUP BY NUMSERIE20";
+ " AND ei.ACTIVO = 1 "
+ " AND e.PUNTOVENTA_ID = :punto_venta_id "
+ " AND ei.EMPRESA_ID = :empresa_id "
+ " GROUP BY e.ESTACION_ID)";
Query q = getSession().createSQLQuery(query); Query q = getSession().createSQLQuery(query);
q.setInteger("punto_venta_id", puntoVentaID); q.setInteger("puntoVentaId", puntoVentaID);
q.setInteger("empresa_id", empresaID); return q.list();
BigDecimal quantidadeEcf = (BigDecimal) q.uniqueResult();
return quantidadeEcf == null ? 0 : quantidadeEcf.intValue();
} }
} }

View File

@ -76,7 +76,7 @@ public interface ConferenciaComissaoService extends GenericService<Conferencia,
public DiaConferenciaComissaoVO carregarConferenciaRegistrada(Date datamovimento, Empresa empresa, PuntoVenta puntoVenta) throws BusinessException; public DiaConferenciaComissaoVO carregarConferenciaRegistrada(Date datamovimento, Empresa empresa, PuntoVenta puntoVenta) throws BusinessException;
public Integer quantidadeECFPorPuntoVenta(Integer empresaID, Integer puntoVentaID); public List<String> quantidadeECFPorPuntoVenta(Integer puntoVentaID);
public void enviarEmailIrregularidadeECF(String email, String msg,String assunto)throws Exception ; public void enviarEmailIrregularidadeECF(String email, String msg,String assunto)throws Exception ;

View File

@ -469,7 +469,7 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
//subtrairOcdFormapagoDinheiro(totalOcd, resumoComissao); //subtrairOcdFormapagoDinheiro(totalOcd, resumoComissao);
carregarTotalDeposito(resumoComissao, boletoComissaos, lsEventosFinanceiros); carregarTotalDeposito(resumoComissao, boletoComissaos, lsEventosFinanceiros);
resumoComissao.setQuantidadeEcf(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia.getEmpresa().getEmpresaId(), conferencia.getPuntoVenta().getPuntoventaId())); resumoComissao.setListNumSerieECF(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia.getPuntoVenta().getPuntoventaId()));
return resumoComissao; return resumoComissao;
} }
@ -715,8 +715,8 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
} }
@Override @Override
public Integer quantidadeECFPorPuntoVenta(Integer empresaID, Integer puntoVentaID) { public List<String> quantidadeECFPorPuntoVenta(Integer puntoVentaID) {
return puntoVentaDAO.quantidadeECFPorPuntoVenta(empresaID, puntoVentaID); return puntoVentaDAO.quantidadeECFPorPuntoVenta(puntoVentaID);
} }
@Override @Override

View File

@ -15,7 +15,8 @@ public class ResumoComissao {
private BigDecimal totalReceitas; private BigDecimal totalReceitas;
private BigDecimal totalDespesas; private BigDecimal totalDespesas;
private BigDecimal valorDeposito; private BigDecimal valorDeposito;
private Integer quantidadeEcf; private List<String> listNumSerieECF;
private OcdVO totalOcd; private OcdVO totalOcd;
private List<FormapagoVO> totalFormapago; private List<FormapagoVO> totalFormapago;
@ -84,14 +85,6 @@ public class ResumoComissao {
this.totalFormapago = totalFormapago; this.totalFormapago = totalFormapago;
} }
public Integer getQuantidadeEcf() {
return quantidadeEcf;
}
public void setQuantidadeEcf(Integer quantidadeEcf) {
this.quantidadeEcf = quantidadeEcf;
}
public OcdVO getTotalOcd() { public OcdVO getTotalOcd() {
return totalOcd; return totalOcd;
} }
@ -99,6 +92,14 @@ public class ResumoComissao {
public void setTotalOcd(OcdVO totalOcd) { public void setTotalOcd(OcdVO totalOcd) {
this.totalOcd = totalOcd; this.totalOcd = totalOcd;
} }
public List<String> getListNumSerieECF() {
return listNumSerieECF;
}
public void setListNumSerieECF(List<String> listNumSerieECF) {
this.listNumSerieECF = listNumSerieECF;
}
public String getTotalVendasFormatado() { public String getTotalVendasFormatado() {
return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getTotalVendas(), LocaleUtil.getLocale()); return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getTotalVendas(), LocaleUtil.getLocale());
@ -135,5 +136,7 @@ public class ResumoComissao {
public String getValorDepositoFormatado() { public String getValorDepositoFormatado() {
return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getValorDeposito(), LocaleUtil.getLocale()); return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getValorDeposito(), LocaleUtil.getLocale());
} }
} }