|
@@ -607,6 +607,7 @@ func SzybML008(doctor string, doctor_code string, fixmedins_code string, basedru
|
607
|
607
|
inputData := make(map[string]interface{})
|
608
|
608
|
inputMessage["transType"] = "JY003" // 交易编码
|
609
|
609
|
|
|
610
|
+ inputData["listsize"] = 1
|
610
|
611
|
inputMessage["transType"] = "ML008" // 交易编码S
|
611
|
612
|
feedetail := make([]map[string]interface{}, 0)
|
612
|
613
|
feedetailInfo := make(map[string]interface{})
|
|
@@ -835,8 +836,8 @@ func SzybML010(doctor string, doctor_code string, fixmedins_code string, datas [
|
835
|
836
|
for _, item := range datas {
|
836
|
837
|
feedetailInfo := make(map[string]interface{})
|
837
|
838
|
feedetailInfo["ake003"] = strconv.FormatInt(typeId, 10)
|
838
|
|
- feedetailInfo["ake001"] = item.MedicalInsuranceNumber //社保目录编码
|
839
|
|
- feedetailInfo["ake005"] = item.MedicalInsuranceNumber //协议机构内部目录编码
|
|
839
|
+ feedetailInfo["ake001"] = item.SocialSecurityDirectoryCode //社保目录编码
|
|
840
|
+ feedetailInfo["ake005"] = item.SocialSecurityDirectoryCode //协议机构内部目录编码
|
840
|
841
|
feedetail = append(feedetail, feedetailInfo)
|
841
|
842
|
}
|
842
|
843
|
|
|
@@ -878,58 +879,55 @@ func SzybML010(doctor string, doctor_code string, fixmedins_code string, datas [
|
878
|
879
|
|
879
|
880
|
}
|
880
|
881
|
|
881
|
|
-func SzybYS001(doctor string, doctor_code string, fixmedins_code string, datas []*models.DocDetail) string {
|
|
882
|
+func SzybYS001(doctor string, doctor_code string, fixmedins_code string, doc *models.DocDetail) string {
|
882
|
883
|
//生成输入报文
|
883
|
884
|
inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
|
884
|
885
|
|
885
|
886
|
inputData := make(map[string]interface{})
|
886
|
887
|
|
887
|
|
- inputData["listsize"] = len(datas)
|
|
888
|
+ inputData["listsize"] = 1
|
888
|
889
|
inputMessage["transType"] = "YS001" // 交易编码
|
889
|
890
|
feedetail := make([]map[string]interface{}, 0)
|
890
|
891
|
|
891
|
|
- for _, item := range datas {
|
892
|
|
- fmt.Println("item222222", item.RoleId)
|
893
|
|
- feedetailInfo := make(map[string]interface{})
|
894
|
|
- feedetailInfo["aac003"] = item.UserName
|
895
|
|
- feedetailInfo["bka633"] = "1"
|
896
|
|
- feedetailInfo["aac004"] = item.Sex
|
897
|
|
- feedetailInfo["aac058"] = item.CardType
|
898
|
|
- feedetailInfo["aac147"] = item.IdCard
|
899
|
|
- feedetailInfo["aae005"] = item.Phone
|
900
|
|
- feedetailInfo["bkc322"] = item.WorkMajorName
|
901
|
|
- feedetailInfo["aac005"] = item.Nation
|
902
|
|
- feedetailInfo["aac006"] = item.BirthDay
|
903
|
|
- feedetailInfo["aac007"] = item.WorkTime
|
904
|
|
- feedetailInfo["aac011"] = item.Education
|
905
|
|
- feedetailInfo["aac183"] = item.StudyMajorName
|
906
|
|
- feedetailInfo["bkc323"] = item.CertificateCode
|
907
|
|
- feedetailInfo["bke955"] = item.MedicalCode
|
908
|
|
- feedetailInfo["akc055"] = item.MedicalRangeCode
|
909
|
|
- feedetailInfo["bcc950"] = item.MedicalLevel
|
910
|
|
- feedetailInfo["bcc955"] = item.TypeJob
|
911
|
|
- feedetailInfo["bka503"] = item.DoctorNumber
|
912
|
|
- feedetailInfo["bkc324"] = item.Licensing
|
913
|
|
- feedetailInfo["bkc326"] = item.DoctorServiceStatus
|
914
|
|
- feedetailInfo["bkc328"] = item.MonitoringLevel
|
915
|
|
- feedetailInfo["bkc329"] = item.DrugPsychotropicSubstances
|
916
|
|
- feedetailInfo["bke801"] = item.HealthCareCode
|
917
|
|
- feedetailInfo["bkc330"] = item.PlanningTechnicalServiceCode
|
918
|
|
- feedetailInfo["bkc332"] = item.PharmacistType
|
919
|
|
- feedetailInfo["bkc333"] = item.PharmacistPracticeCategory
|
920
|
|
- feedetailInfo["bkc334"] = item.PharmacistsLicensing
|
921
|
|
- feedetailInfo["bkc335"] = item.PharmacistRegistrationNumber
|
922
|
|
- feedetailInfo["akf001"] = item.OfficeCode
|
923
|
|
- feedetailInfo["acc501"] = item.JobNumber
|
924
|
|
- feedetailInfo["ahc451"] = item.PostName
|
925
|
|
- feedetailInfo["aaf009"] = item.TechnicalJobLevelCode
|
926
|
|
- feedetailInfo["bkc321"] = item.IsActive
|
927
|
|
- feedetailInfo["ckc302"] = item.PrescriptionQualificationIdentification
|
928
|
|
- feedetailInfo["bkc325"] = item.IdentificationOutpatients
|
929
|
|
- feedetailInfo["ckc304"] = item.OutpatientIllnessCategory
|
930
|
|
- feedetailInfo["aae030"] = item.StartTime
|
931
|
|
- feedetail = append(feedetail, feedetailInfo)
|
932
|
|
- }
|
|
892
|
+ feedetailInfo := make(map[string]interface{})
|
|
893
|
+ feedetailInfo["aac003"] = doc.UserName //医护人员姓名
|
|
894
|
+ feedetailInfo["bka633"] = "1" //医护人员类别
|
|
895
|
+ feedetailInfo["aac004"] = doc.Sex //性别
|
|
896
|
+ feedetailInfo["aac058"] = doc.CardType //证件类型
|
|
897
|
+ feedetailInfo["aac147"] = doc.IdCard //证件号码
|
|
898
|
+ feedetailInfo["aae005"] = doc.Phone //联系电话
|
|
899
|
+ feedetailInfo["bkc322"] = doc.WorkMajorName //现从事专业名称
|
|
900
|
+ feedetailInfo["aac005"] = doc.Nation //民族
|
|
901
|
+ feedetailInfo["aac006"] = doc.BirthDay //出生日期
|
|
902
|
+ feedetailInfo["aac007"] = doc.WorkTime //参加工作日期
|
|
903
|
+ feedetailInfo["aac011"] = doc.Education //学历
|
|
904
|
+ feedetailInfo["aac183"] = doc.StudyMajorName //所学的专业名称
|
|
905
|
+ feedetailInfo["bkc323"] = doc.CertificateCode //医(药)师执业证书编码
|
|
906
|
+ feedetailInfo["bke955"] = doc.MedicalCode //医(药)师资格证编码
|
|
907
|
+ feedetailInfo["akc055"] = doc.MedicalRangeCode // 医师执业范围代码
|
|
908
|
+ feedetailInfo["bcc950"] = doc.MedicalLevel //医生执业资格证中的医师级别
|
|
909
|
+ feedetailInfo["bcc955"] = doc.TypeJob //医生执业资格证中的执业类别
|
|
910
|
+ feedetailInfo["bka503"] = doc.DoctorNumber //医保医师编号
|
|
911
|
+ feedetailInfo["bkc324"] = doc.Licensing //多点执业标志
|
|
912
|
+ feedetailInfo["bkc326"] = doc.DoctorServiceStatus //医师医保服务资格状态
|
|
913
|
+ feedetailInfo["bkc328"] = doc.MonitoringLevel //监控等级
|
|
914
|
+ feedetailInfo["bkc329"] = doc.DrugPsychotropicSubstances //毒麻精神药品资格
|
|
915
|
+ feedetailInfo["bke801"] = doc.HealthCareCode //母婴保健技术考核合格证书编号
|
|
916
|
+ feedetailInfo["bkc330"] = doc.PlanningTechnicalServiceCode //bkc330 计划生育技术服务人员合格证编号
|
|
917
|
+ feedetailInfo["bkc332"] = doc.PharmacistType //药师类别
|
|
918
|
+ feedetailInfo["bkc333"] = doc.PharmacistPracticeCategory //药师执业类别
|
|
919
|
+ feedetailInfo["bkc334"] = doc.PharmacistsLicensing //药师执业范围
|
|
920
|
+ feedetailInfo["bkc335"] = doc.PharmacistRegistrationNumber //执业药师注册证编号
|
|
921
|
+ feedetailInfo["akf001"] = doc.OfficeCode //所属科室编码
|
|
922
|
+ feedetailInfo["acc501"] = doc.JobNumber //工号
|
|
923
|
+ feedetailInfo["ahc451"] = doc.PostName //职务名称
|
|
924
|
+ feedetailInfo["aaf009"] = doc.TechnicalJobLevelCode //专业技术职务级别编码
|
|
925
|
+ feedetailInfo["bkc321"] = doc.IsActive //在职与否
|
|
926
|
+ feedetailInfo["ckc302"] = doc.PrescriptionQualificationIdentification //处方资格标识
|
|
927
|
+ feedetailInfo["bkc325"] = doc.IdentificationOutpatients //门诊大病医师 标识
|
|
928
|
+ feedetailInfo["ckc304"] = doc.OutpatientIllnessCategory //门诊大病类别
|
|
929
|
+ feedetailInfo["aae030"] = doc.StartTime //开始日期
|
|
930
|
+ feedetail = append(feedetail, feedetailInfo)
|
933
|
931
|
|
934
|
932
|
inputData["inputlist"] = feedetail
|
935
|
933
|
inputMessage["transBody"] = inputData
|
|
@@ -969,24 +967,112 @@ func SzybYS001(doctor string, doctor_code string, fixmedins_code string, datas [
|
969
|
967
|
|
970
|
968
|
}
|
971
|
969
|
|
972
|
|
-func SzybYS002(doctor string, doctor_code string, fixmedins_code string, datas []*models.DocDetail) string {
|
|
970
|
+//func SzybYS001(doctor string, doctor_code string, fixmedins_code string, datas []*models.DocDetail) string {
|
|
971
|
+// //生成输入报文
|
|
972
|
+// inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
|
|
973
|
+//
|
|
974
|
+// inputData := make(map[string]interface{})
|
|
975
|
+//
|
|
976
|
+// inputData["listsize"] = len(datas)
|
|
977
|
+// inputMessage["transType"] = "YS001" // 交易编码
|
|
978
|
+// feedetail := make([]map[string]interface{}, 0)
|
|
979
|
+//
|
|
980
|
+// for _, item := range datas {
|
|
981
|
+// fmt.Println("item222222", item.RoleId)
|
|
982
|
+// feedetailInfo := make(map[string]interface{})
|
|
983
|
+// feedetailInfo["aac003"] = item.UserName
|
|
984
|
+// feedetailInfo["bka633"] = "1"
|
|
985
|
+// feedetailInfo["aac004"] = item.Sex
|
|
986
|
+// feedetailInfo["aac058"] = item.CardType
|
|
987
|
+// feedetailInfo["aac147"] = item.IdCard
|
|
988
|
+// feedetailInfo["aae005"] = item.Phone
|
|
989
|
+// feedetailInfo["bkc322"] = item.WorkMajorName
|
|
990
|
+// feedetailInfo["aac005"] = item.Nation
|
|
991
|
+// feedetailInfo["aac006"] = item.BirthDay
|
|
992
|
+// feedetailInfo["aac007"] = item.WorkTime
|
|
993
|
+// feedetailInfo["aac011"] = item.Education
|
|
994
|
+// feedetailInfo["aac183"] = item.StudyMajorName
|
|
995
|
+// feedetailInfo["bkc323"] = item.CertificateCode
|
|
996
|
+// feedetailInfo["bke955"] = item.MedicalCode
|
|
997
|
+// feedetailInfo["akc055"] = item.MedicalRangeCode
|
|
998
|
+// feedetailInfo["bcc950"] = item.MedicalLevel
|
|
999
|
+// feedetailInfo["bcc955"] = item.TypeJob
|
|
1000
|
+// feedetailInfo["bka503"] = item.DoctorNumber
|
|
1001
|
+// feedetailInfo["bkc324"] = item.Licensing
|
|
1002
|
+// feedetailInfo["bkc326"] = item.DoctorServiceStatus
|
|
1003
|
+// feedetailInfo["bkc328"] = item.MonitoringLevel
|
|
1004
|
+// feedetailInfo["bkc329"] = item.DrugPsychotropicSubstances
|
|
1005
|
+// feedetailInfo["bke801"] = item.HealthCareCode
|
|
1006
|
+// feedetailInfo["bkc330"] = item.PlanningTechnicalServiceCode
|
|
1007
|
+// feedetailInfo["bkc332"] = item.PharmacistType
|
|
1008
|
+// feedetailInfo["bkc333"] = item.PharmacistPracticeCategory
|
|
1009
|
+// feedetailInfo["bkc334"] = item.PharmacistsLicensing
|
|
1010
|
+// feedetailInfo["bkc335"] = item.PharmacistRegistrationNumber
|
|
1011
|
+// feedetailInfo["akf001"] = item.OfficeCode
|
|
1012
|
+// feedetailInfo["acc501"] = item.JobNumber
|
|
1013
|
+// feedetailInfo["ahc451"] = item.PostName
|
|
1014
|
+// feedetailInfo["aaf009"] = item.TechnicalJobLevelCode
|
|
1015
|
+// feedetailInfo["bkc321"] = item.IsActive
|
|
1016
|
+// feedetailInfo["ckc302"] = item.PrescriptionQualificationIdentification
|
|
1017
|
+// feedetailInfo["bkc325"] = item.IdentificationOutpatients
|
|
1018
|
+// feedetailInfo["ckc304"] = item.OutpatientIllnessCategory
|
|
1019
|
+// feedetailInfo["aae030"] = item.StartTime
|
|
1020
|
+// feedetail = append(feedetail, feedetailInfo)
|
|
1021
|
+// }
|
|
1022
|
+//
|
|
1023
|
+// inputData["inputlist"] = feedetail
|
|
1024
|
+// inputMessage["transBody"] = inputData
|
|
1025
|
+//
|
|
1026
|
+// bytesData, err := json.Marshal(inputMessage)
|
|
1027
|
+// fmt.Println(string(bytesData))
|
|
1028
|
+// if err != nil {
|
|
1029
|
+// fmt.Println(err.Error())
|
|
1030
|
+// return err.Error()
|
|
1031
|
+// }
|
|
1032
|
+// reader := bytes.NewReader(bytesData)
|
|
1033
|
+// //url := "http://192.168.1.99:10000"
|
|
1034
|
+// url := "http://192.168.1.228:17001/szsi-portal/transData"
|
|
1035
|
+//
|
|
1036
|
+// request, err := http.NewRequest("POST", url, reader)
|
|
1037
|
+// if err != nil {
|
|
1038
|
+// fmt.Println(err.Error())
|
|
1039
|
+// return err.Error()
|
|
1040
|
+// }
|
|
1041
|
+//
|
|
1042
|
+// request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
|
1043
|
+//
|
|
1044
|
+// client := http.Client{}
|
|
1045
|
+// resp, err := client.Do(request)
|
|
1046
|
+// if err != nil {
|
|
1047
|
+// fmt.Println(err.Error())
|
|
1048
|
+// return err.Error()
|
|
1049
|
+// }
|
|
1050
|
+// respBytes, err := ioutil.ReadAll(resp.Body)
|
|
1051
|
+// if err != nil {
|
|
1052
|
+// fmt.Println(err.Error())
|
|
1053
|
+// return err.Error()
|
|
1054
|
+// }
|
|
1055
|
+// fmt.Println(string(respBytes))
|
|
1056
|
+// str := string(respBytes)
|
|
1057
|
+// return str
|
|
1058
|
+//
|
|
1059
|
+//}
|
|
1060
|
+
|
|
1061
|
+func SzybYS002(doctor string, doctor_code string, fixmedins_code string, datas *models.DocDetail) string {
|
973
|
1062
|
|
974
|
1063
|
//生成输入报文
|
975
|
1064
|
inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
|
976
|
1065
|
|
977
|
1066
|
inputData := make(map[string]interface{})
|
978
|
1067
|
|
979
|
|
- inputData["listsize"] = len(datas)
|
|
1068
|
+ inputData["listsize"] = 1
|
980
|
1069
|
inputMessage["transType"] = "YS002" // 交易编码
|
981
|
1070
|
feedetail := make([]map[string]interface{}, 0)
|
982
|
1071
|
|
983
|
|
- for _, item := range datas {
|
984
|
|
- fmt.Println("item2222", item)
|
985
|
|
- feedetailInfo := make(map[string]interface{})
|
986
|
|
- feedetailInfo["bkc320"] = "H27224269"
|
987
|
|
- feedetailInfo["bke155"] = "4"
|
988
|
|
- feedetail = append(feedetail, feedetailInfo)
|
989
|
|
- }
|
|
1072
|
+ feedetailInfo := make(map[string]interface{})
|
|
1073
|
+ feedetailInfo["bkc320"] = datas.DoctorNumber
|
|
1074
|
+ feedetailInfo["bke155"] = "4"
|
|
1075
|
+ feedetail = append(feedetail, feedetailInfo)
|
990
|
1076
|
|
991
|
1077
|
inputData["inputlist"] = feedetail
|
992
|
1078
|
inputMessage["transBody"] = inputData
|
|
@@ -1123,24 +1209,23 @@ func SzybYML007(doctor string, doctor_code string, fixmedins_code string, infor
|
1123
|
1209
|
inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
|
1124
|
1210
|
|
1125
|
1211
|
inputData := make(map[string]interface{})
|
1126
|
|
-
|
|
1212
|
+ inputData["listsize"] = 1
|
1127
|
1213
|
inputMessage["transType"] = "ML007" // 交易编码
|
1128
|
1214
|
feedetail := make([]map[string]interface{}, 0)
|
1129
|
1215
|
|
1130
|
1216
|
feedetailInfo := make(map[string]interface{})
|
1131
|
1217
|
feedetailInfo["ake001"] = infor.SocialSecurityDirectoryCode // 社保目录编码
|
1132
|
|
- //feedetailInfo["ake001"] = "3333333333" // 社保目录编码
|
|
1218
|
+
|
1133
|
1219
|
feedetailInfo["ake005"] = infor.SocialSecurityDirectoryCode //协议机构内部目录编码
|
1134
|
|
- //feedetailInfo["ake006"] = item.GoodName //医药机构内部目录名称
|
1135
|
|
- feedetailInfo["ake006"] = "222222" //医药机构内部目录名称
|
1136
|
|
- feedetailInfo["bka053"] = infor.ManufacturerName //生产厂家
|
1137
|
|
- feedetailInfo["ake004"] = infor.ProductionType //生产地类别
|
1138
|
|
- feedetailInfo["ckf261"] = infor.SpecialMedical //特殊医用材料标识
|
1139
|
|
- feedetailInfo["aka067"] = "支" //计价单位
|
1140
|
|
- feedetailInfo["aka074"] = infor.SpecificationName //规格
|
1141
|
|
- feedetailInfo["bka505"] = infor.BuyPrice //进货价
|
1142
|
|
- feedetailInfo["bka506"] = infor.SellPrice // 收获价
|
1143
|
|
- feedetailInfo["aae013"] = infor.Remark //备注
|
|
1220
|
+ feedetailInfo["ake006"] = infor.GoodName //医药机构内部目录名称
|
|
1221
|
+ feedetailInfo["bka053"] = infor.ManufacturerName //生产厂家
|
|
1222
|
+ feedetailInfo["ake004"] = infor.ProductionType //生产地类别
|
|
1223
|
+ feedetailInfo["ckf261"] = infor.SpecialMedical //特殊医用材料标识
|
|
1224
|
+ feedetailInfo["aka067"] = "支" //计价单位
|
|
1225
|
+ feedetailInfo["aka074"] = infor.SpecificationName //规格
|
|
1226
|
+ feedetailInfo["bka505"] = infor.BuyPrice //进货价
|
|
1227
|
+ feedetailInfo["bka506"] = infor.SellPrice // 收获价
|
|
1228
|
+ feedetailInfo["aae013"] = infor.Remark //备注
|
1144
|
1229
|
feedetail = append(feedetail, feedetailInfo)
|
1145
|
1230
|
|
1146
|
1231
|
inputData["inputlist"] = feedetail
|
|
@@ -1285,14 +1370,14 @@ func UpdateDrugByIdDetail(id int64) (models.XtBaseDrug, error) {
|
1285
|
1370
|
return drug, err
|
1286
|
1371
|
}
|
1287
|
1372
|
|
1288
|
|
-func UpdateGoodInformaitonByDetail(id int64) (models.XtGoodInformation, error) {
|
1289
|
|
- information := models.XtGoodInformation{}
|
|
1373
|
+func UpdateGoodInformaitonByDetail(id int64) (models.MyGoodInformation, error) {
|
|
1374
|
+ information := models.MyGoodInformation{}
|
1290
|
1375
|
err := XTWriteDB().Model(&information).Where("id=?", id).Updates(map[string]interface{}{"is_mark": 1}).Error
|
1291
|
1376
|
return information, err
|
1292
|
1377
|
}
|
1293
|
1378
|
|
1294
|
|
-func UpdateGoodInfoById(id int64) (models.XtGoodInformation, error) {
|
1295
|
|
- information := models.XtGoodInformation{}
|
|
1379
|
+func UpdateGoodInfoById(id int64) (models.MyGoodInformation, error) {
|
|
1380
|
+ information := models.MyGoodInformation{}
|
1296
|
1381
|
err := XTWriteDB().Model(&information).Where("id=?", id).Updates(map[string]interface{}{"is_mark": 0}).Error
|
1297
|
1382
|
return information, err
|
1298
|
1383
|
}
|
|
@@ -1309,8 +1394,9 @@ func UpdateMyProjectById(id int64) (models.MyHisProject, error) {
|
1309
|
1394
|
return project, err
|
1310
|
1395
|
}
|
1311
|
1396
|
|
1312
|
|
-func UpdataOrderInfoStatus(id int64, number string, user_org_id int64) {
|
1313
|
|
- err = writeDb.Model(&models.HisOrder{}).Where("status = 1 AND id = ? AND user_org_id = ?", id, user_org_id).Updates(map[string]interface{}{"mtime": time.Now().Unix(), "status": 0}).Error
|
1314
|
|
- err = writeDb.Model(&models.HisOrderInfo{}).Where("status = 1 AND user_org_id = ? AND order_number = ?", user_org_id, number).Updates(map[string]interface{}{"mtime": time.Now().Unix(), "status": 0}).Error
|
1315
|
|
- return
|
|
1397
|
+func UpdateAdminUserRoleById(id int64) (models.MySgjUserAdminRole, error) {
|
|
1398
|
+
|
|
1399
|
+ role := models.MySgjUserAdminRole{}
|
|
1400
|
+ err = UserWriteDB().Model(&role).Where("admin_user_id = ?", id).Updates(map[string]interface{}{"is_mark = ?": 1}).Error
|
|
1401
|
+ return role, err
|
1316
|
1402
|
}
|