package com.mortals.xhx.module.pj.service;
import cn.hutool.core.date.DateTime;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.common.pdu.site.SitePdu;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
import com.mortals.xhx.module.pj.dao.PjEvaluateStatDao;
import com.mortals.xhx.module.pj.model.PjEvaluateStatQuery;
import org.springframework.util.StopWatch;

import java.util.List;

/**
* PjEvaluateStatService
*
* 评价汇总统计 service接口
*
* @author zxfei
* @date 2024-06-24
*/
public interface PjEvaluateStatService extends ICRUDService<PjEvaluateStatEntity,Long>{

    PjEvaluateStatDao getDao();

    /**
     * 更新站点评价统计
     * @param entity
     * @param context
     * @return
     */
    Rest<List<PjEvaluateStatEntity>> updateSitePjStat(PjEvaluateStatEntity entity, Context context);


    List<PjEvaluateStatEntity> getBillInfos(PjEvaluateStatQuery query, PageInfo pageInfo, Context context);

    void saveUpdatePjEvaluateStatList(List<PjEvaluateStatEntity> saveAndUpdatelist);

    void updateSitePjStatLog(DateTime attendStart, Long compare, StopWatch stopWatch, SitePdu site, Context context);
}