yangys
2025-04-10 220141036107ef2103833fcd878de43307ca0905
smart-man-boot/src/main/java/com/qianwen/smartman/modules/smis/service/impl/WorkstationServiceImpl.java
@@ -152,6 +152,8 @@
    private WorkstationDatapointsService wsDpService;
    @Autowired
    private LicenseWrapper licenseWrapper;
    @Autowired
    private WorkstationDatapointsService dataPointService;
    
    private final String NAME = "默认工作台";
    private final Integer SORT = 1;
@@ -237,9 +239,12 @@
        }
        return workstationVO;
    }
    /**
     * 验证许可中配置的设备数量
     */
    void checkLicenseCount() {
       
       Wrapper<Workstation> wrapper = Wrappers.lambdaQuery(Workstation.class).eq(Workstation::getIsDeleted, 0);
       Long count = workstationMapper.selectCount(wrapper);
       
@@ -376,6 +381,9 @@
            this.workstationWcsService.deleteByWorkstationIdList(workstationIds);
            this.workstationOfMachineService.remove(Wrappers.<WorkstationOfMachine>lambdaQuery().in(WorkstationOfMachine::getWorkstationId, workstationIds));
            this.commonGroupOfItemService.remove(Wrappers.<CommonGroupOfItem>lambdaQuery().in(CommonGroupOfItem::getItemId, workstationIds));
            //20250324新增,删除工位对应的数据点位配置。
            dataPointService.removeByWorkstation(workstationIds);
            /*
            this.workstationOfMachineService.remove((Wrapper) Wrappers.lambdaQuery().in((v0) -> {
                return v0.getWorkstationId();
@@ -407,7 +415,7 @@
                return String.valueOf(item.getId());
            }).collect(Collectors.toList()));
        }
        List<WorkstationVO> workstationVOS = this.workstationMapper.listPage(workStationGroupIdList, workstationVOIPage, keyWord, groupId, CommonGroupConstant.ALL_WORKSTATION_ID, status == null ? CommonConstant.ENABLE : status, type, Integer.valueOf(LocalDate.now().getYear()));
        List<WorkstationVO> workstationVOS = this.workstationMapper.listPage(workStationGroupIdList, workstationVOIPage, keyWord, groupId, CommonGroupConstant.ALL_WORKSTATION_ID, status == null ? CommonConstant.ENABLE : status, type, LocalDate.now().getYear());
        workstationVOS.forEach(workstationVO -> {
            String calendarName = workstationVO.getCalendarName();
            if (Func.isBlank(calendarName)) {