package org.jeecg.modules.eam.controller; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.modules.eam.entity.EamEquipment; import org.jeecg.modules.eam.service.IEamEquipmentService; import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.system.vo.UserSelector; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @Description: 用户选择 * @Author: jeecg-boot * @Date: 2025-03-19 * @Version: V1.0 */ @Slf4j @Api(tags = "用户选择") @RestController @RequestMapping("/eam/user_select") public class EamUserSelectController { @Autowired private ISysUserService sysUserService; @Autowired private IEamEquipmentService eamEquipmentService; @ApiOperation(value = "用户选择-选择操作人列表查询", notes = "用户选择-选择操作人列表查询") @GetMapping(value = "/list") public Result selectOperatorList(@RequestParam(required = false, value = "equipmentId") String equipmentId, @RequestParam("positionCode") String positionCode) { String productionId = null; String equipmentCode = null; if (StringUtils.isNotBlank(equipmentId)) { EamEquipment equipment = eamEquipmentService.getById(equipmentId); if(equipment != null) { productionId = equipment.getOrgId(); equipmentCode = equipment.getEquipmentCode(); } } List list = sysUserService.selectOperatorList(equipmentCode, productionId, positionCode); return Result.ok(list); } }