package com.style24.batch.biz.service;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gagaframework.web.parameter.GagaMap;
import com.style24.batch.biz.dao.TsbCjDeliveryDao;
import com.style24.batch.support.env.TsbConstants;
import com.style24.persistence.domain.Delivery;

import lombok.extern.slf4j.Slf4j;

/**
 * CJ Service
 *
 * @author moon
 * @since  2021. 04. 09
 */
@Service
@Slf4j
public class TsbCjDeliveryService {

	@Autowired
	private TsbCjDeliveryDao cjDeliveryDao;


	/**
	 * cj 회수 송장번호 조회
	 * @param 
	 * @return Collection<Delivery>
	 * @author moon
	 * @since  2021. 04. 09
	 */
	//@Transactional("cjTxnManager")
	public Collection<Delivery> getCjWdInvoiceList() {
		return cjDeliveryDao.getCjWdInvoiceList();
	}

	/**
	 * cj 회수 상태 조회  
	 * @param 
	 * @return Collection<Delivery>
	 * @author moon
	 * @since  2021. 04. 12
	 */
	//@Transactional("cjTxnManager")
	public Collection<Delivery> getCjWdStatList() {
		return cjDeliveryDao.getCjWdStatList();
	}
	
	/**
	 * cj 회수상태 수신 결과 업데이트   
	 * @param 
	 * @return Collection<Delivery>
	 * @author moon
	 * @since  2021. 04. 12
	 */
	@Transactional("cjTxnManager")
	public void updateCjWdStat(Delivery delivery) {
		cjDeliveryDao.updateCjWdStat(delivery);
	}
	
	/**
	 * cj 회수송장번호 수신 결과 업데이트   
	 * @param 
	 * @return Delivery
	 * @author moon
	 * @since  2021. 05. 24
	 */
	@Transactional("cjTxnManager")
	public void updateCjInvcNo(Delivery delivery) {
		cjDeliveryDao.updateCjInvcNo(delivery);
	}	
	
}
