Browse Source

拉取代码

XMLWAN 4 years ago
parent
commit
3c6e463e8e
1 changed files with 292 additions and 292 deletions
  1. 292 292
      controllers/sz/sz_his_api_controller.go

+ 292 - 292
controllers/sz/sz_his_api_controller.go View File

9
 	"gdyb/service"
9
 	"gdyb/service"
10
 	"gdyb/utils"
10
 	"gdyb/utils"
11
 	"github.com/astaxie/beego"
11
 	"github.com/astaxie/beego"
12
-	"github.com/axgle/mahonia"
12
+	//"github.com/axgle/mahonia"
13
 	"math/rand"
13
 	"math/rand"
14
 
14
 
15
 	//"github.com/axgle/mahonia"
15
 	//"github.com/axgle/mahonia"
3004
 }
3004
 }
3005
 
3005
 
3006
 //费用录入取消
3006
 //费用录入取消
3007
-func (c *SZHisApiController) CancelOrderDetail() {
3008
-	order_id, _ := c.GetInt64("order_id")
3009
-	record_time := c.GetString("record_time")
3010
-	patient_id, _ := c.GetInt64("patient_id")
3011
-	admin_user_id, _ := c.GetInt64("admin_user_id")
3012
-	timeLayout := "2006-01-02"
3013
-	loc, _ := time.LoadLocation("Local")
3014
-	adminUser := c.GetAdminUserInfo()
3015
-	theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", record_time+" 00:00:00", loc)
3016
-	fmt.Println(err)
3017
-	if err != nil {
3018
-		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
3019
-		return
3020
-	}
3021
-	recordDateTime := theTime.Unix()
3022
-	var order models.HisOrder
3023
-	order, _ = service.GetHisOrderByID(order_id)
3024
-
3025
-	if order.ID == 0 {
3026
-		order, _ = service.GetHisOrderThree(recordDateTime, patient_id, adminUser.CurrentOrgId)
3027
-
3028
-	}
3029
-
3030
-	order_infos, _ := service.GetHisOrderInfoByNumber(order.Number)
3031
-
3032
-	roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
3033
-	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
3034
-	//结算流程
3035
-	var doctor_name string
3036
-	var doctor_code string
3037
-	if roles.ID == 0 {
3038
-		doctor_name = "管理员"
3039
-		doctor_code = "1001"
3040
-	} else {
3041
-		doctor_name = roles.UserName
3042
-		doctor_code = strconv.FormatInt(admin_user_id, 10)
3043
-
3044
-	}
3045
-	var customs []*models.CustomDetail
3046
-
3047
-	for _, item := range order_infos {
3048
-		cus := &models.CustomDetail{
3049
-			PrescriptionNumber: item.OrderNumber,
3050
-			ChargeSerialNumber: item.FeedetlSn,
3051
-		}
3052
-		customs = append(customs, cus)
3053
-	}
3054
-	his, _ := service.GetHisPatientInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
3055
-
3056
-	verifyCode, version_code := ReadCardGetCode("FY002" + "|" + order.OrgSetlNumber + "|" + miConfig.Code)
3057
-
3058
-	var pagesize int = 50
3059
-	var start int = 1
3060
-	var stop int
3061
-	var pagecount int
3062
-	var curpage int
3063
-	var isSuccess bool = true
3064
-	var ress []*ResultFive
3065
-
3066
-	//总页数,向上取整,注意除之前要先转换类型为float64
3067
-	pagecount = int(math.Ceil(float64(len(customs)) / float64(pagesize)))
3068
-
3069
-	for curpage = 1; curpage <= pagecount; curpage++ {
3070
-		if curpage == 1 {
3071
-			start = 1
3072
-		} else {
3073
-			start = (curpage-1)*pagesize + 1
3074
-		}
3075
-		stop = curpage * pagesize
3076
-		if stop > len(customs) {
3077
-			stop = len(customs)
3078
-		}
3079
-
3080
-		result := service.SzybFY002(doctor_name, doctor_code, miConfig.Code, customs[start-1:stop], verifyCode, order.OrgSetlNumber, his.Number, version_code)
3081
-		fmt.Println(result)
3082
-
3083
-		var dat map[string]interface{}
3084
-		if err := json.Unmarshal([]byte(result), &dat); err == nil {
3085
-			fmt.Println(dat)
3086
-		} else {
3087
-			fmt.Println(err)
3088
-		}
3089
-		userJSONBytes, _ := json.Marshal(dat)
3090
-		var res ResultFive
3091
-		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
3092
-			utils.ErrorLog("解析失败:%v", err)
3093
-			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3094
-			return
3095
-		}
3096
-		if res.Transreturncode == "00000000" {
3097
-			ress = append(ress, &res)
3098
-		} else {
3099
-			isSuccess = false
3100
-			//预结算报错
3101
-			errlog := &models.HisOrderError{
3102
-				UserOrgId:  adminUser.CurrentOrgId,
3103
-				Ctime:      time.Now().Unix(),
3104
-				Mtime:      time.Now().Unix(),
3105
-				ErrMsg:     res.Transreturnmessage,
3106
-				Status:     1,
3107
-				PatientId:  patient_id,
3108
-				RecordTime: recordDateTime,
3109
-				Stage:      11,
3110
-			}
3111
-			service.CreateErrMsgLog(errlog)
3112
-
3113
-			c.ServeSuccessJSON(map[string]interface{}{
3114
-				"faild_code": -10,
3115
-				"msg":        res.Transreturnmessage,
3116
-			})
3117
-			return
3118
-		}
3119
-	}
3120
-	if isSuccess == true {
3121
-		service.UpdataOrderInfoStatus(order.ID, order.Number, adminUser.CurrentOrgId)
3122
-		c.ServeSuccessJSON(map[string]interface{}{
3123
-			"msg": "撤销成功",
3124
-		})
3125
-	}
3126
-}
3007
+//func (c *SZHisApiController) CancelOrderDetail() {
3008
+//	order_id, _ := c.GetInt64("order_id")
3009
+//	record_time := c.GetString("record_time")
3010
+//	patient_id, _ := c.GetInt64("patient_id")
3011
+//	admin_user_id, _ := c.GetInt64("admin_user_id")
3012
+//	timeLayout := "2006-01-02"
3013
+//	loc, _ := time.LoadLocation("Local")
3014
+//	adminUser := c.GetAdminUserInfo()
3015
+//	theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", record_time+" 00:00:00", loc)
3016
+//	fmt.Println(err)
3017
+//	if err != nil {
3018
+//		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
3019
+//		return
3020
+//	}
3021
+//	recordDateTime := theTime.Unix()
3022
+//	var order models.HisOrder
3023
+//	order, _ = service.GetHisOrderByID(order_id)
3024
+//
3025
+//	if order.ID == 0 {
3026
+//		order, _ = service.GetHisOrderThree(recordDateTime, patient_id, adminUser.CurrentOrgId)
3027
+//
3028
+//	}
3029
+//
3030
+//	order_infos, _ := service.GetHisOrderInfoByNumber(order.Number)
3031
+//
3032
+//	roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
3033
+//	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
3034
+//	//结算流程
3035
+//	var doctor_name string
3036
+//	var doctor_code string
3037
+//	if roles.ID == 0 {
3038
+//		doctor_name = "管理员"
3039
+//		doctor_code = "1001"
3040
+//	} else {
3041
+//		doctor_name = roles.UserName
3042
+//		doctor_code = strconv.FormatInt(admin_user_id, 10)
3043
+//
3044
+//	}
3045
+//	var customs []*models.CustomDetail
3046
+//
3047
+//	for _, item := range order_infos {
3048
+//		cus := &models.CustomDetail{
3049
+//			PrescriptionNumber: item.OrderNumber,
3050
+//			ChargeSerialNumber: item.FeedetlSn,
3051
+//		}
3052
+//		customs = append(customs, cus)
3053
+//	}
3054
+//	his, _ := service.GetHisPatientInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
3055
+//
3056
+//	verifyCode, version_code := ReadCardGetCode("FY002" + "|" + order.OrgSetlNumber + "|" + miConfig.Code)
3057
+//
3058
+//	var pagesize int = 50
3059
+//	var start int = 1
3060
+//	var stop int
3061
+//	var pagecount int
3062
+//	var curpage int
3063
+//	var isSuccess bool = true
3064
+//	var ress []*ResultFive
3065
+//
3066
+//	//总页数,向上取整,注意除之前要先转换类型为float64
3067
+//	pagecount = int(math.Ceil(float64(len(customs)) / float64(pagesize)))
3068
+//
3069
+//	for curpage = 1; curpage <= pagecount; curpage++ {
3070
+//		if curpage == 1 {
3071
+//			start = 1
3072
+//		} else {
3073
+//			start = (curpage-1)*pagesize + 1
3074
+//		}
3075
+//		stop = curpage * pagesize
3076
+//		if stop > len(customs) {
3077
+//			stop = len(customs)
3078
+//		}
3079
+//
3080
+//		result := service.SzybFY002(doctor_name, doctor_code, miConfig.Code, customs[start-1:stop], verifyCode, order.OrgSetlNumber, his.Number, version_code)
3081
+//		fmt.Println(result)
3082
+//
3083
+//		var dat map[string]interface{}
3084
+//		if err := json.Unmarshal([]byte(result), &dat); err == nil {
3085
+//			fmt.Println(dat)
3086
+//		} else {
3087
+//			fmt.Println(err)
3088
+//		}
3089
+//		userJSONBytes, _ := json.Marshal(dat)
3090
+//		var res ResultFive
3091
+//		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
3092
+//			utils.ErrorLog("解析失败:%v", err)
3093
+//			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3094
+//			return
3095
+//		}
3096
+//		if res.Transreturncode == "00000000" {
3097
+//			ress = append(ress, &res)
3098
+//		} else {
3099
+//			isSuccess = false
3100
+//			//预结算报错
3101
+//			errlog := &models.HisOrderError{
3102
+//				UserOrgId:  adminUser.CurrentOrgId,
3103
+//				Ctime:      time.Now().Unix(),
3104
+//				Mtime:      time.Now().Unix(),
3105
+//				ErrMsg:     res.Transreturnmessage,
3106
+//				Status:     1,
3107
+//				PatientId:  patient_id,
3108
+//				RecordTime: recordDateTime,
3109
+//				Stage:      11,
3110
+//			}
3111
+//			service.CreateErrMsgLog(errlog)
3112
+//
3113
+//			c.ServeSuccessJSON(map[string]interface{}{
3114
+//				"faild_code": -10,
3115
+//				"msg":        res.Transreturnmessage,
3116
+//			})
3117
+//			return
3118
+//		}
3119
+//	}
3120
+//	if isSuccess == true {
3121
+//		service.UpdataOrderInfoStatus(order.ID, order.Number, adminUser.CurrentOrgId)
3122
+//		c.ServeSuccessJSON(map[string]interface{}{
3123
+//			"msg": "撤销成功",
3124
+//		})
3125
+//	}
3126
+//}
3127
 
