Browse Source

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

csx 3 years ago
parent
commit
9bf55afab4
3 changed files with 40 additions and 44 deletions
  1. 5 5
      conf/app.conf
  2. 7 2
      controllers/zh/zh_his_api_controller.go
  3. 28 37
      service/his_service.go

+ 5 - 5
conf/app.conf View File

@@ -45,7 +45,7 @@ appsecret="61ee2e6268497d5aa9de0b0187c39aea"
45 45
 
46 46
 
47 47
 [prod]
48
-org_id = 9504
48
+org_id = 10265
49 49
 mobile_token_expiration_second = 86400
50 50
 httpdomain = https://api.xt.kuyicloud.com
51 51
 sso_domain = https://sso.kuyicloud.com
@@ -54,13 +54,13 @@ front_end_domain = "https://xt.kuyicloud.com/#"
54 54
 #url  = "http://192.168.1.228:17001/szsi-portal/transData"
55 55
 #url = "http://192.168.1.88:6666/szsi-portal/transData"
56 56
 #gdyb_url = "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/"
57
-gdyb_url="http://igb.hsa.gdgov.cn/ebus/sz_prd/hsa/hgs/"
57
+#gdyb_url="http://igb.hsa.gdgov.cn/ebus/sz_prd/hsa/hgs/"
58 58
 #内蒙古
59
-#gdyb_url = "http://10.38.23.105:8090/uif-hsaf-med-api/api/medical/service/"
60
-#gdyb_paasid = "sg03_prd"
59
+gdyb_url = "http://10.38.23.105:8090/uif-hsaf-med-api/api/medical/service/"
60
+gdyb_paasid = "sg03_prd"
61 61
 #gdyb_paasid = "jm_sc_yjyy"
62 62
 #gdyb_paasid="zh_prd_yjyy"
63
-gdyb_paasid = "sz_prd_yjyy"
63
+#gdyb_paasid = "sz_prd_yjyy"
64 64
 #gdyb_paasid = "zq_prd_yjyy"
65 65
 
66 66
 

+ 7 - 2
controllers/zh/zh_his_api_controller.go View File

