Przeglądaj źródła

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

csx 3 lat temu
rodzic
commit
bbda7b146d

+ 10 - 4
controllers/sz/sz_his_api_controller.go Wyświetl plik

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

+ 1 - 0
models/his_models.go Wyświetl plik

@@ -693,6 +693,7 @@ type HisOrder struct {
693 693
 	HisPrescriptionInfo HisPrescriptionInfo `gorm:"ForeignKey:PatientId,SettleAccountsDate;AssociationForeignKey:PatientId,RecordDate" json:"p_info"`
694 694
 
695 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 699
 func (HisOrder) TableName() string {

+ 1 - 0
service/his_service.go Wyświetl plik

@@ -599,6 +599,7 @@ type HisOrder struct {
599 599
 	PrivatePrice          float64 `gorm:"column:private_price" json:"private_price" form:"private_price"`
600 600
 	Creator               int64   `gorm:"column:creator" json:"creator" form:"creator"`
601 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 604
 	SzChargeInfo            string `gorm:"column:sz_charge_info" json:"sz_charge_info" form:"sz_charge_info"`
604 605
 	SzProjectInfo           string `gorm:"column:sz_project_info" json:"sz_project_info" form:"sz_project_info"`