3127
 
3128
 //获取verifyCode
3128
 //获取verifyCode
3129
 //func ReadCardGetCode(request string) (string, string) {
3129
 //func ReadCardGetCode(request string) (string, string) {
3325
 		detail := &models.DrugDetail{
3325
 		detail := &models.DrugDetail{
3326
 
3326
 
3327
 			MedicalInsuranceNumber: item.MedicalInsuranceNumber,
3327
 			MedicalInsuranceNumber: item.MedicalInsuranceNumber,
3328
-			Code:             item.Code,
3329
-			DrugName:         item.DrugName,
3330
-			DrugSpec:         item.DrugSpec,
3331
-			DrugDosageName:   item.DrugDosageName,
3332
-			ManufacturerName: item.ManufacturerName,
3333
-			MinUnit:          item.MinUnit,
3334
-			RetailPrice:      item.RetailPrice,
3335
-			LastPrice:        item.LastPrice,
3336
-			LimitRemark:      item.LimitRemark,
3328
+			Code:                   item.Code,
3329
+			DrugName:               item.DrugName,
3330
+			DrugSpec:               item.DrugSpec,
3331
+			DrugDosageName:         item.DrugDosageName,
3332
+			ManufacturerName:       item.ManufacturerName,
3333
+			MinUnit:                item.MinUnit,
3334
+			RetailPrice:            item.RetailPrice,
3335
+			LastPrice:              item.LastPrice,
3336
+			LimitRemark:            item.LimitRemark,
3337
 		}
3337
 		}
