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.OutSourceProdInOutDown;
import com.uas.platform.b2b.erp.service.OutSourceProdInOutDownService;
import com.uas.platform.b2b.model.MakeAccept;
import com.uas.platform.b2b.model.MakeReturn;

@Service
public class OutSourceProdInOutDownServiceImpl implements OutSourceProdInOutDownService {

	@Override
	public List<OutSourceProdInOutDown> convertOutSourceAccepts(List<MakeAccept> makeAccepts) {
		List<OutSourceProdInOutDown> prodInOutDowns = new ArrayList<OutSourceProdInOutDown>();
		for (MakeAccept makeAccept : makeAccepts) {
			prodInOutDowns.add(new OutSourceProdInOutDown(makeAccept));
		}
		return prodInOutDowns;
	}

	@Override
	public List<OutSourceProdInOutDown> convertMakeReturns(List<MakeReturn> makeReturns) {
		List<OutSourceProdInOutDown> downs = new ArrayList<OutSourceProdInOutDown>();
		for (MakeReturn makeReturn : makeReturns) {
			downs.add(new OutSourceProdInOutDown(makeReturn));
		}
		return downs;
	}

}
