mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
删除/恢复柜体优先bodyId后用roomId查询房间下所有柜体
This commit is contained in:
+9
-6
@@ -996,7 +996,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验查询柜体,优先roomIds下的所有柜体
|
||||
* 校验查询柜体,优先bodyId下的所有柜体
|
||||
*
|
||||
* @param orderId
|
||||
* @param bodyId
|
||||
@@ -1009,11 +1009,9 @@ public class OrderServiceImpl implements OrderService {
|
||||
|
||||
List<Long> bodyIds = new ArrayList<>();
|
||||
|
||||
if (CollUtil.isNotEmpty(roomIds)) {
|
||||
bodyIds.addAll(orderBodyMapper.selectBodyIdByRoomId(orderId, roomIds, organId, deleted));
|
||||
}
|
||||
|
||||
if (bodyId != null && bodyId != 0) {
|
||||
// 柜体id是否为空
|
||||
boolean bodyIdIsNull = ObjectUtil.isNotNull(bodyId);
|
||||
if (bodyIdIsNull) {
|
||||
Long bodyCount = orderBodyMapper.selectCount(new LambdaQueryWrapperX<OrderBodyDO>()
|
||||
.eq(OrderBodyDO::getOrganId, organId)
|
||||
.eqIfPresent(OrderBodyDO::getDeleted, deleted)
|
||||
@@ -1027,6 +1025,11 @@ public class OrderServiceImpl implements OrderService {
|
||||
bodyIds.add(bodyId);
|
||||
}
|
||||
|
||||
// 柜体id为空时查询房间下所有柜体id
|
||||
if (!bodyIdIsNull && CollUtil.isNotEmpty(roomIds)) {
|
||||
bodyIds.addAll(orderBodyMapper.selectBodyIdByRoomId(orderId, roomIds, organId, deleted));
|
||||
}
|
||||
|
||||
return bodyIds;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user