zhangherong
2025-07-03 c82b14f3a882698cbca62ef168615d31711320ca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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);
    }
}