test_user 1 년 전
부모
커밋
e2c39146bc
5개의 변경된 파일36개의 추가작업 그리고 22개의 파일을 삭제
  1. 1 1
      conf/app.conf
  2. 11 11
      controllers/js/jsyb_controller.go
  3. 15 2
      controllers/sg/his_api_controller.go
  4. 6 5
      main.go
  5. 3 3
      service/fj_service.go

+ 1 - 1
conf/app.conf 파일 보기

@@ -45,7 +45,7 @@ appsecret="61ee2e6268497d5aa9de0b0187c39aea"
45 45
 
46 46
 
47 47
 [prod]
48
-org_id = 10217
48
+org_id = 10191
49 49
 mobile_token_expiration_second = 86400
50 50
 httpdomain = https://api.xt.kuyicloud.com
51 51
 sso_domain = https://sso.kuyicloud.com

+ 11 - 11
controllers/js/jsyb_controller.go 파일 보기

@@ -720,17 +720,17 @@ func (c *JSybController) PostEight() {
720 720
 	var result string
721 721
 	var request_log string
722 722
 	if id_card_type == 4 {
723
-		_, pBusiCardInfo := GetELeCertInfoSettle(fixmedins_code, "", "")
724
-		pBusiCardInfo = Remove0000(pBusiCardInfo)
725
-		var ele ELeData
726
-		err := json.Unmarshal([]byte(pBusiCardInfo), &ele)
727
-		if err != nil {
728
-			utils.ErrorLog("解析失败:%v", err)
729
-		}
730
-		token := ele.Data.EcCardToken
731
-		if len(token) > 0 {
732
-			result, request_log = service.Jsyb2207(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, fulamt_ownpay_amt, overlmt_selfpay, preselfpay_amt, inscp_scp_amt, certificates, acct_used_flag, url, ak, token, cainfo)
733
-		}
723
+		//_, pBusiCardInfo := GetELeCertInfoSettle(fixmedins_code, "", "")
724
+		//pBusiCardInfo = Remove0000(pBusiCardInfo)
725
+		//var ele ELeData
726
+		//err := json.Unmarshal([]byte(pBusiCardInfo), &ele)
727
+		//if err != nil {
728
+		//	utils.ErrorLog("解析失败:%v", err)
729
+		//}
730
+		//token := ele.Data.EcCardToken
731
+		//if len(token) > 0 {
732
+		result, request_log = service.Jsyb2207(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, fulamt_ownpay_amt, overlmt_selfpay, preselfpay_amt, inscp_scp_amt, certificates, acct_used_flag, url, ak, verify_number, cainfo)
733
+		//}
734 734
 	} else {
735 735
 		result, request_log = service.Jsyb2207(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, fulamt_ownpay_amt, overlmt_selfpay, preselfpay_amt, inscp_scp_amt, certificates, acct_used_flag, url, ak, verify_number, cainfo)
736 736
 

+ 15 - 2
controllers/sg/his_api_controller.go 파일 보기

@@ -10642,13 +10642,26 @@ func (c *HisApiController) GetCheckAccount() {
10642 10642
 				MedfeeSumamt:     medfee_sumamt,
10643 10643
 				FundPaySumamt:    fund_pay_sumamt,
10644 10644
 				AcctPay:          acct_pay,
10645
-				FixmedinsSetlCnt: fixmedins_setl_cnt + int64(len(orders_two)*2),
10645
+				FixmedinsSetlCnt: fixmedins_setl_cnt,
10646 10646
 			}
10647
-			result, requestLog, err_msg := service.FJyb3201(baseParams, businessParams)
10647
+			result, requestLog, err_msg := service.FJyb3201(baseParams, businessParams, fmt.Sprintf("%.4f", medfee_sumamt), fmt.Sprintf("%.4f", fund_pay_sumamt))
10648 10648
 			fmt.Println(requestLog)
10649 10649
 			fmt.Println(result)
10650 10650
 			fmt.Println(err_msg)
10651 10651
 
10652
+			var dat map[string]interface{}
10653
+			if err := json.Unmarshal([]byte(result), &dat); err == nil {
10654
+				fmt.Println(dat)
10655
+			} else {
10656
+				fmt.Println(err)
10657
+			}
10658
+			userJSONBytes, _ := json.Marshal(dat)
10659
+			if err := json.Unmarshal(userJSONBytes, &res); err != nil {
10660
+				utils.ErrorLog("解析失败:%v", err)
10661
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
10662
+				return
10663
+			}
10664
+
10652 10665
 		} else {
10653 10666
 			if len(clr_type) == 0 {
10654 10667
 				clr_type = "11"

+ 6 - 5
main.go 파일 보기

@@ -6,6 +6,7 @@ import (
6 6
 
7 7
 	_ "gdyb/routers"
8 8
 	"gdyb/service"
9
+
9 10
 	//"github.com/qiniu/api.v7/auth/qbox"
10 11
 	//"github.com/qiniu/api.v7/storage"
11 12
 
@@ -19,13 +20,13 @@ import (
19 20
 
20 21
 func init() {
21 22
 	service.ConnectDB()
22
-	//org_id, _ := beego.AppConfig.Int64("org_id")
23
-	//miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
23
+	org_id, _ := beego.AppConfig.Int64("org_id")
24
+	miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
24 25
 	//CreateLog(miConfig)
25 26
 	//UploadLog(miConfig)
26
-	//if org_id == 10191 {
27
-	//	service.GetFjAuthorizationInfo(miConfig.Code)
28
-	//}
27
+	if org_id == 10191 {
28
+		service.GetFjAuthorizationInfo(miConfig.Code)
29
+	}
29 30
 }
30 31
 func main() {
31 32
 	beego.Run()

+ 3 - 3
service/fj_service.go 파일 보기

@@ -957,7 +957,7 @@ func FJyb6201(org_name string, doctor string, fixmedins_code string, insuplc_adm
957 957
 }
958 958
 
959 959
 //  医药机构费用结算对总账 func Gdyb3201( org_name string, doctor string, secret_key string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string) string {
960
-func FJyb3201(baseParams models.BaseParams, businessParams models.BusinessParams) (string, string, string) {
960
+func FJyb3201(baseParams models.BaseParams, businessParams models.BusinessParams, med string, fund string) (string, string, string) {
961 961
 
962 962
 	fmt.Println(baseParams)
963 963
 	fmt.Println(businessParams)
@@ -981,8 +981,8 @@ func FJyb3201(baseParams models.BaseParams, businessParams models.BusinessParams
981 981
 	inputData["setl_optins"] = "350581"                               // 结算经办机构
982 982
 	inputData["stmt_begndate"] = businessParams.StmtBegndate          // 对帐开始时间
983 983
 	inputData["stmt_enddate"] = businessParams.StmtEnddate            //对帐结束时间
984
-	inputData["medfee_sumamt"] = businessParams.MedfeeSumamt          //医疗费总额
985
-	inputData["fund_pay_sumamt"] = businessParams.FundPaySumamt       //基金支付总额
984
+	inputData["medfee_sumamt"] = med                                  //医疗费总额
985
+	inputData["fund_pay_sumamt"] = fund                               //基金支付总额
986 986
 	inputData["acct_pay"] = businessParams.AcctPay                    //个人账户支付金额
987 987
 	inputData["fixmedins_setl_cnt"] = businessParams.FixmedinsSetlCnt //定点医药机构结算笔数
988 988
 	inputData["refd_setl_flag"] = "0"                                 // 就诊 ID(来自2201接口返回)