package sgc.portal.cd.cd0202.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cd.cd0202.dto.CD02020001USearch;
import sgc.portal.cd.cd0202.model.CD02020001U;
import sgc.portal.cd.cd0202.persistence.CD02020001UMapper;

@Service
public class CD02020001UService {
    private final CD02020001UMapper mapper;

    public CD02020001UService(CD02020001UMapper mapper) {
        this.mapper = mapper;
    }
    
    //공사일보 승인 조회
    public List<EasyHashMap<String, Object>> getConDayWrkList(CD02020001USearch search) {
        return mapper.getConDayWrkList(search);
    }
    
    @Transactional
    public Map<String, String> updateConDayWrk(CD02020001U cD02020001U) {
    	
    	Map<String,String> result = new HashMap<>();
    	mapper.updateConDayWrk(cD02020001U);
    	
    	return result;
    }
}
