|
|
@@ -756,19 +756,20 @@ public class ApiServiceImpl implements ApiService {
|
|
|
|
|
|
@Override
|
|
|
public List<Map<String, Object>> tyreSaleSizeProportion(String tenantId) {
|
|
|
- List<PjOrderItems> orderItemsList = orderItemsService.selectOrderItemsList(tenantId, "");
|
|
|
+ List<PjOrderItems> orderItemsList = orderItemsService.selectOrderItemsListBySaleSizeDetail(tenantId);
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
|
|
if (!orderItemsList.isEmpty()) {
|
|
|
List<TyreSaleSize> saleSizeList = new ArrayList<>();
|
|
|
List<Long> goodsId = orderItemsList.stream().map(PjOrderItems::getGoodsId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
|
|
- StringBuilder goodsIds = new StringBuilder();
|
|
|
+/* StringBuilder goodsIds = new StringBuilder();
|
|
|
for (Long item : goodsId) {
|
|
|
goodsIds.append(item).append(",");
|
|
|
}
|
|
|
if (ObjectUtils.isNotNull(goodsIds.toString())) {
|
|
|
goodsIds = new StringBuilder(goodsIds.substring(0, goodsIds.length() - 1));
|
|
|
}
|
|
|
- List<PjGoodsDesc> goodsDescList = goodsDescService.selectGoodsList(tenantId, goodsIds.toString());
|
|
|
+ List<PjGoodsDesc> goodsDescList = goodsDescService.selectGoodsList(tenantId, goodsIds.toString());*/
|
|
|
+ List<PjGoodsDesc> goodsDescList = goodsDescService.selectGoodsListBySaleSizeDetail(tenantId, goodsId);
|
|
|
for (Long items : goodsId) {
|
|
|
BigDecimal goodsNum = orderItemsList.stream().filter(e -> e.getGoodsId().equals(items)).map(PjOrderItems::getGoodsNum)
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
@@ -842,14 +843,15 @@ public class ApiServiceImpl implements ApiService {
|
|
|
if (!orderItemsList.isEmpty()) {
|
|
|
List<TyreSaleSize> saleSizeList = new ArrayList<>();
|
|
|
List<Long> goodsId = orderItemsList.stream().map(PjOrderItems::getGoodsId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
|
|
- StringBuilder goodsIds = new StringBuilder();
|
|
|
+/* StringBuilder goodsIds = new StringBuilder();
|
|
|
for (Long item : goodsId) {
|
|
|
goodsIds.append(item).append(",");
|
|
|
}
|
|
|
if (ObjectUtils.isNotNull(goodsIds.toString())) {
|
|
|
goodsIds = new StringBuilder(goodsIds.substring(0, goodsIds.length() - 1));
|
|
|
- }
|
|
|
- List<PjGoodsDesc> goodsDescList = goodsDescService.selectGoodsList(tenantId, goodsIds.toString());
|
|
|
+ }*/
|
|
|
+ // List<PjGoodsDesc> goodsDescList = goodsDescService.selectGoodsList(tenantId, goodsIds.toString());
|
|
|
+ List<PjGoodsDesc> goodsDescList = goodsDescService.selectGoodsListBySaleSizeDetail(tenantId, goodsId);
|
|
|
for (Long items : goodsId) {
|
|
|
BigDecimal goodsNum = orderItemsList.stream().filter(e -> e.getGoodsId().equals(items)).map(PjOrderItems::getGoodsNum)
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
@@ -935,7 +937,8 @@ public class ApiServiceImpl implements ApiService {
|
|
|
|
|
|
@Override
|
|
|
public List<Map<String, Object>> tyreBrandSalesVolumeProportion(String tenantId) {
|
|
|
- List<PjOrderItems> orderItemsList = orderItemsService.selectOrderItemsList(tenantId, "");
|
|
|
+ // List<PjOrderItems> orderItemsList = orderItemsService.selectOrderItemsList(tenantId, "");
|
|
|
+ List<PjOrderItems> orderItemsList = orderItemsService.selectOrderItemsListBySaleSizeDetail(tenantId);
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
|
|
if (!orderItemsList.isEmpty()) {
|
|
|
List<TyreSaleBrand> saleBrandList = new ArrayList<>();
|
|
|
@@ -969,7 +972,8 @@ public class ApiServiceImpl implements ApiService {
|
|
|
|
|
|
@Override
|
|
|
public List<Map<String, Object>> tyreBrandSalesVolumeDetail(String tenantId) {
|
|
|
- List<PjOrderItems> orderItemsList = orderItemsService.selectOrderItemsList(tenantId, "");
|
|
|
+ // List<PjOrderItems> orderItemsList = orderItemsService.selectOrderItemsList(tenantId, "");
|
|
|
+ List<PjOrderItems> orderItemsList = orderItemsService.selectOrderItemsListBySaleSizeDetail(tenantId);
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
|
|
if (!orderItemsList.isEmpty()) {
|
|
|
List<TyreSaleBrand> saleBrandList = new ArrayList<>();
|