|
|
|
@ -495,12 +495,19 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<IndexDeliveryDataVO> deliveryData(IndexDTO indexDTO) { |
|
|
|
|
public Map<String,List<IndexDeliveryDataVO>> deliveryData(IndexDTO indexDTO) { |
|
|
|
|
|
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "deliveryData:" + indexDTO.toString()); |
|
|
|
|
// List<IndexDeliveryDataVO> indexDeliveryDataVOList = bladeRedis.get(key);
|
|
|
|
|
String deliveryKey = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "deliveryData:" + indexDTO.toString()); |
|
|
|
|
String billKey = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "deliveryData:" + indexDTO.toString()); |
|
|
|
|
String tripartiteDeliveryKey = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "deliveryData:" + indexDTO.toString()); |
|
|
|
|
// List<IndexDeliveryDataVO> indexDeliveryDataVOList = bladeRedis.get(deliveryKey);
|
|
|
|
|
// List<IndexDeliveryDataVO> indexBillDataVOList = bladeRedis.get(billKey);
|
|
|
|
|
// List<IndexDeliveryDataVO> indexBillDataVOList = bladeRedis.get(tripartiteDeliveryKey);
|
|
|
|
|
List<IndexDeliveryDataVO> indexDeliveryDataVOList= null; |
|
|
|
|
List<IndexDeliveryDataVO> indexBillDataVOList= null; |
|
|
|
|
List<IndexDeliveryDataVO> indexTripartiteDeliveryDataVOList= null; |
|
|
|
|
Map<String,List<IndexDeliveryDataVO>> map = new HashMap<>(); |
|
|
|
|
if (Objects.isNull(indexDeliveryDataVOList)) { |
|
|
|
|
//查询商市配的信息
|
|
|
|
|
indexDeliveryDataVOList = new ArrayList<>(); |
|
|
|
@ -521,47 +528,58 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
|
|
|
|
|
// indexDeliveryDataVO.setTotalRoadNum(totalRoadNum);
|
|
|
|
|
} |
|
|
|
|
indexDeliveryDataVOList.addAll(indexDeliveryDataVOS); |
|
|
|
|
bladeRedis.setEx(deliveryKey, indexDeliveryDataVOList, 3600L); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//查询自提信息
|
|
|
|
|
List<IndexDeliveryDataVO> indexDeliveryDataVO = warehouseIndexMapper.findBillLadingTotal(indexDTO); |
|
|
|
|
if (Func.isNotEmpty(indexDeliveryDataVO)) { |
|
|
|
|
for (IndexDeliveryDataVO deliveryDataVO : indexDeliveryDataVO) { |
|
|
|
|
//查询自提总件数
|
|
|
|
|
Integer billLadingTotalNum = warehouseIndexMapper.findBillLadingTotalNum(deliveryDataVO.getWarehouseId()); |
|
|
|
|
deliveryDataVO.setTotalDeliveryNum(billLadingTotalNum); |
|
|
|
|
//查询总重量
|
|
|
|
|
BigDecimal billLadingTotalWeight = warehouseIndexMapper.findBillLadingTotalWeight(deliveryDataVO.getWarehouseId()); |
|
|
|
|
deliveryDataVO.setTotalWeight(billLadingTotalWeight); |
|
|
|
|
//查询总包件体积
|
|
|
|
|
BigDecimal billLadingTotalVolume = warehouseIndexMapper.findBillLadingTotalVolume(deliveryDataVO.getWarehouseId()); |
|
|
|
|
deliveryDataVO.setTotalVolume(billLadingTotalVolume); |
|
|
|
|
//查询在途件数
|
|
|
|
|
map.put("data1",indexDeliveryDataVOList); |
|
|
|
|
if (indexBillDataVOList.isEmpty()){ |
|
|
|
|
indexBillDataVOList = new ArrayList<>(); |
|
|
|
|
//查询自提信息
|
|
|
|
|
List<IndexDeliveryDataVO> indexDeliveryDataVO = warehouseIndexMapper.findBillLadingTotal(indexDTO); |
|
|
|
|
if (Func.isNotEmpty(indexDeliveryDataVO)) { |
|
|
|
|
for (IndexDeliveryDataVO deliveryDataVO : indexDeliveryDataVO) { |
|
|
|
|
//查询自提总件数
|
|
|
|
|
Integer billLadingTotalNum = warehouseIndexMapper.findBillLadingTotalNum(deliveryDataVO.getWarehouseId()); |
|
|
|
|
deliveryDataVO.setTotalDeliveryNum(billLadingTotalNum); |
|
|
|
|
//查询总重量
|
|
|
|
|
BigDecimal billLadingTotalWeight = warehouseIndexMapper.findBillLadingTotalWeight(deliveryDataVO.getWarehouseId()); |
|
|
|
|
deliveryDataVO.setTotalWeight(billLadingTotalWeight); |
|
|
|
|
//查询总包件体积
|
|
|
|
|
BigDecimal billLadingTotalVolume = warehouseIndexMapper.findBillLadingTotalVolume(deliveryDataVO.getWarehouseId()); |
|
|
|
|
deliveryDataVO.setTotalVolume(billLadingTotalVolume); |
|
|
|
|
//查询在途件数
|
|
|
|
|
// Integer billLadingRoadTotalNum = warehouseIndexMapper.findBillLadingRoadTotalNum(deliveryDataVO.getWarehouseId());
|
|
|
|
|
// deliveryDataVO.setTotalRoadNum(billLadingRoadTotalNum);
|
|
|
|
|
} |
|
|
|
|
indexBillDataVOList.addAll(indexDeliveryDataVO); |
|
|
|
|
} |
|
|
|
|
indexDeliveryDataVOList.addAll(indexDeliveryDataVO); |
|
|
|
|
bladeRedis.setEx(billKey, indexBillDataVOList, 3600L); |
|
|
|
|
} |
|
|
|
|
//查询尊外协信息
|
|
|
|
|
List<IndexDeliveryDataVO> indexTripartiteDeliveryDataVOS = warehouseIndexMapper.findTripartiteDeliveryTotal(indexDTO); |
|
|
|
|
if (!indexTripartiteDeliveryDataVOS.isEmpty()) { |
|
|
|
|
for (IndexDeliveryDataVO indexTripartiteDeliveryDataVO : indexTripartiteDeliveryDataVOS) { |
|
|
|
|
//总包件数量
|
|
|
|
|
Integer deLiveryTotalNum = warehouseIndexMapper.findDeLiveryTotalNum(indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2); |
|
|
|
|
indexTripartiteDeliveryDataVO.setTotalDeliveryNum(deLiveryTotalNum); |
|
|
|
|
//查询总重量
|
|
|
|
|
BigDecimal totalWeight = warehouseIndexMapper.findDeliveryTotalWeight( indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2); |
|
|
|
|
indexTripartiteDeliveryDataVO.setTotalWeight(totalWeight); |
|
|
|
|
//查询总包件体积
|
|
|
|
|
BigDecimal totalVolume = warehouseIndexMapper.findDeliveryTotalVolume( indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2); |
|
|
|
|
indexTripartiteDeliveryDataVO.setTotalVolume(totalVolume); |
|
|
|
|
|
|
|
|
|
map.put("data2",indexBillDataVOList); |
|
|
|
|
if (indexTripartiteDeliveryDataVOList.isEmpty()){ |
|
|
|
|
//查询尊外协信息
|
|
|
|
|
indexTripartiteDeliveryDataVOList = new ArrayList<>(); |
|
|
|
|
List<IndexDeliveryDataVO> indexTripartiteDeliveryDataVOS = warehouseIndexMapper.findTripartiteDeliveryTotal(indexDTO); |
|
|
|
|
if (!indexTripartiteDeliveryDataVOS.isEmpty()) { |
|
|
|
|
for (IndexDeliveryDataVO indexTripartiteDeliveryDataVO : indexTripartiteDeliveryDataVOS) { |
|
|
|
|
//总包件数量
|
|
|
|
|
Integer deLiveryTotalNum = warehouseIndexMapper.findDeLiveryTotalNum(indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2); |
|
|
|
|
indexTripartiteDeliveryDataVO.setTotalDeliveryNum(deLiveryTotalNum); |
|
|
|
|
//查询总重量
|
|
|
|
|
BigDecimal totalWeight = warehouseIndexMapper.findDeliveryTotalWeight( indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2); |
|
|
|
|
indexTripartiteDeliveryDataVO.setTotalWeight(totalWeight); |
|
|
|
|
//查询总包件体积
|
|
|
|
|
BigDecimal totalVolume = warehouseIndexMapper.findDeliveryTotalVolume( indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2); |
|
|
|
|
indexTripartiteDeliveryDataVO.setTotalVolume(totalVolume); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
indexTripartiteDeliveryDataVOList.addAll(indexTripartiteDeliveryDataVOS); |
|
|
|
|
bladeRedis.setEx(tripartiteDeliveryKey, indexTripartiteDeliveryDataVOList, 3600L); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bladeRedis.setEx(key, indexDeliveryDataVOList, 3600L); |
|
|
|
|
map.put("data3",indexTripartiteDeliveryDataVOList); |
|
|
|
|
} |
|
|
|
|
return indexDeliveryDataVOList; |
|
|
|
|
|
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|