fix: 慢性病管理,用药任务生成修改。
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<result property="status" column="status"/>
|
||||
<result property="todayTotal" column="today_total"/>
|
||||
<result property="todayCompleted" column="today_completed"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user