doctor_schedule_api_controller.go 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. package controllers
  2. import (
  3. "XT_New/enums"
  4. "XT_New/models"
  5. "XT_New/service"
  6. "fmt"
  7. "github.com/astaxie/beego"
  8. "github.com/jinzhu/gorm"
  9. "time"
  10. )
  11. type DoctorScheduleApiController struct {
  12. BaseAuthAPIController
  13. }
  14. func DoctorScheduleRouters() {
  15. beego.Router("/api/schedules/savedoctorschedules", &DoctorScheduleApiController{}, "Get:SaveDoctorSchedules")
  16. beego.Router("/api/schedules/getdoctorschedulelist", &DoctorScheduleApiController{}, "Get:GetDoctorScheduleList")
  17. beego.Router("/api/schedules/getscheduledetail", &DoctorScheduleApiController{}, "Get:GetScheduleDetail")
  18. beego.Router("/api/schedules/updateschedule", &DoctorScheduleApiController{}, "Get:UpdateSchedule")
  19. beego.Router("/api/schedule/deleteschedule", &DoctorScheduleApiController{}, "Get:DeleteSchedule")
  20. beego.Router("/api/schedule/getdoctorlist", &DoctorScheduleApiController{}, "Get:GetDoctorList")
  21. beego.Router("/api/schedule/getschedulelist", &DoctorScheduleApiController{}, "Get:GetScheduleList")
  22. beego.Router("/api/schedule/addschedule", &DoctorScheduleApiController{}, "Get:AddSchedule")
  23. beego.Router("/api/schedule/getstaffschedulelist", &DoctorScheduleApiController{}, "Get:GetStaffScheduleList")
  24. beego.Router("/api/schedule/getnextweeklist", &DoctorScheduleApiController{}, "Get:GetNextWeekList")
  25. beego.Router("/api/schedule/getschedulebydoctorid", &DoctorScheduleApiController{}, "Get:GetScheduleByDoctorId")
  26. beego.Router("/api/schedule/tosearchsechedulelist", &DoctorScheduleApiController{}, "Get:ToSearchScheduleList")
  27. beego.Router("api/schedule/deletestaffschedule", &DoctorScheduleApiController{}, "Get:DeleteStaffSchedule")
  28. beego.Router("/api/schedule/copystaffschedule", &DoctorScheduleApiController{}, "Get:CopyStaffSchedule")
  29. beego.Router("/api/scheudle/updatecontinusschedule", &DoctorScheduleApiController{}, "Get:UpdateContinusSchedule")
  30. beego.Router("/api/schedule/savenursesort", &DoctorScheduleApiController{}, "Get:SaveNureSort")
  31. beego.Router("/api/schedule/saveisschedule", &DoctorScheduleApiController{}, "Get:SaveIsSchedule")
  32. beego.Router("/api/schedule/getscheudlelisttotal", &DoctorScheduleApiController{}, "Get:GetScheduleListTotal")
  33. }
  34. func (this *DoctorScheduleApiController) SaveDoctorSchedules() {
  35. adminUser := this.GetAdminUserInfo()
  36. orgId := adminUser.CurrentOrgId
  37. class_name := this.GetString("class_name")
  38. class_attributes, _ := this.GetInt64("class_attributes")
  39. timeone_start := this.GetString("timeone_start")
  40. timeone_type, _ := this.GetInt64("timeone_type")
  41. timeone_end := this.GetString("timeone_end")
  42. timetwo_start := this.GetString("timetwo_start")
  43. timetwo_type, _ := this.GetInt64("timetwo_type")
  44. timetwo_end := this.GetString("timetwo_end")
  45. work_time := this.GetString("work_time")
  46. remarks := this.GetString("remarks")
  47. minute, _ := this.GetInt64("minute")
  48. schedules := models.DoctorSchedules{
  49. ClassName: class_name,
  50. ClassAttributes: class_attributes,
  51. TimeoneStart: timeone_start,
  52. TimeoneType: timeone_type,
  53. TimeoneEnd: timeone_end,
  54. TimetwoStart: timetwo_start,
  55. TimetwoEnd: timetwo_end,
  56. TimetwoType: timetwo_type,
  57. WorkTime: work_time,
  58. Remarks: remarks,
  59. UserOrgId: orgId,
  60. Status: 1,
  61. Ctime: time.Now().Unix(),
  62. Minute: minute,
  63. }
  64. //查询班种名称是否存在
  65. _, errcode := service.GetClassName(orgId, class_name)
  66. //如果不存在
  67. if errcode == gorm.ErrRecordNotFound {
  68. err := service.CreateDotorSchedule(&schedules)
  69. if err != nil {
  70. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  71. return
  72. }
  73. this.ServeSuccessJSON(map[string]interface{}{
  74. "schedules": schedules,
  75. })
  76. } else if errcode == nil {
  77. this.ServeFailJsonSend(enums.ErrorCodeDataException, "班种名称已存在")
  78. return
  79. }
  80. }
  81. func (this *DoctorScheduleApiController) GetDoctorScheduleList() {
  82. adminUserInfo := this.GetAdminUserInfo()
  83. orgId := adminUserInfo.CurrentOrgId
  84. page, _ := this.GetInt64("page")
  85. limit, _ := this.GetInt64("limit")
  86. schedules, total, err := service.GetDoctorScheduleList(orgId, page, limit)
  87. if err != nil {
  88. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  89. return
  90. }
  91. this.ServeSuccessJSON(map[string]interface{}{
  92. "schedules": schedules,
  93. "total": total,
  94. })
  95. //查询该机构是否有班种,如果没有去读系统默认的
  96. //_, errcode := service.GetDoctorScheduleByOrgId(orgId)
  97. //if errcode == gorm.ErrRecordNotFound{
  98. // schedules, total, err := service.GetDoctorScheduleList(0,page, limit)
  99. // if err != nil {
  100. // this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  101. // return
  102. // }
  103. //
  104. // this.ServeSuccessJSON(map[string]interface{}{
  105. // "schedules": schedules,
  106. // "total":total,
  107. // })
  108. //}else if errcode == nil{
  109. // schedules, total, err := service.GetDoctorScheduleList(orgId, page, limit)
  110. // if err != nil {
  111. // this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  112. // return
  113. // }
  114. //
  115. // this.ServeSuccessJSON(map[string]interface{}{
  116. // "schedules": schedules,
  117. // "total":total,
  118. // })
  119. //}
  120. }
  121. func (this *DoctorScheduleApiController) GetScheduleDetail() {
  122. id, _ := this.GetInt64("id")
  123. scheduleDetail, err := service.GetScheduleDetail(id)
  124. if err != nil {
  125. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  126. return
  127. }
  128. this.ServeSuccessJSON(map[string]interface{}{
  129. "scheduleDetail": scheduleDetail,
  130. })
  131. }
  132. func (this *DoctorScheduleApiController) UpdateSchedule() {
  133. id, _ := this.GetInt64("id")
  134. class_name := this.GetString("class_name")
  135. class_attributes, _ := this.GetInt64("class_attributes")
  136. timeone_start := this.GetString("timeone_start")
  137. timeone_type, _ := this.GetInt64("timeone_type")
  138. timeone_end := this.GetString("timeone_end")
  139. timetwo_start := this.GetString("timetwo_start")
  140. timetwo_type, _ := this.GetInt64("timetwo_type")
  141. timetwo_end := this.GetString("timetwo_end")
  142. work_time := this.GetString("work_time")
  143. remarks := this.GetString("remarks")
  144. user_org_id, _ := this.GetInt64("user_org_id")
  145. minute, _ := this.GetInt64("minute")
  146. schedules := models.DoctorSchedules{
  147. ClassName: class_name,
  148. ClassAttributes: class_attributes,
  149. TimeoneStart: timeone_start,
  150. TimeoneType: timeone_type,
  151. TimeoneEnd: timeone_end,
  152. TimetwoStart: timetwo_start,
  153. TimetwoEnd: timetwo_end,
  154. TimetwoType: timetwo_type,
  155. WorkTime: work_time,
  156. Remarks: remarks,
  157. Minute: minute,
  158. }
  159. if user_org_id == 0 {
  160. err := service.CreateDotorSchedule(&schedules)
  161. if err != nil {
  162. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  163. return
  164. }
  165. } else {
  166. //查询是否班种名称已存在
  167. scheduledata, _ := service.GetClassNameIsExsit(class_name, user_org_id, id)
  168. if scheduledata.ID > 0 && scheduledata.ID != id {
  169. this.ServeFailJsonSend(enums.ErrorCodeDataException, "班种名称已存在")
  170. return
  171. }
  172. err := service.UpdateScheduleList(id, &schedules)
  173. if err != nil {
  174. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  175. return
  176. }
  177. }
  178. this.ServeSuccessJSON(map[string]interface{}{
  179. "schedules": schedules,
  180. })
  181. }
  182. func (this *DoctorScheduleApiController) DeleteSchedule() {
  183. adminUserInfo := this.GetAdminUserInfo()
  184. orgId := adminUserInfo.CurrentOrgId
  185. id, _ := this.GetInt64("id")
  186. //产寻该班种是否存在排班,如果存在不能删除
  187. _, errcode := service.GetStaffScheduleByScheduleType(id, orgId)
  188. if errcode == gorm.ErrRecordNotFound {
  189. err := service.DeleteScheduleById(id)
  190. if err != nil {
  191. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  192. return
  193. }
  194. returnData := make(map[string]interface{}, 0)
  195. returnData["msg"] = "ok"
  196. this.ServeSuccessJSON(returnData)
  197. return
  198. } else if errcode == nil {
  199. this.ServeFailJsonSend(enums.ErrorCodeDataException, "该班种已存在排班,不能删除")
  200. return
  201. }
  202. }
  203. func (this *DoctorScheduleApiController) GetDoctorList() {
  204. orgId := this.GetAdminUserInfo().CurrentOrgId
  205. appId := this.GetAdminUserInfo().CurrentAppId
  206. //admin_user_id := this.GetAdminUserInfo().AdminUser.Id
  207. list, err := service.GetDoctorList(orgId, appId)
  208. //获取所有的医生
  209. doctorList, err := service.GetAllDoctorList(orgId, appId)
  210. //获取所有的护士
  211. nurseList, err := service.GetAllNurseList(orgId, appId)
  212. if err != nil {
  213. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  214. return
  215. }
  216. this.ServeSuccessJSON(map[string]interface{}{
  217. "list": list,
  218. "doctorlist": doctorList,
  219. "nurselist": nurseList,
  220. })
  221. }
  222. func (this *DoctorScheduleApiController) GetScheduleList() {
  223. orgId := this.GetAdminUserInfo().CurrentOrgId
  224. _, errcode := service.GetDoctorScheduleByOrgId(orgId)
  225. if errcode == gorm.ErrRecordNotFound {
  226. scheduleList, err := service.GetScheduleList(0)
  227. if err != nil {
  228. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  229. return
  230. }
  231. this.ServeSuccessJSON(map[string]interface{}{
  232. "scheduleList": scheduleList,
  233. })
  234. } else {
  235. scheduleList, err := service.GetScheduleList(orgId)
  236. if err != nil {
  237. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  238. return
  239. }
  240. this.ServeSuccessJSON(map[string]interface{}{
  241. "scheduleList": scheduleList,
  242. })
  243. }
  244. }
  245. func (this *DoctorScheduleApiController) AddSchedule() {
  246. orgId := this.GetAdminUserInfo().CurrentOrgId
  247. doctor_id, _ := this.GetInt64("doctor_id")
  248. fmt.Println("doctor_id", doctor_id)
  249. doctor_type, _ := this.GetInt64("doctor_type")
  250. fmt.Println("doctor_type", doctor_type)
  251. start_time, _ := this.GetInt64("start_time")
  252. fmt.Println("start_time", start_time)
  253. end_time, _ := this.GetInt64("end_time")
  254. fmt.Println("end_time", end_time)
  255. schedule_type, _ := this.GetInt64("schedule_type")
  256. fmt.Println("schedule_type", schedule_type)
  257. schedule_week, _ := this.GetInt64("schedule_week")
  258. fmt.Println("schedule_week", schedule_week)
  259. schedule_date, _ := this.GetInt64("schedule_date")
  260. schedule := models.StaffSchedule{
  261. DoctorId: doctor_id,
  262. DoctorType: doctor_type,
  263. ScheduleType: schedule_type,
  264. ScheduleWeek: schedule_week,
  265. UserOrgId: orgId,
  266. StartTime: start_time,
  267. EndTime: end_time,
  268. Status: 1,
  269. Ctime: time.Now().Unix(),
  270. ScheduleDate: schedule_date,
  271. }
  272. _, errcode := service.GetScheduleListDetail(doctor_id, orgId, schedule_date)
  273. fmt.Println("errcode-----", errcode)
  274. if errcode == gorm.ErrRecordNotFound {
  275. err := service.AddSchedule(&schedule)
  276. if err != nil {
  277. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  278. return
  279. }
  280. this.ServeSuccessJSON(map[string]interface{}{
  281. "schedule": schedule,
  282. })
  283. } else if errcode == nil {
  284. schedules, _ := service.GetScheduleListDetail(doctor_id, orgId, schedule_date)
  285. err := service.UpdateStaffList(&schedule, schedules.ID)
  286. if err != nil {
  287. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  288. return
  289. }
  290. this.ServeSuccessJSON(map[string]interface{}{
  291. "schedule": schedule,
  292. })
  293. }
  294. }
  295. func (this *DoctorScheduleApiController) GetStaffScheduleList() {
  296. start_time, _ := this.GetInt64("start_time")
  297. fmt.Println("start_time", start_time)
  298. end_time, _ := this.GetInt64("end_time")
  299. fmt.Println("end_time", end_time)
  300. orgId := this.GetAdminUserInfo().CurrentOrgId
  301. staffList, err := service.GetStaffScheduleList(orgId, start_time, end_time)
  302. if err != nil {
  303. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  304. return
  305. }
  306. this.ServeSuccessJSON(map[string]interface{}{
  307. "staffList": staffList,
  308. })
  309. }
  310. func (this *DoctorScheduleApiController) GetNextWeekList() {
  311. start_time, _ := this.GetInt64("start_time")
  312. fmt.Println("start_time", start_time)
  313. end_time, _ := this.GetInt64("end_time")
  314. fmt.Println("end_time", end_time)
  315. orgId := this.GetAdminUserInfo().CurrentOrgId
  316. staffList, err := service.GetStaffScheduleList(orgId, start_time, end_time)
  317. if err != nil {
  318. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  319. return
  320. }
  321. this.ServeSuccessJSON(map[string]interface{}{
  322. "staffList": staffList,
  323. })
  324. }
  325. func (this *DoctorScheduleApiController) GetScheduleByDoctorId() {
  326. doctor_id, _ := this.GetInt64("doctor_id")
  327. start_time, _ := this.GetInt64("start_time")
  328. end_time, _ := this.GetInt64("end_time")
  329. orgId := this.GetAdminUserInfo().CurrentOrgId
  330. staffList, err := service.GetScheduleByDoctorId(doctor_id, start_time, end_time, orgId)
  331. if err != nil {
  332. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  333. return
  334. }
  335. this.ServeSuccessJSON(map[string]interface{}{
  336. "staffList": staffList,
  337. })
  338. }
  339. func (this *DoctorScheduleApiController) ToSearchScheduleList() {
  340. //doctor_id, _ := this.GetInt64("doctor_id")
  341. user_name := this.GetString("user_name")
  342. start_time, _ := this.GetInt64("start_time")
  343. end_time, _ := this.GetInt64("end_time")
  344. orgId := this.GetAdminUserInfo().CurrentOrgId
  345. staffList, err := service.ToSearchSeacheduleList(user_name, start_time, end_time, orgId)
  346. if err != nil {
  347. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  348. return
  349. }
  350. this.ServeSuccessJSON(map[string]interface{}{
  351. "staffList": staffList,
  352. })
  353. }
  354. func (this *DoctorScheduleApiController) DeleteStaffSchedule() {
  355. adminUserInfo := this.GetAdminUserInfo()
  356. orgId := adminUserInfo.CurrentOrgId
  357. start_time, _ := this.GetInt64("start_time")
  358. fmt.Println("start_time", start_time)
  359. end_time, _ := this.GetInt64("end_time")
  360. err := service.DeleteStaffSchedule(orgId, start_time, end_time)
  361. if err != nil {
  362. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  363. return
  364. }
  365. returnData := make(map[string]interface{}, 0)
  366. returnData["msg"] = "ok"
  367. this.ServeSuccessJSON(returnData)
  368. return
  369. }
  370. func (this *DoctorScheduleApiController) CopyStaffSchedule() {
  371. adminUserInfo := this.GetAdminUserInfo()
  372. orgId := adminUserInfo.CurrentOrgId
  373. start_time, _ := this.GetInt64("start_time")
  374. fmt.Println("start_time", start_time)
  375. end_time, _ := this.GetInt64("end_time")
  376. fmt.Println("end_time", end_time)
  377. copy_startime, _ := this.GetInt64("copy_startime")
  378. fmt.Println("copy_startime", copy_startime)
  379. copy_endtime, _ := this.GetInt64("copy_endtime")
  380. schedule, err := service.GetStaffScheduleListTwo(orgId, start_time, end_time)
  381. //查询选中日期的排班是否存在
  382. _, errcode := service.GetNextWeekSchedule(orgId, copy_startime, copy_endtime)
  383. if errcode == gorm.ErrRecordNotFound {
  384. for _, item := range schedule {
  385. //fmt.Println(item.StartTime+604800)
  386. //礼拜1
  387. if item.ScheduleWeek == 1 {
  388. item.ScheduleDate = copy_startime
  389. }
  390. if item.ScheduleWeek == 2 {
  391. item.ScheduleDate = copy_startime + 86400
  392. }
  393. if item.ScheduleWeek == 3 {
  394. item.ScheduleDate = copy_startime + 172800
  395. }
  396. if item.ScheduleWeek == 4 {
  397. item.ScheduleDate = copy_startime + 259200
  398. }
  399. if item.ScheduleWeek == 5 {
  400. item.ScheduleDate = copy_startime + 345600
  401. }
  402. if item.ScheduleWeek == 6 {
  403. item.ScheduleDate = copy_startime + 432000
  404. }
  405. //礼拜天
  406. if item.ScheduleWeek == 0 {
  407. item.ScheduleDate = copy_endtime
  408. }
  409. staffSchedule := models.StaffSchedule{
  410. DoctorId: item.DoctorId,
  411. DoctorType: item.DoctorType,
  412. ScheduleType: item.ScheduleType,
  413. ScheduleWeek: item.ScheduleWeek,
  414. UserOrgId: item.UserOrgId,
  415. StartTime: copy_startime,
  416. EndTime: copy_endtime,
  417. Status: 1,
  418. Ctime: time.Now().Unix(),
  419. ScheduleDate: item.ScheduleDate,
  420. }
  421. service.AddSchedule(&staffSchedule)
  422. }
  423. if err != nil {
  424. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  425. return
  426. }
  427. returnData := make(map[string]interface{}, 0)
  428. returnData["msg"] = "ok"
  429. this.ServeSuccessJSON(returnData)
  430. return
  431. } else if errcode == nil {
  432. this.ServeFailJsonSend(enums.ErrorCodeDataException, "排班数据已存在")
  433. fmt.Print("下周排班已存在")
  434. return
  435. }
  436. }
  437. func (this *DoctorScheduleApiController) UpdateContinusSchedule() {
  438. adminUserInfo := this.GetAdminUserInfo()
  439. orgId := adminUserInfo.CurrentOrgId
  440. is_status, _ := this.GetInt64("is_status")
  441. fmt.Println("is_status", is_status)
  442. schedule := models.ContinueSchedule{
  443. IsStatus: is_status,
  444. }
  445. err := service.UpdateContinusSchedule(&schedule, orgId)
  446. if err != nil {
  447. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  448. return
  449. }
  450. this.ServeSuccessJSON(map[string]interface{}{
  451. "schedule": schedule,
  452. })
  453. }
  454. func (this *DoctorScheduleApiController) SaveNureSort() {
  455. id, _ := this.GetInt64("id")
  456. fmt.Println("id", id)
  457. sort, _ := this.GetInt64("sort")
  458. fmt.Println("sort", sort)
  459. role := models.App_Role{
  460. Sort: sort,
  461. }
  462. err := service.SaveNurseSort(&role, id)
  463. if err != nil {
  464. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  465. return
  466. }
  467. this.ServeSuccessJSON(map[string]interface{}{
  468. "role": role,
  469. })
  470. }
  471. func (this *DoctorScheduleApiController) SaveIsSchedule() {
  472. id, _ := this.GetInt64("id")
  473. fmt.Println("id", id)
  474. is_sort, _ := this.GetInt64("is_sort")
  475. fmt.Println("is_sort", is_sort)
  476. role := models.App_Role{
  477. IsSort: is_sort,
  478. }
  479. err := service.SaveIsSchedule(id, &role)
  480. if err != nil {
  481. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  482. return
  483. }
  484. this.ServeSuccessJSON(map[string]interface{}{
  485. "role": role,
  486. })
  487. }
  488. func (this *DoctorScheduleApiController) GetScheduleListTotal() {
  489. start_time, _ := this.GetInt64("start_time")
  490. fmt.Println(start_time)
  491. end_time, _ := this.GetInt64("end_time")
  492. fmt.Println("end_time", end_time)
  493. adminUserInfo := this.GetAdminUserInfo()
  494. orgId := adminUserInfo.CurrentOrgId
  495. //统计总工时
  496. scheudletotal, err := service.GetScheduleListTotal(orgId, start_time, end_time)
  497. list, err := service.GetTotalMinutes(orgId, start_time, end_time)
  498. if err != nil {
  499. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  500. return
  501. }
  502. this.ServeSuccessJSON(map[string]interface{}{
  503. "scheudletotal": scheudletotal,
  504. "list": list,
  505. })
  506. }