seeder ongoing
This commit is contained in:
No files matched your search
@@ -889,7 +889,7 @@ func ApproveSwitchSpecialist(input e.ApproveCancelSpecialistDto) (*d.Data, error
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set doctor_code; nil indicates no change.
|
// Set doctor_code; nil indicates no change.
|
||||||
if input.Dst_Doctor_Code == nil {
|
if input.Dst_Doctor_Code == nil || *input.Dst_Doctor_Code == "" {
|
||||||
input.Dst_Doctor_Code = irData.Doctor_Code
|
input.Dst_Doctor_Code = irData.Doctor_Code
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,14 +27,25 @@ func SeedSpecialist(event *pl.Event, tx *db.Dualtx) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mapping To Installation
|
// Mapping To Specialist
|
||||||
var speData []es.CreateDto
|
var speData []es.CreateDto
|
||||||
for _, v := range ruang {
|
for _, v := range ruang {
|
||||||
|
if v.StAktif == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
speCode := strconv.Itoa(int(v.No))
|
||||||
|
|
||||||
|
var insCode string
|
||||||
|
if v.KdUnit != 0 {
|
||||||
|
code := strconv.Itoa(v.KdUnit)
|
||||||
|
insCode = code
|
||||||
|
}
|
||||||
|
|
||||||
codeString := strconv.Itoa(int(v.No))
|
|
||||||
speData = append(speData, es.CreateDto{
|
speData = append(speData, es.CreateDto{
|
||||||
Code: codeString,
|
Code: speCode,
|
||||||
Name: v.Nama,
|
Name: v.Nama,
|
||||||
|
Installation_Code: insCode,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user