package com.uas.platform.b2b.erp.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import com.uas.platform.b2b.erp.model.SaleDownChange;
import com.uas.platform.b2b.erp.model.SaleDownChangeReply;
import com.uas.platform.b2b.erp.service.SaleDownChangeService;
import com.uas.platform.b2b.model.PurchaseOrderChange;

@Service
public class SaleDownChangeServiceImpl implements SaleDownChangeService {

	@Override
	public List<SaleDownChange> convertPurchaseOrderChange(List<PurchaseOrderChange> orderChanges) {
		List<SaleDownChange> changes = new ArrayList<SaleDownChange>();
		for (PurchaseOrderChange orderChange : orderChanges)
			changes.add(new SaleDownChange(orderChange));
		return changes;
	}

	@Override
	public List<SaleDownChangeReply> convertOrderChangeReply(List<PurchaseOrderChange> changes) {
		List<SaleDownChangeReply> replies = new ArrayList<SaleDownChangeReply>();
		for (PurchaseOrderChange change : changes) {
			replies.add(new SaleDownChangeReply(change));
		}
		return replies;
	}

}