选煤厂生产管理平台后台代码
dongyukun
2024-12-10 b643c158bc05f2a7f95bb9fed15a1451691eaef4
提交 | 用户 | 时间
532d0b 1 package com.iailab.module.pms.production.warehouse.service.impl;
D 2
3
4 import com.iailab.framework.common.pojo.PageResult;
5 import com.iailab.framework.common.util.object.BeanUtils;
6 import com.iailab.module.pms.production.warehouse.dao.WarehouseStockDao;
7 import com.iailab.module.pms.production.warehouse.entity.WarehouseStockEntity;
8 import com.iailab.module.pms.production.warehouse.service.WarehouseStockService;
9 import com.iailab.module.pms.production.warehouse.vo.WarehouseStockPageReqVO;
10 import lombok.extern.slf4j.Slf4j;
11 import org.springframework.stereotype.Service;
12
13 import javax.annotation.Resource;
14
15 /**
16  * 产品库存
17  *
18  * @author DongYukun
19  * @Description
20  * @createTime 2023年01月04日 10:19:30
21  */
22 @Slf4j
23 @Service
24 public class WarehouseStockServiceImpl implements WarehouseStockService {
25
26     @Resource
27     private WarehouseStockDao warehouseStockDao;
28
29
30     @Override
31     public String create(WarehouseStockEntity createEntity) {
32         WarehouseStockEntity dto = BeanUtils.toBean(createEntity, WarehouseStockEntity.class);
33         warehouseStockDao.insert(dto);
34         return dto.getId();
35     }
36
37     @Override
38     public String update(WarehouseStockEntity createEntity) {
39         WarehouseStockEntity dto = BeanUtils.toBean(createEntity, WarehouseStockEntity.class);
40         warehouseStockDao.updateById(dto);
41         return dto.getId();
42     }
43
44     @Override
45     public void delete(String id) {
46         warehouseStockDao.deleteById(id);
47     }
48
49     @Override
50     public WarehouseStockEntity getInfo(String id) {
51         return warehouseStockDao.selectById(id);
52     }
53
54     @Override
55     public PageResult<WarehouseStockEntity> getPage(WarehouseStockPageReqVO PageReqVO) {
56         return warehouseStockDao.selectPage(PageReqVO);
57     }
58 }