package cn.iocoder.yudao.module.bpm.service.business;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.bpm.controller.admin.business.vo.BpmApplyRetreatCreateReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.business.vo.BpmBusinessFormCreateReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.elderly.BpmElderlyInfoVO;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.elderly.ElderlyLogRecordVO;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmMyPageReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstancePageReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
import cn.iocoder.yudao.module.bpm.dal.dataobject.business.BpmBusinessFormDO;

import javax.validation.Valid;
import java.util.Map;
import java.util.Set;

/**
 * @Author: jinyd
 * @CreateTime: 2024/8/12  10:29
 * @Description: 业务表单服务
 * @Version: 4.0
 */
public interface BpmBusinessFormService {

    Long create(@Valid BpmBusinessFormCreateReqVO createReqDo);

    /**
     * 创建业务表单
     *
     * @param userId 用户编号
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createBusinessForm(Long userId, @Valid BpmApplyRetreatCreateReqVO createReqVO);

    /**
     * 更新业务表单
     * @param businessFormDO 修改信息
     */
    void updateBusinessForm(@Valid BpmBusinessFormDO businessFormDO);

    BpmBusinessFormDO getBusinessFormById(Long id);

    BpmBusinessFormDO getBusinessFormByInstanceId(String processInstanceId);

    BpmBusinessFormDO getBusinessFormByBusinessId(String businessId);

    ElderlyLogRecordVO getElderlyInfoByInstanceId(String processInstanceId);

    PageResult<BpmElderlyInfoVO> getMyBpmPage(Long loginUserId, BpmMyPageReqVO pageReqVO);

    Map<String, BpmElderlyInfoVO> getElderMapByBusinessKey(Set<String> strings);

    Map<String, BpmElderlyInfoVO> getElderMapByProcessInstanceId(Set<String> strings);

    BpmBusinessFormDO selectOneByProcessInstanceId(String processInstanceId);

    Map<String, BpmTaskRespVO> getTenantMap(Set<String> processInstanceIds);

    Map<String, BpmElderlyInfoVO> getReadMapById(Set<String> strings);


    void completeApplyRetreat(BpmBusinessFormDO businessFormDO);

    void completeBedChange(BpmBusinessFormDO businessFormDO);

    void completeNurseChange(BpmBusinessFormDO businessFormDO);

    void completeCateringChange(BpmBusinessFormDO businessFormDO);


    void completePriceChange(BpmBusinessFormDO businessFormDO);

    void updateById(BpmBusinessFormDO updateDO);
}
