XMLWAN hace 3 años
padre
commit
5b416c1cc4

+ 2 - 2
controllers/base_api_controller.go Ver fichero

@@ -90,7 +90,7 @@ func (this *BaseAuthAPIController) Prepare() {
90 90
 		subscibe.CreatedTime = 1538035409
91 91
 		subscibe.UpdatedTime = 1538035409
92 92
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
93
-		subscibes[9671] = &subscibe
93
+		subscibes[4] = &subscibe
94 94
 		var adminUserInfo service.AdminUserInfo
95 95
 		adminUserInfo.CurrentOrgId = org_id
96 96
 		adminUserInfo.CurrentAppId = 8642
@@ -206,7 +206,7 @@ func (this *BaseServeAPIController) Prepare() {
206 206
 		subscibe.CreatedTime = 1538035409
207 207
 		subscibe.UpdatedTime = 1538035409
208 208
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
209
-		subscibes[9671] = &subscibe
209
+		subscibes[4] = &subscibe
210 210
 		var adminUserInfo service.AdminUserInfo
211 211
 		adminUserInfo.CurrentOrgId = org_id
212 212
 		adminUserInfo.AdminUser = &userAdmin

+ 125 - 49
controllers/sz/sz_his_api_controller.go Ver fichero

@@ -1615,11 +1615,12 @@ func (c *SZHisApiController) GetDrugList() {
1615 1615
 }
1616 1616
 
1617 1617
 func (c *SZHisApiController) GetTreatmentProject() {
1618
+	fmt.Println("触发了吗2222222222")
1618 1619
 	adminUserInfo := c.GetAdminUserInfo()
1619 1620
 	orgId := adminUserInfo.CurrentOrgId
1620 1621
 
1621 1622
 	//获取药品库数据
1622
-	list, _ := service.GetDrugList(orgId)
1623
+	list, _ := service.GetMyPorjecgList(orgId)
1623 1624
 
1624 1625
 	miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
1625 1626
 	var doctor_name string
@@ -1650,19 +1651,16 @@ func (c *SZHisApiController) GetTreatmentProject() {
1650 1651
 		}
1651 1652
 		//这里就可以查看开始和结束了
1652 1653
 		fmt.Println(list[start-1 : stop])
1653
-		var customs []*models.DrugDetail
1654
+		var customs []*models.ProjectDetail
1654 1655
 		for _, item := range list {
1655
-			fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
1656
-			detail := &models.DrugDetail{
1657 1656
 
1658
-				MedicalInsuranceNumber: item.MedicalInsuranceNumber, //社保目录
1659
-				Code:                   item.Code,                   //协议机构内部目录编码
1660
-				DrugName:               item.DrugName,               //协议机构内部目录名称
1661
-				DrugSpec:               item.DrugSpec,
1662
-				ManufacturerName:       item.ManufacturerName,
1663
-				MinUnit:                item.MinUnit,
1664
-				RetailPrice:            item.RetailPrice, //协议机构内部项目收费价格
1665
-				LimitRemark:            item.LimitRemark,
1657
+			detail := &models.ProjectDetail{
1658
+
1659
+				SocialSecurityDirectoryCode: item.MedicalCode, //社保目录
1660
+				ProjectName:                 item.ProjectName,
1661
+				Price:                       item.Price,
1662
+				Category:                    strconv.FormatInt(item.Category, 10),
1663
+				Remark:                      item.Remark,
1666 1664
 			}
1667 1665
 			customs = append(customs, detail)
1668 1666
 		}
@@ -1783,6 +1781,77 @@ func (c *SZHisApiController) GetRevocation() {
1783 1781
 			fmt.Println(isSuccess)
1784 1782
 		}
1785 1783
 
1784
+		if type_id == 2 {
1785
+
1786
+			//获取药品库数据
1787
+			list, _ := service.GetMyPorjecgListDetail(orgId, id)
1788
+
1789
+			miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
1790
+			var doctor_name string
1791
+			var doctor_code string
1792
+
1793
+			doctor_name = "黄亦轩"
1794
+			doctor_code = "1001"
1795
+
1796
+			var pagesize int = 50
1797
+			var start int = 1
1798
+			var stop int
1799
+			var pagecount int
1800
+			var curpage int
1801
+			var isSuccess bool = true
1802
+			//总页数,向上取整,注意除之前要先转换类型为float64
1803
+			pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
1804
+
1805
+			var ress []*Result
1806
+			for curpage = 1; curpage <= pagecount; curpage++ {
1807
+				if curpage == 1 {
1808
+					start = 1
1809
+				} else {
1810
+					start = (curpage-1)*pagesize + 1
1811
+				}
1812
+				stop = curpage * pagesize
1813
+				if stop > len(list) {
1814
+					stop = len(list)
1815
+				}
1816
+				//这里就可以查看开始和结束了
1817
+				fmt.Println(list[start-1 : stop])
1818
+				var customs []*models.DrugDetail
1819
+				for _, item := range list {
1820
+					detail := &models.DrugDetail{
1821
+						SocialSecurityDirectoryCode: item.MedicalCode,
1822
+					}
1823
+					customs = append(customs, detail)
1824
+				}
1825
+				result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs, type_id)
1826
+				fmt.Println("reuslt", result)
1827
+				var dat map[string]interface{}
1828
+				if err := json.Unmarshal([]byte(result), &dat); err == nil {
1829
+					fmt.Println(dat)
1830
+				} else {
1831
+					fmt.Println(err)
1832
+				}
1833
+
1834
+				userJSONBytes, _ := json.Marshal(dat)
1835
+
1836
+				var res Result
1837
+				if err := json.Unmarshal(userJSONBytes, &res); err != nil {
1838
+					utils.ErrorLog("解析失败:%v", err)
1839
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1840
+					return
1841
+				}
1842
+				if res.Transreturncode == "00000000" {
1843
+					ress = append(ress, &res)
1844
+				} else {
1845
+					isSuccess = false
1846
+					//失败
1847
+
1848
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
1849
+					return
1850
+				}
1851
+				fmt.Println(isSuccess)
1852
+			}
1853
+		}
1854
+
1786 1855
 		if type_id == 3 {
1787 1856
 
1788 1857
 			//获取药品库数据
@@ -1903,11 +1972,11 @@ func (c *SZHisApiController) GetDoctorList() {
1903 1972
 	orgid := adminUserInfo.CurrentOrgId
1904 1973
 	fmt.Println("or3gi", orgid)
1905 1974
 	//获取所有医生护士信息
1906
-	list, _ := service.GetDoctorList(orgid)
1975
+	list, _ := service.GetDoctorList(9671)
1907 1976
 	//获取所有角色名称
1908
-	roleList, _ := service.GetRoleList(orgid)
1977
+	roleList, _ := service.GetRoleList(9671)
1909 1978
 
1910
-	miConfig, _ := service.FindMedicalInsuranceInfo(orgid)
1979
+	miConfig, _ := service.FindMedicalInsuranceInfo(9671)
1911 1980
 	for _, item := range list {
1912 1981
 		for _, it := range roleList {
1913 1982
 			if item.RoleId == it.ID {
@@ -1946,44 +2015,48 @@ func (c *SZHisApiController) GetDoctorList() {
1946 2015
 		var customs []*models.DocDetail
1947 2016
 		for _, item := range list {
1948 2017
 			fmt.Println("医护类别", item.Name)
2018
+			sex := strconv.FormatInt(item.Sex, 10)
2019
+			card_type := strconv.FormatInt(item.CardType, 10)
2020
+			is_active := strconv.FormatInt(item.IsActive, 10)
2021
+
1949 2022
 			detail := &models.DocDetail{
1950 2023
 				UserName:                                item.UserName,
1951 2024
 				RoleId:                                  item.Name,
1952
-				Sex:                                     "",
1953
-				CardType:                                "",
1954
-				IdCard:                                  "",
2025
+				Sex:                                     sex,
2026
+				CardType:                                card_type,
2027
+				IdCard:                                  item.IdCard,
1955 2028
 				Phone:                                   "",
1956
-				WorkMajorName:                           "",
1957
-				Nation:                                  "",
2029
+				WorkMajorName:                           item.WorkMajorName,
2030
+				Nation:                                  item.Nation,
1958 2031
 				BirthDay:                                20201022,
1959 2032
 				WorkTime:                                12,
1960
-				Education:                               "",
1961
-				StudyMajorName:                          "",
1962
-				CertificateCode:                         "",   //证书编码
1963
-				MedicalCode:                             "",   //医师资格编码
1964
-				MedicalRangeCode:                        "",   //医师执业范围代码
1965
-				MedicalLevel:                            "",   //医生级别
1966
-				TypeJob:                                 "",   //职业类别
1967
-				DoctorNumber:                            "",   //医师编号
1968
-				Licensing:                               "",   //职业标志
1969
-				DoctorServiceStatus:                     "",   //医师医保服务资格状态
1970
-				MonitoringLevel:                         "",   //监控等级
1971
-				DrugPsychotropicSubstances:              "",   //毒麻精神药品资格
1972
-				HealthCareCode:                          "",   // 母婴保健技术考核合格证书编号
1973
-				PlanningTechnicalServiceCode:            "",   //计划生育技术服务人员合格证编号
1974
-				PharmacistType:                          "",   //药师类别
1975
-				PharmacistPracticeCategory:              "",   //药师执业类别
1976
-				PharmacistsLicensing:                    "",   //药师执业范围
1977
-				PharmacistRegistrationNumber:            "",   //执业药师注册证编号
1978
-				OfficeCode:                              "",   //科室编码
1979
-				JobNumber:                               "",   //工号
1980
-				PostName:                                "",   //职位名称
1981
-				TechnicalJobLevelCode:                   "",   //专业技术职务级别编码
1982
-				IsActive:                                "",   //在职与否
1983
-				PrescriptionQualificationIdentification: "",   //处方资格标识
1984
-				IdentificationOutpatients:               "",   //门诊大病医师标识
1985
-				OutpatientIllnessCategory:               "",   //门诊大病类别
1986
-				StartTime:                               1233, //开始日期
2033
+				Education:                               strconv.FormatInt(item.Education, 10),
2034
+				StudyMajorName:                          item.StudyMajorName,
2035
+				CertificateCode:                         "",                                           //证书编码
2036
+				MedicalCode:                             item.MedicalCode,                             //医师资格编码
2037
+				MedicalRangeCode:                        strconv.FormatInt(item.MedicalRangeCode, 10), //医师执业范围代码
2038
+				MedicalLevel:                            strconv.FormatInt(item.MedicalLevel, 10),     //医生级别
2039
+				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),    //职业类别
2040
+				DoctorNumber:                            item.DoctorNumber,                            //医师编号
2041
+				Licensing:                               strconv.FormatInt(item.Licensing, 10),        //职业标志
2042
+				DoctorServiceStatus:                     "",                                           //医师医保服务资格状态
2043
+				MonitoringLevel:                         "",                                           //监控等级
2044
+				DrugPsychotropicSubstances:              "",                                           //毒麻精神药品资格
2045
+				HealthCareCode:                          "",                                           // 母婴保健技术考核合格证书编号
2046
+				PlanningTechnicalServiceCode:            "",                                           //计划生育技术服务人员合格证编号
2047
+				PharmacistType:                          "",                                           //药师类别
2048
+				PharmacistPracticeCategory:              "",                                           //药师执业类别
2049
+				PharmacistsLicensing:                    "",                                           //药师执业范围
2050
+				PharmacistRegistrationNumber:            item.PharmacistRegistrationNumber,            //执业药师注册证编号
2051
+				OfficeCode:                              "",                                           //科室编码
2052
+				JobNumber:                               item.JobNumber,                               //工号
2053
+				PostName:                                "",                                           //职位名称
2054
+				TechnicalJobLevelCode:                   "",                                           //专业技术职务级别编码
2055
+				IsActive:                                is_active,                                    //在职与否
2056
+				PrescriptionQualificationIdentification: item.PharmacistRegistrationNumber,            //处方资格标识
2057
+				IdentificationOutpatients:               "",                                           //门诊大病医师标识
2058
+				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,               //门诊大病类别
2059
+				StartTime:                               1233,                                         //开始日期
1987 2060
 			}
1988 2061
 			customs = append(customs, detail)
1989 2062
 		}
@@ -2023,8 +2096,11 @@ func (c *SZHisApiController) GetMedicalList() {
2023 2096
 
2024 2097
 	adminUserInfo := c.GetAdminUserInfo()
2025 2098
 	orgId := adminUserInfo.CurrentOrgId
2099
+
2100
+	id, _ := c.GetInt64("id")
2101
+	fmt.Println("id22222222", id)
2026 2102
 	//获取所有医生护士信息
2027
-	list, _ := service.GetDoctorList(orgId)
2103
+	list, _ := service.GetDoctorListByDetail(orgId, id)
2028 2104
 	//获取所有角色名称
2029 2105
 	roleList, _ := service.GetRoleList(orgId)
2030 2106
 
@@ -2134,7 +2210,7 @@ func (c *SZHisApiController) GetMedicalList() {
2134 2210
 			isSuccess = false
2135 2211
 			//失败
2136 2212
 
2137
-			c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
2213
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
2138 2214
 			return
2139 2215
 		}
2140 2216
 		fmt.Println(isSuccess)

BIN
gdyb Ver fichero


+ 27 - 0
models/dialysis.go Ver fichero

@@ -891,6 +891,33 @@ type SgjUserAdminRole struct {
891 891
 	OrgLogo       string `gorm:"column:org_logo" json:"org_logo" form:"org_logo"`
892 892
 	Creator       int64  `gorm:"column:creator" json:"creator" form:"creator"`
893 893
 	Name          string
894
+
895
+	Age                                     int64  `gorm:"column:age" json:"age" form:"age"`
896
+	Nation                                  string `gorm:"column:nation" json:"nation" form:"nation"`
897
+	CardType                                int64  `gorm:"column:card_type" json:"card_type" form:"card_type"`
898
+	IdCard                                  string `gorm:"column:id_card" json:"id_card" form:"id_card"`
899
+	Education                               int64  `gorm:"column:education" json:"education" form:"education"`
900
+	StudyMajorName                          string `gorm:"column:study_major_name" json:"study_major_name" form:"study_major_name"`
901
+	WorkMajorName                           string `gorm:"column:work_major_name" json:"work_major_name" form:"work_major_name"`
902
+	RoleType                                int64  `gorm:"column:role_type" json:"role_type" form:"role_type"`
903
+	MedicalCode                             string `gorm:"column:medical_code" json:"medical_code" form:"medical_code"`
904
+	DoctorCode                              string `gorm:"column:doctor_code" json:"doctor_code" form:"doctor_code"`
905
+	Licensing                               int64  `gorm:"column:licensing" json:"licensing" form:"licensing"`
906
+	JobNumber                               string `gorm:"column:job_number" json:"job_number" form:"job_number"`
907
+	PrescriptionQualificationIdentification int64  `gorm:"column:prescription_qualification_identification" json:"prescription_qualification_identification" form:"prescription_qualification_identification"`
908
+	IdentificationOutpatients               int64  `gorm:"column:identification_outpatients" json:"identification_outpatients" form:"identification_outpatients"`
909
+	StartTime                               int64  `gorm:"column:start_time" json:"start_time" form:"start_time"`
910
+	MedicalRangeCode                        int64  `gorm:"column:medical_range_code" json:"medical_range_code" form:"medical_range_code"`
911
+	MedicalLevel                            int64  `gorm:"column:medical_level" json:"medical_level" form:"medical_level"`
912
+	MedicalTypeJob                          int64  `gorm:"column:medical_type_job" json:"medical_type_job" form:"medical_type_job"`
913
+	PharmacistRegistrationNumber            string `gorm:"column:pharmacist_registration_number" json:"pharmacist_registration_number" form:"pharmacist_registration_number"`
914
+	DoctorRangeCode                         int64  `gorm:"column:doctor_range_code" json:"doctor_range_code" form:"doctor_range_code"`
915
+	DoctorLevel                             int64  `gorm:"column:doctor_level" json:"doctor_level" form:"doctor_level"`
916
+	DoctorTypeJob                           int64  `gorm:"column:doctor_type_job" json:"doctor_type_job" form:"doctor_type_job"`
917
+	DoctorNumber                            string `gorm:"column:doctor_number" json:"doctor_number" form:"doctor_number"`
918
+	OutpatientIllnessCategory               string `gorm:"column:outpatient_illness_category" json:"outpatient_illness_category" form:"outpatient_illness_category"`
919
+	IsActive                                int64  `gorm:"column:is_active" json:"is_active" form:"is_active"`
920
+	ActiveStatus                            int64  `gorm:"column:active_status" json:"active_status" form:"active_status"`
894 921
 }
895 922
 
896 923
 func (SgjUserAdminRole) TableName() string {

+ 41 - 0
models/his_models.go Ver fichero

@@ -1046,3 +1046,44 @@ type XtRole struct {
1046 1046
 func (XtRole) TableName() string {
1047 1047
 	return "sgj_user_role"
1048 1048
 }
1049
+
1050
+type MyHisProject struct {
1051
+	ID                        int64   `gorm:"column:id" json:"id" form:"id"`
1052
+	ProjectName               string  `gorm:"column:project_name" json:"project_name" form:"project_name"`
1053
+	Pinyin                    string  `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
1054
+	Wubi                      string  `gorm:"column:wubi" json:"wubi" form:"wubi"`
1055
+	Price                     float64 `gorm:"column:price" json:"price" form:"price"`
1056
+	Unit                      string  `gorm:"column:unit" json:"unit" form:"unit"`
1057
+	CostClassify              int64   `gorm:"column:cost_classify" json:"cost_classify" form:"cost_classify"`
1058
+	ExecutiveSection          int64   `gorm:"column:executive_section" json:"executive_section" form:"executive_section"`
1059
+	MedicalCoverage           int64   `gorm:"column:medical_coverage" json:"medical_coverage" form:"medical_coverage"`
1060
+	StatisticalClassification int64   `gorm:"column:statistical_classification" json:"statistical_classification" form:"statistical_classification"`
1061
+	DiseaseDirectory          int64   `gorm:"column:disease_directory" json:"disease_directory" form:"disease_directory"`
1062
+	IsRecord                  int64   `gorm:"column:is_record" json:"is_record" form:"is_record"`
1063
+	MedicalCode               string  `gorm:"column:medical_code" json:"medical_code" form:"medical_code"`
1064
+	TubeColor                 int64   `gorm:"column:tube_color" json:"tube_color" form:"tube_color"`
1065
+	MedicalStatus             int64   `gorm:"column:medical_status" json:"medical_status" form:"medical_status"`
1066
+	Remark                    string  `gorm:"column:remark" json:"remark" form:"remark"`
1067
+	Sign                      int64   `gorm:"column:sign" json:"sign" form:"sign"`
1068
+	DefaultNumber             string  `gorm:"column:default_number" json:"default_number" form:"default_number"`
1069
+	IsDefault                 int64   `gorm:"column:is_default" json:"is_default" form:"is_default"`
1070
+	IsCharge                  int64   `gorm:"column:is_charge" json:"is_charge" form:"is_charge"`
1071
+	IsEstimate                int64   `gorm:"column:is_estimate" json:"is_estimate" form:"is_estimate"`
1072
+	IsWorkload                int64   `gorm:"column:is_workload" json:"is_workload" form:"is_workload"`
1073
+	Sort                      string  `gorm:"column:sort" json:"sort" form:"sort"`
1074
+	DoctorAdvice              int64   `gorm:"column:doctor_advice" json:"doctor_advice" form:"doctor_advice"`
1075
+	UserOrgId                 int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
1076
+	Status                    int64   `gorm:"column:status" json:"status" form:"status"`
1077
+	CreatedTime               int64   `gorm:"column:created_time" json:"created_time" form:"created_time"`
1078
+	UpdatedTime               int64   `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
1079
+	SingleDose                string  `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
1080
+	ExecutionFrequency        string  `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
1081
+	DeliveryWay               string  `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
1082
+	NumberDays                string  `gorm:"column:number_days" json:"number_days" form:"number_days"`
1083
+	Total                     string  `gorm:"column:total" json:"total" form:"total"`
1084
+	Category                  int64   `gorm:"column:category" json:"category" form:"category"`
1085
+}
1086
+
1087
+func (MyHisProject) TableName() string {
1088
+	return "xt_his_project"
1089
+}

+ 8 - 0
models/sz_his_models.go Ver fichero

@@ -87,3 +87,11 @@ type GoodDetail struct {
87 87
 	SpecialMedical              string  //特殊医用材料标识
88 88
 	Remark                      string  //备注
89 89
 }
90
+
91
+type ProjectDetail struct {
92
+	SocialSecurityDirectoryCode string  //社保目录编码
93
+	ProjectName                 string  //协议机构内部目录名称
94
+	Price                       float64 //协议机构内部项目收费价格
95
+	Category                    string  //协议机构项目类别
96
+	Remark                      string  //备注
97
+}

+ 20 - 3
service/his_service.go Ver fichero

@@ -976,7 +976,7 @@ func GetDrugList(orgID int64) (drug []*models.BaseDrugList, err error) {
976 976
 	table := XTReadDB().Table("xt_manufacturer as m")
977 977
 	fmt.Print(table)
978 978
 	if orgID > 0 {
979
-		db = db.Where("x.org_id = ? and x.id = 278", orgID)
979
+		db = db.Where("x.org_id = ? ", orgID)
980 980
 	}
981 981
 	err = db.Select("x.id,x.medical_insurance_number,x.code,x.drug_name,x.drug_spec,x.drug_type,x.min_unit,x.last_price,x.retail_price,x.limit_remark,x.drug_dosage_form,m.manufacturer_name").Joins("left join xt_manufacturer as m on m.id = x.manufacturer").Scan(&drug).Error
982 982
 
@@ -991,7 +991,7 @@ func GetDrugDosageForm(orgid int64) (dataconfig []*models.XtDrugDataConfig, err
991 991
 
992 992
 func GetDoctorList(orgid int64) (role []*models.SgjUserAdminRole, err error) {
993 993
 
994
-	err = UserReadDB().Model(&role).Where("org_id = ? and status = 1 and id = 855", orgid).Find(&role).Error
994
+	err = UserReadDB().Model(&role).Where("org_id = ? and status = 1 and user_type = 2", orgid).Find(&role).Error
995 995
 	return role, err
996 996
 }
997 997
 
@@ -1020,7 +1020,7 @@ func GetGoodInformationList(orgid int64) (good []*models.GoodInformation, err er
1020 1020
 	table := XTReadDB().Table("xt_manufacturer as m")
1021 1021
 	fmt.Println(table)
1022 1022
 	if orgid > 0 {
1023
-		db = db.Where("x.org_id = ? and x.id= 976", orgid)
1023
+		db = db.Where("x.org_id = ?", orgid)
1024 1024
 	}
1025 1025
 	err = db.Select("x.id,x.social_security_directory_code,x.good_name,x.specification_name,x.production_type,x.special_medical,x.good_unit,x.buy_price,x.sell_price,x.remark,m.manufacturer_name").Joins("left join xt_manufacturer as m on m.id = x.manufacturer").Scan(&good).Error
1026 1026
 	return good, err
@@ -1036,3 +1036,20 @@ func GetGoodListByDetail(orgid int64, id int64) (good []*models.GoodInformation,
1036 1036
 	err = db.Select("x.id,x.social_security_directory_code,x.good_name,x.specification_name,x.production_type,x.special_medical,x.good_unit,x.buy_price,x.sell_price,x.remark,m.manufacturer_name").Joins("left join xt_manufacturer as m on m.id = x.manufacturer").Scan(&good).Error
1037 1037
 	return good, err
1038 1038
 }
1039
+
1040
+func GetDoctorListByDetail(orgid int64, id int64) (role []*models.SgjUserAdminRole, err error) {
1041
+
1042
+	err = UserReadDB().Model(&role).Where("org_id = ? and status = 1 and id = ? and user_type = 2", orgid, id).Find(&role).Error
1043
+	return role, err
1044
+}
1045
+
1046
+func GetMyPorjecgList(orgid int64) (project []*models.MyHisProject, err error) {
1047
+
1048
+	err = XTReadDB().Model(&project).Where("user_org_id = ? and status = 1", orgid).Find(&project).Error
1049
+	return project, err
1050
+}
1051
+
1052
+func GetMyPorjecgListDetail(orgid int64, id int64) (project []*models.MyHisProject, err error) {
1053
+	err = XTReadDB().Model(&project).Where("user_org_id = ? and status = 1 and id = ?", orgid, id).Find(&project).Error
1054
+	return project, err
1055
+}

+ 9 - 9
service/sz_his_service.go Ver fichero

@@ -638,7 +638,7 @@ func SetSZDrugMessage(doctor string, doctor_code string, fixmedins_code string)
638 638
 	return inputMessage
639 639
 }
640 640
 
641
-func SzybML009(doctor string, doctor_code string, fixmedins_code string, datas []*models.DrugDetail) string {
641
+func SzybML009(doctor string, doctor_code string, fixmedins_code string, datas []*models.ProjectDetail) string {
642 642
 	//生成输入报文
643 643
 	inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
644 644
 
@@ -650,14 +650,14 @@ func SzybML009(doctor string, doctor_code string, fixmedins_code string, datas [
650 650
 
651 651
 	for _, item := range datas {
652 652
 		feedetailInfo := make(map[string]interface{})
653
-		feedetailInfo["ake001"] = item.MedicalInsuranceNumber //社保目录编码
654
-		feedetailInfo["ake005"] = "110100002"                 //协议机构内部目录编码
655
-		feedetailInfo["ake006"] = item.DrugName               // 协议机构内部目录名称
656
-		feedetailInfo["bkf131"] = "4"                         //协议机构项目类别
657
-		feedetailInfo["bkm062"] = "0"                         // 门诊特检项目标识
658
-		feedetailInfo["bka506"] = item.RetailPrice            // 协议机构内部项目收费价格
659
-		feedetailInfo["aae030"] = 20210407                    // 备案日期
660
-		feedetailInfo["aae013"] = item.LimitRemark            // 备注
653
+		feedetailInfo["ake001"] = item.SocialSecurityDirectoryCode //社保目录编码
654
+		feedetailInfo["ake005"] = "110100002"                      //协议机构内部目录编码
655
+		feedetailInfo["ake006"] = item.ProjectName                 // 协议机构内部目录名称
656
+		feedetailInfo["bkf131"] = item.Category                    //协议机构项目类别
657
+		feedetailInfo["bkm062"] = "0"                              // 门诊特检项目标识
658
+		feedetailInfo["bka506"] = item.Price                       // 协议机构内部项目收费价格
659
+		feedetailInfo["aae030"] = 20210407                         // 备案日期
660
+		feedetailInfo["aae013"] = item.Remark                      // 备注
661 661
 		feedetail = append(feedetail, feedetailInfo)
662 662
 	}
663 663
 	fmt.Println("feeedDetal2333333333", feedetail)