无关风月
2024-07-30 f3cba59fc471e42936a10d8e923fd097e80cbc97
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package com.ruoyi.management.controller;
 
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.page.PageDTO;
import com.ruoyi.management.domain.InventoriesSuppliesInfo;
import com.ruoyi.management.domain.dto.InventoriesSuppDTO;
import com.ruoyi.management.domain.dto.InventoriesSuppliesInfoDTO;
import com.ruoyi.management.domain.dto.InventoriesSuppliesInfoQuery;
import com.ruoyi.management.domain.dto.InventoriesSuppliesQuery;
import com.ruoyi.management.domain.vo.InventoriesSuppliesInfoVO;
import com.ruoyi.management.domain.vo.InventoriesSuppliesVO;
import com.ruoyi.management.service.InventoriesSuppliesInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
 
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hjl
 * @since 2024-07-01
 */
@RestController
@RequestMapping("/inventories-supplies-info")
@Api(value = "物资盘点详情接口", tags = "物资盘点详情接口", description = "物资盘点详情接口")
public class InventoriesSuppliesInfoController {
 
    @Resource
    private InventoriesSuppliesInfoService inventoriesSuppliesInfoService;
    @PostMapping("/getInventoriesSuppliesInfoList")
    @ApiOperation(value = "分页获物资盘点详情")
    public R<PageDTO<InventoriesSuppliesInfoVO>> inventoriesSuppliesInfoService(@RequestBody InventoriesSuppliesInfoQuery inventoriesSuppliesInfoQuery) {
        return R.ok(inventoriesSuppliesInfoService.inventoriesSuppliesInfoService(inventoriesSuppliesInfoQuery));
    }
 
    @PostMapping("/addInventoriesSuppliesInfo")
    @ApiOperation(value = "添加/修改物资盘点详情")
    public R addInventoriesSuppliesInfo(@RequestBody List<InventoriesSuppliesInfoDTO> inventoriesSuppliesInfoDTO) {
        inventoriesSuppliesInfoService.addInventoriesSuppliesInfo(inventoriesSuppliesInfoDTO);
        return R.ok();
    }
 
    @PostMapping("/getInventoriesSuppliesInfo")
    @ApiOperation(value = "通过入库id查询是否已经有物资详情")
    public R<InventoriesSuppliesInfo> getInventoriesSuppliesInfo(@RequestBody InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO) {
        return R.ok(   inventoriesSuppliesInfoService.getInventoriesSuppliesInfo(inventoriesSuppliesInfoDTO));
    }
 
    @PostMapping("/submitInventoriesSuppliesInfo")
    @ApiOperation(value = "提交物资盘点数据")
    public R submitInventoriesSuppliesInfo(@RequestBody InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO) {
        inventoriesSuppliesInfoService.submitInventoriesSuppliesInfo(inventoriesSuppliesInfoDTO);
        return R.ok();
    }
 
    @PostMapping("/accomplishInventoriesSuppliesInfo")
    @ApiOperation(value = "完成物资盘点数据")
    public R accomplishInventoriesSuppliesInfo(@RequestBody InventoriesSuppliesInfoDTO inventoriesSuppliesInfoDTO) {
        inventoriesSuppliesInfoService.accomplishInventoriesSuppliesInfo(inventoriesSuppliesInfoDTO);
        return R.ok();
    }
 
}