/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.service;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.sg.balancedlibrary.liKuResourcePool.entity.LiKuResourcePool;
import com.jeeplus.modules.sg.balancedlibrary.liKuResourcePool.mapper.LiKuResourcePoolMapper;
import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.LikuDetail;
import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.MaterialReportDetails;
import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.mapper.MaterialReportDetailsMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 物资上报明细Service
 *
 * @author enford
 * @version 1.0
 */
@Service
@Transactional(readOnly = true)
public class MaterialReportDetailsService extends CrudService<MaterialReportDetailsMapper, MaterialReportDetails> {

	@Override
	public MaterialReportDetails get(String id) {
		return super.get(id);
	}

	@Override
	public List<MaterialReportDetails> findList(MaterialReportDetails entity) {
		return super.findList(entity);
	}

	@Override
	public Page<MaterialReportDetails> findPage(Page<MaterialReportDetails> page, MaterialReportDetails entity) {
		return super.findPage(page, entity);
	}

	@Override
	@Transactional(readOnly = false)
	public void save(MaterialReportDetails entity) {
		super.save(entity);
	}

	@Override
	@Transactional(readOnly = false)
	public void delete(MaterialReportDetails entity) {
		super.delete(entity);
	}

	@Transactional(readOnly = false)
	public void insertList(List<MaterialReportDetails> list) {
		mapper.insertList(list);
	}

	@Transactional(readOnly = false)
	public void delAll() {
		mapper.delAll();
	}

	public List<LikuDetail> getLikuDetails(MaterialReportDetails report){
		return mapper.getLikuDetails(report);
	}
}