feat: restrict permission roles

This commit is contained in:
Frudrax Cheng
2026-06-06 13:50:56 +08:00
parent a55f515930
commit 5edb25ac4e
17 changed files with 229 additions and 175 deletions
+7 -7
View File
@@ -59,7 +59,7 @@ func (c *ProjectOrdersController) Create(ctx *gin.Context) {
// FindAll 获取项目工单列表
// @Summary 获取项目工单列表
// @Description 支持分页、搜索、按状态/服务类型/技术员筛选
// @Description 支持分页、搜索、按状态/服务类型/工单负责人筛选
// @Tags 项目工单
// @Produce json
// @Security BearerAuth
@@ -68,7 +68,7 @@ func (c *ProjectOrdersController) Create(ctx *gin.Context) {
// @Param search query string false "搜索关键词"
// @Param workOrderStatus query string false "工单状态"
// @Param serviceType query string false "服务类型"
// @Param technicianId query int false "技术员 ID"
// @Param technicianId query int false "工单负责人 ID"
// @Param mine query bool false "仅查看自己负责的工单"
// @Success 200 {object} models.PaginationResponse
// @Failure 401 {object} models.ErrorResponse
@@ -179,9 +179,9 @@ func (c *ProjectOrdersController) Update(ctx *gin.Context) {
})
}
// SubmitCompletion 技术员提交完成资料
// SubmitCompletion 工单负责人提交完成资料
// @Summary 提交完成确认
// @Description 技术员填写处理结果后提交,工单进入"待完成确认"状态
// @Description 工单负责人填写处理结果后提交,工单进入"待完成确认"状态
// @Tags 项目工单
// @Accept json
// @Produce json
@@ -257,14 +257,14 @@ func (c *ProjectOrdersController) GenerateQRCode(ctx *gin.Context) {
})
}
// Reassign 重新分配技术员(仅管理员)
// @Summary 重新分配技术员
// Reassign 重新分配工单负责人(仅管理员)
// @Summary 重新分配工单负责人
// @Tags 项目工单
// @Accept json
// @Produce json
// @Security BearerAuth
// @Param serialNumber path string true "工单号"
// @Param data body models.ReassignProjectOrderDTO true "新技术员 ID"
// @Param data body models.ReassignProjectOrderDTO true "新工单负责人 ID"
// @Success 200 {object} models.DataResponse
// @Failure 400 {object} models.ErrorResponse
// @Failure 401 {object} models.ErrorResponse