Bläddra i källkod

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

csx 3 år sedan
förälder
incheckning
226ed80ab8
3 ändrade filer med 13 tillägg och 5 borttagningar
  1. 4 4
      conf/app.conf
  2. 1 1
      controllers/zh/zh_his_api_controller.go
  3. 8 0
      service/his_service.go

+ 4 - 4
conf/app.conf Visa fil

@@ -161,14 +161,14 @@ front_end_domain = "http://xt.test.sgjyun.com/#"
161 161
 
162 162
 org_id = 4
163 163
 #url  = "http://192.168.1.228:17001/szsi-portal/transData"
164
-#gdyb_url = "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/"
165
-gdyb_url = "http://10.97.240.206/ebus/sztest_hosp/poc/hsa/hgs/"
164
+gdyb_url = "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/"
165
+#gdyb_url = "http://10.97.240.206/ebus/sztest_hosp/poc/hsa/hgs/"
166 166
 #url = "http://192.168.1.88:6666/szsi-portal/transData"
167 167
 #gdyb_url = "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/"
168 168
 #gdyb_url = "http://10.87.67.83:8080/mbs-hi-intf/web/api/webservices/hb/interface/"
169
-gdyb_paasid = "test_sz"
169
+#gdyb_paasid = "test_sz"
170 170
 #gdyb_paasid = zh_cs
171
-#gdyb_paasid = test_hosp
171
+gdyb_paasid = test_hosp
172 172
 #gdyb_paasid = zq_prd_yjyy
173 173
 
174 174
 #gdyb_paasid = "zh_prd_yjyy"

+ 1 - 1
controllers/zh/zh_his_api_controller.go Visa fil

@@ -1274,7 +1274,7 @@ func (c *ZHHisApiController) ZHRefund() {
1274 1274
 			return
1275 1275
 		}
1276 1276
 		if res.Infcode == 0 {
1277
-			err := service.UpdataOrderStatus(order_id, order.Number, adminUser.CurrentOrgId, src_resquest, result)
1277
+			err := service.UpdataOrderStatusThree(order_id, order.Number, adminUser.CurrentOrgId, src_resquest, result)
1278 1278
 			if err == nil {
1279 1279
 				c.ServeSuccessJSON(map[string]interface{}{
1280 1280
 					"msg": "退费成功",

+ 8 - 0
service/his_service.go Visa fil

@@ -722,6 +722,14 @@ func UpdataOrderStatus(id int64, number string, user_org_id int64, log string, r
722 722
 
723 723
 }
724 724
 
725
+func UpdataOrderStatusThree(id int64, number string, user_org_id int64, log string, result string) (err error) {
726
+	err = writeDb.Model(&models.HisOrder{}).Where("status = 1 AND id = ? AND user_org_id = ?", id, user_org_id).Updates(map[string]interface{}{"order_status": 3, "mtime": time.Now().Unix(), "refund_request_log": log, "refund_log": result, "status": 0}).Error
727
+	err = writeDb.Model(&models.HisPrescription{}).Where("status = 1 AND batch_number = ? AND user_org_id = ?", number, user_org_id).Updates(map[string]interface{}{"order_status": 4, "mtime": time.Now().Unix()}).Error
728
+	err = writeDb.Model(&models.HisPrescriptionInfo{}).Where("status = 1 AND batch_number = ? AND user_org_id = ?", number, user_org_id).Updates(map[string]interface{}{"prescription_status": 1, "mtime": time.Now().Unix()}).Error
729
+	return
730
+
731
+}
732
+
725 733
 func UpdataRegStatus(patient_id int64, record_time int64, org_id int64) {
726 734
 	writeDb.Model(&models.HisPatient{}).Where("patient_id = ? AND status = 1 AND record_date =? AND user_org_id = ?", patient_id, record_time, org_id).Updates(map[string]interface{}{"status": 0, "mtime": time.Now().Unix()})
727 735
 	//writeDb.Model(&models.HisPrescription{}).Where("status = 1 AND batch_number = ? AND user_org_id = ?", number, user_org_id).Updates(map[string]interface{}{"order_status": 1, "mtime": time.Now().Unix()}).Error