import request from "../../common/request"
import { PSI_MANAGEMANT as prefix } from "@/api/AppPath";

export default class MaterialTypeService {
  list(param) {
    return request({
      url: prefix + '/psi/materialType/list',
      method: 'get',
      params: param
    })
  }

  bxList(param) {
    return request({
      url: prefix + '/psi/materialType/bxList',
      method: 'get',
      params: param
    })
  }

  cgList(param) {
    return request({
      url: prefix + '/psi/materialType/cgList',
      method: 'get',
      params: param
    })
  }

  summaryTreeData(param) {
    return request({
      url: prefix + '/psi/materialType/summaryTreeData',
      method: 'get',
      params: param
    })
  }

  save(param) {
    return request({
      url: prefix + '/psi/materialType/save',
      method: 'post',
      data: param
    })
  }

  findById(id) {
    return request({
      url: prefix + '/psi/materialType/findById',
      method: 'get',
      params: { id: id }
    })
  }

  remove(id) {
    return request({
      url: prefix + '/psi/materialType/deleteById',
      method: 'get',
      params: { id: id }
    })
  }
}
