| Line 76... |
Line 76... |
| 76 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
76 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
| 77 |
import com.spice.profitmandi.dao.enumuration.dtr.PaymentOptionReferenceType;
|
77 |
import com.spice.profitmandi.dao.enumuration.dtr.PaymentOptionReferenceType;
|
| 78 |
import com.spice.profitmandi.dao.enumuration.fofo.ReturnType;
|
78 |
import com.spice.profitmandi.dao.enumuration.fofo.ReturnType;
|
| 79 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
79 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
| 80 |
import com.spice.profitmandi.dao.enumuration.fofo.SettlementType;
|
80 |
import com.spice.profitmandi.dao.enumuration.fofo.SettlementType;
|
| 81 |
import com.spice.profitmandi.dao.repository.GenericRepository;
|
- |
|
| 82 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
81 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| 83 |
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
|
82 |
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
|
| 84 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
83 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| 85 |
import com.spice.profitmandi.dao.repository.dtr.InsurancePolicyRepository;
|
84 |
import com.spice.profitmandi.dao.repository.dtr.InsurancePolicyRepository;
|
| 86 |
import com.spice.profitmandi.dao.repository.dtr.InsuranceProviderRepository;
|
85 |
import com.spice.profitmandi.dao.repository.dtr.InsuranceProviderRepository;
|
| Line 1645... |
Line 1644... |
| 1645 |
Item item = itemRepository.selectById(itemId);
|
1644 |
Item item = itemRepository.selectById(itemId);
|
| 1646 |
order.getLineItem().setColor(item.getColor());
|
1645 |
order.getLineItem().setColor(item.getColor());
|
| 1647 |
return true;
|
1646 |
return true;
|
| 1648 |
}
|
1647 |
}
|
| 1649 |
|
1648 |
|
| - |
|
1649 |
@Override
|
| - |
|
1650 |
public FofoOrder getOrderByInventoryItemId(int inventoryItemId) throws Exception {
|
| - |
|
1651 |
List<FofoLineItem> lineItems = fofoLineItemRepository.selectByInventoryItemId(inventoryItemId);
|
| - |
|
1652 |
if(lineItems.size() > 0) {
|
| - |
|
1653 |
FofoOrderItem fofoOrderItem = fofoOrderItemRepository.selectById(lineItems.get(0).getFofoOrderItemId());
|
| - |
|
1654 |
fofoOrderItem.setFofoLineItems(new HashSet<>(lineItems));
|
| - |
|
1655 |
FofoOrder fofoOrder = fofoOrderRepository.selectByOrderId(fofoOrderItem.getOrderId());
|
| - |
|
1656 |
fofoOrder.setOrderItem(fofoOrderItem);
|
| - |
|
1657 |
return fofoOrder;
|
| - |
|
1658 |
} else {
|
| - |
|
1659 |
throw new Exception(String.format("Could not find inventoryItemId - %s", inventoryItemId));
|
| - |
|
1660 |
}
|
| - |
|
1661 |
}
|
| - |
|
1662 |
|
| 1650 |
}
|
1663 |
}
|