提交 | 用户 | 时间
|
532d0b
|
1 |
package com.iailab.module.pms.production.sale.controller.admin; |
D |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.PageResult; |
|
4 |
import com.iailab.framework.common.util.object.BeanUtils; |
|
5 |
import com.iailab.module.pms.production.sale.dao.SaleVolumeDao; |
|
6 |
import com.iailab.module.pms.production.sale.entity.SaleVolumeEntity; |
|
7 |
import com.iailab.module.pms.production.sale.service.SaleVolumeService; |
|
8 |
import com.iailab.module.pms.production.sale.vo.SaleVolumePageReqVO; |
|
9 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
10 |
import org.springframework.web.bind.annotation.RestController; |
|
11 |
|
|
12 |
import javax.annotation.Resource; |
|
13 |
|
|
14 |
/** |
|
15 |
* 销售量统计 |
|
16 |
* |
|
17 |
* @author DongYukun |
|
18 |
* @Description |
|
19 |
* @createTime 2022年12月23日 14:46:00 |
|
20 |
*/ |
|
21 |
@RestController |
e16f4e
|
22 |
@RequestMapping("/xmcpms/prod/sale/volume") |
532d0b
|
23 |
public class SaleVolumeController implements SaleVolumeService { |
D |
24 |
|
|
25 |
@Resource |
|
26 |
private SaleVolumeDao saleVolumeDao; |
|
27 |
|
|
28 |
|
|
29 |
@Override |
|
30 |
public String create(SaleVolumeEntity createEntity) { |
|
31 |
SaleVolumeEntity dto = BeanUtils.toBean(createEntity, SaleVolumeEntity.class); |
|
32 |
saleVolumeDao.insert(dto); |
|
33 |
return dto.getId(); |
|
34 |
} |
|
35 |
|
|
36 |
@Override |
|
37 |
public String update(SaleVolumeEntity createEntity) { |
|
38 |
SaleVolumeEntity dto = BeanUtils.toBean(createEntity, SaleVolumeEntity.class); |
|
39 |
saleVolumeDao.updateById(dto); |
|
40 |
return dto.getId(); |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public void delete(String id) { |
|
45 |
saleVolumeDao.deleteById(id); |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
public SaleVolumeEntity getInfo(String id) { |
|
50 |
return saleVolumeDao.selectById(id); |
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
public PageResult<SaleVolumeEntity> getPage(SaleVolumePageReqVO PageReqVO) { |
|
55 |
return saleVolumeDao.selectPage(PageReqVO); |
|
56 |
} |
|
57 |
|
|
58 |
} |