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 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;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer quantidadeECFPorPuntoVenta(Integer empresaID, Integer puntoVentaID) {
|
||||
String query = "SELECT sum(NECF) numeroECF "
|
||||
+ " FROM (SELECT count(e.ESTACION_ID) AS NECF "
|
||||
+ " FROM ESTACION e "
|
||||
+ " INNER JOIN ESTACION_IMPRESORA ei ON ei.ESTACION_ID = e.ESTACION_ID "
|
||||
+ " WHERE ei.TIPOIMPRESSORA = 1 "
|
||||
+ " AND ei.ACTIVO = 1 "
|
||||
+ " AND e.PUNTOVENTA_ID = :punto_venta_id "
|
||||
+ " AND ei.EMPRESA_ID = :empresa_id "
|
||||
+ " GROUP BY e.ESTACION_ID)";
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<String> quantidadeECFPorPuntoVenta(Integer puntoVentaID) {
|
||||
String query = " select DISTINCT NUMSERIE20 from FISCAL_R4 f"
|
||||
+" join Boleto b on b.BOLETO_ID=f.BOLETO_ID"
|
||||
+" WHERE b.PUNTOVENTA_ID=:puntoVentaId"
|
||||
+" GROUP BY NUMSERIE20";
|
||||
|
||||
Query q = getSession().createSQLQuery(query);
|
||||
q.setInteger("punto_venta_id", puntoVentaID);
|
||||
q.setInteger("empresa_id", empresaID);
|
||||
BigDecimal quantidadeEcf = (BigDecimal) q.uniqueResult();
|
||||
return quantidadeEcf == null ? 0 : quantidadeEcf.intValue();
|
||||
q.setInteger("puntoVentaId", puntoVentaID);
|
||||
return q.list();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public interface ConferenciaComissaoService extends GenericService<Conferencia,
|
|||
|
||||
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 ;
|
||||
|
||||
|
|
|
@ -469,7 +469,7 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
//subtrairOcdFormapagoDinheiro(totalOcd, resumoComissao);
|
||||
carregarTotalDeposito(resumoComissao, boletoComissaos, lsEventosFinanceiros);
|
||||
|
||||
resumoComissao.setQuantidadeEcf(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia.getEmpresa().getEmpresaId(), conferencia.getPuntoVenta().getPuntoventaId()));
|
||||
resumoComissao.setListNumSerieECF(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia.getPuntoVenta().getPuntoventaId()));
|
||||
|
||||
return resumoComissao;
|
||||
}
|
||||
|
@ -715,8 +715,8 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer quantidadeECFPorPuntoVenta(Integer empresaID, Integer puntoVentaID) {
|
||||
return puntoVentaDAO.quantidadeECFPorPuntoVenta(empresaID, puntoVentaID);
|
||||
public List<String> quantidadeECFPorPuntoVenta(Integer puntoVentaID) {
|
||||
return puntoVentaDAO.quantidadeECFPorPuntoVenta(puntoVentaID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -15,7 +15,8 @@ public class ResumoComissao {
|
|||
private BigDecimal totalReceitas;
|
||||
private BigDecimal totalDespesas;
|
||||
private BigDecimal valorDeposito;
|
||||
private Integer quantidadeEcf;
|
||||
private List<String> listNumSerieECF;
|
||||
|
||||
private OcdVO totalOcd;
|
||||
|
||||
private List<FormapagoVO> totalFormapago;
|
||||
|
@ -84,14 +85,6 @@ public class ResumoComissao {
|
|||
this.totalFormapago = totalFormapago;
|
||||
}
|
||||
|
||||
public Integer getQuantidadeEcf() {
|
||||
return quantidadeEcf;
|
||||
}
|
||||
|
||||
public void setQuantidadeEcf(Integer quantidadeEcf) {
|
||||
this.quantidadeEcf = quantidadeEcf;
|
||||
}
|
||||
|
||||
public OcdVO getTotalOcd() {
|
||||
return totalOcd;
|
||||
}
|
||||
|
@ -100,6 +93,14 @@ public class ResumoComissao {
|
|||
this.totalOcd = totalOcd;
|
||||
}
|
||||
|
||||
public List<String> getListNumSerieECF() {
|
||||
return listNumSerieECF;
|
||||
}
|
||||
|
||||
public void setListNumSerieECF(List<String> listNumSerieECF) {
|
||||
this.listNumSerieECF = listNumSerieECF;
|
||||
}
|
||||
|
||||
public String getTotalVendasFormatado() {
|
||||
return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getTotalVendas(), LocaleUtil.getLocale());
|
||||
}
|
||||
|
@ -136,4 +137,6 @@ public class ResumoComissao {
|
|||
return BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(getValorDeposito(), LocaleUtil.getLocale());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue