Browse Source

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

csx 3 years ago
parent
commit
3acfd40d6a
3 changed files with 9 additions and 22 deletions
  1. 6 20
      controllers/sg/his_api_controller.go
  2. 1 0
      service/gdyb_service.go
  3. 2 2
      service/his_service.go

+ 6 - 20
controllers/sg/his_api_controller.go View File

@@ -857,22 +857,7 @@ type ResultSixteen struct {
857 857
 			AcctMulaidPay   float64 `json:"acct_mulaid_pay"`
858 858
 			HospPartAmt     float64 `json:"hosp_part_amt"`
859 859
 			MedinsSetlID    string  `json:"medins_setl_id"`
860
-			Age             float64 `json:"age"`
861
-			Brdy            string  `json:"brdy"`
862
-			Certno          string  `json:"certno"`
863
-			ClrType         string  `json:"clr_type"`
864
-			ClrWay          string  `json:"clr_way"`
865
-			CvlservFlag     string  `json:"cvlserv_flag"`
866
-			Gend            string  `json:"gend"`
867
-			Insutype        string  `json:"insutype"`
868
-			MdtrtCertType   string  `json:"mdtrt_cert_type"`
869
-			MedType         string  `json:"med_type"`
870
-			Naty            string  `json:"naty"`
871
-			PsnCashPay      float64 `json:"psn_cash_pay"`
872
-			PsnCertType     string  `json:"psn_cert_type"`
873
-			PsnName         string  `json:"psn_name"`
874
-			PsnNo           string  `json:"psn_no"`
875
-			PsnType         string  `json:"psn_type"`
860
+			PdnCashPay      string  `json:"pdn_cash_pay"`
876 861
 		} `json:"setlinfo"`
877 862
 	} `json:"output"`
878 863
 	RefmsgTime  string      `json:"refmsg_time"`
@@ -2642,7 +2627,7 @@ func (c *HisApiController) Refund() {
2642 2627
 				return
2643 2628
 			}
2644 2629
 			if res2.Infcode == 0 {
2645
-				err := service.UpdataOrderStatus(order_id, order.Number, adminUser.CurrentOrgId, src_resquest)
2630
+				err := service.UpdataOrderStatus(order_id, order.Number, adminUser.CurrentOrgId, src_resquest, result)
2646 2631
 				if err == nil {
2647 2632
 					c.ServeSuccessJSON(map[string]interface{}{
2648 2633
 						"msg": "退费成功",
@@ -2664,7 +2649,7 @@ func (c *HisApiController) Refund() {
2664 2649
 			})
2665 2650
 		}
2666 2651
 	} else {
2667
-		err := service.UpdataOrderStatus(order_id, order.Number, adminUser.CurrentOrgId, "")
2652
+		err := service.UpdataOrderStatus(order_id, order.Number, adminUser.CurrentOrgId, "", "")
2668 2653
 		if err == nil {
2669 2654
 			c.ServeSuccessJSON(map[string]interface{}{
2670 2655
 				"msg": "退费成功",
@@ -2822,7 +2807,7 @@ func (c *HisApiController) RefundDetail() {
2822 2807
 			return
2823 2808
 		}
2824 2809
 
2825
-		err := service.UpdataOrderStatus(order_id, number, adminUser.CurrentOrgId, "")
2810
+		err := service.UpdataOrderStatus(order_id, number, adminUser.CurrentOrgId, "", "")
2826 2811
 		if err == nil {
2827 2812
 			c.ServeSuccessJSON(map[string]interface{}{
2828 2813
 				"msg": "退费成功",
@@ -2832,7 +2817,7 @@ func (c *HisApiController) RefundDetail() {
2832 2817
 			return
2833 2818
 		}
2834 2819
 	} else {
2835
-		err := service.UpdataOrderStatus(order_id, number, adminUser.CurrentOrgId, "")
2820
+		err := service.UpdataOrderStatus(order_id, number, adminUser.CurrentOrgId, "", "")
2836 2821
 		if err == nil {
2837 2822
 			c.ServeSuccessJSON(map[string]interface{}{
2838 2823
 				"msg": "退费成功",
@@ -3135,6 +3120,7 @@ func (c *HisApiController) GetCheckDetailAccount() {
3135 3120
 				_, err = f.Write([]byte(str))
3136 3121
 			}
3137 3122
 			if item.OrderStatus == 3 {
3123
+
3138 3124
 				var str string
3139 3125
 				str = item.SetlId + "	" +
3140 3126
 					item.MdtrtId + "	" +

+ 1 - 0
service/gdyb_service.go View File

@@ -1391,6 +1391,7 @@ func Gdyb3202(baseParams models.BaseParams, businessParams models.BusinessParams
1391 1391
 	inputData["cash_payamt"] = businessParams.CashPayamt              //现金支付金额
1392 1392
 	inputData["fixmedins_setl_cnt"] = businessParams.FixmedinsSetlCnt //定点医药机构结算笔数
1393 1393
 	inputData["clr_type"] = "11"                                      // 就诊 ID(来自2201接口返回)
1394
+	inputData["refd_setl_flag"] = 0                                   // 就诊 ID(来自2201接口返回)
1394 1395
 
1395 1396
 	input["data"] = inputData
1396 1397
 	inputMessage["input"] = input //交易输入

+ 2 - 2
service/his_service.go View File

@@ -665,8 +665,8 @@ func GetMedicalInsuranceConfig(org_id int64) (medicalInsuranceConfig models.Medi
665 665
 
666 666
 }
667 667
 
668
-func UpdataOrderStatus(id int64, number string, user_org_id int64, log string) (err error) {
669
-	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}).Error
668
+func UpdataOrderStatus(id int64, number string, user_org_id int64, log string, result string) (err error) {
669
+	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}).Error
670 670
 	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": 1, "mtime": time.Now().Unix()}).Error
671 671
 	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
672 672
 	return