Index: ssts-maintain/src/main/java/com/forgon/disinfectsystem/maintain/device/consumptivematerial/service/ConsumptiveMaterialContainerManagerImpl.java =================================================================== diff -u -r34055 -r34070 --- ssts-maintain/src/main/java/com/forgon/disinfectsystem/maintain/device/consumptivematerial/service/ConsumptiveMaterialContainerManagerImpl.java (.../ConsumptiveMaterialContainerManagerImpl.java) (revision 34055) +++ ssts-maintain/src/main/java/com/forgon/disinfectsystem/maintain/device/consumptivematerial/service/ConsumptiveMaterialContainerManagerImpl.java (.../ConsumptiveMaterialContainerManagerImpl.java) (revision 34070) @@ -149,8 +149,8 @@ //自动生成领用记录 //receiveRecord = "[{'warehouseId':10154,'warehouseName':'供应室仓库','consumptiveMaterialTypeId':10,'disposableGoodsBatchStockId':40051,'amount':1}]"; - if(StringUtils.isNotBlank(receiveRecord)){ - JSONArray receiveRecordArray = JSONArray.fromObject(receiveRecord); + if(CollectionUtils.isNotEmpty(newVolumes) && StringUtils.isNotBlank(receiveRecord)){ + JSONArray receiveRecordArray = getReceiveRecordArray(receiveRecord, newVolumes); if(receiveRecordArray != null && receiveRecordArray.size() >0){ for (int i=0;i newVolumes) { + JSONArray result = new JSONArray(); + JSONArray receiveRecordArray = JSONArray.fromObject(receiveRecord); + Map consumptiveMaterialTypeMap = new HashMap(); + if(CollectionUtils.isNotEmpty(newVolumes)){ + for (ConsumptiveMaterialVolume v : newVolumes) { + ConsumptiveMaterialType type = v.getConsumptiveMaterialType(); + if(type == null){ + continue; + } + consumptiveMaterialTypeMap.put(type.getId(), type); + } + } + if(receiveRecordArray != null && receiveRecordArray.size() >0){ + for(int i=0;i