| | |
| | | import com.qianwen.smartman.modules.smis.entity.WorkstationWcs; |
| | | import com.qianwen.smartman.modules.smis.entity.WorkstationWcsUsage; |
| | | import com.qianwen.smartman.modules.smis.mapper.WorkstationWcsMapper; |
| | | import com.qianwen.smartman.modules.smis.service.IDmpVariablesService; |
| | | import com.qianwen.smartman.modules.smis.service.IWorkstationOfMachineService; |
| | | import com.qianwen.smartman.modules.smis.service.IWorkstationService; |
| | | import com.qianwen.smartman.modules.smis.service.IWorkstationWcsService; |
| | |
| | | @Autowired |
| | | @Lazy |
| | | private IWorkstationService workstationService; |
| | | @Autowired |
| | | @Lazy |
| | | private IDmpVariablesService dmpVariablesService; |
| | | //@Autowired |
| | | //@Lazy |
| | | //private IDmpVariablesService dmpVariablesService; |
| | | @Autowired |
| | | private IWorkstationDynamicCollectService dynamicCollectService; |
| | | @Autowired |
| | | @Lazy |
| | | private IWorkstationWcsUsageService workstationWcsUsageService; |
| | | private static final String SUFFIX = "_____0"; |
| | | |
| | | /* |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public List<WorkstationWcsVO> updateBatch(List<WorkstationWcsSaveVO> workstationWcsSaveVOList) { |
| | | List<WorkstationWcs> workstationWcsList = WorkstationWcsConvert.INSTANCE.convertVOToEntity(workstationWcsSaveVOList); |
| | |
| | | .eq(WorkstationWcs::getDataType, workstationWcs.getDataType()) |
| | | .eq(WorkstationWcs::getDataItem, workstationWcs.getDataItem())) |
| | | .stream().map(WorkstationWcs::getId).collect(Collectors.toList()); |
| | | /* |
| | | List<Long> ids = (List) list((Wrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq(Func.isNotEmpty(workstationWcs.getWorkstationId()), (v0) -> { |
| | | return v0.getWorkstationId(); |
| | | }, workstationWcs.getWorkstationId()).eq((v0) -> { |
| | | return v0.getCollectSettingItem(); |
| | | }, workstationWcs.getCollectSettingItem())).eq((v0) -> { |
| | | return v0.getDataType(); |
| | | }, workstationWcs.getDataType())).eq((v0) -> { |
| | | return v0.getDataItem(); |
| | | }, workstationWcs.getDataItem())).stream().map((v0) -> { |
| | | return v0.getId(); |
| | | }).collect(Collectors.toList());*/ |
| | | |
| | | if (Func.isNotEmpty(ids)) { |
| | | workstationWcsIdList.addAll(ids); |
| | | } else { |
| | |
| | | wrapperVO(convert); |
| | | return convert; |
| | | } |
| | | */ |
| | | |
| | | /* |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public List<WorkstationWcsVO> insert(List<WorkstationWcsSaveVO> workstationWcsSaveVOList) { |
| | |
| | | //返回所有数据的VO列表 |
| | | return WorkstationWcsConvert.INSTANCE.convert(saveWorkstationWcsList); |
| | | } |
| | | */ |
| | | |
| | | private void validWorkstationExistsWcs(final List<WorkstationWcsSaveVO> workstationWcsSaveVOList) { |
| | | boolean exist = (workstationWcsSaveVOList.stream().filter(it -> { |
| | |
| | | }); |
| | | Assert.isTrue(!exist, MessageUtils.message("workstation.wcs.usage.id.already.exists", new Object[0]), new Object[0]); |
| | | } |
| | | |
| | | /* |
| | | private List<DmpVariables> validDmpName(Long workstationId, List<WorkstationWcsSaveVO> workstationWcsSaveVOList) { |
| | | WorkstationOfMachine one = this.workstationOfMachineService.getWorkstationOfMachineByWorkstationId(workstationId); |
| | | |
| | |
| | | List<String> collectItemDistinctList = collectItemList.stream().distinct().collect(Collectors.toList()); |
| | | Assert.isTrue(collectItemList.size() == collectItemDistinctList.size(), MessageUtils.message("workstationWcs.collectItem.already.exists", new Object[0]), new Object[0]); |
| | | return dmpVariablesList; |
| | | } |
| | | }*/ |
| | | |
| | | public void setCrc(WorkstationWcs workstationWcs) { |
| | | byte[] bytes = workstationWcs.getDataItem().concat(SUFFIX).getBytes(); |