package com.ruoyi.production.controller;
|
|
import com.ruoyi.framework.web.domain.R;
|
import com.ruoyi.production.bean.dto.ProductionTeamDto;
|
import com.ruoyi.production.bean.vo.ProductionTeamVo;
|
import com.ruoyi.production.bean.vo.TeamLeaderVo;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import com.ruoyi.production.service.ProductionTeamUserRelService;
|
import io.swagger.v3.oas.annotations.Operation;
|
import lombok.AllArgsConstructor;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
/**
|
* <p>
|
* 前端控制器
|
* </p>
|
*
|
* @author 芯导软件(江苏)有限公司
|
* @since 2026-05-11 11:15:05
|
*/
|
@RestController
|
@RequestMapping("/productionTeamUserRel")
|
@AllArgsConstructor
|
public class ProductionTeamUserRelController {
|
private ProductionTeamUserRelService productionTeamUserRelService;
|
/**
|
* 查询班组长列表
|
*/
|
@GetMapping("/leaderList")
|
@Operation(summary = "查询班组长列表", description = "查询生产班组班组长列表")
|
public R<List<TeamLeaderVo>> getTeamLeaderList() {
|
return R.ok(productionTeamUserRelService.listAllLeaders());
|
}
|
|
/**
|
* 根据班组长用户ID查询班组成员列表
|
*/
|
@GetMapping("/memberListByLeader")
|
@Operation(summary = "根据班组长查询班组成员", description = "根据班组长用户ID查询所属班组的成员列表")
|
public R<List<ProductionTeamVo.MemberVo>> getMemberListByLeader(@RequestParam Long leaderUserId) {
|
return R.ok(productionTeamUserRelService.listTeamMembersByLeader(leaderUserId));
|
}
|
}
|