|
@@ -185,7 +185,7 @@ func HisManagerApiRegistRouters() {
|
185
|
185
|
beego.Router("/api/pc_bg", &HisApiController{}, "get:FJ3501AND3502")
|
186
|
186
|
//删除库盘和变更
|
187
|
187
|
beego.Router("/api/delete_pc_bg", &HisApiController{}, "get:DeletePCandBG")
|
188
|
|
- beego.Router("/api/delete_xs_bg", &HisApiController{}, "get:DeleteXSandBG")
|
|
188
|
+ //beego.Router("/api/delete_xs_bg", &HisApiController{}, "get:DeleteXSandBG")
|
189
|
189
|
//药品变更
|
190
|
190
|
beego.Router("/api/changedrug", &HisApiController{}, "get:ChangeDrug")
|
191
|
191
|
|
|
@@ -537,74 +537,74 @@ func (c *HisApiController) DeletePCandBG() {
|
537
|
537
|
|
538
|
538
|
}
|
539
|
539
|
|
540
|
|
-func (c *HisApiController) DeleteXSandBG() {
|
541
|
|
- ids := c.GetString("ids")
|
542
|
|
- id_arr := strings.Split(ids, ",")
|
543
|
|
- admin_user_id, _ := c.GetInt64("admin_user_id")
|
544
|
|
- roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
|
545
|
|
-
|
546
|
|
- drugs, _ := service.GetNewDrugWarehouseInfo(id_arr)
|
547
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
548
|
|
- for _, item := range drugs {
|
549
|
|
- if item.IsPc == 1 && item.IsBg == 1 {
|
550
|
|
- var struct3507 models.Struct3507
|
551
|
|
- struct3507.FixmedinsBchno =
|
552
|
|
- struct3507.InvDataType = "1"
|
553
|
|
- struct3507.Opter = roles.UserName
|
554
|
|
- struct3507.OrgName = miConfig.OrgName
|
555
|
|
- struct3507.AccessKey = miConfig.AccessKey
|
556
|
|
- struct3507.RequestUrl = miConfig.Url
|
557
|
|
- struct3507.SecretKey = miConfig.SecretKey
|
558
|
|
- struct3507.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
|
559
|
|
- struct3507.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
|
560
|
|
-
|
561
|
|
- struct3507.Url = miConfig.Url
|
562
|
|
- struct3507.AppId = miConfig.Cainfo
|
563
|
|
- struct3507.AppSecret = miConfig.AppSecret
|
564
|
|
- struct3507.Enckey = miConfig.EncKey
|
565
|
|
- struct3507.SignKey = miConfig.SignKey
|
566
|
|
- struct3507.SecretKey = miConfig.SecretKey
|
567
|
|
- struct3507.FixmedinsBchno = ""
|
568
|
|
- struct3507.InvDataType = "1"
|
569
|
|
-
|
570
|
|
- service.FJyb3507(struct3507)
|
571
|
|
-
|
572
|
|
- var struct3507_2 models.Struct3507
|
573
|
|
- struct3507_2.OrgName = miConfig.OrgName
|
574
|
|
- struct3507_2.AccessKey = miConfig.AccessKey
|
575
|
|
- struct3507_2.RequestUrl = miConfig.Url
|
576
|
|
- struct3507_2.SecretKey = miConfig.SecretKey
|
577
|
|
- struct3507_2.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
|
578
|
|
- struct3507_2.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
|
579
|
|
- struct3507_2.FixmedinsBchno = ""
|
580
|
|
- struct3507_2.InvDataType = "2"
|
581
|
|
-
|
582
|
|
- struct3507_2.Url = miConfig.Url
|
583
|
|
- struct3507_2.AppId = miConfig.Cainfo
|
584
|
|
- struct3507_2.AppSecret = miConfig.AppSecret
|
585
|
|
- struct3507_2.Enckey = miConfig.EncKey
|
586
|
|
- struct3507_2.SignKey = miConfig.SignKey
|
587
|
|
- struct3507_2.SecretKey = miConfig.SecretKey
|
588
|
|
- struct3507_2.FixmedinsBchno = ""
|
589
|
|
- struct3507_2.InvDataType = "1"
|
590
|
|
- service.FJyb3507(struct3507_2)
|
591
|
|
- }
|
592
|
|
- if item.IsPc == 1 && item.IsBg == 0 {
|
593
|
|
- var struct3507 models.Struct3507
|
594
|
|
- struct3507.OrgName = miConfig.OrgName
|
595
|
|
- struct3507.AccessKey = miConfig.AccessKey
|
596
|
|
- struct3507.RequestUrl = miConfig.Url
|
597
|
|
- struct3507.SecretKey = miConfig.SecretKey
|
598
|
|
- struct3507.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
|
599
|
|
- struct3507.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
|
600
|
|
- struct3507.FixmedinsBchno = ""
|
601
|
|
- struct3507.InvDataType = "1"
|
602
|
|
- service.FJyb3507(struct3507)
|
603
|
|
- }
|
604
|
|
-
|
605
|
|
- }
|
606
|
|
-
|
607
|
|
-}
|
|
540
|
+//func (c *HisApiController) DeleteXSandBG() {
|
|
541
|
+// ids := c.GetString("ids")
|
|
542
|
+// id_arr := strings.Split(ids, ",")
|
|
543
|
+// admin_user_id, _ := c.GetInt64("admin_user_id")
|
|
544
|
+// roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
|
|
545
|
+//
|
|
546
|
+// drugs, _ := service.GetNewDrugWarehouseInfo(id_arr)
|
|
547
|
+// miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
|
548
|
+// for _, item := range drugs {
|
|
549
|
+// if item.IsPc == 1 && item.IsBg == 1 {
|
|
550
|
+// var struct3507 models.Struct3507
|
|
551
|
+// struct3507.FixmedinsBchno =item
|
|
552
|
+// struct3507.InvDataType = "1"
|
|
553
|
+// struct3507.Opter = roles.UserName
|
|
554
|
+// struct3507.OrgName = miConfig.OrgName
|
|
555
|
+// struct3507.AccessKey = miConfig.AccessKey
|
|
556
|
+// struct3507.RequestUrl = miConfig.Url
|
|
557
|
+// struct3507.SecretKey = miConfig.SecretKey
|
|
558
|
+// struct3507.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
|
|
559
|
+// struct3507.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
|
|
560
|
+//
|
|
561
|
+// struct3507.Url = miConfig.Url
|
|
562
|
+// struct3507.AppId = miConfig.Cainfo
|
|
563
|
+// struct3507.AppSecret = miConfig.AppSecret
|
|
564
|
+// struct3507.Enckey = miConfig.EncKey
|
|
565
|
+// struct3507.SignKey = miConfig.SignKey
|
|
566
|
+// struct3507.SecretKey = miConfig.SecretKey
|
|
567
|
+// struct3507.FixmedinsBchno = ""
|
|
568
|
+// struct3507.InvDataType = "1"
|
|
569
|
+//
|
|
570
|
+// service.FJyb3507(struct3507)
|
|
571
|
+//
|
|
572
|
+// var struct3507_2 models.Struct3507
|
|
573
|
+// struct3507_2.OrgName = miConfig.OrgName
|
|
574
|
+// struct3507_2.AccessKey = miConfig.AccessKey
|
|
575
|
+// struct3507_2.RequestUrl = miConfig.Url
|
|
576
|
+// struct3507_2.SecretKey = miConfig.SecretKey
|
|
577
|
+// struct3507_2.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
|
|
578
|
+// struct3507_2.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
|
|
579
|
+// struct3507_2.FixmedinsBchno = ""
|
|
580
|
+// struct3507_2.InvDataType = "2"
|
|
581
|
+//
|
|
582
|
+// struct3507_2.Url = miConfig.Url
|
|
583
|
+// struct3507_2.AppId = miConfig.Cainfo
|
|
584
|
+// struct3507_2.AppSecret = miConfig.AppSecret
|
|
585
|
+// struct3507_2.Enckey = miConfig.EncKey
|
|
586
|
+// struct3507_2.SignKey = miConfig.SignKey
|
|
587
|
+// struct3507_2.SecretKey = miConfig.SecretKey
|
|
588
|
+// struct3507_2.FixmedinsBchno = ""
|
|
589
|
+// struct3507_2.InvDataType = "1"
|
|
590
|
+// service.FJyb3507(struct3507_2)
|
|
591
|
+// }
|
|
592
|
+// if item.IsPc == 1 && item.IsBg == 0 {
|
|
593
|
+// var struct3507 models.Struct3507
|
|
594
|
+// struct3507.OrgName = miConfig.OrgName
|
|
595
|
+// struct3507.AccessKey = miConfig.AccessKey
|
|
596
|
+// struct3507.RequestUrl = miConfig.Url
|
|
597
|
+// struct3507.SecretKey = miConfig.SecretKey
|
|
598
|
+// struct3507.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
|
|
599
|
+// struct3507.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
|
|
600
|
+// struct3507.FixmedinsBchno = ""
|
|
601
|
+// struct3507.InvDataType = "1"
|
|
602
|
+// service.FJyb3507(struct3507)
|
|
603
|
+// }
|
|
604
|
+//
|
|
605
|
+// }
|
|
606
|
+//
|
|
607
|
+//}
|
608
|
608
|
|
609
|
609
|
func (c *HisApiController) ChangeDrug() {
|
610
|
610
|
ids := c.GetString("ids")
|
|
@@ -878,6 +878,7 @@ func SaleStock(org_id int64, pre models.HisPrescription, drug *models.DrugFlow,
|
878
|
878
|
struct3505.FixmedinsHilistId = miConfig.Code
|
879
|
879
|
struct3505.FixmedinsHilistName = miConfig.OrgName
|
880
|
880
|
struct3505.FixmedinsBchno = drug.NewDrugWarehouseInfo.Bchno
|
|
881
|
+ struct3505.Opter = role.UserName
|
881
|
882
|
|
882
|
883
|
struct3505.FixmedinsCode = miConfig.Code
|
883
|
884
|
roles, _ := service.GetAdminUserInfoByID(org_id, pre.Creator)
|
|
@@ -888,7 +889,7 @@ func SaleStock(org_id int64, pre models.HisPrescription, drug *models.DrugFlow,
|
888
|
889
|
struct3505.SetlId = order.SetlId
|
889
|
890
|
struct3505.MdtrtSn = order.MdtrtId
|
890
|
891
|
struct3505.ManuLotnum = drug.Number
|
891
|
|
- struct3505.ManuDate = time.Unix(drug.ProductDate, 0).Format("2006-01-02 15:04:05")
|
|
892
|
+ struct3505.ManuDate = time.Unix(drug.ProductDate, 0).Format("2006-01-02")
|
892
|
893
|
struct3505.ExpyEnd = ""
|
893
|
894
|
struct3505.RxFlag = "0"
|
894
|
895
|
struct3505.TrdnFlag = "1"
|