|
@@ -136,22 +136,18 @@ func (this *XcxApiController) GetCodeInfo() {
|
136
|
136
|
}
|
137
|
137
|
|
138
|
138
|
func (this *XcxApiController) GetLoginInfor() {
|
139
|
|
- fmt.Println("c出啊大发阿方阿道夫发 阿方阿")
|
|
139
|
+
|
140
|
140
|
mobile := this.GetString("mobile")
|
141
|
141
|
fmt.Println(mobile)
|
142
|
|
- info, err := service.GetMobilePatientInfo(mobile)
|
|
142
|
+ info, _ := service.GetMobilePatientInfo("18179463966")
|
143
|
143
|
if info.ID == 0 {
|
144
|
|
- if err != nil {
|
145
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
146
|
|
- return
|
147
|
|
- }
|
148
|
144
|
|
149
|
145
|
this.ServeSuccessJSON(map[string]interface{}{
|
150
|
146
|
"is_bind": false,
|
151
|
147
|
"info": info,
|
152
|
148
|
})
|
153
|
149
|
} else {
|
154
|
|
- _, errcode := service.GetLoginInfor("18923081560")
|
|
150
|
+ _, errcode := service.GetLoginInfor("18179463966")
|
155
|
151
|
if errcode == gorm.ErrRecordNotFound {
|
156
|
152
|
role := models.XcxAdminUserRole{
|
157
|
153
|
PatientName: info.Name,
|
|
@@ -223,6 +219,7 @@ func (this *XcxApiController) GetDataInfo() {
|
223
|
219
|
|
224
|
220
|
func (this *XcxApiController) GetScheduleInfo() {
|
225
|
221
|
patient_id, _ := this.GetInt64("patient_id")
|
|
222
|
+ fmt.Println(patient_id)
|
226
|
223
|
thisWeekMonday := service.GetFirstDateOfWeek()
|
227
|
224
|
weekDayWeek := service.GetWeekDayOfWeek()
|
228
|
225
|
TimeMonday, _ := time.Parse("2006-01-02", thisWeekMonday)
|
|
@@ -234,16 +231,16 @@ func (this *XcxApiController) GetScheduleInfo() {
|
234
|
231
|
fmt.Println("weekmodonday", weekMonday)
|
235
|
232
|
fmt.Println("nextweeekday", weekDay)
|
236
|
233
|
|
237
|
|
- timeLayout := "2006-01-02 15:04:05"
|
|
234
|
+ timeLayout := "2006-01-02"
|
238
|
235
|
loc, _ := time.LoadLocation("Local")
|
239
|
|
-
|
240
|
236
|
startTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", weekMonday+" 00:00:00", loc)
|
|
237
|
+ //startTime, _ := time.ParseInLocation(timeLayout+"15:04:05", weekMonday+"00:00:00", loc)
|
241
|
238
|
fmt.Println("startiem", startTime)
|
242
|
|
- endTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", weekDay+" 00:00:00", loc)
|
|
239
|
+ endTime, _ := time.ParseInLocation(timeLayout+"15:04:05", weekDay+"00:00:00", loc)
|
243
|
240
|
|
244
|
241
|
fmt.Println(startTime.Unix(), endTime.Unix())
|
245
|
242
|
|
246
|
|
- schedule, err := service.GetScheduleInfo(1630252800, 1631980800, patient_id)
|
|
243
|
+ schedule, err := service.GetScheduleInfo(startTime.Unix(), endTime.Unix(), 1)
|
247
|
244
|
if err != nil {
|
248
|
245
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
249
|
246
|
return
|