parent
61045751f3
commit
e00b5e3af7
@ -0,0 +1,105 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storagemat;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagemat.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.storagemat.StorageMatService;
|
||||
|
||||
@Tag(name = "管理后台 - 入/出库物料")
|
||||
@RestController
|
||||
@RequestMapping("/heli/storage-mat")
|
||||
@Validated
|
||||
public class StorageMatController {
|
||||
|
||||
@Resource
|
||||
private StorageMatService storageMatService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建入/出库物料")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-mat:create')")
|
||||
public CommonResult<Long> createStorageMat(@Valid @RequestBody StorageMatSaveReqVO createReqVO) {
|
||||
return success(storageMatService.createStorageMat(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/create-batch")
|
||||
@Operation(summary = "批量创建入/出库物料")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-mat:create')")
|
||||
public CommonResult<Long> createStorageMat(@Valid @RequestBody List<StorageMatSaveReqVO> createReqVO) {
|
||||
for (StorageMatSaveReqVO item :createReqVO){
|
||||
storageMatService.createStorageMat(item);
|
||||
};
|
||||
return success(1L);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新入/出库物料")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-mat:update')")
|
||||
public CommonResult<Boolean> updateStorageMat(@Valid @RequestBody StorageMatSaveReqVO updateReqVO) {
|
||||
storageMatService.updateStorageMat(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除入/出库物料")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-mat:delete')")
|
||||
public CommonResult<Boolean> deleteStorageMat(@RequestParam("id") Long id) {
|
||||
storageMatService.deleteStorageMat(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得入/出库物料")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-mat:query')")
|
||||
public CommonResult<StorageMatRespVO> getStorageMat(@RequestParam("id") Long id) {
|
||||
StorageMatDO storageMat = storageMatService.getStorageMat(id);
|
||||
return success(BeanUtils.toBean(storageMat, StorageMatRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得入/出库物料分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-mat:query')")
|
||||
public CommonResult<PageResult<StorageMatRespVO>> getStorageMatPage(@Valid StorageMatPageReqVO pageReqVO) {
|
||||
PageResult<StorageMatDO> pageResult = storageMatService.getStorageMatPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, StorageMatRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出入/出库物料 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-mat:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportStorageMatExcel(@Valid StorageMatPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StorageMatDO> list = storageMatService.getStorageMatPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "入/出库物料.xls", "数据", StorageMatRespVO.class,
|
||||
BeanUtils.toBean(list, StorageMatRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.storagemat;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagemat.vo.*;
|
||||
|
||||
/**
|
||||
* 入/出库物料 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface StorageMatMapper extends BaseMapperX<StorageMatDO> {
|
||||
|
||||
default PageResult<StorageMatDO> selectPage(StorageMatPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<StorageMatDO>()
|
||||
.eqIfPresent(StorageMatDO::getStockId, reqVO.getStockId())
|
||||
.eqIfPresent(StorageMatDO::getMatId, reqVO.getMatId())
|
||||
.eqIfPresent(StorageMatDO::getWhId, reqVO.getWhId())
|
||||
.eqIfPresent(StorageMatDO::getRgId, reqVO.getRgId())
|
||||
.eqIfPresent(StorageMatDO::getPnId, reqVO.getPnId())
|
||||
.eqIfPresent(StorageMatDO::getStorageOkQty, reqVO.getStorageOkQty())
|
||||
.eqIfPresent(StorageMatDO::getLotNo, reqVO.getLotNo())
|
||||
.eqIfPresent(StorageMatDO::getDescription, reqVO.getDescription())
|
||||
.eqIfPresent(StorageMatDO::getCreator, reqVO.getCreator())
|
||||
.betweenIfPresent(StorageMatDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(StorageMatDO::getUpdater, reqVO.getUpdater())
|
||||
.betweenIfPresent(StorageMatDO::getUpdateTime, reqVO.getUpdateTime())
|
||||
.orderByDesc(StorageMatDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -1,74 +1,81 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.storage;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storage.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storage.StorageDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storage.StorageMapper;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 入/出库 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class StorageServiceImpl implements StorageService {
|
||||
|
||||
@Resource
|
||||
private StorageMapper storageMapper;
|
||||
|
||||
@Override
|
||||
public Long createStorage(StorageSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
StorageDO storage = BeanUtils.toBean(createReqVO, StorageDO.class);
|
||||
storageMapper.insert(storage);
|
||||
// 返回
|
||||
return storage.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStorage(StorageSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateStorageExists(updateReqVO.getId());
|
||||
// 更新
|
||||
StorageDO updateObj = BeanUtils.toBean(updateReqVO, StorageDO.class);
|
||||
storageMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteStorage(Long id) {
|
||||
// 校验存在
|
||||
validateStorageExists(id);
|
||||
// 删除
|
||||
storageMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateStorageExists(Long id) {
|
||||
if (storageMapper.selectById(id) == null) {
|
||||
throw exception(STORAGE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageDO getStorage(Long id) {
|
||||
return storageMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StorageDO> getStoragePage(StoragePageReqVO pageReqVO) {
|
||||
return storageMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
package com.chanko.yunxi.mes.module.heli.service.storage;
|
||||
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storage.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storage.StorageDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storage.StorageMapper;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.CodeEnum.STOCK_IN;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.CodeEnum.WAREHOUSE;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 入/出库 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class StorageServiceImpl implements StorageService {
|
||||
|
||||
@Resource
|
||||
private StorageMapper storageMapper;
|
||||
|
||||
@Override
|
||||
public Long createStorage(StorageSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
StorageDO storage = BeanUtils.toBean(createReqVO, StorageDO.class);
|
||||
storage.setStockNo(UUID.fastUUID().toString(true));
|
||||
storageMapper.insert(storage);
|
||||
|
||||
storage.setStockNo(STOCK_IN.getCode(storage.getId().toString()));
|
||||
storageMapper.updateById(storage);
|
||||
// 返回
|
||||
return storage.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStorage(StorageSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateStorageExists(updateReqVO.getId());
|
||||
// 更新
|
||||
StorageDO updateObj = BeanUtils.toBean(updateReqVO, StorageDO.class);
|
||||
storageMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteStorage(Long id) {
|
||||
// 校验存在
|
||||
validateStorageExists(id);
|
||||
// 删除
|
||||
storageMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateStorageExists(Long id) {
|
||||
if (storageMapper.selectById(id) == null) {
|
||||
throw exception(STORAGE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageDO getStorage(Long id) {
|
||||
return storageMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StorageDO> getStoragePage(StoragePageReqVO pageReqVO) {
|
||||
return storageMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,55 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.storagemat;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagemat.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 入/出库物料 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface StorageMatService {
|
||||
|
||||
/**
|
||||
* 创建入/出库物料
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createStorageMat(@Valid StorageMatSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新入/出库物料
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateStorageMat(@Valid StorageMatSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除入/出库物料
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteStorageMat(Long id);
|
||||
|
||||
/**
|
||||
* 获得入/出库物料
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 入/出库物料
|
||||
*/
|
||||
StorageMatDO getStorageMat(Long id);
|
||||
|
||||
/**
|
||||
* 获得入/出库物料分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 入/出库物料分页
|
||||
*/
|
||||
PageResult<StorageMatDO> getStorageMatPage(StorageMatPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.storagemat;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagemat.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagemat.StorageMatMapper;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 入/出库物料 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class StorageMatServiceImpl implements StorageMatService {
|
||||
|
||||
@Resource
|
||||
private StorageMatMapper storageMatMapper;
|
||||
|
||||
@Override
|
||||
public Long createStorageMat(StorageMatSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
StorageMatDO storageMat = BeanUtils.toBean(createReqVO, StorageMatDO.class);
|
||||
storageMatMapper.insert(storageMat);
|
||||
// 返回
|
||||
return storageMat.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStorageMat(StorageMatSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateStorageMatExists(updateReqVO.getId());
|
||||
// 更新
|
||||
StorageMatDO updateObj = BeanUtils.toBean(updateReqVO, StorageMatDO.class);
|
||||
storageMatMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteStorageMat(Long id) {
|
||||
// 校验存在
|
||||
validateStorageMatExists(id);
|
||||
// 删除
|
||||
storageMatMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateStorageMatExists(Long id) {
|
||||
if (storageMatMapper.selectById(id) == null) {
|
||||
throw exception(STORAGE_MAT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageMatDO getStorageMat(Long id) {
|
||||
return storageMatMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StorageMatDO> getStorageMatPage(StorageMatPageReqVO pageReqVO) {
|
||||
return storageMatMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -1,49 +1,49 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface StorageVO {
|
||||
id: number
|
||||
stockType: number
|
||||
stockInType: number
|
||||
stockOutType: number
|
||||
stockNo: string
|
||||
headerNo: number
|
||||
description: string
|
||||
status: number
|
||||
whId: number
|
||||
keeper: number
|
||||
keeperTime: Date
|
||||
outbound: number
|
||||
outboundTime: Date
|
||||
cancel: number
|
||||
cancelTime: Date
|
||||
}
|
||||
|
||||
// 查询入/出库分页
|
||||
export const getStoragePage = async (params) => {
|
||||
return await request.get({ url: `/heli/storage/page`, params })
|
||||
}
|
||||
|
||||
// 查询入/出库详情
|
||||
export const getStorage = async (id: number) => {
|
||||
return await request.get({ url: `/heli/storage/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增入/出库
|
||||
export const createStorage = async (data: StorageVO) => {
|
||||
return await request.post({ url: `/heli/storage/create`, data })
|
||||
}
|
||||
|
||||
// 修改入/出库
|
||||
export const updateStorage = async (data: StorageVO) => {
|
||||
return await request.put({ url: `/heli/storage/update`, data })
|
||||
}
|
||||
|
||||
// 删除入/出库
|
||||
export const deleteStorage = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/storage/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出入/出库 Excel
|
||||
export const exportStorage = async (params) => {
|
||||
return await request.download({ url: `/heli/storage/export-excel`, params })
|
||||
}
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface StorageVO {
|
||||
id: number
|
||||
stockType: number
|
||||
stockInType: number
|
||||
stockOutType: number
|
||||
stockNo: string
|
||||
headerNo: number
|
||||
description: string
|
||||
status: number
|
||||
whId: number
|
||||
keeper: number
|
||||
keeperTime: Date
|
||||
outbound: number
|
||||
outboundTime: Date
|
||||
cancel: number
|
||||
cancelTime: Date
|
||||
}
|
||||
|
||||
// 查询入/出库分页
|
||||
export const getStoragePage = async (params) => {
|
||||
return await request.get({ url: `/heli/storage/page`, params })
|
||||
}
|
||||
|
||||
// 查询入/出库详情
|
||||
export const getStorage = async (id: number) => {
|
||||
return await request.get({ url: `/heli/storage/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增入/出库
|
||||
export const createStorage = async (data: StorageVO) => {
|
||||
return await request.post({ url: `/heli/storage/create`, data })
|
||||
}
|
||||
|
||||
// 修改入/出库
|
||||
export const updateStorage = async (data: StorageVO) => {
|
||||
return await request.put({ url: `/heli/storage/update`, data })
|
||||
}
|
||||
|
||||
// 删除入/出库
|
||||
export const deleteStorage = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/storage/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出入/出库 Excel
|
||||
export const exportStorage = async (params) => {
|
||||
return await request.download({ url: `/heli/storage/export-excel`, params })
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface StorageMatVO {
|
||||
id: number
|
||||
stockId: number
|
||||
matId: number
|
||||
whId: number
|
||||
rgId: number
|
||||
pnId: number
|
||||
storageOkQty: number
|
||||
lotNo: string
|
||||
description: string
|
||||
}
|
||||
|
||||
// 查询入/出库物料分页
|
||||
export const getStorageMatPage = async (params) => {
|
||||
return await request.get({ url: `/heli/storage-mat/page`, params })
|
||||
}
|
||||
|
||||
// 查询入/出库物料详情
|
||||
export const getStorageMat = async (id: number) => {
|
||||
return await request.get({ url: `/heli/storage-mat/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增入/出库物料
|
||||
export const createStorageMat = async (data: StorageMatVO) => {
|
||||
return await request.post({ url: `/heli/storage-mat/create`, data })
|
||||
}
|
||||
|
||||
// 批量新增入/出库物料
|
||||
export const createStorageMatBatch = async (data: StorageMatVO[]) => {
|
||||
return await request.post({ url: `/heli/storage-mat/create-batch`, data })
|
||||
}
|
||||
|
||||
|
||||
// 修改入/出库物料
|
||||
export const updateStorageMat = async (data: StorageMatVO) => {
|
||||
return await request.put({ url: `/heli/storage-mat/update`, data })
|
||||
}
|
||||
|
||||
// 删除入/出库物料
|
||||
export const deleteStorageMat = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/storage-mat/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出入/出库物料 Excel
|
||||
export const exportStorageMat = async (params) => {
|
||||
return await request.download({ url: `/heli/storage-mat/export-excel`, params })
|
||||
}
|
Loading…
Reference in new issue