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

import com.jeeplus.common.persistence.Page;
import com.jeeplus.common.service.CrudService;
import com.jeeplus.modules.worklog.dao.WorkLogDao;
import com.jeeplus.modules.worklog.entity.WorkLog;
import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional(readOnly = true)
public class WorkLogService extends CrudService<WorkLogDao, WorkLog> {

	@Autowired
	private WorkLogDao workLogDao;
	@Autowired
	private WorkClientAttachmentDao workClientAttachmentDao;

	public WorkLog get(String id) {
		WorkLog workLog =  super.get(id);
		return workLog;
	}
	
	public List<WorkLog> findList(WorkLog workLog) {
		return super.findList(workLog);
	}
	
	public Page<WorkLog> findPage(Page<WorkLog> page, WorkLog workLog) {
		return super.findPage(page, workLog);
	}
	
	@Transactional(readOnly = false)
	public void save(WorkLog workLog) {
		super.save(workLog);
	}
	
	@Transactional(readOnly = false)
	public void delete(WorkLog workLog) {
		super.delete(workLog);
	}


	public WorkLog findListByProId(WorkLog workLog){
		return workLogDao.findListByProId(workLog);
	}
	
}