@@ -672,9 +672,14 @@ func (c *ZHHisApiController) GetZHInHospitalCheck() {
672 672
 
673 673
 	//InsuplcAdmdvs = res2.Output.
674 674
 
675
+	if social_type != 0 {
676
+
677
+	} else {
678
+
679
+	}
680
+
675 681
 	Iinfos, _ := json.Marshal(res2.Output.Iinfo)
676 682
 	infoStr := string(Iinfos)
677
-	fmt.Println(infoStr)
678 683
 
679 684
 	var rf []*ResultFive
680 685
 	json.Unmarshal([]byte(infoStr), &rf)
@@ -770,7 +775,7 @@ func (c *ZHHisApiController) GetZHInHospitalCheck() {
770 775
 		timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
771 776
 		var struct2401 service.Struct2401
772 777
 		struct2401.PsnNo = res2.Output.Baseinfo.PsnNo
773
-		struct2401.Insutype = strconv.FormatInt(int64(social_type), 10)
778
+		struct2401.Insutype = insutype
774 779
 		struct2401.MdtrtCertType = "02"
775 780
 		struct2401.MdtrtCertNo = res2.Output.Baseinfo.Certno
776 781
 		if miConfig.Code == "H15049901371" {

+ 28 - 37
service/his_service.go View File

@@ -502,17 +502,13 @@ func CreateOrderInfo(order *models.HisOrderInfo) (err error) {
502 502
 	err = writeDb.Create(&order).Error
503 503
 	return
504 504
 }
505
-
506 505
 func FindPatientPrescriptionInfo(org_id int64, patient_id int64, record_date int64) (info models.HisPrescriptionInfo, err error) {
507 506
 	err = readDb.Model(&models.HisPrescriptionInfo{}).Where("user_org_id = ? AND status = 1 AND record_date = ? AND patient_id = ?", org_id, record_date, patient_id).First(&info).Error
508 507
 	return
509
-
510 508
 }
511
-
512 509
 func FindHisPatientPrescriptionInfo(org_id int64, his_patient_id int64, record_date int64) (info models.HisPrescriptionInfo, err error) {
513 510
 	err = readDb.Model(&models.HisPrescriptionInfo{}).Where("user_org_id = ? AND status = 1 AND record_date = ? AND his_patient_id = ?", org_id, record_date, his_patient_id).First(&info).Error
514 511
 	return
515
-
516 512
 }
517 513
 
518 514
 func FindLastPatientPrescriptionInfo(org_id int64, patient_id int64, record_date int64) (info models.HisPrescriptionInfo, err error) {
@@ -523,7 +519,6 @@ func FindLastPatientPrescriptionInfo(org_id int64, patient_id int64, record_date
523 519
 func SavePatientPrescriptionInfo(info models.HisPrescriptionInfo) (err error) {
524 520
 	err = writeDb.Save(&info).Error
525 521
 	return
526
-
527 522
 }
528 523
 
529 524
 func GetHisOrderList(user_org_id int64, page int64, limit int64, start_time int64, end_time int64, doctor_id int64, keywords string) (order []*models.HisOrder, err error, total int64) {
@@ -572,47 +567,43 @@ func UpDatePrescriptionOrderStatus(user_org_id int64, ids []int64) (err error) {
572 567
 
573 568
 func UpDatePrescriptionInfoNumber(user_org_id int64, id int64, number string, record_time int64) (err error) {
574 569
 	err = writeDb.Model(&models.HisPrescriptionInfo{}).Where("user_org_id = ? AND status = 1 AND patient_id = ? AND record_date = ?", user_org_id, id, record_time).Updates(map[string]interface{}{"batch_number": number, "prescription_status": 2, "mtime": time.Now().Unix()}).Error
575
-
576 570
 	return
577 571
 }
578 572
 
579 573
 func UpDateHisPrescriptionInfoNumber(user_org_id int64, his_patient_id int64, number string, record_time int64) (err error) {
580 574
 	err = writeDb.Model(&models.HisPrescriptionInfo{}).Where("user_org_id = ? AND status = 1 AND his_patient_id = ? AND record_date = ?", user_org_id, his_patient_id, record_time).Updates(map[string]interface{}{"batch_number": number, "prescription_status": 2, "mtime": time.Now().Unix()}).Error
581
-
582 575
 	return
583 576
 }
584 577
 
585 578
 type HisOrder struct {
586
-	ID                    int64   `gorm:"column:id" json:"id" form:"id"`
587
-	UserOrgId             int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
588
-	HisPatientId          int64   `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
589
-	SettleAccountsDate    int64   `gorm:"column:settle_accounts_date" json:"settle_accounts_date" form:"settle_accounts_date"`
590
-	Ctime                 int64   `gorm:"column:ctime" json:"ctime" form:"ctime"`
591
-	Mtime                 int64   `gorm:"column:mtime" json:"mtime" form:"mtime"`
592
-	Status                int64   `gorm:"column:status" json:"status" form:"status"`
593
-	Number                string  `gorm:"column:number" json:"number" form:"number"`
594
-	PatientId             int64   `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
595
-	MedfeeSumamt          float64 `gorm:"column:medfee_sumamt" json:"medfee_sumamt" form:"medfee_sumamt"`
596
-	OrderStatus           float64 `gorm:"column:order_status" json:"order_status" form:"order_status"`
597
-	PayWay                int64   `gorm:"column:pay_way" json:"pay_way" form:"pay_way"`
598
-	PayPrice              float64 `gorm:"column:pay_price" json:"pay_price" form:"pay_price"`
599
-	PayCardNo             string  `gorm:"column:pay_card_no" json:"pay_card_no" form:"pay_card_no"`
600
-	DiscountPrice         float64 `gorm:"column:discount_price" json:"discount_price" form:"discount_price"`
601
-	PreferentialPrice     float64 `gorm:"column:preferential_price" json:"preferential_price" form:"preferential_price"`
602
-	RealityPrice          float64 `gorm:"column:reality_price" json:"reality_price" form:"reality_price"`
603
-	FoundPrice            float64 `gorm:"column:found_price" json:"found_price" form:"found_price"`
604
-	MedicalInsurancePrice float64 `gorm:"column:medical_insurance_price" json:"medical_insurance_price" form:"medical_insurance_price"`
605
-	PrivatePrice          float64 `gorm:"column:private_price" json:"private_price" form:"private_price"`
606
-	Creator               int64   `gorm:"column:creator" json:"creator" form:"creator"`
607
-	Modify                int64   `gorm:"column:modify" json:"modify" form:"modify"`
608
-	IsPre                 int64   `gorm:"column:is_pre" json:"is_pre" form:"is_pre"`
609
-
610
-	SzChargeInfo            string `gorm:"column:sz_charge_info" json:"sz_charge_info" form:"sz_charge_info"`
611
-	SzProjectInfo           string `gorm:"column:sz_project_info" json:"sz_project_info" form:"sz_project_info"`
612
-	SzMedicineInsuranceInfo string `gorm:"column:sz_medicine_insurance_info" json:"sz_medicine_insurance_info" form:"sz_medicine_insurance_info"`
613
-
614
-	MzNumber      string `gorm:"column:mz_number" json:"mz_number" form:"mz_number"`
615
-	OrgSetlNumber string `gorm:"column:org_setl_number" json:"org_setl_number" form:"org_setl_number"`
579
+	ID                      int64   `gorm:"column:id" json:"id" form:"id"`
580
+	UserOrgId               int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
581
+	HisPatientId            int64   `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
582
+	SettleAccountsDate      int64   `gorm:"column:settle_accounts_date" json:"settle_accounts_date" form:"settle_accounts_date"`
583
+	Ctime                   int64   `gorm:"column:ctime" json:"ctime" form:"ctime"`
584
+	Mtime                   int64   `gorm:"column:mtime" json:"mtime" form:"mtime"`
585
+	Status                  int64   `gorm:"column:status" json:"status" form:"status"`
586
+	Number                  string  `gorm:"column:number" json:"number" form:"number"`
587
+	PatientId               int64   `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
588
+	MedfeeSumamt            float64 `gorm:"column:medfee_sumamt" json:"medfee_sumamt" form:"medfee_sumamt"`
589
+	OrderStatus             float64 `gorm:"column:order_status" json:"order_status" form:"order_status"`
590
+	PayWay                  int64   `gorm:"column:pay_way" json:"pay_way" form:"pay_way"`
591
+	PayPrice                float64 `gorm:"column:pay_price" json:"pay_price" form:"pay_price"`
592
+	PayCardNo               string  `gorm:"column:pay_card_no" json:"pay_card_no" form:"pay_card_no"`
593
+	DiscountPrice           float64 `gorm:"column:discount_price" json:"discount_price" form:"discount_price"`
594
+	PreferentialPrice       float64 `gorm:"column:preferential_price" json:"preferential_price" form:"preferential_price"`
595
+	RealityPrice            float64 `gorm:"column:reality_price" json:"reality_price" form:"reality_price"`
596
+	FoundPrice              float64 `gorm:"column:found_price" json:"found_price" form:"found_price"`
597
+	MedicalInsurancePrice   float64 `gorm:"column:medical_insurance_price" json:"medical_insurance_price" form:"medical_insurance_price"`
598
+	PrivatePrice            float64 `gorm:"column:private_price" json:"private_price" form:"private_price"`
599
+	Creator                 int64   `gorm:"column:creator" json:"creator" form:"creator"`
600
+	Modify                  int64   `gorm:"column:modify" json:"modify" form:"modify"`
601
+	IsPre                   int64   `gorm:"column:is_pre" json:"is_pre" form:"is_pre"`
602
+	SzChargeInfo            string  `gorm:"column:sz_charge_info" json:"sz_charge_info" form:"sz_charge_info"`
603
+	SzProjectInfo           string  `gorm:"column:sz_project_info" json:"sz_project_info" form:"sz_project_info"`
604
+	SzMedicineInsuranceInfo string  `gorm:"column:sz_medicine_insurance_info" json:"sz_medicine_insurance_info" form:"sz_medicine_insurance_info"`
605
+	MzNumber                string  `gorm:"column:mz_number" json:"mz_number" form:"mz_number"`
606
+	OrgSetlNumber           string  `gorm:"column:org_setl_number" json:"org_setl_number" form:"org_setl_number"`
616 607
 
617 608
 	HisOrderInfo        models.HisOrderInfo        `gorm:"ForeignKey:ID;AssociationForeignKey:OrderId" json:"order_info"`
618 609
 	Patients            models.Patients            `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"patient"`