fixes bug #9066
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@69591 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
8eae090a59
commit
dda3feed15
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ;
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -100,6 +93,14 @@ public class ResumoComissao {
|
||||||
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());
|
||||||
}
|
}
|
||||||
|
@ -136,4 +137,6 @@ public class ResumoComissao {
|
||||||
return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getValorDeposito(), LocaleUtil.getLocale());
|
return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getValorDeposito(), LocaleUtil.getLocale());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue