"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.BaseService = void 0;
var _utils = require("@vtx/utils");
var _ahooks = require("ahooks");
var BaseService = {
  useAppraisal: function useAppraisal(id, startTime, endTime) {
    // 考核列表
    var _useRequest = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/zykh-reborn/checkRecord/list', {
          data: {
            jcssId: id,
            startTime: startTime,
            endTime: endTime
          }
        });
      }, {
        refreshDeps: [id, startTime, endTime]
      }),
      khRes = _useRequest.data;
    var khData = (khRes === null || khRes === void 0 ? void 0 : khRes.data) || [];
    // 整改列表
    var _useRequest2 = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/zykh-reborn/orderTask/list', {
          data: {
            jcssId: id,
            startTime: startTime,
            endTime: endTime
          }
        });
      }, {
        refreshDeps: [id, startTime, endTime]
      }),
      zgRes = _useRequest2.data;
    var zgData = (zgRes === null || zgRes === void 0 ? void 0 : zgRes.data) || [];
    // 考核信息汇总
    var _useRequest3 = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/zykh-reborn/kanban/checkInfoBySourceId', {
          data: {
            jcssId: id,
            startTime: startTime,
            endTime: endTime
          }
        });
      }, {
        refreshDeps: [id, startTime, endTime]
      }),
      checkInfoRes = _useRequest3.data;
    var checkInfo = (checkInfoRes === null || checkInfoRes === void 0 ? void 0 : checkInfoRes.data) ? checkInfoRes.data[0] : {};
    //  整改信息汇总
    var _useRequest4 = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/zykh-reborn/kanban/orderInfoBySourceId', {
          data: {
            jcssId: id,
            startTime: startTime,
            endTime: endTime
          }
        });
      }, {
        refreshDeps: [id, startTime, endTime]
      }),
      orderInfoRes = _useRequest4.data;
    var orderInfo = (orderInfoRes === null || orderInfoRes === void 0 ? void 0 : orderInfoRes.data) || {};
    // 扣分因子分析
    var _useRequest5 = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/zykh-reborn/kanban/checkRuleBySourceId', {
          data: {
            jcssId: id,
            startTime: startTime,
            endTime: endTime
          }
        });
      }, {
        refreshDeps: [id, startTime, endTime]
      }),
      deductPointRes = _useRequest5.data;
    var deductPoint = (deductPointRes === null || deductPointRes === void 0 ? void 0 : deductPointRes.data) || {};
    // 问题类型分析
    var _useRequest6 = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/zykh-reborn/kanban/orderCategoryBySourceId', {
          data: {
            jcssId: id,
            startTime: startTime,
            endTime: endTime
          }
        });
      }, {
        refreshDeps: [id, startTime, endTime]
      }),
      orderCategoryRes = _useRequest6.data;
    var orderCategory = (orderCategoryRes === null || orderCategoryRes === void 0 ? void 0 : orderCategoryRes.data) || {};
    return {
      khData: khData,
      zgData: zgData,
      checkInfo: checkInfo,
      orderInfo: orderInfo,
      deductPoint: deductPoint,
      orderCategory: orderCategory
    };
  }
};
exports.BaseService = BaseService;
//# sourceMappingURL=api.js.map
