no message
parent
9c6b4cb479
commit
013e0a56f0
|
|
@ -44,6 +44,7 @@ import org.springframework.data.domain.Pageable;
|
|||
import java.sql.Timestamp;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
||||
|
|
@ -617,8 +618,15 @@ public class AgvTaskServiceImpl implements AgvTaskService {
|
|||
*/
|
||||
private void handleJl(Stock stock, Point endPoint, AgvTask agvTask) {
|
||||
List<Inventory> inventoryList = inventoryService.queryInventory(stock);
|
||||
if (!inventoryList.isEmpty()) {
|
||||
inventoryService.deleteAll(inventoryList.stream().map(Inventory::getId).toArray(Long[]::new));
|
||||
Long[] ids = inventoryList.stream()
|
||||
.filter(i -> {
|
||||
String areaCode = i.getPoint().getArea().getCode();
|
||||
return AreaNameDic.XJFBCQ.equals(areaCode) || AreaNameDic.DJFBCQ.equals(areaCode);
|
||||
})
|
||||
.map(Inventory::getId)
|
||||
.toArray(Long[]::new);
|
||||
if (ids.length > 0) {
|
||||
inventoryService.deleteAll(ids);
|
||||
}
|
||||
stock.setPoint(endPoint);
|
||||
stockRepository.save(stock);
|
||||
|
|
|
|||
Loading…
Reference in New Issue