Browse Source

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

csx 3 years ago
parent
commit
2d1b2d9f65
2 changed files with 7 additions and 0 deletions
  1. 1 0
      controllers/zh/zh_his_api_controller.go
  2. 6 0
      service/his_service.go

+ 1 - 0
controllers/zh/zh_his_api_controller.go View File

@@ -1953,6 +1953,7 @@ func (this *ZHHisApiController) GetZHOutHospitalUnCheck() {
1953 1953
 	if res.Infcode == 0 {
1954 1954
 		record.OutHospitalStatus = 0
1955 1955
 		service.CreateHospitalRecord(&record)
1956
+		service.UpdataOrderStatusByNumber(record.Number)
1956 1957
 		this.ServeSuccessJSON(map[string]interface{}{
1957 1958
 			"msg": "撤销出院成功",
1958 1959
 		})

+ 6 - 0
service/his_service.go View File

@@ -1369,3 +1369,9 @@ func GetHisOrderInfoByNumberFour(order_number string) (order []*models.HisOrderI
1369 1369
 	err = db.Where("order_number = ? AND status = 1", order_number).Find(&order).Error
1370 1370
 	return
1371 1371
 }
1372
+
1373
+func UpdataOrderStatusByNumber(number string) (err error) {
1374
+	err = writeDb.Model(&models.HisOrder{}).Where("status = 1 AND number = ?", number).Updates(map[string]interface{}{"order_status": 3, "mtime": time.Now().Unix(), "status": 0}).Error
1375
+	return
1376
+
1377
+}