chore: 编译器警告清理 — 22 条全部消除,workspace 零警告
erp-ai(8): 移除未用 import + serde 结构体 #[allow(dead_code)] erp-plugin(5): 移除未用 import + FromQueryResult 结构体允许 erp-health(8): 移除未用 import/变量 + FromQueryResult 字段允许 erp-server(1): AnalyticsEvent.timestamp 允许(未来分析集成)
This commit is contained in:
@@ -325,15 +325,7 @@ pub fn register_handlers_with_state(state: crate::state::HealthState) {
|
||||
.and_then(|s| uuid::Uuid::parse_str(s).ok());
|
||||
|
||||
if let Some(patient_id) = patient_id {
|
||||
// 通过 raw SQL 查找关联的 AI 建议(action_result 中包含 followup_task_id)
|
||||
let sql = r#"
|
||||
SELECT id FROM ai_suggestion
|
||||
WHERE tenant_id = $1
|
||||
AND deleted_at IS NULL
|
||||
AND status = 'executed'
|
||||
AND action_result @> $2
|
||||
LIMIT 1
|
||||
"#;
|
||||
// 通过 ai_suggestion_loader 查找关联的 AI 建议
|
||||
if let Some(suggestion_id) = crate::service::ai_suggestion_loader::find_by_followup_task(
|
||||
&fu_db, event.tenant_id, task_id,
|
||||
).await.unwrap_or(None) {
|
||||
|
||||
@@ -105,6 +105,7 @@ struct ActionItemRow {
|
||||
patient_id: Uuid,
|
||||
patient_name: String,
|
||||
result_content: Option<String>,
|
||||
#[allow(dead_code)] // FromQueryResult 映射需要,当前 DTO 转换中未读取
|
||||
source_id: Option<Uuid>,
|
||||
}
|
||||
|
||||
@@ -116,6 +117,7 @@ struct CountRow {
|
||||
#[derive(Debug, FromQueryResult)]
|
||||
struct ActionDetail {
|
||||
id: Uuid,
|
||||
#[allow(dead_code)] // FromQueryResult 映射需要,当前 DTO 转换中未读取
|
||||
action_type: String,
|
||||
priority_raw: String,
|
||||
status: String,
|
||||
@@ -124,6 +126,7 @@ struct ActionDetail {
|
||||
reanalysis_id: Option<Uuid>,
|
||||
created_at: DateTime<Utc>,
|
||||
updated_at: DateTime<Utc>,
|
||||
#[allow(dead_code)] // FromQueryResult 映射需要,当前 DTO 转换中未读取
|
||||
source_id: Option<Uuid>,
|
||||
patient_id: Uuid,
|
||||
patient_name: String,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use chrono::Utc;
|
||||
use sea_orm::entity::prelude::*;
|
||||
use sea_orm::{ActiveModelTrait, ActiveValue::Set, ColumnTrait, EntityTrait, PaginatorTrait, QueryFilter, QueryOrder, QuerySelect};
|
||||
use uuid::Uuid;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use sea_orm::{ColumnTrait, ConnectionTrait, EntityTrait, PaginatorTrait, QueryFilter, sea_query::Expr, FromQueryResult, Statement};
|
||||
use sea_orm::{ColumnTrait, ConnectionTrait, EntityTrait, PaginatorTrait, QueryFilter, sea_query::Expr, FromQueryResult};
|
||||
|
||||
use erp_core::error::AppResult;
|
||||
|
||||
@@ -7,7 +7,6 @@ use crate::entity::{
|
||||
patient, consultation_session, follow_up_task,
|
||||
points_transaction, lab_report,
|
||||
appointment, vital_signs, patient_doctor_relation, doctor_profile,
|
||||
article,
|
||||
};
|
||||
use crate::state::HealthState;
|
||||
|
||||
@@ -463,6 +462,7 @@ async fn compute_daily_report_rate(
|
||||
struct DailyRow {
|
||||
date: String,
|
||||
reported: i64,
|
||||
#[allow(dead_code)] // FromQueryResult 映射需要 total 字段,当前未读取
|
||||
total: i64,
|
||||
}
|
||||
|
||||
@@ -902,7 +902,7 @@ pub async fn get_points_recent_activity(
|
||||
|
||||
/// 模块状态
|
||||
pub async fn get_module_status(
|
||||
state: &HealthState,
|
||||
_state: &HealthState,
|
||||
) -> AppResult<Vec<ModuleStatusResp>> {
|
||||
let modules = vec![
|
||||
ModuleStatusResp {
|
||||
|
||||
Reference in New Issue
Block a user