|
|
@@ -1193,6 +1193,16 @@ func CentralKitchenForSchoolBatchAskForLeave(c *gin.Context) { |
|
|
|
e.OutErr(c, err1.Code, err1.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
var datesMap map[string]string |
|
|
|
for _, v := range req.Dates { |
|
|
|
datesMap[v] = v |
|
|
|
} |
|
|
|
var dates []string |
|
|
|
for _, v := range datesMap { |
|
|
|
dates = append(dates, v) |
|
|
|
} |
|
|
|
req.Dates = dates |
|
|
|
|
|
|
|
err = svc2.CentralKitchenForSchoolBatchAskForLeaveBySchool(req) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR, err.Error()) |
|
|
@@ -1209,6 +1219,16 @@ func CentralKitchenForSchoolBatchAskForLeave(c *gin.Context) { |
|
|
|
e.OutErr(c, err1.Code, err1.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
var datesMap map[string]string |
|
|
|
for _, v := range req.Dates { |
|
|
|
datesMap[v] = v |
|
|
|
} |
|
|
|
var dates []string |
|
|
|
for _, v := range datesMap { |
|
|
|
dates = append(dates, v) |
|
|
|
} |
|
|
|
req.Dates = dates |
|
|
|
|
|
|
|
err = svc2.CentralKitchenForSchoolBatchAskForLeaveByGrade(req) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR, err.Error()) |
|
|
@@ -1225,6 +1245,16 @@ func CentralKitchenForSchoolBatchAskForLeave(c *gin.Context) { |
|
|
|
e.OutErr(c, err1.Code, err1.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
var datesMap map[string]string |
|
|
|
for _, v := range req.Dates { |
|
|
|
datesMap[v] = v |
|
|
|
} |
|
|
|
var dates []string |
|
|
|
for _, v := range datesMap { |
|
|
|
dates = append(dates, v) |
|
|
|
} |
|
|
|
req.Dates = dates |
|
|
|
|
|
|
|
err = svc2.CentralKitchenForSchoolBatchAskForLeaveByClass(req) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR, err.Error()) |
|
|
|