|
@@ -607,7 +607,6 @@ 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
|
611
|
610
|
inputMessage["transType"] = "ML008" // 交易编码S
|
612
|
611
|
feedetail := make([]map[string]interface{}, 0)
|
613
|
612
|
feedetailInfo := make(map[string]interface{})
|
|
@@ -708,7 +707,7 @@ func SzybML009(doctor string, doctor_code string, fixmedins_code string, pro *mo
|
708
|
707
|
inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
|
709
|
708
|
|
710
|
709
|
inputData := make(map[string]interface{})
|
711
|
|
- inputData["listsize"] = 1
|
|
710
|
+
|
712
|
711
|
inputMessage["transType"] = "ML009" // 交易编码
|
713
|
712
|
feedetail := make([]map[string]interface{}, 0)
|
714
|
713
|
|
|
@@ -836,8 +835,8 @@ func SzybML010(doctor string, doctor_code string, fixmedins_code string, datas [
|
836
|
835
|
for _, item := range datas {
|
837
|
836
|
feedetailInfo := make(map[string]interface{})
|
838
|
837
|
feedetailInfo["ake003"] = strconv.FormatInt(typeId, 10)
|
839
|
|
- feedetailInfo["ake001"] = item.SocialSecurityDirectoryCode //社保目录编码
|
840
|
|
- feedetailInfo["ake005"] = item.SocialSecurityDirectoryCode //协议机构内部目录编码
|
|
838
|
+ feedetailInfo["ake001"] = item.MedicalInsuranceNumber //社保目录编码
|
|
839
|
+ feedetailInfo["ake005"] = item.MedicalInsuranceNumber //协议机构内部目录编码
|
841
|
840
|
feedetail = append(feedetail, feedetailInfo)
|
842
|
841
|
}
|
843
|
842
|
|
|
@@ -879,55 +878,58 @@ func SzybML010(doctor string, doctor_code string, fixmedins_code string, datas [
|
879
|
878
|
|
880
|
879
|
}
|
881
|
880
|
|
882
|
|
-func SzybYS001(doctor string, doctor_code string, fixmedins_code string, doc *models.DocDetail) string {
|
|
881
|
+func SzybYS001(doctor string, doctor_code string, fixmedins_code string, datas []*models.DocDetail) string {
|
883
|
882
|
//生成输入报文
|
884
|
883
|
inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
|
885
|
884
|
|
886
|
885
|
inputData := make(map[string]interface{})
|
887
|
886
|
|
888
|
|
- inputData["listsize"] = 1
|
|
887
|
+ inputData["listsize"] = len(datas)
|
889
|
888
|
inputMessage["transType"] = "YS001" // 交易编码
|
890
|
889
|
feedetail := make([]map[string]interface{}, 0)
|
891
|
890
|
|
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)
|
|
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
|
+ }
|
931
|
933
|
|
932
|
934
|
inputData["inputlist"] = feedetail
|
933
|
935
|
inputMessage["transBody"] = inputData
|
|
@@ -967,112 +969,24 @@ func SzybYS001(doctor string, doctor_code string, fixmedins_code string, doc *mo
|
967
|
969
|
|
968
|
970
|
}
|
969
|
971
|
|
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 {
|
|
972
|
+func SzybYS002(doctor string, doctor_code string, fixmedins_code string, datas []*models.DocDetail) string {
|
1062
|
973
|
|
1063
|
974
|
//生成输入报文
|
1064
|
975
|
inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
|
1065
|
976
|
|
1066
|
977
|
inputData := make(map[string]interface{})
|
1067
|
978
|
|
1068
|
|
- inputData["listsize"] = 1
|
|
979
|
+ inputData["listsize"] = len(datas)
|
1069
|
980
|
inputMessage["transType"] = "YS002" // 交易编码
|
1070
|
981
|
feedetail := make([]map[string]interface{}, 0)
|
1071
|
982
|
|
1072
|
|
- feedetailInfo := make(map[string]interface{})
|
1073
|
|
- feedetailInfo["bkc320"] = datas.DoctorNumber
|
1074
|
|
- feedetailInfo["bke155"] = "4"
|
1075
|
|
- feedetail = append(feedetail, feedetailInfo)
|
|
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
|
+ }
|
1076
|
990
|
|
1077
|
991
|
inputData["inputlist"] = feedetail
|
1078
|
992
|
inputMessage["transBody"] = inputData
|
|
@@ -1209,23 +1123,24 @@ func SzybYML007(doctor string, doctor_code string, fixmedins_code string, infor
|
1209
|
1123
|
inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
|
1210
|
1124
|
|
1211
|
1125
|
inputData := make(map[string]interface{})
|
1212
|
|
- inputData["listsize"] = 1
|
|
1126
|
+
|
1213
|
1127
|
inputMessage["transType"] = "ML007" // 交易编码
|
1214
|
1128
|
feedetail := make([]map[string]interface{}, 0)
|
1215
|
1129
|
|
1216
|
1130
|
feedetailInfo := make(map[string]interface{})
|
1217
|
1131
|
feedetailInfo["ake001"] = infor.SocialSecurityDirectoryCode // 社保目录编码
|
1218
|
|
-
|
|
1132
|
+ //feedetailInfo["ake001"] = "3333333333" // 社保目录编码
|
1219
|
1133
|
feedetailInfo["ake005"] = infor.SocialSecurityDirectoryCode //协议机构内部目录编码
|
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 //备注
|
|
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 //备注
|
1229
|
1144
|
feedetail = append(feedetail, feedetailInfo)
|
1230
|
1145
|
|
1231
|
1146
|
inputData["inputlist"] = feedetail
|
|
@@ -1370,14 +1285,14 @@ func UpdateDrugByIdDetail(id int64) (models.XtBaseDrug, error) {
|
1370
|
1285
|
return drug, err
|
1371
|
1286
|
}
|
1372
|
1287
|
|
1373
|
|
-func UpdateGoodInformaitonByDetail(id int64) (models.MyGoodInformation, error) {
|
1374
|
|
- information := models.MyGoodInformation{}
|
|
1288
|
+func UpdateGoodInformaitonByDetail(id int64) (models.XtGoodInformation, error) {
|
|
1289
|
+ information := models.XtGoodInformation{}
|
1375
|
1290
|
err := XTWriteDB().Model(&information).Where("id=?", id).Updates(map[string]interface{}{"is_mark": 1}).Error
|
1376
|
1291
|
return information, err
|
1377
|
1292
|
}
|
1378
|
1293
|
|
1379
|
|
-func UpdateGoodInfoById(id int64) (models.MyGoodInformation, error) {
|
1380
|
|
- information := models.MyGoodInformation{}
|
|
1294
|
+func UpdateGoodInfoById(id int64) (models.XtGoodInformation, error) {
|
|
1295
|
+ information := models.XtGoodInformation{}
|
1381
|
1296
|
err := XTWriteDB().Model(&information).Where("id=?", id).Updates(map[string]interface{}{"is_mark": 0}).Error
|
1382
|
1297
|
return information, err
|
1383
|
1298
|
}
|
|
@@ -1394,9 +1309,8 @@ func UpdateMyProjectById(id int64) (models.MyHisProject, error) {
|
1394
|
1309
|
return project, err
|
1395
|
1310
|
}
|
1396
|
1311
|
|
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
|
|
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
|
1402
|
1316
|
}
|