¶Ô±ÈÐÂÎļþ |
| | |
| | | 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<UserSelector> list = sysUserService.selectOperatorList(equipmentCode, productionId, positionCode); |
| | | return Result.ok(list); |
| | | } |
| | | } |