package com.red.circle.other.app.inner.service.approval;

import com.red.circle.common.business.core.enums.ApprovalStatusEnum;
import com.red.circle.common.business.core.enums.DataApprovalTypeEnum;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.other.inner.model.cmd.approval.ApprovalDataCmd;
import com.red.circle.other.inner.model.cmd.approval.ApprovalOpsPageQryCmd;
import com.red.circle.other.inner.model.cmd.approval.ApprovalPhotoWallApprovalTableQryCmd;
import com.red.circle.other.inner.model.cmd.approval.ProfileApprovalContentCmd;
import com.red.circle.other.inner.model.dto.approval.ApprovalUserPhotoWallDTO;
import com.red.circle.other.inner.model.dto.approval.ApprovalUserSettingDataDTO;
import java.util.List;

/**
 * 资料审核.
 *
 * @author pengliang on 2023/5/26
 */
public interface ApprovalUserSettingDataClientService {

  /**
   * 提交审批信息.
   */
  void submitApproval(ProfileApprovalContentCmd cmd);

  /**
   * 提交审批信息-批量.
   */
  void submitApprovalBatch(List<ProfileApprovalContentCmd> list);

  /**
   * 修改审批状态.
   */
  void updateStatus(ApprovalDataCmd cmd);

  /**
   * 保存或修改审批类型.
   */
  void saveOrUpdate(Long userId, String sysOrigin, DataApprovalTypeEnum approveType);

  /**
   * 设置审批状态.
   */
  void save(Long userId, String sysOrigin, DataApprovalTypeEnum approveType,
      ApprovalStatusEnum approvalStatus);

  /**
   * 批量添加.
   */
  void saveBatch(Long userId, String sysOrigin, List<DataApprovalTypeEnum> approveTypes);

  /**
   * 累计违规次数.
   */
  void incrNotPassSize(Long userId, DataApprovalTypeEnum approveType);

  /**
   * 修改状态和机器编码.
   */
  Boolean updateStatusMachineLabel(Long userId, ApprovalStatusEnum approvalStatus,
      DataApprovalTypeEnum approveType, String label);

  /**
   * 验证是否审批通过.
   *
   * @return true 通过，false 不通过
   */
  Boolean isPass(Long userId, DataApprovalTypeEnum approvalType);

  /**
   * 验证是否审不批通过或者没有上传.
   *
   * @param userId       用户id
   * @param approvalType 审批状态
   * @return true 是，false 否
   */
  boolean isNoneOrNotPass(Long userId, DataApprovalTypeEnum approvalType);

  /**
   * 查找历史记录
   *
   * @param query ignore
   * @return ignore
   */
  PageResult<ApprovalUserPhotoWallDTO> pageUserDetailsPhotoWall(
      ApprovalPhotoWallApprovalTableQryCmd query);


  /**
   * 获取审批表格(运营后台).
   */
  PageResult<ApprovalUserSettingDataDTO> listOps(ApprovalOpsPageQryCmd qryCmd);

}
