From e1938334e2dc0ebc684c558fa3482d64c3fd02db Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Sun, 29 Mar 2026 09:41:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=85=A2=E6=80=A7=E7=97=85=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E7=94=A8=E8=8D=AF=E4=BB=BB=E5=8A=A1=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/intc/health/domain/vo/MedicationPlanVo.java | 3 +++ .../src/main/java/com/intc/health/task/MedicationTaskJob.java | 1 + .../src/main/resources/mapper/health/MedicationPlanMapper.xml | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/intc-modules/intc-health/src/main/java/com/intc/health/domain/vo/MedicationPlanVo.java b/intc-modules/intc-health/src/main/java/com/intc/health/domain/vo/MedicationPlanVo.java index 11615f8..64bc0c2 100644 --- a/intc-modules/intc-health/src/main/java/com/intc/health/domain/vo/MedicationPlanVo.java +++ b/intc-modules/intc-health/src/main/java/com/intc/health/domain/vo/MedicationPlanVo.java @@ -90,6 +90,9 @@ public class MedicationPlanVo { @ApiModelProperty("今日已完成") private Integer todayCompleted; + @ApiModelProperty("创建人") + private String createBy; + @ApiModelProperty("创建时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; diff --git a/intc-modules/intc-health/src/main/java/com/intc/health/task/MedicationTaskJob.java b/intc-modules/intc-health/src/main/java/com/intc/health/task/MedicationTaskJob.java index 2dd3168..54d19e0 100644 --- a/intc-modules/intc-health/src/main/java/com/intc/health/task/MedicationTaskJob.java +++ b/intc-modules/intc-health/src/main/java/com/intc/health/task/MedicationTaskJob.java @@ -220,6 +220,7 @@ public class MedicationTaskJob { task.setPlannedDosage(dosage); task.setStatus(0); // 待服药 task.setRemindStatus(0); // 未提醒 + task.setCreateBy(plan.getCreateBy()); task.setCreateTime(DateUtils.getNowDate()); tasks.add(task); diff --git a/intc-modules/intc-health/src/main/resources/mapper/health/MedicationPlanMapper.xml b/intc-modules/intc-health/src/main/resources/mapper/health/MedicationPlanMapper.xml index 29bb0e1..37b8c1f 100644 --- a/intc-modules/intc-health/src/main/resources/mapper/health/MedicationPlanMapper.xml +++ b/intc-modules/intc-health/src/main/resources/mapper/health/MedicationPlanMapper.xml @@ -26,6 +26,7 @@ + @@ -35,7 +36,7 @@ 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_by, 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