廖井涛
2024-01-26 32b98dff004ee2b9f230f86ec3883590f9a1c31b
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
package com.example.erp.controller.mm;
 
 
 
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.mm.FinishedGoodsInventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.example.erp.entity.mm.FinishedGoodsInventory;
 
 
import java.util.Map;
 
@RestController
@RequestMapping("/FinishedGoodsInventory")
public class FinishedGoodsInventoryController {
    @Autowired
    FinishedGoodsInventoryService finishedGoodsInventoryService;
 
    @PostMapping("/getselet/{pageNum}/{pageSize}")
    public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory finishedGoodsInventory){
        System.out.println(finishedGoodsInventory);
        return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory));
    }
 
    @PostMapping("/getseletwarehousing/{pageNum}/{pageSize}")
    public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){
        System.out.println(flowCard);
        return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard));
    }
 
    @PostMapping("/addseletwarehousing")
    public Result addseletwarehousing( @RequestBody Map<String,Map<String,Object>> object){
        if(finishedGoodsInventoryService.addseletwarehousing(object)){
            return Result.seccess();
        }else {
           throw new ServiceException(Constants.Code_500,"入库失败");
 
        }
    }
}