3338
 
3338
 
3339
 		result := service.SzybML008(doctor_name, doctor_code, miConfig.Code, detail)
3339
 		result := service.SzybML008(doctor_name, doctor_code, miConfig.Code, detail)
3497
 					detail := &models.DrugDetail{
3497
 					detail := &models.DrugDetail{
3498
 
3498
 
3499
 						SocialSecurityDirectoryCode: item.MedicalInsuranceNumber, //社保目录
3499
 						SocialSecurityDirectoryCode: item.MedicalInsuranceNumber, //社保目录
3500
-						Code:                   item.Code,     //协议机构内部目录编码
3501
-						DrugName:               item.DrugName, //协议机构内部目录名称
3502
-						DrugSpec:               item.DrugSpec,
3503
-						ManufacturerName:       item.ManufacturerName,
3504
-						MinUnit:                item.MinUnit,
3505
-						RetailPrice:            item.RetailPrice, //协议机构内部项目收费价格
3506
-						LimitRemark:            item.LimitRemark,
3507
-						MedicalInsuranceNumber: item.MedicalInsuranceNumber, //社保目录
3500
+						Code:                        item.Code,                   //协议机构内部目录编码
3501
+						DrugName:                    item.DrugName,               //协议机构内部目录名称
3502
+						DrugSpec:                    item.DrugSpec,
3503
+						ManufacturerName:            item.ManufacturerName,
3504
+						MinUnit:                     item.MinUnit,
3505
+						RetailPrice:                 item.RetailPrice, //协议机构内部项目收费价格
3506
+						LimitRemark:                 item.LimitRemark,
3507
+						MedicalInsuranceNumber:      item.MedicalInsuranceNumber, //社保目录
3508
 					}
3508
 					}
