Rev 10120 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/****/package in.shop2020.warehouse.handler;import java.util.Date;import java.util.HashMap;import java.util.List;import java.util.Map;import in.shop2020.warehouse.TransferLotStatus;import in.shop2020.warehouse.domain.TransferLot;import in.shop2020.warehouse.persistence.TransferLotMapper;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;/*** @author amar**/@Servicepublic class TransferLotHandler {@Autowiredprivate TransferLotMapper transferLotMapper;public long createTransferLot(TransferLot transferLot) {transferLotMapper.createTransferLot(transferLot);return transferLot.getId();}public TransferLot getTransferLot(long transferLotId) {return transferLotMapper.getTransferLot(transferLotId);}public List<TransferLot> getTransferLotsByDate(Date fromDate, Date toDate) {return transferLotMapper.getTransferLotsByDate(fromDate, toDate);}public Map<Long, Long> getItemsInTransferLot(long transferLotId) {Map<Integer, Integer> result = transferLotMapper.getItemsInTransferLot(transferLotId);Map<Long, Long> lotItems = new HashMap<Long, Long>();for(Integer itemId : result.keySet()){Long count = Long.parseLong(((Object)((Map<String,Long>)(Object)result.get(itemId)).get("count")).toString());lotItems.put(new Long(itemId), count);}return lotItems;}public void markTransferLotAsReceived(long id, String remoteTransferRefNumber) {transferLotMapper.markTransferLotAsReceived(id, remoteTransferRefNumber);}public List<Long> getAllowedDestinationWarehousesForTransfer(long originWarehouseId) {return transferLotMapper.getAllowedDestinationWarehousesForTransfer(originWarehouseId);}public void updateTransferLotStatus(long id,TransferLotStatus status) {transferLotMapper.updateTransferLotStatus(id, status);}}