fix: 慢性病管理,定时任务修改完善。

This commit is contained in:
tianyongbao
2026-03-21 22:28:06 +08:00
parent 8821e01422
commit 6cff4a2e7a
24 changed files with 368 additions and 55 deletions

View File

@@ -24,6 +24,8 @@
<result property="notifyFamily" column="notify_family"/>
<result property="familyMemberIds" column="family_member_ids" typeHandler="com.intc.common.core.handler.JsonNodeTypeHandler"/>
<result property="status" column="status"/>
<result property="todayTotal" column="today_total"/>
<result property="todayCompleted" column="today_completed"/>
<result property="createTime" column="create_time"/>
</resultMap>
@@ -33,7 +35,9 @@
a.medicine_name, a.specification, a.dosage_per_time, a.dosage_unit,
a.frequency_type, a.frequency_config, a.time_slots, a.start_date, a.end_date,
a.remind_enabled, a.remind_advance_min, a.notify_family, a.family_member_ids,
a.status, a.create_time
a.status, a.create_time,
(select count(1) from medication_task t where t.plan_id = a.id and t.del_flag = 0 and t.planned_date = current_date) as today_total,
(select count(1) from medication_task t where t.plan_id = a.id and t.del_flag = 0 and t.planned_date = current_date and t.status = 1) as today_completed
from medication_plan a
left join health_person p on a.person_id = p.id
left join chronic_disease_record c on a.chronic_disease_id = c.id
@@ -60,6 +64,8 @@
and (a.plan_name like '%' || #{keyword} || '%' or a.medicine_name like '%' || #{keyword} || '%')
</if>
</where>
<!-- 数据范围过滤 -->
${params.dataScope}
order by a.create_time desc
</select>