|
@@ -1,68 +0,0 @@
|
|
|
-package com.sd.business.service.inventory.impl;
|
|
|
-
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.sd.business.entity.inventory.dto.InventoryIngredientsDto;
|
|
|
-import com.sd.business.entity.inventory.dto.InventoryIngredientsSelectDto;
|
|
|
-import com.sd.business.entity.inventory.po.InventoryIngredients;
|
|
|
-import com.sd.business.entity.inventory.vo.InventoryIngredientsVo;
|
|
|
-import com.sd.business.mapper.inventory.InventoryIngredientsMapper;
|
|
|
-import com.sd.business.service.inventory.InventoryIngredientsService;
|
|
|
-import com.sd.framework.util.Assert;
|
|
|
-import com.sd.framework.util.sql.Sql;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
-
|
|
|
-/**
|
|
|
- * <p>
|
|
|
- * 原料库存 服务实现类
|
|
|
- * </p>
|
|
|
- *
|
|
|
- * @author
|
|
|
- * @since 2024-01-08
|
|
|
- */
|
|
|
-@Service
|
|
|
-public class InventoryIngredientsServiceImpl extends ServiceImpl<InventoryIngredientsMapper, InventoryIngredients> implements InventoryIngredientsService {
|
|
|
-
|
|
|
- @Override
|
|
|
- public Page<InventoryIngredientsVo> getPage(InventoryIngredientsSelectDto dto) {
|
|
|
-
|
|
|
- Page<InventoryIngredientsVo> page = Sql.create(InventoryIngredientsVo.class)
|
|
|
- .selectAll(InventoryIngredients.class)
|
|
|
- .from(InventoryIngredients.class)
|
|
|
- .orderByDesc(InventoryIngredients::getId)
|
|
|
- .page(dto);
|
|
|
-
|
|
|
- return page;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public InventoryIngredientsVo detail(Long id) {
|
|
|
-
|
|
|
- InventoryIngredientsVo vo = Sql.create(InventoryIngredientsVo.class)
|
|
|
- .selectAll(InventoryIngredients.class)
|
|
|
- .from(InventoryIngredients.class)
|
|
|
- .eq(InventoryIngredients::getId, id)
|
|
|
- .one();
|
|
|
-
|
|
|
- Assert.notNull(vo, "未知数据");
|
|
|
-
|
|
|
- return vo;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void add(InventoryIngredientsDto dto) {
|
|
|
- save(dto);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void edit(InventoryIngredientsDto dto) {
|
|
|
- updateById(dto);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void delete(Long id) {
|
|
|
- removeById(id);
|
|
|
- }
|
|
|
-
|
|
|
-}
|