1.修复单据编辑查询数据重复问题

master
x_z 3 years ago
parent bb4b592466
commit b5f02508f4

@ -9,6 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
@Mapper
public interface OrderDao {
@ -64,7 +65,7 @@ public interface OrderDao {
*/
OrderEntity selectByBillNo(String billNo);
List<OrderEntity> selectByIds(@Param("orderIds") List<String> orderIds);
List<OrderEntity> selectByIds(@Param("orderIds") Set<String> orderIds);
/**
*

@ -375,7 +375,7 @@ public class OrderServiceImpl implements OrderService {
}
//通过源单据查询所有关联的单据数据
public void getLinkedOrderId(String id, List<String> orderIds) {
public void getLinkedOrderId(String id, Set<String> orderIds) {
List<String> list = getOneOrderById(id);
if (!orderIds.containsAll(list)) {
//找出不包含在原有集合中的单据号,回调方法
@ -421,7 +421,7 @@ public class OrderServiceImpl implements OrderService {
*/
@Override
public List<OrderEntity> getAllOrder(OrderEntity orderEntity) {
List<String> orderIds = new ArrayList<>();
Set<String> orderIds = new HashSet<>();
orderIds.add(orderEntity.getId());
getLinkedOrderId(orderEntity.getId(), orderIds);

Loading…
Cancel
Save