package com.jpsoft.shinestar.modules.base.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.jpsoft.shinestar.modules.base.entity.PersonInfo;
import com.jpsoft.shinestar.modules.base.entity.PersonPopedom;
import com.jpsoft.shinestar.modules.base.entity.WorkOver;
import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.common.dto.Sort;

public interface WorkOverService {
	WorkOver get(String id);
	boolean exist(String id);
	int insert(WorkOver model);
	int update(WorkOver model);
	int delete(String id);
	List<WorkOver> list();
	Page<WorkOver> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);

    void approvalWorkOver(PersonInfo personInfo, String ids, String status, String approvalContent) throws Exception;

    String workOverPathSubmit(PersonPopedom personPopedom, Integer hours, String startTime, String endTime, String reason, String personIds,String formId,String type,String ids,String draft,String processTemplateId) throws Exception;

	int findSumHoursByParams(Long personId, Date startDate, Date endDate, Map<String, Object> searchParams);

	List<String> findPeopdomId(Date startDate, Date endDate);
	int findCountByPersonId(Long personId,Date startDate, Date endDate);

	Date findTopCreateTimeByPersonId(Long personId,Date startDate, Date endDate);
	Date findTopApprovalTimeByPersonId(Long personId,Date startDate, Date endDate);

    boolean punchIn(String deviceNo, Long personId, Date recordTime);


}