浏览代码

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 年前
父节点
当前提交
bbda7b146d
共有 3 个文件被更改,包括 12 次插入4 次删除
  1. 10 4
      controllers/sz/sz_his_api_controller.go
  2. 1 0
      models/his_models.go
  3. 1 0
      service/his_service.go

+ 10 - 4
controllers/sz/sz_his_api_controller.go 查看文件

2619
 		}
2619
 		}
2620
 
2620
 
2621
 	} else {
2621
 	} else {
2622
-		if tempOrder.OrderStatus == 4 {
2622
+		if tempOrder.OrderStatus == 1 && tempOrder.IsPre == 1 {
2623
 			pay_way, _ := c.GetInt64("pay_way")
2623
 			pay_way, _ := c.GetInt64("pay_way")
2624
 			pay_price, _ := c.GetFloat("pay_price")
2624
 			pay_price, _ := c.GetFloat("pay_price")
2625
 			pay_card_no := c.GetString("pay_card_no")
2625
 			pay_card_no := c.GetString("pay_card_no")
2779
 				return
2779
 				return
2780
 			}
2780
 			}
2781
 
2781
 
2782
+		} else {
2783
+
2784
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisOrderNoExistParamWrong)
2785
+			return
2786
+
2782
 		}
2787
 		}
2783
 
2788
 
2784
 	}
2789
 	}
3227
 			SettleAccountsDate:  recordDateTime,
3232
 			SettleAccountsDate:  recordDateTime,
3228
 			Ctime:               time.Now().Unix(),
3233
 			Ctime:               time.Now().Unix(),
3229
 			Mtime:               time.Now().Unix(),
3234
 			Mtime:               time.Now().Unix(),
3230
-			Status:              1,
3235
+			Status:              0,
3231
 			Number:              chrg_bchno,
3236
 			Number:              chrg_bchno,
3232
 			Infcode:             0,
3237
 			Infcode:             0,
3233
 			WarnMsg:             "",
3238
 			WarnMsg:             "",
3235
 			ErrMsg:              "",
3240
 			ErrMsg:              "",
3236
 			RespondTime:         "",
3241
 			RespondTime:         "",
3237
 			InfRefmsgid:         "",
3242
 			InfRefmsgid:         "",
3238
-			OrderStatus:         4,
3243
+			OrderStatus:         1,
3239
 			IsMedicineInsurance: 1,
3244
 			IsMedicineInsurance: 1,
3240
 			SettleType:          settle_accounts_type,
3245
 			SettleType:          settle_accounts_type,
3241
 			SettleStartTime:     start_time,
3246
 			SettleStartTime:     start_time,
3344
 				}
3349
 				}
3345
 
3350
 
3346
 				if res.Transreturncode == "00000000" {
3351
 				if res.Transreturncode == "00000000" {
3347
-					order.OrderStatus = 4
3352
+					order.OrderStatus = 1
3348
 					order.Status = 1
3353
 					order.Status = 1
3349
 					order.PsnNo = health_card_no
3354
 					order.PsnNo = health_card_no
3350
 					order.Modify = admin_user_id
3355
 					order.Modify = admin_user_id
3366
 					detailStrThree := string(setlDetailThree)
3371
 					detailStrThree := string(setlDetailThree)
3367
 					order.SzMedicineInsuranceInfo = detailStrThree
3372
 					order.SzMedicineInsuranceInfo = detailStrThree
3368
 					order.Cainfo = result_three
3373
 					order.Cainfo = result_three
3374
+					order.IsPre = 1
3369
 					//err = service.UpdataOrderStatusTwo(order.Number, adminUser.CurrentOrgId)
3375
 					//err = service.UpdataOrderStatusTwo(order.Number, adminUser.CurrentOrgId)
3370
 					err = service.UpDateOrderTwo(order)
3376
 					err = service.UpDateOrderTwo(order)
3371
 					c.ServeSuccessJSON(map[string]interface{}{
3377
 					c.ServeSuccessJSON(map[string]interface{}{

+ 1 - 0
models/his_models.go 查看文件

693
 	HisPrescriptionInfo HisPrescriptionInfo `gorm:"ForeignKey:PatientId,SettleAccountsDate;AssociationForeignKey:PatientId,RecordDate" json:"p_info"`
693
 	HisPrescriptionInfo HisPrescriptionInfo `gorm:"ForeignKey:PatientId,SettleAccountsDate;AssociationForeignKey:PatientId,RecordDate" json:"p_info"`
694
 
694
 
695
 	PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
695
 	PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
696
+	IsPre int64 `gorm:"column:is_pre" json:"is_pre" form:"is_pre"`
696
 }
697
 }
697
 
698
 
698
 func (HisOrder) TableName() string {
699
 func (HisOrder) TableName() string {

+ 1 - 0
service/his_service.go 查看文件

599
 	PrivatePrice          float64 `gorm:"column:private_price" json:"private_price" form:"private_price"`
599
 	PrivatePrice          float64 `gorm:"column:private_price" json:"private_price" form:"private_price"`
600
 	Creator               int64   `gorm:"column:creator" json:"creator" form:"creator"`
600
 	Creator               int64   `gorm:"column:creator" json:"creator" form:"creator"`
601
 	Modify                int64   `gorm:"column:modify" json:"modify" form:"modify"`
601
 	Modify                int64   `gorm:"column:modify" json:"modify" form:"modify"`
602
+	IsPre                 int64   `gorm:"column:is_pre" json:"is_pre" form:"is_pre"`
602
 
603
 
603
 	SzChargeInfo            string `gorm:"column:sz_charge_info" json:"sz_charge_info" form:"sz_charge_info"`
604
 	SzChargeInfo            string `gorm:"column:sz_charge_info" json:"sz_charge_info" form:"sz_charge_info"`
604
 	SzProjectInfo           string `gorm:"column:sz_project_info" json:"sz_project_info" form:"sz_project_info"`
605
 	SzProjectInfo           string `gorm:"column:sz_project_info" json:"sz_project_info" form:"sz_project_info"`