|
@@ -1882,9 +1882,19 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
1882
|
1882
|
adminUserInfo := c.GetAdminUserInfo()
|
1883
|
1883
|
orgId := adminUserInfo.CurrentOrgId
|
1884
|
1884
|
|
1885
|
|
- //获取药品库数据
|
1886
|
|
- list, _ := service.GetMyPorjecgList(orgId)
|
1887
|
|
-
|
|
1885
|
+ ids := c.GetString("ids")
|
|
1886
|
+ stringarr := strings.Split(ids, ",")
|
|
1887
|
+ idss := make([]int64, 0)
|
|
1888
|
+ for _, item := range stringarr {
|
|
1889
|
+ itemsss, _ := strconv.ParseInt(item, 10, 64)
|
|
1890
|
+ id := int64(itemsss)
|
|
1891
|
+ idss = append(idss, id)
|
|
1892
|
+ }
|
|
1893
|
+ fmt.Println("idsss", idss)
|
|
1894
|
+ //获取项目库数据
|
|
1895
|
+ //list, _ := service.GetMyPorjecgList(orgId)
|
|
1896
|
+ list, _ := service.GetBathchMyPorjecgList(idss)
|
|
1897
|
+ fmt.Println("list2222222222", list)
|
1888
|
1898
|
miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
1889
|
1899
|
var doctor_name string
|
1890
|
1900
|
var doctor_code string
|
|
@@ -2021,7 +2031,6 @@ func (c *SZHisApiController) GetRevocation() {
|
2021
|
2031
|
id, _ := c.GetInt64("id")
|
2022
|
2032
|
//用来区分是药品的撤销还是耗材的撤销 1.药品 2.诊疗项目 3.材料 5.辅助器具项目
|
2023
|
2033
|
is_mark, _ := c.GetInt64("is_mark")
|
2024
|
|
-
|
2025
|
2034
|
type_id, _ := c.GetInt64("type_id")
|
2026
|
2035
|
fmt.Println("type_id2222222", type_id)
|
2027
|
2036
|
if type_id == 1 {
|
|
@@ -2179,135 +2188,139 @@ func (c *SZHisApiController) GetRevocation() {
|
2179
|
2188
|
}
|
2180
|
2189
|
|
2181
|
2190
|
}
|
2182
|
|
- if type_id == 2 {
|
2183
|
|
- //撤销
|
2184
|
|
- if is_mark == 1 {
|
2185
|
|
- //获取药品库数据
|
2186
|
|
- list, _ := service.GetMyPorjecgListDetail(orgId, id)
|
2187
|
|
-
|
2188
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
2189
|
|
- var doctor_name string
|
2190
|
|
- var doctor_code string
|
2191
|
|
-
|
2192
|
|
- doctor_name = "黄亦轩"
|
2193
|
|
- doctor_code = "1001"
|
2194
|
|
-
|
2195
|
|
- var pagesize int = 50
|
2196
|
|
- var start int = 1
|
2197
|
|
- var stop int
|
2198
|
|
- var pagecount int
|
2199
|
|
- var curpage int
|
2200
|
|
- var isSuccess bool = true
|
2201
|
|
- //总页数,向上取整,注意除之前要先转换类型为float64
|
2202
|
|
- pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
2203
|
|
-
|
2204
|
|
- for curpage = 1; curpage <= pagecount; curpage++ {
|
2205
|
|
- if curpage == 1 {
|
2206
|
|
- start = 1
|
2207
|
|
- } else {
|
2208
|
|
- start = (curpage-1)*pagesize + 1
|
2209
|
|
- }
|
2210
|
|
- stop = curpage * pagesize
|
2211
|
|
- if stop > len(list) {
|
2212
|
|
- stop = len(list)
|
2213
|
|
- }
|
2214
|
|
- //这里就可以查看开始和结束了
|
2215
|
|
- fmt.Println(list[start-1 : stop])
|
2216
|
|
- var customs []*models.DrugDetail
|
2217
|
|
- for _, item := range list {
|
2218
|
|
- detail := &models.DrugDetail{
|
2219
|
|
- SocialSecurityDirectoryCode: item.MedicalCode,
|
2220
|
|
- }
|
2221
|
|
- customs = append(customs, detail)
|
2222
|
|
- }
|
2223
|
|
- result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs, type_id)
|
2224
|
|
- fmt.Println("reuslt", result)
|
2225
|
|
- var dat map[string]interface{}
|
2226
|
|
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
2227
|
|
- fmt.Println(dat)
|
2228
|
|
- } else {
|
2229
|
|
- fmt.Println(err)
|
2230
|
|
- }
|
|
2191
|
+ }
|
2231
|
2192
|
|
2232
|
|
- userJSONBytes, _ := json.Marshal(dat)
|
|
2193
|
+ if type_id == 2 {
|
|
2194
|
+ fmt.Println("222222222222222q2")
|
|
2195
|
+ //撤销
|
|
2196
|
+ if is_mark == 1 {
|
|
2197
|
+ //获取药品库数据
|
|
2198
|
+ list, _ := service.GetMyPorjecgListDetail(orgId, id)
|
2233
|
2199
|
|
2234
|
|
- var res Result
|
2235
|
|
- if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
2236
|
|
- utils.ErrorLog("解析失败:%v", err)
|
2237
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2238
|
|
- return
|
2239
|
|
- }
|
2240
|
|
- if res.Transreturncode == "00000000" {
|
2241
|
|
- //核销成功返回状态码
|
2242
|
|
- _, err := service.UpdateMyProjectById(id)
|
2243
|
|
- fmt.Println("err", err)
|
2244
|
|
- } else {
|
2245
|
|
- isSuccess = false
|
2246
|
|
- //失败
|
2247
|
|
-
|
2248
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
2249
|
|
- return
|
2250
|
|
- }
|
2251
|
|
- fmt.Println(isSuccess)
|
|
2200
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
|
2201
|
+ var doctor_name string
|
|
2202
|
+ var doctor_code string
|
|
2203
|
+
|
|
2204
|
+ doctor_name = "黄亦轩"
|
|
2205
|
+ doctor_code = "1001"
|
|
2206
|
+
|
|
2207
|
+ var pagesize int = 50
|
|
2208
|
+ var start int = 1
|
|
2209
|
+ var stop int
|
|
2210
|
+ var pagecount int
|
|
2211
|
+ var curpage int
|
|
2212
|
+ var isSuccess bool = true
|
|
2213
|
+ //总页数,向上取整,注意除之前要先转换类型为float64
|
|
2214
|
+ pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
2215
|
+
|
|
2216
|
+ for curpage = 1; curpage <= pagecount; curpage++ {
|
|
2217
|
+ if curpage == 1 {
|
|
2218
|
+ start = 1
|
|
2219
|
+ } else {
|
|
2220
|
+ start = (curpage-1)*pagesize + 1
|
2252
|
2221
|
}
|
2253
|
|
- }
|
2254
|
|
- //备案
|
2255
|
|
- if is_mark == 0 {
|
2256
|
|
- adminUserInfo := c.GetAdminUserInfo()
|
2257
|
|
- orgId := adminUserInfo.CurrentOrgId
|
2258
|
|
-
|
2259
|
|
- //获取药品库数据
|
2260
|
|
- list, _ := service.GetMyPorjecgListDetail(orgId, id)
|
2261
|
|
-
|
2262
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
2263
|
|
- var doctor_name string
|
2264
|
|
- var doctor_code string
|
2265
|
|
- doctor_name = "黄亦轩"
|
2266
|
|
- doctor_code = "1001"
|
2267
|
|
- var isSuccess bool = true
|
|
2222
|
+ stop = curpage * pagesize
|
|
2223
|
+ if stop > len(list) {
|
|
2224
|
+ stop = len(list)
|
|
2225
|
+ }
|
|
2226
|
+ //这里就可以查看开始和结束了
|
|
2227
|
+ fmt.Println(list[start-1 : stop])
|
|
2228
|
+ var customs []*models.DrugDetail
|
2268
|
2229
|
for _, item := range list {
|
2269
|
|
- detail := &models.MyHisProject{
|
2270
|
|
- MedicalCode: item.MedicalCode, //社保目录
|
2271
|
|
- ProjectName: item.ProjectName,
|
2272
|
|
- Price: item.Price,
|
2273
|
|
- Category: item.Category,
|
2274
|
|
- Remark: item.Remark,
|
|
2230
|
+ detail := &models.DrugDetail{
|
|
2231
|
+ SocialSecurityDirectoryCode: item.MedicalCode,
|
2275
|
2232
|
}
|
|
2233
|
+ customs = append(customs, detail)
|
|
2234
|
+ }
|
|
2235
|
+ result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs, type_id)
|
|
2236
|
+ fmt.Println("reuslt", result)
|
|
2237
|
+ var dat map[string]interface{}
|
|
2238
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2239
|
+ fmt.Println(dat)
|
|
2240
|
+ } else {
|
|
2241
|
+ fmt.Println(err)
|
|
2242
|
+ }
|
2276
|
2243
|
|
2277
|
|
- result := service.SzybML009(doctor_name, doctor_code, miConfig.Code, detail)
|
2278
|
|
- fmt.Println("reuslt9999999999999999", result)
|
2279
|
|
- var dat map[string]interface{}
|
2280
|
|
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
2281
|
|
- fmt.Println(dat)
|
2282
|
|
- } else {
|
2283
|
|
- fmt.Println(err)
|
2284
|
|
- }
|
|
2244
|
+ userJSONBytes, _ := json.Marshal(dat)
|
2285
|
2245
|
|
2286
|
|
- userJSONBytes, _ := json.Marshal(dat)
|
|
2246
|
+ var res Result
|
|
2247
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2248
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2249
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2250
|
+ return
|
|
2251
|
+ }
|
|
2252
|
+ if res.Transreturncode == "00000000" {
|
|
2253
|
+ //核销成功返回状态码
|
|
2254
|
+ _, err := service.UpdateMyProjectById(id)
|
|
2255
|
+ fmt.Println("err", err)
|
|
2256
|
+ } else {
|
|
2257
|
+ isSuccess = false
|
|
2258
|
+ //失败
|
2287
|
2259
|
|
2288
|
|
- var res Result
|
2289
|
|
- if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
2290
|
|
- utils.ErrorLog("解析失败:%v", err)
|
2291
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2292
|
|
- return
|
2293
|
|
- }
|
2294
|
|
- if res.Transreturncode == "00000000" {
|
2295
|
|
- //备案成功返回状态值
|
2296
|
|
- _, err := service.UpdateProjectById(item.ID)
|
2297
|
|
- fmt.Println("err22222", err)
|
2298
|
|
- } else {
|
2299
|
|
- isSuccess = false
|
2300
|
|
- //失败
|
2301
|
|
-
|
2302
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
2303
|
|
- return
|
2304
|
|
- }
|
2305
|
|
- fmt.Println(isSuccess)
|
|
2260
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
|
2261
|
+ return
|
2306
|
2262
|
}
|
|
2263
|
+ fmt.Println(isSuccess)
|
2307
|
2264
|
}
|
2308
|
2265
|
}
|
|
2266
|
+ fmt.Println("is_marke", is_mark)
|
|
2267
|
+ //备案
|
|
2268
|
+ if is_mark == 0 {
|
|
2269
|
+ fmt.Println("进来饿了吗32222222")
|
|
2270
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
2271
|
+ orgId := adminUserInfo.CurrentOrgId
|
|
2272
|
+
|
|
2273
|
+ //获取药品库数据
|
|
2274
|
+ list, _ := service.GetMyPorjecgListDetail(orgId, id)
|
|
2275
|
+
|
|
2276
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
|
2277
|
+ var doctor_name string
|
|
2278
|
+ var doctor_code string
|
|
2279
|
+ doctor_name = "黄亦轩"
|
|
2280
|
+ doctor_code = "1001"
|
|
2281
|
+ var isSuccess bool = true
|
|
2282
|
+ for _, item := range list {
|
|
2283
|
+ detail := &models.MyHisProject{
|
|
2284
|
+ MedicalCode: item.MedicalCode, //社保目录
|
|
2285
|
+ ProjectName: item.ProjectName,
|
|
2286
|
+ Price: item.Price,
|
|
2287
|
+ Category: item.Category,
|
|
2288
|
+ Remark: item.Remark,
|
|
2289
|
+ }
|
|
2290
|
+
|
|
2291
|
+ result := service.SzybML009(doctor_name, doctor_code, miConfig.Code, detail)
|
|
2292
|
+ fmt.Println("reuslt9999999999999999", result)
|
|
2293
|
+ var dat map[string]interface{}
|
|
2294
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2295
|
+ fmt.Println(dat)
|
|
2296
|
+ } else {
|
|
2297
|
+ fmt.Println(err)
|
|
2298
|
+ }
|
2309
|
2299
|
|
|
2300
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
2301
|
+
|
|
2302
|
+ var res Result
|
|
2303
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2304
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2305
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2306
|
+ return
|
|
2307
|
+ }
|
|
2308
|
+ if res.Transreturncode == "00000000" {
|
|
2309
|
+ //备案成功返回状态值
|
|
2310
|
+ _, err := service.UpdateProjectById(item.ID)
|
|
2311
|
+ fmt.Println("err22222", err)
|
|
2312
|
+ } else {
|
|
2313
|
+ isSuccess = false
|
|
2314
|
+ //失败
|
|
2315
|
+
|
|
2316
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
|
2317
|
+ return
|
|
2318
|
+ }
|
|
2319
|
+ fmt.Println(isSuccess)
|
|
2320
|
+ }
|
|
2321
|
+ }
|
2310
|
2322
|
}
|
|
2323
|
+
|
2311
|
2324
|
if type_id == 3 {
|
2312
|
2325
|
|
2313
|
2326
|
//撤销
|
|
@@ -2345,7 +2358,7 @@ func (c *SZHisApiController) GetRevocation() {
|
2345
|
2358
|
fmt.Println(list[start-1 : stop])
|
2346
|
2359
|
var customs []*models.DrugDetail
|
2347
|
2360
|
for _, item := range list {
|
2348
|
|
- fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
|
|
2361
|
+ fmt.Println("医疗机构编码", item.SocialSecurityDirectoryCode)
|
2349
|
2362
|
detail := &models.DrugDetail{
|
2350
|
2363
|
SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
|
2351
|
2364
|
ManufacturerName: item.ManufacturerName,
|
|
@@ -2412,6 +2425,7 @@ func (c *SZHisApiController) GetRevocation() {
|
2412
|
2425
|
BuyPrice: item.BuyPrice,
|
2413
|
2426
|
SellPrice: item.SellPrice,
|
2414
|
2427
|
Remark: item.Remark,
|
|
2428
|
+ SpecificationName: item.SpecificationName,
|
2415
|
2429
|
}
|
2416
|
2430
|
|
2417
|
2431
|
result := service.SzybYML007(doctor_name, doctor_code, miConfig.Code, detail)
|
|
@@ -2494,8 +2508,20 @@ func (c *SZHisApiController) GetDoctorList() {
|
2494
|
2508
|
adminUserInfo := c.GetAdminUserInfo()
|
2495
|
2509
|
orgid := adminUserInfo.CurrentOrgId
|
2496
|
2510
|
fmt.Println("or3gi", orgid)
|
|
2511
|
+ ids := c.GetString("ids")
|
|
2512
|
+ fmt.Println("ids2222222222", ids)
|
|
2513
|
+ stringarr := strings.Split(ids, ",")
|
|
2514
|
+ idss := make([]int64, 0)
|
|
2515
|
+ for _, item := range stringarr {
|
|
2516
|
+ itemsss, _ := strconv.ParseInt(item, 10, 64)
|
|
2517
|
+ id := int64(itemsss)
|
|
2518
|
+ idss = append(idss, id)
|
|
2519
|
+ }
|
2497
|
2520
|
//获取所有医生护士信息
|
2498
|
|
- list, _ := service.GetDoctorList(orgid)
|
|
2521
|
+ //list, _ := service.GetDoctorList(orgid)
|
|
2522
|
+ //批量查询
|
|
2523
|
+ list, _ := service.GetBatchDoctorList(idss)
|
|
2524
|
+ fmt.Println("list22222222222", list)
|
2499
|
2525
|
//获取所有角色名称
|
2500
|
2526
|
roleList, _ := service.GetRoleList(orgid)
|
2501
|
2527
|
|
|
@@ -2513,31 +2539,246 @@ func (c *SZHisApiController) GetDoctorList() {
|
2513
|
2539
|
doctor_name = "黄亦轩"
|
2514
|
2540
|
doctor_code = "1001"
|
2515
|
2541
|
|
2516
|
|
- var pagesize int = 50
|
2517
|
|
- var start int = 1
|
2518
|
|
- var stop int
|
2519
|
|
- var pagecount int
|
2520
|
|
- var curpage int
|
2521
|
2542
|
var isSuccess bool = true
|
2522
|
|
- //总页数,向上取整,注意除之前要先转换类型为float64
|
2523
|
|
- pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
2524
|
2543
|
|
2525
|
|
- var ress []*Result
|
2526
|
|
- for curpage = 1; curpage <= pagecount; curpage++ {
|
2527
|
|
- if curpage == 1 {
|
2528
|
|
- start = 1
|
|
2544
|
+ for _, item := range list {
|
|
2545
|
+ fmt.Println("医护类别", item.StudyMajorName)
|
|
2546
|
+ detail := &models.DocDetail{
|
|
2547
|
+ UserName: item.UserName, //医护姓名
|
|
2548
|
+ RoleId: item.Name, //医护人员类别
|
|
2549
|
+ Sex: strconv.FormatInt(item.Sex, 10), //性别
|
|
2550
|
+ CardType: strconv.FormatInt(item.CardType, 10), //证件类型
|
|
2551
|
+ IdCard: item.IdCard, //证件号码
|
|
2552
|
+ Phone: item.Mobile, //联系电话
|
|
2553
|
+ WorkMajorName: item.WorkMajorName, // 现从事专业名称
|
|
2554
|
+ Nation: item.Nation, //民族
|
|
2555
|
+ BirthDay: 20201022, // 出生日期
|
|
2556
|
+ WorkTime: 20201022, //参加工作日期
|
|
2557
|
+ Education: strconv.FormatInt(item.Education, 10), //学历
|
|
2558
|
+ StudyMajorName: item.StudyMajorName, //所学的专业名称
|
|
2559
|
+ CertificateCode: item.MedicalCode, //医(药)师执业证书编码
|
|
2560
|
+ MedicalCode: item.DoctorCode, //医(药)师资格证编码
|
|
2561
|
+ MedicalRangeCode: strconv.FormatInt(item.DoctorRangeCode, 10), //医师执业范围代码
|
|
2562
|
+ MedicalLevel: strconv.FormatInt(item.DoctorLevel, 10), //医生执业资格证中的医师级别
|
|
2563
|
+ TypeJob: strconv.FormatInt(item.DoctorTypeJob, 10), //医生执业资格证中的执业类别
|
|
2564
|
+ DoctorNumber: item.DoctorNumber, //医保医师编号
|
|
2565
|
+ Licensing: strconv.FormatInt(item.Licensing, 10), //多点执业标志
|
|
2566
|
+ DoctorServiceStatus: "", //医师医保服务资格状态
|
|
2567
|
+ MonitoringLevel: "", //监控等级
|
|
2568
|
+ DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
|
2569
|
+ HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
|
2570
|
+ PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
|
2571
|
+ PharmacistType: "", //药师类别
|
|
2572
|
+ PharmacistPracticeCategory: "", //药师执业类别
|
|
2573
|
+ PharmacistsLicensing: "", //药师执业范围
|
|
2574
|
+ PharmacistRegistrationNumber: "", //执业药师注册证编号
|
|
2575
|
+ OfficeCode: "", //科室编码
|
|
2576
|
+ JobNumber: item.JobNumber, //工号
|
|
2577
|
+ PostName: "", //职位名称
|
|
2578
|
+ TechnicalJobLevelCode: "", //专业技术职务级别编码
|
|
2579
|
+ IsActive: strconv.FormatInt(item.IsActive, 10), //在职与否
|
|
2580
|
+ PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
|
|
2581
|
+ IdentificationOutpatients: strconv.FormatInt(item.IdentificationOutpatients, 10), //门诊大病医师标识
|
|
2582
|
+ OutpatientIllnessCategory: item.OutpatientIllnessCategory, //门诊大病类别
|
|
2583
|
+ StartTime: 20201010, //开始日期
|
|
2584
|
+ StaffCode: "", //医护人员编码
|
|
2585
|
+ EndTime: 0, // 结束日期
|
|
2586
|
+ }
|
|
2587
|
+
|
|
2588
|
+ result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, detail)
|
|
2589
|
+ fmt.Println("reuslt9999999999999999", result)
|
|
2590
|
+ var dat map[string]interface{}
|
|
2591
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2592
|
+ fmt.Println(dat)
|
2529
|
2593
|
} else {
|
2530
|
|
- start = (curpage-1)*pagesize + 1
|
|
2594
|
+ fmt.Println(err)
|
2531
|
2595
|
}
|
2532
|
|
- stop = curpage * pagesize
|
2533
|
|
- if stop > len(list) {
|
2534
|
|
- stop = len(list)
|
|
2596
|
+
|
|
2597
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
2598
|
+
|
|
2599
|
+ var res Result
|
|
2600
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2601
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2602
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2603
|
+ return
|
2535
|
2604
|
}
|
2536
|
|
- //这里就可以查看开始和结束了
|
2537
|
|
- fmt.Println(list[start-1 : stop])
|
2538
|
|
- var customs []*models.DocDetail
|
|
2605
|
+ if res.Transreturncode == "00000000" {
|
|
2606
|
+ //批量插入数据
|
|
2607
|
+ _, err := service.UpdateAdminUserRoleById(item.AdminUserId)
|
|
2608
|
+ fmt.Println("err2222", err)
|
|
2609
|
+ } else {
|
|
2610
|
+ isSuccess = false
|
|
2611
|
+ //失败
|
|
2612
|
+
|
|
2613
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDoctorLoginFaildParamWrong)
|
|
2614
|
+ return
|
|
2615
|
+ }
|
|
2616
|
+ fmt.Println(isSuccess)
|
|
2617
|
+ }
|
|
2618
|
+
|
|
2619
|
+}
|
|
2620
|
+
|
|
2621
|
+//func (c *SZHisApiController) GetDoctorList() {
|
|
2622
|
+//
|
|
2623
|
+// adminUserInfo := c.GetAdminUserInfo()
|
|
2624
|
+// orgid := adminUserInfo.CurrentOrgId
|
|
2625
|
+// fmt.Println("or3gi", orgid)
|
|
2626
|
+// //获取所有医生护士信息
|
|
2627
|
+// list, _ := service.GetDoctorList(orgid)
|
|
2628
|
+// //获取所有角色名称
|
|
2629
|
+// roleList, _ := service.GetRoleList(orgid)
|
|
2630
|
+//
|
|
2631
|
+// miConfig, _ := service.FindMedicalInsuranceInfo(orgid)
|
|
2632
|
+// for _, item := range list {
|
|
2633
|
+// for _, it := range roleList {
|
|
2634
|
+// if item.RoleId == it.ID {
|
|
2635
|
+// item.Name = it.RoleName
|
|
2636
|
+// }
|
|
2637
|
+// }
|
|
2638
|
+// }
|
|
2639
|
+// var doctor_name string
|
|
2640
|
+// var doctor_code string
|
|
2641
|
+//
|
|
2642
|
+// doctor_name = "黄亦轩"
|
|
2643
|
+// doctor_code = "1001"
|
|
2644
|
+//
|
|
2645
|
+// var pagesize int = 50
|
|
2646
|
+// var start int = 1
|
|
2647
|
+// var stop int
|
|
2648
|
+// var pagecount int
|
|
2649
|
+// var curpage int
|
|
2650
|
+// var isSuccess bool = true
|
|
2651
|
+// //总页数,向上取整,注意除之前要先转换类型为float64
|
|
2652
|
+// pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
2653
|
+//
|
|
2654
|
+// var ress []*Result
|
|
2655
|
+// for curpage = 1; curpage <= pagecount; curpage++ {
|
|
2656
|
+// if curpage == 1 {
|
|
2657
|
+// start = 1
|
|
2658
|
+// } else {
|
|
2659
|
+// start = (curpage-1)*pagesize + 1
|
|
2660
|
+// }
|
|
2661
|
+// stop = curpage * pagesize
|
|
2662
|
+// if stop > len(list) {
|
|
2663
|
+// stop = len(list)
|
|
2664
|
+// }
|
|
2665
|
+// //这里就可以查看开始和结束了
|
|
2666
|
+// fmt.Println(list[start-1 : stop])
|
|
2667
|
+// var customs []*models.DocDetail
|
|
2668
|
+// for _, item := range list {
|
|
2669
|
+// fmt.Println("医护类别", item.Name)
|
|
2670
|
+// sex := strconv.FormatInt(item.Sex, 10)
|
|
2671
|
+// card_type := strconv.FormatInt(item.CardType, 10)
|
|
2672
|
+// is_active := strconv.FormatInt(item.IsActive, 10)
|
|
2673
|
+//
|
|
2674
|
+// detail := &models.DocDetail{
|
|
2675
|
+// UserName: item.UserName,
|
|
2676
|
+// RoleId: item.Name,
|
|
2677
|
+// Sex: sex,
|
|
2678
|
+// CardType: card_type,
|
|
2679
|
+// IdCard: item.IdCard,
|
|
2680
|
+// Phone: item.Mobile,
|
|
2681
|
+// WorkMajorName: item.WorkMajorName,
|
|
2682
|
+// Nation: item.Nation,
|
|
2683
|
+// BirthDay: 20201022,
|
|
2684
|
+// WorkTime: 12,
|
|
2685
|
+// Education: strconv.FormatInt(item.Education, 10),
|
|
2686
|
+// StudyMajorName: item.StudyMajorName,
|
|
2687
|
+// CertificateCode: "", //证书编码
|
|
2688
|
+// MedicalCode: item.MedicalCode, //医师资格编码
|
|
2689
|
+// MedicalRangeCode: strconv.FormatInt(item.MedicalRangeCode, 10), //医师执业范围代码
|
|
2690
|
+// MedicalLevel: strconv.FormatInt(item.MedicalLevel, 10), //医生级别
|
|
2691
|
+// TypeJob: strconv.FormatInt(item.DoctorTypeJob, 10), //职业类别
|
|
2692
|
+// DoctorNumber: item.DoctorNumber, //医师编号
|
|
2693
|
+// Licensing: strconv.FormatInt(item.Licensing, 10), //职业标志
|
|
2694
|
+// DoctorServiceStatus: "", //医师医保服务资格状态
|
|
2695
|
+// MonitoringLevel: "", //监控等级
|
|
2696
|
+// DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
|
2697
|
+// HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
|
2698
|
+// PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
|
2699
|
+// PharmacistType: "", //药师类别
|
|
2700
|
+// PharmacistPracticeCategory: "", //药师执业类别
|
|
2701
|
+// PharmacistsLicensing: "", //药师执业范围
|
|
2702
|
+// PharmacistRegistrationNumber: item.PharmacistRegistrationNumber, //执业药师注册证编号
|
|
2703
|
+// OfficeCode: "", //科室编码
|
|
2704
|
+// JobNumber: item.JobNumber, //工号
|
|
2705
|
+// PostName: "", //职位名称
|
|
2706
|
+// TechnicalJobLevelCode: "", //专业技术职务级别编码
|
|
2707
|
+// IsActive: is_active, //在职与否
|
|
2708
|
+// PrescriptionQualificationIdentification: item.PharmacistRegistrationNumber, //处方资格标识
|
|
2709
|
+// IdentificationOutpatients: "", //门诊大病医师标识
|
|
2710
|
+// OutpatientIllnessCategory: item.OutpatientIllnessCategory, //门诊大病类别
|
|
2711
|
+// StartTime: 1233, //开始日期
|
|
2712
|
+//
|
|
2713
|
+// }
|
|
2714
|
+// customs = append(customs, detail)
|
|
2715
|
+// }
|
|
2716
|
+//
|
|
2717
|
+// result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, customs)
|
|
2718
|
+// fmt.Println("reuslt9999999999999999", result)
|
|
2719
|
+// var dat map[string]interface{}
|
|
2720
|
+// if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2721
|
+// fmt.Println(dat)
|
|
2722
|
+// } else {
|
|
2723
|
+// fmt.Println(err)
|
|
2724
|
+// }
|
|
2725
|
+//
|
|
2726
|
+// userJSONBytes, _ := json.Marshal(dat)
|
|
2727
|
+//
|
|
2728
|
+// var res Result
|
|
2729
|
+// if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2730
|
+// utils.ErrorLog("解析失败:%v", err)
|
|
2731
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2732
|
+// return
|
|
2733
|
+// }
|
|
2734
|
+// if res.Transreturncode == "00000000" {
|
|
2735
|
+// ress = append(ress, &res)
|
|
2736
|
+// } else {
|
|
2737
|
+// isSuccess = false
|
|
2738
|
+// //失败
|
|
2739
|
+//
|
|
2740
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorDoctorLoginFaildParamWrong)
|
|
2741
|
+// return
|
|
2742
|
+// }
|
|
2743
|
+// fmt.Println(isSuccess)
|
|
2744
|
+// }
|
|
2745
|
+//
|
|
2746
|
+//}
|
|
2747
|
+
|
|
2748
|
+func (c *SZHisApiController) GetMedicalList() {
|
|
2749
|
+
|
|
2750
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
2751
|
+ orgId := adminUserInfo.CurrentOrgId
|
|
2752
|
+
|
|
2753
|
+ id, _ := c.GetInt64("id")
|
|
2754
|
+ fmt.Println("id22222222", id)
|
|
2755
|
+ is_mark, _ := c.GetInt64("is_mark")
|
|
2756
|
+
|
|
2757
|
+ //去登记
|
|
2758
|
+ if is_mark == 0 {
|
|
2759
|
+ list, _ := service.GetDoctorListByDetail(orgId, id)
|
|
2760
|
+ fmt.Println("list22222222222", list)
|
|
2761
|
+ //获取所有角色名称
|
|
2762
|
+ roleList, _ := service.GetRoleList(orgId)
|
|
2763
|
+
|
|
2764
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
2539
|
2765
|
for _, item := range list {
|
2540
|
|
- fmt.Println("医护类别", item.Name)
|
|
2766
|
+ for _, it := range roleList {
|
|
2767
|
+ if item.RoleId == it.ID {
|
|
2768
|
+ item.Name = it.RoleName
|
|
2769
|
+ }
|
|
2770
|
+ }
|
|
2771
|
+ }
|
|
2772
|
+ var doctor_name string
|
|
2773
|
+ var doctor_code string
|
|
2774
|
+
|
|
2775
|
+ doctor_name = "黄亦轩"
|
|
2776
|
+ doctor_code = "1001"
|
|
2777
|
+
|
|
2778
|
+ var isSuccess bool = true
|
|
2779
|
+
|
|
2780
|
+ for _, item := range list {
|
|
2781
|
+ fmt.Println("医护类别", item.Mobile)
|
2541
|
2782
|
sex := strconv.FormatInt(item.Sex, 10)
|
2542
|
2783
|
card_type := strconv.FormatInt(item.CardType, 10)
|
2543
|
2784
|
is_active := strconv.FormatInt(item.IsActive, 10)
|
|
@@ -2579,92 +2820,63 @@ func (c *SZHisApiController) GetDoctorList() {
|
2579
|
2820
|
PrescriptionQualificationIdentification: item.PharmacistRegistrationNumber, //处方资格标识
|
2580
|
2821
|
IdentificationOutpatients: "", //门诊大病医师标识
|
2581
|
2822
|
OutpatientIllnessCategory: item.OutpatientIllnessCategory, //门诊大病类别
|
2582
|
|
- StartTime: 1233, //开始日期
|
|
2823
|
+ StartTime: 20201012, //开始日期
|
2583
|
2824
|
|
2584
|
2825
|
}
|
2585
|
|
- customs = append(customs, detail)
|
2586
|
|
- }
|
|
2826
|
+ result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, detail)
|
|
2827
|
+ fmt.Println("reuslt9999999999999999", result)
|
|
2828
|
+ var dat map[string]interface{}
|
|
2829
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2830
|
+ fmt.Println(dat)
|
|
2831
|
+ } else {
|
|
2832
|
+ fmt.Println(err)
|
|
2833
|
+ }
|
2587
|
2834
|
|
2588
|
|
- result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, customs)
|
2589
|
|
- fmt.Println("reuslt9999999999999999", result)
|
2590
|
|
- var dat map[string]interface{}
|
2591
|
|
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
2592
|
|
- fmt.Println(dat)
|
2593
|
|
- } else {
|
2594
|
|
- fmt.Println(err)
|
2595
|
|
- }
|
|
2835
|
+ userJSONBytes, _ := json.Marshal(dat)
|
2596
|
2836
|
|
2597
|
|
- userJSONBytes, _ := json.Marshal(dat)
|
|
2837
|
+ var res Result
|
|
2838
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2839
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2840
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2841
|
+ return
|
|
2842
|
+ }
|
|
2843
|
+ if res.Transreturncode == "00000000" {
|
|
2844
|
+ //登记成功
|
|
2845
|
+ service.UpdateAdminUserRoleById(item.ID)
|
2598
|
2846
|
|
2599
|
|
- var res Result
|
2600
|
|
- if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
2601
|
|
- utils.ErrorLog("解析失败:%v", err)
|
2602
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2603
|
|
- return
|
2604
|
|
- }
|
2605
|
|
- if res.Transreturncode == "00000000" {
|
2606
|
|
- ress = append(ress, &res)
|
2607
|
|
- } else {
|
2608
|
|
- isSuccess = false
|
2609
|
|
- //失败
|
|
2847
|
+ } else {
|
|
2848
|
+ isSuccess = false
|
|
2849
|
+ //失败
|
2610
|
2850
|
|
2611
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorDoctorLoginFaildParamWrong)
|
2612
|
|
- return
|
|
2851
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDoctorLoginFaildParamWrong)
|
|
2852
|
+ return
|
|
2853
|
+ }
|
|
2854
|
+ fmt.Println(isSuccess)
|
2613
|
2855
|
}
|
2614
|
|
- fmt.Println(isSuccess)
|
2615
|
2856
|
}
|
2616
|
2857
|
|
2617
|
|
-}
|
|
2858
|
+ //去撤销
|
|
2859
|
+ if is_mark == 1 {
|
|
2860
|
+ //获取所有医生护士信息
|
|
2861
|
+ list, _ := service.GetDoctorListByDetail(orgId, id)
|
|
2862
|
+ //获取所有角色名称
|
|
2863
|
+ roleList, _ := service.GetRoleList(orgId)
|
2618
|
2864
|
|
2619
|
|
-func (c *SZHisApiController) GetMedicalList() {
|
2620
|
|
-
|
2621
|
|
- adminUserInfo := c.GetAdminUserInfo()
|
2622
|
|
- orgId := adminUserInfo.CurrentOrgId
|
2623
|
|
-
|
2624
|
|
- id, _ := c.GetInt64("id")
|
2625
|
|
- fmt.Println("id22222222", id)
|
2626
|
|
- //获取所有医生护士信息
|
2627
|
|
- list, _ := service.GetDoctorListByDetail(orgId, id)
|
2628
|
|
- //获取所有角色名称
|
2629
|
|
- roleList, _ := service.GetRoleList(orgId)
|
2630
|
|
-
|
2631
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
2632
|
|
- for _, item := range list {
|
2633
|
|
- for _, it := range roleList {
|
2634
|
|
- if item.RoleId == it.ID {
|
2635
|
|
- item.Name = it.RoleName
|
|
2865
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
|
2866
|
+ for _, item := range list {
|
|
2867
|
+ for _, it := range roleList {
|
|
2868
|
+ if item.RoleId == it.ID {
|
|
2869
|
+ item.Name = it.RoleName
|
|
2870
|
+ }
|
2636
|
2871
|
}
|
2637
|
2872
|
}
|
2638
|
|
- }
|
2639
|
|
- var doctor_name string
|
2640
|
|
- var doctor_code string
|
2641
|
|
-
|
2642
|
|
- doctor_name = "黄亦轩"
|
2643
|
|
- doctor_code = "1001"
|
|
2873
|
+ var doctor_name string
|
|
2874
|
+ var doctor_code string
|
2644
|
2875
|
|
2645
|
|
- var pagesize int = 50
|
2646
|
|
- var start int = 1
|
2647
|
|
- var stop int
|
2648
|
|
- var pagecount int
|
2649
|
|
- var curpage int
|
2650
|
|
- var isSuccess bool = true
|
2651
|
|
- //总页数,向上取整,注意除之前要先转换类型为float64
|
2652
|
|
- pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
2876
|
+ doctor_name = "黄亦轩"
|
|
2877
|
+ doctor_code = "1001"
|
2653
|
2878
|
|
2654
|
|
- var ress []*Result
|
2655
|
|
- for curpage = 1; curpage <= pagecount; curpage++ {
|
2656
|
|
- if curpage == 1 {
|
2657
|
|
- start = 1
|
2658
|
|
- } else {
|
2659
|
|
- start = (curpage-1)*pagesize + 1
|
2660
|
|
- }
|
2661
|
|
- stop = curpage * pagesize
|
2662
|
|
- if stop > len(list) {
|
2663
|
|
- stop = len(list)
|
2664
|
|
- }
|
2665
|
|
- //这里就可以查看开始和结束了
|
2666
|
|
- fmt.Println(list[start-1 : stop])
|
2667
|
|
- var customs []*models.DocDetail
|
|
2879
|
+ var isSuccess bool = true
|
2668
|
2880
|
for _, item := range list {
|
2669
|
2881
|
fmt.Println("医护类别", item.Name)
|
2670
|
2882
|
detail := &models.DocDetail{
|
|
@@ -2708,37 +2920,36 @@ func (c *SZHisApiController) GetMedicalList() {
|
2708
|
2920
|
StartTime: 20210311, //开始日期
|
2709
|
2921
|
|
2710
|
2922
|
}
|
2711
|
|
- customs = append(customs, detail)
|
2712
|
|
- }
|
2713
|
|
-
|
2714
|
|
- result := service.SzybYS002(doctor_name, doctor_code, miConfig.Code, customs)
|
2715
|
|
- fmt.Println("reuslt9999999999999999", result)
|
2716
|
|
- var dat map[string]interface{}
|
2717
|
|
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
2718
|
|
- fmt.Println(dat)
|
2719
|
|
- } else {
|
2720
|
|
- fmt.Println(err)
|
2721
|
|
- }
|
|
2923
|
+ result := service.SzybYS002(doctor_name, doctor_code, miConfig.Code, detail)
|
|
2924
|
+ fmt.Println("reuslt9999999999999999", result)
|
|
2925
|
+ var dat map[string]interface{}
|
|
2926
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2927
|
+ fmt.Println(dat)
|
|
2928
|
+ } else {
|
|
2929
|
+ fmt.Println(err)
|
|
2930
|
+ }
|
2722
|
2931
|
|
2723
|
|
- userJSONBytes, _ := json.Marshal(dat)
|
|
2932
|
+ userJSONBytes, _ := json.Marshal(dat)
|
2724
|
2933
|
|
2725
|
|
- var res Result
|
2726
|
|
- if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
2727
|
|
- utils.ErrorLog("解析失败:%v", err)
|
2728
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2729
|
|
- return
|
2730
|
|
- }
|
2731
|
|
- if res.Transreturncode == "00000000" {
|
2732
|
|
- ress = append(ress, &res)
|
2733
|
|
- } else {
|
2734
|
|
- isSuccess = false
|
2735
|
|
- //失败
|
|
2934
|
+ var res Result
|
|
2935
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2936
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2937
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2938
|
+ return
|
|
2939
|
+ }
|
|
2940
|
+ if res.Transreturncode == "00000000" {
|
|
2941
|
+ //去撤销
|
|
2942
|
+ service.UpdateAdminUserRoleById(item.ID)
|
|
2943
|
+ } else {
|
|
2944
|
+ isSuccess = false
|
|
2945
|
+ //失败
|
|
2946
|
+
|
|
2947
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
|
2948
|
+ return
|
|
2949
|
+ }
|
|
2950
|
+ fmt.Println(isSuccess)
|
2736
|
2951
|
|
2737
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
2738
|
|
- return
|
2739
|
2952
|
}
|
2740
|
|
- fmt.Println(isSuccess)
|
2741
|
|
-
|
2742
|
2953
|
}
|
2743
|
2954
|
}
|
2744
|
2955
|
|
|
@@ -2869,9 +3080,18 @@ func (c *SZHisApiController) GetGoodsList() {
|
2869
|
3080
|
|
2870
|
3081
|
adminUserInfo := c.GetAdminUserInfo()
|
2871
|
3082
|
orgId := adminUserInfo.CurrentOrgId
|
2872
|
|
- fmt.Println("3344555555555", orgId)
|
2873
|
|
- //获取所有耗材信息
|
2874
|
|
- list, _ := service.GetGoodInformationList(orgId)
|
|
3083
|
+
|
|
3084
|
+ ids := c.GetString("ids")
|
|
3085
|
+ fmt.Println("ids2222222222", ids)
|
|
3086
|
+ stringarr := strings.Split(ids, ",")
|
|
3087
|
+ idss := make([]int64, 0)
|
|
3088
|
+ for _, item := range stringarr {
|
|
3089
|
+ itemsss, _ := strconv.ParseInt(item, 10, 64)
|
|
3090
|
+ id := int64(itemsss)
|
|
3091
|
+ idss = append(idss, id)
|
|
3092
|
+ }
|
|
3093
|
+ //批量获取所有耗材信息
|
|
3094
|
+ list, _ := service.GetBatchGoodInformationList(idss)
|
2875
|
3095
|
fmt.Println("list22222", list)
|
2876
|
3096
|
//获取单位
|
2877
|
3097
|
miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
|
@@ -2893,6 +3113,7 @@ func (c *SZHisApiController) GetGoodsList() {
|
2893
|
3113
|
BuyPrice: item.BuyPrice,
|
2894
|
3114
|
SellPrice: item.SellPrice,
|
2895
|
3115
|
Remark: item.Remark,
|
|
3116
|
+ SpecificationName: item.SpecificationName,
|
2896
|
3117
|
}
|
2897
|
3118
|
|
2898
|
3119
|
result := service.SzybYML007(doctor_name, doctor_code, miConfig.Code, detail)
|
|
@@ -2928,6 +3149,69 @@ func (c *SZHisApiController) GetGoodsList() {
|
2928
|
3149
|
}
|
2929
|
3150
|
}
|
2930
|
3151
|
|
|
3152
|
+//func (c *SZHisApiController) GetGoodsList() {
|
|
3153
|
+//
|
|
3154
|
+// adminUserInfo := c.GetAdminUserInfo()
|
|
3155
|
+// orgId := adminUserInfo.CurrentOrgId
|
|
3156
|
+// fmt.Println("3344555555555", orgId)
|
|
3157
|
+// //获取所有耗材信息
|
|
3158
|
+// list, _ := service.GetGoodInformationList(orgId)
|
|
3159
|
+// fmt.Println("list22222", list)
|
|
3160
|
+// //获取单位
|
|
3161
|
+// miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
|
3162
|
+// var doctor_name string
|
|
3163
|
+// var doctor_code string
|
|
3164
|
+//
|
|
3165
|
+// doctor_name = "黄亦轩"
|
|
3166
|
+// doctor_code = "1001"
|
|
3167
|
+//
|
|
3168
|
+// var isSuccess bool = true
|
|
3169
|
+// for _, item := range list {
|
|
3170
|
+// fmt.Println("生产厂商", item.ManufacturerName)
|
|
3171
|
+// detail := &models.XtGoodInformation{
|
|
3172
|
+// GoodName: item.GoodName,
|
|
3173
|
+// SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
|
|
3174
|
+// ManufacturerName: item.ManufacturerName,
|
|
3175
|
+// ProductionType: item.ProductionType,
|
|
3176
|
+// SpecialMedical: item.SpecialMedical,
|
|
3177
|
+// BuyPrice: item.BuyPrice,
|
|
3178
|
+// SellPrice: item.SellPrice,
|
|
3179
|
+// Remark: item.Remark,
|
|
3180
|
+// }
|
|
3181
|
+//
|
|
3182
|
+// result := service.SzybYML007(doctor_name, doctor_code, miConfig.Code, detail)
|
|
3183
|
+// fmt.Println("reuslt8888", result)
|
|
3184
|
+// var dat map[string]interface{}
|
|
3185
|
+// if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
3186
|
+// fmt.Println(dat)
|
|
3187
|
+// } else {
|
|
3188
|
+// fmt.Println(err)
|
|
3189
|
+// }
|
|
3190
|
+//
|
|
3191
|
+// userJSONBytes, _ := json.Marshal(dat)
|
|
3192
|
+//
|
|
3193
|
+// var res Result
|
|
3194
|
+// if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
3195
|
+// utils.ErrorLog("解析失败:%v", err)
|
|
3196
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
3197
|
+// return
|
|
3198
|
+// }
|
|
3199
|
+// if res.Transreturncode == "00000000" {
|
|
3200
|
+//
|
|
3201
|
+// //备案成功返回状态
|
|
3202
|
+// _, err := service.UpdateGoodInformaitonByDetail(item.ID)
|
|
3203
|
+// fmt.Println("err2222222", err)
|
|
3204
|
+// } else {
|
|
3205
|
+// isSuccess = false
|
|
3206
|
+// //失败
|
|
3207
|
+//
|
|
3208
|
+// c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
|
3209
|
+// return
|
|
3210
|
+// }
|
|
3211
|
+// fmt.Println(isSuccess)
|
|
3212
|
+// }
|
|
3213
|
+//}
|
|
3214
|
+
|
2931
|
3215
|
//func (c *SZHisApiController) GetGoodsList() {
|
2932
|
3216
|
//
|
2933
|
3217
|
// adminUserInfo := c.GetAdminUserInfo()
|