Sfoglia il codice sorgente

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

csx 2 anni fa
parent
commit
5c46503c71

+ 1 - 1
conf/app.conf Vedi File

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

+ 14 - 2
controllers/sg/his_api_controller.go Vedi File

@@ -6322,7 +6322,7 @@ func (c *HisApiController) GetUploadInfo() {
6322 6322
 
6323 6323
 				} else if miConfig.MdtrtareaAdmvs == "350500" {
6324 6324
 
6325
-					result, request_log, _ := service.FJyb2204(his.PsnNo, his.Number, prescriptions, chrg_bchno, miConfig.OrgName, roles.UserName, strconv.FormatInt(patientPrescription.Departments, 10), miConfig.Code, department.Number, strconv.FormatInt(roles.AdminUserId, 10), his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(his.BalanceAccountsType, 10), roles.UserName, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
6325
+					result, request_log, _ := service.FJyb2204(his.PsnNo, his.Number, prescriptions, chrg_bchno, miConfig.OrgName, roles.UserName, strconv.FormatInt(patientPrescription.Departments, 10), miConfig.Code, department.Number, strconv.FormatInt(roles.AdminUserId, 10), his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(his.BalanceAccountsType, 10), roles.UserName, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey, sickConfig.CountryCode)
6326 6326
 					var dat map[string]interface{}
6327 6327
 					if err := json.Unmarshal([]byte(result), &dat); err == nil {
6328 6328
 						fmt.Println(dat)
@@ -8315,7 +8315,7 @@ func (c *HisApiController) GetPreUploadInfo() {
8315 8315
 
8316 8316
 			} else if miConfig.MdtrtareaAdmvs == "350500" {
8317 8317
 
8318
-				result, request_log, _ := service.FJyb2204(his.PsnNo, his.Number, prescriptions, chrg_bchno, miConfig.OrgName, roles.UserName, strconv.FormatInt(patientPrescription.Departments, 10), miConfig.Code, department.Number, strconv.FormatInt(roles.AdminUserId, 10), his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(his.BalanceAccountsType, 10), roles.UserName, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
8318
+				result, request_log, _ := service.FJyb2204(his.PsnNo, his.Number, prescriptions, chrg_bchno, miConfig.OrgName, roles.UserName, strconv.FormatInt(patientPrescription.Departments, 10), miConfig.Code, department.Number, strconv.FormatInt(roles.AdminUserId, 10), his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(his.BalanceAccountsType, 10), roles.UserName, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey, sickConfig.CountryCode)
8319 8319
 				var dat map[string]interface{}
8320 8320
 				if err := json.Unmarshal([]byte(result), &dat); err == nil {
8321 8321
 					fmt.Println(dat)
@@ -9854,6 +9854,18 @@ func (c *HisApiController) GetCheckAccount() {
9854 9854
 			infocode, _ := strconv.ParseInt(res10188.Infcode, 10, 64)
9855 9855
 			res.Infcode = infocode
9856 9856
 
9857
+		} else if miConfig.MdtrtareaAdmvs == "350500" {
9858
+			var baseParams models.BaseParams
9859
+			baseParams.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
9860
+			baseParams.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
9861
+			baseParams.SecretKey = miConfig.SecretKey
9862
+			baseParams.OrgName = miConfig.OrgName
9863
+			baseParams.EncKey = miConfig.EncKey
9864
+			baseParams.AppSecret = miConfig.AppSecret
9865
+			baseParams.SignKey = miConfig.SignKey
9866
+
9867
+			service.FJyb3201(baseParams)
9868
+
9857 9869
 		} else {
9858 9870
 			api := "http://127.0.0.1:9532/" + "gdyb/ten?" +
9859 9871
 				"insutype=" + insutype +

+ 2 - 2
main.go Vedi File

@@ -11,7 +11,7 @@ import (
11 11
 	//"github.com/qiniu/api.v7/auth/qbox"
12 12
 	//"github.com/qiniu/api.v7/storage"
13 13
 
14
-	"gdyb/service"
14
+	//"gdyb/service"
15 15
 	"github.com/astaxie/beego"
16 16
 	//"github.com/qiniu/api.v7/auth/qbox"
17 17
 	//"github.com/qiniu/api.v7/storage"
@@ -21,7 +21,7 @@ import (
21 21
 )
22 22
 
23 23
 func init() {
24
-	service.ConnectDB()
24
+	//service.ConnectDB()
25 25
 	//org_id, _ := beego.AppConfig.Int64("org_id")
26 26
 	//miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
27 27
 	//CreateLog(miConfig)

+ 4 - 0
models/his_models.go Vedi File

@@ -1009,6 +1009,10 @@ type BaseParams struct {
1009 1009
 	RequestUrl     string
1010 1010
 	AccessKey      string
1011 1011
 	Cainfo         string
1012
+	AppID          string
1013
+	AppSecret      string
1014
+	SignKey        string
1015
+	EncKey         string
1012 1016
 }
1013 1017
 
1014 1018
 type BusinessParams struct {

+ 2 - 2
service/fj_service.go Vedi File

@@ -248,7 +248,7 @@ func FJyb2203(psnNo string, mdtrtId string, doctor string, department string, or
248 248
 }
249 249
 
250 250
 //  门诊费用明细信息上传
251
-func FJyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescription, chrg_bchno string, org_name string, doctor string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, balance_accounts_type string, opter string, url string, app_id string, app_secret string, sign_key string, enc_key string) (string, string, string) {
251
+func FJyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescription, chrg_bchno string, org_name string, doctor string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, balance_accounts_type string, opter string, url string, app_id string, app_secret string, sign_key string, enc_key string, dise_code string) (string, string, string) {
252 252
 	// 生成签名
253 253
 	nonce := GetRandomString(32)
254 254
 	timestamp := time.Now().Unix()
@@ -354,7 +354,7 @@ func FJyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
354 354
 		feedetailInfo["mdtrt_id"] = mdtrtId                          // 就诊 ID(来自2201接口返回)
355 355
 		feedetailInfo["psn_no"] = psnNo                              // 人员编号 (来自1101接口返回)
356 356
 		feedetailInfo["chrg_bchno"] = chrg_bchno                     // 收费批次号
357
-		feedetailInfo["dise_codg"] = ""                              // 病种编码
357
+		feedetailInfo["dise_codg"] = dise_code                       // 病种编码
358 358
 		feedetailInfo["rxno"] = ""                                   // 处方号
359 359
 		feedetailInfo["rx_circ_flag"] = "0"                          // 外购处方标志
360 360
 		feedetailInfo["fee_ocur_time"] = item.FeeOcurTime            // 费用发生时间

+ 9 - 9
service/jsyb_service.go Vedi File

@@ -300,7 +300,7 @@ func Jsyb2201(psnNo string, insutype string, certNo string, org_name string, ope
300 300
 	inputData["dept_code"] = dept_code   // 科室编码
301 301
 	inputData["dept_name"] = dept        // 科室名称
302 302
 	inputData["caty"] = "A03.06"         // 科别
303
-	inputData["expContent"] = ""         //
303
+	inputData["exp_content"] = ""        //
304 304
 
305 305
 	input["data"] = inputData
306 306
 	inputMessage["input"] = input //交易输入
@@ -332,7 +332,7 @@ func Jsyb2202(psnNo string, mdtrtId string, ipt_otp_no string, org_name string,
332 332
 	inputData["mdtrt_id"] = mdtrtId      // 就诊 ID(来自2201接口返回)
333 333
 	inputData["ipt_otp_no"] = ipt_otp_no // 住院/门诊号
334 334
 	//inputData["exp_content"] = ""        // 人员编号 (来自1101接口返回)
335
-	inputData["expContent"] = "" //
335
+	inputData["exp_content"] = "" //
336 336
 
337 337
 	input["data"] = inputData
338 338
 	inputMessage["input"] = input //交易输入
@@ -393,7 +393,7 @@ func Jsyb2203(psnNo string, mdtrtId string, doctor string, department string, or
393 393
 		diseinfo = append(diseinfo, diseinfo_sun)
394 394
 	}
395 395
 	//inputData["exp_content"] = "" // 人员编号 (来自1101接口返回)
396
-	inputData["expContent"] = "" //
396
+	inputData["exp_content"] = "" //
397 397
 
398 398
 	input["diseinfo"] = diseinfo
399 399
 	input["mdtrtinfo"] = inputData
@@ -644,7 +644,7 @@ func Jsyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
644 644
 		feedetailInfo["matn_fee_flag"] = ""    // 生育费用标志
645 645
 		subfeedetailInfo["tcmherb_prov_code"] = item.ProvinceDrugMedListCodg
646 646
 		subfeedetailInfo["mcs_prov_code"] = item.ProvinceGoodMedListCodg
647
-		feedetailInfo["expContent"] = subfeedetailInfo
647
+		feedetailInfo["exp_content"] = subfeedetailInfo
648 648
 		feedetail = append(feedetail, feedetailInfo)
649 649
 	}
650 650
 
@@ -680,8 +680,8 @@ func Jsyb2205(psnNo string, mdtrtId string, chrgBchno string, org_name string, d
680 680
 	inputData["mdtrt_id"] = mdtrtId  // 就诊 ID(来自2201接口返回)
681 681
 	inputData["chrg_bchno"] = "0000" // 收费批次号(来自2204生成的)
682 682
 
683
-	inputData["psn_no"] = psnNo  // 人员编号 (来自1101接口返回)
684
-	inputData["expContent"] = "" // 人员编号 (来自1101接口返回)
683
+	inputData["psn_no"] = psnNo   // 人员编号 (来自1101接口返回)
684
+	inputData["exp_content"] = "" // 人员编号 (来自1101接口返回)
685 685
 
686 686
 	input["data"] = inputData
687 687
 	inputMessage["input"] = input //交易输入
@@ -746,7 +746,7 @@ func Jsyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, ins
746 746
 	inputData["acct_used_flag"] = "0"   // 个人账户使用标志 0否 1是
747 747
 	inputData["insutype"] = insutype    // 险种类型
748 748
 	inputData["invono"] = ""            // 发票号
749
-	inputData["expContent"] = ""        // 人员编号 (来自1101接口返回)
749
+	inputData["exp_content"] = ""       // 人员编号 (来自1101接口返回)
750 750
 
751 751
 	input["data"] = inputData
752 752
 	inputMessage["input"] = input //交易输入
@@ -820,7 +820,7 @@ func Jsyb2207(psnNo string, mdtrtId string, chrgBchno string, certNo string, ins
820 820
 	inputData["overlmt_selfpay"] = overlmt_selfpay     //
821 821
 	inputData["preselfpay_amt"] = preselfpay_amt       //
822 822
 	inputData["inscp_scp_amt"] = inscp_scp_amt         //
823
-	inputData["expContent"] = ""                       // 人员编号 (来自1101接口返回)
823
+	inputData["exp_content"] = ""                      // 人员编号 (来自1101接口返回)
824 824
 
825 825
 	input["data"] = inputData
826 826
 	inputMessage["input"] = input //交易输入
@@ -911,7 +911,7 @@ func Jsyb2208(psnNo string, mdtrtId string, setlId string, org_name string, doct
911 911
 	inputData["psn_no"] = psnNo     // 人员编号 (来自1101接口返回)
912 912
 	inputData["mdtrt_id"] = mdtrtId // 就诊 ID(来自2201接口返回)
913 913
 	inputData["setl_id"] = setlId   // 结算 ID
914
-	inputData["expContent"] = ""    // 人员编号 (来自1101接口返回)
914
+	inputData["exp_content"] = ""   // 人员编号 (来自1101接口返回)
915 915
 
916 916
 	input["data"] = inputData
917 917
 	inputMessage["input"] = input //交易输入