inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductServiceImpl.java
@@ -16,6 +16,7 @@
import com.ruoyi.inspect.pojo.InsProduct;
import com.ruoyi.inspect.pojo.InsSample;
import com.ruoyi.inspect.service.InsProductService;
import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours;
import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -134,7 +135,8 @@
            product.setTemplate(null);
            product.setStyle(null);
            return product;
        }).collect(Collectors.toList());
        }).sorted((o1, o2) -> (o1.getSort() == null ? 0 : o1.getSort())
                - (o2.getSort() == null ? 0 : o2.getSort())).collect(Collectors.toList());
        return insProducts;
    }
@@ -213,6 +215,20 @@
        return false;
    }
    @Override
    public List<InsProduct> getRevocationInsProductList(Integer orderId) {
        InsOrder insOrder = insOrderMapper.selectById(orderId);
        if(Objects.isNull(insOrder)){
            throw new RuntimeException("未找到该订单");
        }
        String revocationInsProductIds = insOrder.getRevocationInsProductIds();
        List<Integer> ids = new ArrayList<>();
        if(StringUtils.isNotBlank(revocationInsProductIds)){
            ids = Arrays.asList(revocationInsProductIds.split(",")).stream().map(Integer::parseInt).collect(Collectors.toList());
        }
        return baseMapper.getRevocationInsProductList(ids);
    }
}