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

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.jpsoft.shinestar.modules.base.entity.CompanySupervise;
import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.base.entity.PersonHealthLedger;
import com.jpsoft.shinestar.modules.base.entity.PersonInfo;
import com.jpsoft.shinestar.modules.base.entity.PersonSuperviseRelation;
import com.jpsoft.shinestar.modules.common.dto.Sort;

public interface CompanySuperviseService {
	CompanySupervise get(String id);
	boolean exist(String id);
	int insert(CompanySupervise model);
	int update(CompanySupervise model);
	void updateAtProvinceNum(PersonHealthLedger personHealthLedger);
	int delete(String id);
	List<CompanySupervise> list();
	Page<CompanySupervise> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
	void insertCompanySupervise(String deviceNo,PersonInfo personInfo, Date recordDate, BigDecimal temperature,String address,PersonHealthLedger personHealthLedger);
	CompanySupervise findByCompanyIdAndRecordDate(String companyId,String recordTime);

	Integer findTotalNumByCompanyIdAndDate(List<PersonSuperviseRelation> list,String date);

	Integer findTotalCheckNumByCompanyIdAndDate(List<PersonSuperviseRelation> personSuperviseRelationList, String date);

	Integer findTotalAbnormalNumByCompanyIdAndDate(List<PersonSuperviseRelation> personSuperviseRelationList, String date);

	Integer findLeaveNumByCompanyIdAndDate(List<PersonSuperviseRelation> personSuperviseRelationList, String date);
}