|
@@ -3580,6 +3580,7 @@ func (c *PatientApiController) GetPrintDialysisOrder() {
|
3580
|
3580
|
|
3581
|
3581
|
func (c *PatientApiController) CreateGroupAdvice() {
|
3582
|
3582
|
is_child, _ := c.GetInt64("is_child", 0)
|
|
3583
|
+
|
3583
|
3584
|
if is_child == 1 {
|
3584
|
3585
|
patient, _ := c.GetInt64("id", 0)
|
3585
|
3586
|
if patient <= 0 {
|
|
@@ -3638,6 +3639,20 @@ func (c *PatientApiController) CreateGroupAdvice() {
|
3638
|
3639
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
3639
|
3640
|
return
|
3640
|
3641
|
}
|
|
3642
|
+ advice_date, _ := dataBody["advice_date"].(string)
|
|
3643
|
+ fmt.Println("advice_date----------------------------------", advice_date)
|
|
3644
|
+
|
|
3645
|
+ var advicedateunix int64
|
|
3646
|
+ if len(advice_date) > 0 {
|
|
3647
|
+ theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", advice_date+" 00:00:00", loc)
|
|
3648
|
+ if err != nil {
|
|
3649
|
+ fmt.Println(err)
|
|
3650
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
3651
|
+ return
|
|
3652
|
+ }
|
|
3653
|
+ advicedateunix = theTime.Unix()
|
|
3654
|
+ }
|
|
3655
|
+
|
3641
|
3656
|
adviceDate := startTime2
|
3642
|
3657
|
if len(adviceDate) == 0 {
|
3643
|
3658
|
utils.ErrorLog("len(adviceDate) == 0")
|
|
@@ -3650,8 +3665,8 @@ func (c *PatientApiController) CreateGroupAdvice() {
|
3650
|
3665
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
3651
|
3666
|
return
|
3652
|
3667
|
}
|
3653
|
|
- AdviceDate := theTime.Unix()
|
3654
|
|
- RecordDate := theTime.Unix()
|
|
3668
|
+ AdviceDate := advicedateunix
|
|
3669
|
+ RecordDate := advicedateunix
|
3655
|
3670
|
|
3656
|
3671
|
if dataBody["start_time"] == nil || reflect.TypeOf(dataBody["start_time"]).String() != "string" {
|
3657
|
3672
|
utils.ErrorLog("start_time")
|