Inventory summary

First, the inventory list of logical comb

1, RFID logic consumables

 

 

Private List <FhvcInventoryConsumablesVo> judgeRfidConsumables (FhvcInventoryDto DTO) {
         // consumable supplies Guizu cabinet list, and in accordance with cstId deviceId distinguish 
        List <FhvcInventoryConsumablesVo> inventoryConsumablesVos = fhvcInventoryService.inventoryCurrentConsumables ( 
                dto.getDeviceId (), FhvcInventory.STATUS_TWOIN, dto.getThingId (), Cst.SCAN_RFID); 
        // scanned EPC 
        List <String> = dto.getScanEpcDetails EPCs (..) Stream () Map (S -> . s.getEpc ()) the collect (Collectors.toList ()) ; 
        dto.setEpcs (EPCs); 
        List <String> = noralEpcs new new the ArrayList <String> (); 
        List <String>addEpcs = new ArrayList<>();
        List<String> reduceEpcs = new ArrayList<>();
        List<String> errorEpcs = new ArrayList<>();
        List<String> rightEpcs = new ArrayList<>();

        differentEpcs(dto, epcs, addEpcs, reduceEpcs, errorEpcs, rightEpcs);
        if (rightEpcs != null && !rightEpcs.isEmpty()) {
            List<FhvcInventory> fhvcInventories = corresDevice(rightEpcs, dto);
            inventoryConsumablesVos = judgeNormalEpc(inventoryConsumablesVos, fhvcInventories, noralEpcs);

        }

        setMoreAndLittileEpcs(dto, addEpcs, rightEpcs, noralEpcs, reduceEpcs);

        return inventoryConsumablesVos;

    }

1) First check out the supplies basic information in the cabinet according to deviceId and thingId:

List<FhvcInventoryConsumablesVo> inventoryConsumablesVos = fhvcInventoryService.inventoryCurrentConsumables(
            dto.getDeviceId(),FhvcInventory.STATUS_TWOIN, dto.getThingId(), Cst.SCAN_RFID);

2) According to the passed scan RFID EPC determined right and wrong EPC

List <String> allEpcs = fhvcInventoryService.allEpcs ();
          // scanned and all epc epc differencing error is set epc 
        errorEpcs.addAll ((List <String> ) CollectionUtils.subtract (EPCs, allEpcs));         
         // scan to the library and some epc epc is the intersection of the normal epc 
        rightEpcs.addAll ((List <String> ) CollectionUtils.intersection (EPCs, allEpcs));     
dto.setErrorEpcs (errorEpcs);    

 

 

Guess you like

Origin www.cnblogs.com/tercelpower/p/11942401.html