import {requestInstance} from "@/service";
import {addMonths, getDateToString} from "@/unit/time";

export function getQualityStaSourceStaUnit(params) {

    return requestInstance({
        url:'/zljc/getSjlytjUnitData',
      data:{
          ...params
      }
    })
}export function getQualityStaSourceSta() {

    return requestInstance({
        url:'/zljc/getSjlytjData',
        data:{

        }
    })
}
export function getQualityCheckStaSituation(UNIT_CODE) {
    return requestInstance({
        url:'/zljc/getZjqktj',
        data:{
            START_DATE: addMonths(new Date(),-12),
            END_DATE: getDateToString(new Date()),
            UNIT_CODE
        }
    })
}

export function getQualityCheckQuestionTypeCheckOptions(UNIT_CODE) {
    return requestInstance({
        url:'/zljc/getInspectionTypeCount',
        data:{

        }
    })
}