소스 검색

仓库管理

mainqaq 3 년 전
부모
커밋
7bb46bd97d
1개의 변경된 파일18개의 추가작업 그리고 2개의 파일을 삭제
  1. 18 2
      controllers/secondary_order_api_contorller.go

+ 18 - 2
controllers/secondary_order_api_contorller.go 파일 보기

32
 	beego.Router("/api/secondary/updateoutinfo", &SecondaryOrderApiController{}, "get:UpdateOutInfo")               //更改耗材自动出库仓库
32
 	beego.Router("/api/secondary/updateoutinfo", &SecondaryOrderApiController{}, "get:UpdateOutInfo")               //更改耗材自动出库仓库
33
 	beego.Router("/api/secondary/updatedruginfo", &SecondaryOrderApiController{}, "get:UpdateDrugInfo")             //更改药品自动入库仓库
33
 	beego.Router("/api/secondary/updatedruginfo", &SecondaryOrderApiController{}, "get:UpdateDrugInfo")             //更改药品自动入库仓库
34
 	beego.Router("/api/secondary/updatedrugout", &SecondaryOrderApiController{}, "get:UpdateDrugOut")               //更改药品自动出库仓库
34
 	beego.Router("/api/secondary/updatedrugout", &SecondaryOrderApiController{}, "get:UpdateDrugOut")               //更改药品自动出库仓库
35
+	beego.Router("/api/secondary/getusername", &SecondaryOrderApiController{}, "get:GetuserName")                   //获取仓库管理员信息
35
 	beego.Router("/api/secondary/byliinit", &SecondaryOrderApiController{}, "get:Byliinit")                         //初始化旧数据
36
 	beego.Router("/api/secondary/byliinit", &SecondaryOrderApiController{}, "get:Byliinit")                         //初始化旧数据
36
 
37
 
37
 }
38
 }
57
 //修改仓库状态
58
 //修改仓库状态
58
 func (this *SecondaryOrderApiController) UpdateStatus() {
59
 func (this *SecondaryOrderApiController) UpdateStatus() {
59
 	orgId := this.GetAdminUserInfo().CurrentOrgId
60
 	orgId := this.GetAdminUserInfo().CurrentOrgId
61
+	orgId = 9675
60
 	check := map[string][]string{
62
 	check := map[string][]string{
61
 		"id": {"must", "int", "id"},
63
 		"id": {"must", "int", "id"},
62
 	}
64
 	}
220
 	if tmpid == nil {
222
 	if tmpid == nil {
221
 		admin_id = 0
223
 		admin_id = 0
222
 	} else {
224
 	} else {
223
-		admin_id = int64(dataBody["storehouse_status"].(float64)) //管理员id
225
+		admin_id = int64(dataBody["storehouse_admin_id"].(float64)) //管理员id
224
 	}
226
 	}
225
 	if tmpname == nil {
227
 	if tmpname == nil {
226
 		admin_name = "admin"
228
 		admin_name = "admin"
227
 	} else {
229
 	} else {
228
-		admin_name = dataBody["storehouse_status"].(string) //管理员名称
230
+		admin_name = dataBody["storehouse_admin_name"].(string) //管理员名称
229
 	}
231
 	}
230
 
232
 
231
 	switch {
233
 	switch {
550
 	})
552
 	})
551
 	return
553
 	return
552
 }
554
 }
555
+
556
+//查询机构所属管理员
557
+func (this *SecondaryOrderApiController) GetuserName() {
558
+	orgId := this.GetAdminUserInfo().CurrentOrgId
559
+	username, err := service.GetuserName(orgId)
560
+	if err != nil {
561
+		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, err.Error())
562
+		return
563
+	}
564
+	this.ServeSuccessJSON(map[string]interface{}{
565
+		"list": username,
566
+	})
567
+
568
+}