mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
获得机台树Bug修改
This commit is contained in:
+2
-2
@@ -127,8 +127,8 @@ public class MachineController {
|
|||||||
@GetMapping("getMachineTree")
|
@GetMapping("getMachineTree")
|
||||||
@Operation(summary = "获得机台树")
|
@Operation(summary = "获得机台树")
|
||||||
//@PreAuthorize("@ss.hasPermission('machine::query')")
|
//@PreAuthorize("@ss.hasPermission('machine::query')")
|
||||||
public CommonResult<Map<Integer, List<MachineVO>>> getMachineTree(@RequestParam(required = false) Long organId ,@RequestParam(required = false) Long type) {
|
public CommonResult<Map<Integer, List<MachineVO>>> getMachineTree(@RequestParam(required = false) Long type) {
|
||||||
return success(machineService.getMachineTree(organId,type));
|
return success(machineService.getMachineTree(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = {"/list-all-simple", "/simple-list"})
|
@GetMapping(value = {"/list-all-simple", "/simple-list"})
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ public interface MachineService {
|
|||||||
|
|
||||||
List<MachineDO> list(Collection<Long> ids);
|
List<MachineDO> list(Collection<Long> ids);
|
||||||
|
|
||||||
Map<Integer, List<MachineVO>> getMachineTree(Long organId,Long type);
|
Map<Integer, List<MachineVO>> getMachineTree(Long type);
|
||||||
|
|
||||||
Boolean auth(MachineOrgAuthReq vo);
|
Boolean auth(MachineOrgAuthReq vo);
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -44,6 +44,7 @@ import javax.annotation.Resource;
|
|||||||
|
|
||||||
import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR;
|
import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR;
|
||||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
||||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -236,9 +237,9 @@ public class MachineServiceImpl implements MachineService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Integer, List<MachineVO>> getMachineTree(Long organId,Long type) {
|
public Map<Integer, List<MachineVO>> getMachineTree(Long type) {
|
||||||
List<MachineDO> machineDOS = machineMapper.selectList(new LambdaQueryWrapperX<MachineDO>()
|
List<MachineDO> machineDOS = machineMapper.selectList(new LambdaQueryWrapperX<MachineDO>()
|
||||||
.eqIfPresent(MachineDO::getOrganId, organId)
|
.eqIfPresent(MachineDO::getOrganId, getUserOrganId())
|
||||||
.eqIfPresent(MachineDO::getMachineType, type)
|
.eqIfPresent(MachineDO::getMachineType, type)
|
||||||
.select(MachineDO::getName, MachineDO::getMachineType, MachineDO::getId, MachineDO::getLabelId, MachineDO::getCreateTime)
|
.select(MachineDO::getName, MachineDO::getMachineType, MachineDO::getId, MachineDO::getLabelId, MachineDO::getCreateTime)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user