Rev 106 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 106 | Rev 121 | ||
|---|---|---|---|
| Line 10... | Line 10... | ||
| 10 | 10 | ||
| 11 | private AvaliacaoLoja avaliacaoLoja; |
11 | private AvaliacaoLoja avaliacaoLoja; |
| 12 | private Loja loja; |
12 | private Loja loja; |
| 13 | private Double valorTotalVendido; |
13 | private Double valorTotalVendido; |
| 14 | private Double valorMetaMensal; |
14 | private Double valorMetaMensal; |
| - | 15 | ||
| - | 16 | private Double valorCac; |
|
| - | 17 | private Integer quantidadeVendas; |
|
| - | 18 | private Integer quantidadeAtendimentos; |
|
| - | 19 | private Integer quantidadePedidos; |
|
| - | 20 | private Integer quantidadePedidosInvalidos; |
|
| - | 21 | private Integer quantidadeAvarias; |
|
| - | 22 | private Integer quantidadeTrocas; |
|
| - | 23 | private Double valorTotalDescontos; |
|
| - | 24 | private Double valorTotalEstoque; |
|
| - | 25 | private Integer quantidadeTotalEstoque; |
|
| - | 26 | private Double custoProdutosVendidos; |
|
| - | 27 | private Double resultadoLiquido; |
|
| 15 | 28 | ||
| 16 | public RankingLojaDTO() { |
29 | public RankingLojaDTO() { |
| 17 | valorTotalVendido = 0.0; |
30 | valorTotalVendido = 0.0; |
| 18 | valorMetaMensal = 0.0; |
31 | valorMetaMensal = 0.0; |
| 19 | }
|
32 | }
|
| Line 43... | Line 56... | ||
| 43 | return valorMetaMensal; |
56 | return valorMetaMensal; |
| 44 | }
|
57 | }
|
| 45 | public void setValorMetaMensal(Double valorMetaMensal) { |
58 | public void setValorMetaMensal(Double valorMetaMensal) { |
| 46 | this.valorMetaMensal = valorMetaMensal; |
59 | this.valorMetaMensal = valorMetaMensal; |
| 47 | }
|
60 | }
|
| 48 | - | ||
| 49 | public Double getPercentualMetaMensal() { |
61 | public Double getPercentualMetaMensal() { |
| 50 | if (VerificadorUtil.naoEstaNulo(valorTotalVendido) && VerificadorUtil.naoEstaNulo(valorMetaMensal)) { |
62 | if (VerificadorUtil.naoEstaNulo(valorTotalVendido) && VerificadorUtil.naoEstaNulo(valorMetaMensal)) { |
| 51 | if (valorMetaMensal > new Double(0.0)) { |
63 | if (valorMetaMensal > new Double(0.0)) { |
| 52 | return valorTotalVendido / valorMetaMensal; |
64 | return valorTotalVendido / valorMetaMensal; |
| 53 | }
|
65 | }
|
| 54 | }
|
66 | }
|
| 55 | return new Double (0.0); |
67 | return new Double (0.0); |
| 56 | }
|
68 | }
|
| - | 69 | ||
| - | 70 | public Double getValorCac() { |
|
| - | 71 | return valorCac; |
|
| - | 72 | }
|
|
| - | 73 | public void setValorCac(Double valorCac) { |
|
| - | 74 | this.valorCac = valorCac; |
|
| - | 75 | }
|
|
| - | 76 | ||
| - | 77 | public Integer getQuantidadeVendas() { |
|
| - | 78 | return quantidadeVendas; |
|
| - | 79 | }
|
|
| - | 80 | public void setQuantidadeVendas(Integer quantidadeVendas) { |
|
| - | 81 | this.quantidadeVendas = quantidadeVendas; |
|
| - | 82 | }
|
|
| - | 83 | ||
| - | 84 | public Integer getQuantidadeAtendimentos() { |
|
| - | 85 | return quantidadeAtendimentos; |
|
| - | 86 | }
|
|
| - | 87 | public void setQuantidadeAtendimentos(Integer quantidadeAtendimentos) { |
|
| - | 88 | this.quantidadeAtendimentos = quantidadeAtendimentos; |
|
| - | 89 | }
|
|
| - | 90 | ||
| - | 91 | public Integer getQuantidadePedidos() { |
|
| - | 92 | return quantidadePedidos; |
|
| - | 93 | }
|
|
| - | 94 | public void setQuantidadePedidos(Integer quantidadePedidos) { |
|
| - | 95 | this.quantidadePedidos = quantidadePedidos; |
|
| - | 96 | }
|
|
| - | 97 | ||
| - | 98 | public Integer getQuantidadePedidosInvalidos() { |
|
| - | 99 | return quantidadePedidosInvalidos; |
|
| - | 100 | }
|
|
| - | 101 | public void setQuantidadePedidosInvalidos(Integer quantidadePedidosInvalidos) { |
|
| - | 102 | this.quantidadePedidosInvalidos = quantidadePedidosInvalidos; |
|
| - | 103 | }
|
|
| - | 104 | ||
| - | 105 | public Integer getQuantidadeAvarias() { |
|
| - | 106 | return quantidadeAvarias; |
|
| - | 107 | }
|
|
| - | 108 | public void setQuantidadeAvarias(Integer quantidadeAvarias) { |
|
| - | 109 | this.quantidadeAvarias = quantidadeAvarias; |
|
| - | 110 | }
|
|
| - | 111 | ||
| - | 112 | public Integer getQuantidadeTrocas() { |
|
| - | 113 | return quantidadeTrocas; |
|
| - | 114 | }
|
|
| - | 115 | public void setQuantidadeTrocas(Integer quantidadeTrocas) { |
|
| - | 116 | this.quantidadeTrocas = quantidadeTrocas; |
|
| - | 117 | }
|
|
| - | 118 | ||
| - | 119 | public Double getValorTotalDescontos() { |
|
| - | 120 | return valorTotalDescontos; |
|
| - | 121 | }
|
|
| - | 122 | public void setValorTotalDescontos(Double valorTotalDescontos) { |
|
| - | 123 | this.valorTotalDescontos = valorTotalDescontos; |
|
| - | 124 | }
|
|
| - | 125 | ||
| - | 126 | public Double getValorTotalEstoque() { |
|
| - | 127 | return valorTotalEstoque; |
|
| - | 128 | }
|
|
| - | 129 | public void setValorTotalEstoque(Double valorTotalEstoque) { |
|
| - | 130 | this.valorTotalEstoque = valorTotalEstoque; |
|
| - | 131 | }
|
|
| - | 132 | ||
| - | 133 | public Integer getQuantidadeTotalEstoque() { |
|
| - | 134 | return quantidadeTotalEstoque; |
|
| - | 135 | }
|
|
| - | 136 | public void setQuantidadeTotalEstoque(Integer quantidadeTotalEstoque) { |
|
| - | 137 | this.quantidadeTotalEstoque = quantidadeTotalEstoque; |
|
| - | 138 | }
|
|
| - | 139 | ||
| - | 140 | public Double getCustoProdutosVendidos() { |
|
| - | 141 | return custoProdutosVendidos; |
|
| - | 142 | }
|
|
| - | 143 | public void setCustoProdutosVendidos(Double custoProdutosVendidos) { |
|
| - | 144 | this.custoProdutosVendidos = custoProdutosVendidos; |
|
| - | 145 | }
|
|
| - | 146 | ||
| - | 147 | public Double getResultadoLiquido() { |
|
| - | 148 | return resultadoLiquido; |
|
| - | 149 | }
|
|
| - | 150 | public void setResultadoLiquido(Double resultadoLiquido) { |
|
| - | 151 | this.resultadoLiquido = resultadoLiquido; |
|
| - | 152 | }
|
|
| - | 153 | ||
| - | 154 | /*****************************************/
|
|
| 57 | 155 | ||
| 58 | @Override |
156 | @Override |
| 59 | public int compareTo(RankingLojaDTO rankingLojaDTO) { |
157 | public int compareTo(RankingLojaDTO rankingLojaDTO) { |
| 60 | return rankingLojaDTO.getValorTotalVendido().compareTo(this.valorTotalVendido); |
158 | return rankingLojaDTO.getValorTotalVendido().compareTo(this.valorTotalVendido); |
| 61 | }
|
159 | }
|
| Line 82... | Line 180... | ||
| 82 | } else { |
180 | } else { |
| 83 | return "red"; |
181 | return "red"; |
| 84 | }
|
182 | }
|
| 85 | }
|
183 | }
|
| 86 | return "black"; |
184 | return "black"; |
| - | 185 | }
|
|
| - | 186 | ||
| - | 187 | @Transient |
|
| - | 188 | public Double valorTicketMedio() { |
|
| - | 189 | if (VerificadorUtil.naoEstaNulo(getValorTotalVendido()) && |
|
| - | 190 | VerificadorUtil.naoEstaNulo(getQuantidadeVendas())) { |
|
| - | 191 | if (getValorTotalVendido() > 0.0 && getQuantidadeVendas() > 0) { |
|
| - | 192 | return getValorTotalVendido() / getQuantidadeVendas(); |
|
| - | 193 | }
|
|
| - | 194 | }
|
|
| - | 195 | return 0.0; |
|
| - | 196 | }
|
|
| - | 197 | ||
| - | 198 | @Transient |
|
| - | 199 | public Double percentualDesconto() { |
|
| - | 200 | if (VerificadorUtil.naoEstaNulo(getValorTotalVendido()) && |
|
| - | 201 | VerificadorUtil.naoEstaNulo(getValorTotalDescontos())) { |
|
| - | 202 | if (getValorTotalVendido() > 0.0 && getValorTotalDescontos() > 0.0) { |
|
| - | 203 | return (getValorTotalDescontos() * 100) / getValorTotalVendido(); |
|
| - | 204 | }
|
|
| - | 205 | }
|
|
| - | 206 | return 0.0; |
|
| 87 | }
|
207 | }
|
| 88 | 208 | ||
| 89 | }
|
209 | }
|