3509
 					customs = append(customs, detail)
3509
 					customs = append(customs, detail)
3510
 				}
3510
 				}
3582
 				detail := &models.DrugDetail{
3582
 				detail := &models.DrugDetail{
3583
 					MedicalInsuranceNumber:      item.MedicalInsuranceNumber,
3583
 					MedicalInsuranceNumber:      item.MedicalInsuranceNumber,
3584
 					SocialSecurityDirectoryCode: item.MedicalInsuranceNumber,
3584
 					SocialSecurityDirectoryCode: item.MedicalInsuranceNumber,
3585
-					Code:             item.Code,
3586
-					DrugName:         item.DrugName,
3587
-					DrugSpec:         item.DrugSpec,
3588
-					DrugDosageName:   item.DrugDosageName,
3589
-					ManufacturerName: item.ManufacturerName,
3590
-					MinUnit:          item.MinUnit,
3591
-					RetailPrice:      item.RetailPrice,
3592
-					LastPrice:        item.LastPrice,
3593
-					LimitRemark:      item.LimitRemark,
3585
+					Code:                        item.Code,
3586
+					DrugName:                    item.DrugName,
3587
+					DrugSpec:                    item.DrugSpec,
3588
+					DrugDosageName:              item.DrugDosageName,
3589
+					ManufacturerName:            item.ManufacturerName,
3590
+					MinUnit:                     item.MinUnit,
3591
+					RetailPrice:                 item.RetailPrice,
3592
+					LastPrice:                   item.LastPrice,
3593
+					LimitRemark:                 item.LimitRemark,
3594
 				}
3594
 				}
3595
 
3595
 
3596
 				result := service.SzybML008(doctor_name, doctor_code, miConfig.Code, detail)
3596
 				result := service.SzybML008(doctor_name, doctor_code, miConfig.Code, detail)
