feat (consultation): update column and adjust
This commit is contained in:
No files matched your search
@@ -322,7 +322,7 @@ func Reply(input e.ReplyDto) (*d.Data, error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if data.Doctor_Id != nil && data.Doctor_Id != doctor_id {
|
||||
if data.DstDoctor_Id != nil && data.DstDoctor_Id != doctor_id {
|
||||
event.Status = "failed"
|
||||
event.ErrInfo = pl.ErrorInfo{
|
||||
Code: "data-handled-mismatch",
|
||||
@@ -332,7 +332,7 @@ func Reply(input e.ReplyDto) (*d.Data, error) {
|
||||
return pl.SetLogError(&event, input)
|
||||
}
|
||||
|
||||
data.Doctor_Id = doctor_id
|
||||
data.DstDoctor_Id = doctor_id
|
||||
data.Solution = input.Solution
|
||||
data.RepliedAt = pu.GetTimeNow()
|
||||
err = tx.Save(&data).Error
|
||||
|
||||
@@ -18,6 +18,7 @@ func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.Consultation) {
|
||||
}
|
||||
|
||||
data.Encounter_Id = inputSrc.Encounter_Id
|
||||
data.Case = inputSrc.Case
|
||||
data.Unit_Id = inputSrc.Unit_Id
|
||||
data.Date = inputSrc.Date
|
||||
data.Problem = inputSrc.Problem
|
||||
data.DstUnit_Id = inputSrc.DstUnit_Id
|
||||
}
|
||||
Reference in New Issue
Block a user