|
|
|
@ -1842,30 +1842,30 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public boolean doMoveDsAutoPurchaseBufferToQueue(Map<Long, Long> shopIdAndMoveCntMap) {
|
|
|
|
|
final int pageSize = 100;
|
|
|
|
|
|
|
|
|
|
List<String> allOrderIds = new ArrayList<>();
|
|
|
|
|
Map<Long, DsAutoPurchaseOrderBuffer> allBufferMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
for (Long shopId : shopIdAndMoveCntMap.keySet()) {
|
|
|
|
|
if (!shopIdAndMoveCntMap.containsKey(shopId) && shopIdAndMoveCntMap.get(shopId) == null || shopIdAndMoveCntMap.get(shopId) <= 0) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
Long moveBufferCount = shopIdAndMoveCntMap.get(shopId);
|
|
|
|
|
|
|
|
|
|
List<DsAutoPurchaseOrderBuffer> bufferRows = dsAutoPurchaseOrderBufferMapper.selectXXXX();
|
|
|
|
|
if (bufferRows.size() == 0) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
allOrderIds.addAll(bufferRows.stream().map(DsAutoPurchaseOrderBuffer::getOrderId).collect(Collectors.toList()));
|
|
|
|
|
Map<Long, DsAutoPurchaseOrderBuffer> bufferRowsMap = CommonTool.convertListToMap(bufferRows, DsAutoPurchaseOrderBuffer::getDsAutoPurchaseOrderBufferId);
|
|
|
|
|
allBufferMap.putAll(bufferRowsMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (allBufferMap.isEmpty()) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
// final int pageSize = 100;
|
|
|
|
|
//
|
|
|
|
|
// List<String> allOrderIds = new ArrayList<>();
|
|
|
|
|
// Map<Long, DsAutoPurchaseOrderBuffer> allBufferMap = new HashMap<>();
|
|
|
|
|
//
|
|
|
|
|
// for (Long shopId : shopIdAndMoveCntMap.keySet()) {
|
|
|
|
|
// if (!shopIdAndMoveCntMap.containsKey(shopId) && shopIdAndMoveCntMap.get(shopId) == null || shopIdAndMoveCntMap.get(shopId) <= 0) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// Long moveBufferCount = shopIdAndMoveCntMap.get(shopId);
|
|
|
|
|
//
|
|
|
|
|
// List<DsAutoPurchaseOrderBuffer> bufferRows = dsAutoPurchaseOrderBufferMapper.selectXXXX();
|
|
|
|
|
// if (bufferRows.size() == 0) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// allOrderIds.addAll(bufferRows.stream().map(DsAutoPurchaseOrderBuffer::getOrderId).collect(Collectors.toList()));
|
|
|
|
|
// Map<Long, DsAutoPurchaseOrderBuffer> bufferRowsMap = CommonTool.convertListToMap(bufferRows, DsAutoPurchaseOrderBuffer::getDsAutoPurchaseOrderBufferId);
|
|
|
|
|
// allBufferMap.putAll(bufferRowsMap);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// if (allBufferMap.isEmpty()) {
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// todo: 未完待续
|
|
|
|
|
|
|
|
|
|