3958
 	for _, item := range list {
3958
 	for _, item := range list {
3959
 		fmt.Println("医护类别", item.StudyMajorName)
3959
 		fmt.Println("医护类别", item.StudyMajorName)
3960
 		detail := &models.DocDetail{
3960
 		detail := &models.DocDetail{
3961
-			UserName:                     item.UserName,                               //医护姓名
3962
-			RoleId:                       item.Name,                                   //医护人员类别
3963
-			Sex:                          strconv.FormatInt(item.Sex, 10),             //性别
3964
-			CardType:                     strconv.FormatInt(item.CardType, 10),        //证件类型
3965
-			IdCard:                       item.IdCard,                                 //证件号码
3966
-			Phone:                        item.Mobile,                                 //联系电话
3967
-			WorkMajorName:                item.WorkMajorName,                          // 现从事专业名称
3968
-			Nation:                       item.Nation,                                 //民族
3969
-			BirthDay:                     20201022,                                    // 出生日期
3970
-			WorkTime:                     20201022,                                    //参加工作日期
3971
-			Education:                    strconv.FormatInt(item.Education, 10),       //学历
3972
-			StudyMajorName:               item.StudyMajorName,                         //所学的专业名称
3973
-			CertificateCode:              item.MedicalCode,                            //医(药)师执业证书编码
3974
-			MedicalCode:                  item.DoctorCode,                             //医(药)师资格证编码
3975
-			MedicalRangeCode:             strconv.FormatInt(item.DoctorRangeCode, 10), //医师执业范围代码
3976
-			MedicalLevel:                 strconv.FormatInt(item.DoctorLevel, 10),     //医生执业资格证中的医师级别
3977
-			TypeJob:                      strconv.FormatInt(item.DoctorTypeJob, 10),   //医生执业资格证中的执业类别
3978
-			DoctorNumber:                 item.DoctorNumber,                           //医保医师编号
3979
-			Licensing:                    strconv.FormatInt(item.Licensing, 10),       //多点执业标志
3980
-			DoctorServiceStatus:          "",                                          //医师医保服务资格状态
3981
-			MonitoringLevel:              "",                                          //监控等级
3982
-			DrugPsychotropicSubstances:   "",                                          //毒麻精神药品资格
3983
-			HealthCareCode:               "",                                          // 母婴保健技术考核合格证书编号
3984
-			PlanningTechnicalServiceCode: "",                                          //计划生育技术服务人员合格证编号
3985
-			PharmacistType:               "",                                          //药师类别
3986
-			PharmacistPracticeCategory:   "",                                          //药师执业类别
3987
-			PharmacistsLicensing:         "",                                          //药师执业范围
3988
-			PharmacistRegistrationNumber: "",                                          //执业药师注册证编号
3989
-			OfficeCode:                   "",                                          //科室编码
3990
-			JobNumber:                    item.JobNumber,                              //工号
3991
-			PostName:                     "",                                          //职位名称
3992
-			TechnicalJobLevelCode:        "",                                          //专业技术职务级别编码
3993
-			IsActive:                     strconv.FormatInt(item.IsActive, 10),        //在职与否
3961
+			UserName:                                item.UserName,                                                       //医护姓名
3962
+			RoleId:                                  item.Name,                                                           //医护人员类别
3963
+			Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
3964
+			CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
3965
+			IdCard:                                  item.IdCard,                                                         //证件号码
3966
+			Phone:                                   item.Mobile,                                                         //联系电话
3967
+			WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
3968
+			Nation:                                  item.Nation,                                                         //民族
3969
+			BirthDay:                                20201022,                                                            // 出生日期
3970
+			WorkTime:                                20201022,                                                            //参加工作日期
3971
+			Education:                               strconv.FormatInt(item.Education, 10),                               //学历
3972
+			StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
3973
+			CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
3974
+			MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
3975
+			MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代码
3976
+			MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
3977
+			TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类别
3978
+			DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
3979
+			Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
3980
+			DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
3981
+			MonitoringLevel:                         "",                                                                  //监控等级
3982
+			DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
3983
+			HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
3984
+			PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
3985
+			PharmacistType:                          "",                                                                  //药师类别
3986
+			PharmacistPracticeCategory:              "",                                                                  //药师执业类别
3987
+			PharmacistsLicensing:                    "",                                                                  //药师执业范围
3988
+			PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
3989
+			OfficeCode:                              "",                                                                  //科室编码
3990
+			JobNumber:                               item.JobNumber,                                                      //工号
3991
+			PostName:                                "",                                                                  //职位名称
3992
+			TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
3993
+			IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
3994
 			PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
3994
 			PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
3995
 			IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
3995
 			IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
3996
 			OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
3996
 			OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
4072
 			fmt.Println("医护类别", item.Mobile)
4072
 			fmt.Println("医护类别", item.Mobile)
4073
 
4073
 
4074
 			detail := &models.DocDetail{
4074
 			detail := &models.DocDetail{
4075
-				UserName:                     item.UserName,                               //医护姓名
4076
-				RoleId:                       item.Name,                                   //医护人员类别
4077
-				Sex:                          strconv.FormatInt(item.Sex, 10),             //性别
4078
-				CardType:                     strconv.FormatInt(item.CardType, 10),        //证件类型
4079
-				IdCard:                       item.IdCard,                                 //证件号码
4080
-				Phone:                        item.Mobile,                                 //联系电话
4081
-				WorkMajorName:                item.WorkMajorName,                          // 现从事专业名称
4082
-				Nation:                       item.Nation,                                 //民族
4083
-				BirthDay:                     20201022,                                    // 出生日期
4084
-				WorkTime:                     20201022,                                    //参加工作日期
4085
-				Education:                    strconv.FormatInt(item.Education, 10),       //学历
4086
-				StudyMajorName:               item.StudyMajorName,                         //所学的专业名称
4087
-				CertificateCode:              item.MedicalCode,                            //医(药)师执业证书编码
4088
-				MedicalCode:                  item.DoctorCode,                             //医(药)师资格证编码
4089
-				MedicalRangeCode:             strconv.FormatInt(item.DoctorRangeCode, 10), //医师执业范围代码
4090
-				MedicalLevel:                 strconv.FormatInt(item.DoctorLevel, 10),     //医生执业资格证中的医师级别
4091
-				TypeJob:                      strconv.FormatInt(item.DoctorTypeJob, 10),   //医生执业资格证中的执业类别
4092
-				DoctorNumber:                 item.DoctorNumber,                           //医保医师编号
4093
-				Licensing:                    strconv.FormatInt(item.Licensing, 10),       //多点执业标志
4094
-				DoctorServiceStatus:          "",                                          //医师医保服务资格状态
4095
-				MonitoringLevel:              "",                                          //监控等级
4096
-				DrugPsychotropicSubstances:   "",                                          //毒麻精神药品资格
4097
-				HealthCareCode:               "",                                          // 母婴保健技术考核合格证书编号
4098
-				PlanningTechnicalServiceCode: "",                                          //计划生育技术服务人员合格证编号
4099
-				PharmacistType:               "",                                          //药师类别
4100
-				PharmacistPracticeCategory:   "",                                          //药师执业类别
4101
-				PharmacistsLicensing:         "",                                          //药师执业范围
4102
-				PharmacistRegistrationNumber: "",                                          //执业药师注册证编号
4103
-				OfficeCode:                   "",                                          //科室编码
4104
-				JobNumber:                    item.JobNumber,                              //工号
4105
-				PostName:                     "",                                          //职位名称
4106
-				TechnicalJobLevelCode:        "",                                          //专业技术职务级别编码
4107
-				IsActive:                     strconv.FormatInt(item.IsActive, 10),        //在职与否
4075
+				UserName:                                item.UserName,                                                       //医护姓名
4076
+				RoleId:                                  item.Name,                                                           //医护人员类别
4077
+				Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
4078
+				CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
4079
+				IdCard:                                  item.IdCard,                                                         //证件号码
4080
+				Phone:                                   item.Mobile,                                                         //联系电话
4081
+				WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
4082
+				Nation:                                  item.Nation,                                                         //民族
4083
+				BirthDay:                                20201022,                                                            // 出生日期
4084
+				WorkTime:                                20201022,                                                            //参加工作日期
4085
+				Education:                               strconv.FormatInt(item.Education, 10),                               //学历
4086
+				StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
4087
+				CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
4088
+				MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
4089
+				MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代码
4090
+				MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
4091
+				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类别
4092
+				DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
4093
+				Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
4094
+				DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
4095
+				MonitoringLevel:                         "",                                                                  //监控等级
4096
+				DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
4097
+				HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
4098
+				PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
4099
+				PharmacistType:                          "",                                                                  //药师类别
4100
+				PharmacistPracticeCategory:              "",                                                                  //药师执业类别
4101
+				PharmacistsLicensing:                    "",                                                                  //药师执业范围
4102
+				PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
4103
+				OfficeCode:                              "",                                                                  //科室编码
4104
+				JobNumber:                               item.JobNumber,                                                      //工号
4105
+				PostName:                                "",                                                                  //职位名称
4106
+				TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
4107
+				IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
4108
 				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
4108
 				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
4109
 				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
4109
 				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
4110
 				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
4110
 				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
4172
 		for _, item := range list {
4172
 		for _, item := range list {
4173
 			fmt.Println("医护类别", item.Name)
4173
 			fmt.Println("医护类别", item.Name)
4174
 			detail := &models.DocDetail{
4174
 			detail := &models.DocDetail{
4175
-				UserName:                     item.UserName,                               //医护姓名
4176
-				RoleId:                       item.Name,                                   //医护人员类别
4177
-				Sex:                          strconv.FormatInt(item.Sex, 10),             //性别
4178
-				CardType:                     strconv.FormatInt(item.CardType, 10),        //证件类型
4179
-				IdCard:                       item.IdCard,                                 //证件号码
4180
-				Phone:                        item.Mobile,                                 //联系电话
4181
-				WorkMajorName:                item.WorkMajorName,                          // 现从事专业名称
4182
-				Nation:                       item.Nation,                                 //民族
4183
-				BirthDay:                     20201022,                                    // 出生日期
4184
-				WorkTime:                     20201022,                                    //参加工作日期
4185
-				Education:                    strconv.FormatInt(item.Education, 10),       //学历
4186
-				StudyMajorName:               item.StudyMajorName,                         //所学的专业名称
4187
-				CertificateCode:              item.MedicalCode,                            //医(药)师执业证书编码
4188
-				MedicalCode:                  item.DoctorCode,                             //医(药)师资格证编码
4189
-				MedicalRangeCode:             strconv.FormatInt(item.DoctorRangeCode, 10), //医师执业范围代码
4190
-				MedicalLevel:                 strconv.FormatInt(item.DoctorLevel, 10),     //医生执业资格证中的医师级别
4191
-				TypeJob:                      strconv.FormatInt(item.DoctorTypeJob, 10),   //医生执业资格证中的执业类别
4192
-				DoctorNumber:                 item.DoctorNumber,                           //医保医师编号
4193
-				Licensing:                    strconv.FormatInt(item.Licensing, 10),       //多点执业标志
4194
-				DoctorServiceStatus:          "",                                          //医师医保服务资格状态
4195
-				MonitoringLevel:              "",                                          //监控等级
4196
-				DrugPsychotropicSubstances:   "",                                          //毒麻精神药品资格
4197
-				HealthCareCode:               "",                                          // 母婴保健技术考核合格证书编号
4198
-				PlanningTechnicalServiceCode: "",                                          //计划生育技术服务人员合格证编号
4199
-				PharmacistType:               "",                                          //药师类别
4200
-				PharmacistPracticeCategory:   "",                                          //药师执业类别
4201
-				PharmacistsLicensing:         "",                                          //药师执业范围
4202
-				PharmacistRegistrationNumber: "",                                          //执业药师注册证编号
4203
-				OfficeCode:                   "",                                          //科室编码
4204
-				JobNumber:                    item.JobNumber,                              //工号
4205
-				PostName:                     "",                                          //职位名称
4206
-				TechnicalJobLevelCode:        "",                                          //专业技术职务级别编码
4207
-				IsActive:                     strconv.FormatInt(item.IsActive, 10),        //在职与否
4175
+				UserName:                                item.UserName,                                                       //医护姓名
4176
+				RoleId:                                  item.Name,                                                           //医护人员类别
4177
+				Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
4178
+				CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
4179
+				IdCard:                                  item.IdCard,                                                         //证件号码
4180
+				Phone:                                   item.Mobile,                                                         //联系电话
4181
+				WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
4182
+				Nation:                                  item.Nation,                                                         //民族
4183
+				BirthDay:                                20201022,                                                            // 出生日期
4184
+				WorkTime:                                20201022,                                                            //参加工作日期
4185
+				Education:                               strconv.FormatInt(item.Education, 10),                               //学历
4186
+				StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
4187
+				CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
4188
+				MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
4189
+				MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代码
4190
+				MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
4191
+				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类别
4192
+				DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
4193
+				Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
4194
+				DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
4195
+				MonitoringLevel:                         "",                                                                  //监控等级
4196
+				DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
4197
+				HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
4198
+				PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
4199
+				PharmacistType:                          "",                                                                  //药师类别
4200
+				PharmacistPracticeCategory:              "",                                                                  //药师执业类别
4201
+				PharmacistsLicensing:                    "",                                                                  //药师执业范围
4202
+				PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
4203
+				OfficeCode:                              "",                                                                  //科室编码
4204
+				JobNumber:                               item.JobNumber,                                                      //工号
4205
+				PostName:                                "",                                                                  //职位名称
4206
+				TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
4207
+				IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
4208
 				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
4208
 				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
4209
 				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
4209
 				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
4210
 				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
4210
 				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
4297
 		for _, item := range list {
4297
 		for _, item := range list {
4298
 			fmt.Println("医护类别", item.Name)
4298
 			fmt.Println("医护类别", item.Name)
4299
 			detail := &models.DocDetail{
4299
 			detail := &models.DocDetail{
4300
-				StaffCode:                    "",            //医护人员编码
4301
-				UserName:                     item.UserName, //医护人员姓名
4302
-				RoleId:                       item.Name,     //医护人员类别
4303
-				Sex:                          "",            //性别
4304
-				CardType:                     "",            //证件类型
4305
-				IdCard:                       "",            //证件号码
4306
-				Phone:                        "",            //联系电话
4307
-				WorkMajorName:                "",            //现从事专业名称
4308
-				Nation:                       "",            //民族
4309
-				BirthDay:                     20201022,      //出生日期
4310
-				WorkTime:                     12,            //参加工作日期
4311
-				Education:                    "",            //学历
4312
-				StudyMajorName:               "",            //所学的专业名称
4313
-				CertificateCode:              "",            //证书编码
4314
-				MedicalCode:                  "",            //医师资格编码
4315
-				MedicalRangeCode:             "",            //医师执业范围代码
4316
-				MedicalLevel:                 "",            //医生级别
4317
-				TypeJob:                      "",            //职业类别
4318
-				DoctorNumber:                 "",            //医师编号
4319
-				Licensing:                    "",            //职业标志
4320
-				DoctorServiceStatus:          "",            //医师医保服务资格状态
4321
-				MonitoringLevel:              "",            //监控等级
4322
-				DrugPsychotropicSubstances:   "",            //毒麻精神药品资格
4323
-				HealthCareCode:               "",            // 母婴保健技术考核合格证书编号
4324
-				PlanningTechnicalServiceCode: "",            //计划生育技术服务人员合格证编号
4325
-				PharmacistType:               "",            //药师类别
4326
-				PharmacistPracticeCategory:   "",            //药师执业类别
4327
-				PharmacistsLicensing:         "",            //药师执业范围
4328
-				PharmacistRegistrationNumber: "",            //执业药师注册证编号
4329
-				OfficeCode:                   "",            //科室编码
4330
-				JobNumber:                    "",            //工号
4331
-				PostName:                     "",            //职位名称
4332
-				TechnicalJobLevelCode:        "",            //专业技术职务级别编码
4333
-				IsActive:                     "",            //在职与否
4334
-				PrescriptionQualificationIdentification: "",   //处方资格标识
4335
-				IdentificationOutpatients:               "",   //门诊大病医师标识
4336
-				OutpatientIllnessCategory:               "",   //门诊大病类别
4337
-				StartTime:                               1233, //开始日期
4300
+				StaffCode:                               "",            //医护人员编码
4301
+				UserName:                                item.UserName, //医护人员姓名
4302
+				RoleId:                                  item.Name,     //医护人员类别
4303
+				Sex:                                     "",            //性别
4304
+				CardType:                                "",            //证件类型
4305
+				IdCard:                                  "",            //证件号码
4306
+				Phone:                                   "",            //联系电话
4307
+				WorkMajorName:                           "",            //现从事专业名称
4308
+				Nation:                                  "",            //民族
4309
+				BirthDay:                                20201022,      //出生日期
4310
+				WorkTime:                                12,            //参加工作日期
4311
+				Education:                               "",            //学历
4312
+				StudyMajorName:                          "",            //所学的专业名称
4313
+				CertificateCode:                         "",            //证书编码
4314
+				MedicalCode:                             "",            //医师资格编码
4315
+				MedicalRangeCode:                        "",            //医师执业范围代码
4316
+				MedicalLevel:                            "",            //医生级别
4317
+				TypeJob:                                 "",            //职业类别
4318
+				DoctorNumber:                            "",            //医师编号
4319
+				Licensing:                               "",            //职业标志
4320
+				DoctorServiceStatus:                     "",            //医师医保服务资格状态
4321
+				MonitoringLevel:                         "",            //监控等级
4322
+				DrugPsychotropicSubstances:              "",            //毒麻精神药品资格
4323
+				HealthCareCode:                          "",            // 母婴保健技术考核合格证书编号
4324
+				PlanningTechnicalServiceCode:            "",            //计划生育技术服务人员合格证编号
4325
+				PharmacistType:                          "",            //药师类别
4326
+				PharmacistPracticeCategory:              "",            //药师执业类别
4327
+				PharmacistsLicensing:                    "",            //药师执业范围
4328
+				PharmacistRegistrationNumber:            "",            //执业药师注册证编号
4329
+				OfficeCode:                              "",            //科室编码
4330
+				JobNumber:                               "",            //工号
4331
+				PostName:                                "",            //职位名称
4332
+				TechnicalJobLevelCode:                   "",            //专业技术职务级别编码
4333
+				IsActive:                                "",            //在职与否
4334
+				PrescriptionQualificationIdentification: "",            //处方资格标识
4335
+				IdentificationOutpatients:               "",            //门诊大病医师标识
4336
+				OutpatientIllnessCategory:               "",            //门诊大病类别
4337
+				StartTime:                               1233,          //开始日期
4338
 				EndTime:                                 123333,
4338
 				EndTime:                                 123333,
4339
 			}
4339
 			}
4340
 			customs = append(customs, detail)
4340
 			customs = append(customs, detail)
4456
 	GB18030 = Charset("GB18030")
4456
 	GB18030 = Charset("GB18030")
4457
 )
4457
 )
4458
 
4458
 
4459
-func ConvertToString(src string, srcCode string, tagCode string) string {
4460
-	srcCoder := mahonia.NewDecoder(srcCode)
4461
-	srcResult := srcCoder.ConvertString(src)
4462
-	tagCoder := mahonia.NewDecoder(tagCode)
4463
-	_, cdata, _ := tagCoder.Translate([]byte(srcResult), true)
4464
-	result := string(cdata)
4465
-	return result
4466
-}
4459
+//func ConvertToString(src string, srcCode string, tagCode string) string {
4460
+//	srcCoder := mahonia.NewDecoder(srcCode)
4461
+//	srcResult := srcCoder.ConvertString(src)
4462
+//	tagCoder := mahonia.NewDecoder(tagCode)
4463
+//	_, cdata, _ := tagCoder.Translate([]byte(srcResult), true)
4464
+//	result := string(cdata)
4465
+//	return result
4466
+//}