guoyuji
2024-02-20 f23b5a60dcd349c7a38129b0ce06fa92a1a0d974
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
package com.example.erp.controller.mm;
 
 
 
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.entity.mm.FinishedOperateLog;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.OrderDetail;
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.List;
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){
        return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory));
    }
 
    /*查询可入库的成品数据*/
    @PostMapping("/getseletwarehousing/{pageNum}/{pageSize}")
    public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){
        return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard));
    }
 
    /*成品入库*/
    @PostMapping("/addseletwarehousing")
    public Result addseletwarehousing( @RequestBody Map<String,Object>  object){
        if(finishedGoodsInventoryService.addseletwarehousing(object)){
            return Result.seccess();
        }else {
           throw new ServiceException(Constants.Code_500,"入库失败");
 
        }
    }
 
    /*查询可发货的成品数据*/
    @PostMapping("/getseletdeliveryDetail/{pageNum}/{pageSize}")
    public Result getseletdeliveryDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){
        return Result.seccess(finishedGoodsInventoryService.getseletdeliveryDetail(pageNum,pageSize,orderDetail));
    }
 
    /*成品发货*/
    @PostMapping("/adddeliveryDetail")
    public Result adddeliveryDetail( @RequestBody Map<String,Object>  object){
        if(finishedGoodsInventoryService.adddeliveryDetail(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"出库失败");
 
        }
    }
 
    /* 调拨查询*/
    @PostMapping("/getSelectAllocate/{pageNum}/{pageSize}")
    public Result getSelectAllocate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){
        return Result.seccess(finishedGoodsInventoryService.getSelectAllocate(pageNum,pageSize,orderDetail));
    }
 
    /*订单调拨*/
    @PostMapping("/updateFinishedGoodsInventoryAllocate")
    public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object>  object){
        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object)){
 
            return Result.seccess();
 
        }else {
            throw new ServiceException(Constants.Code_500,"调拨失败");
 
        }
    }
 
    /*领出查询*/
    @PostMapping("/getselectAllocateFinishedOperateLog/{pageNum}/{pageSize}")
    public Result getselectAllocateFinishedOperateLog(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedOperateLog finishedOperateLog){
        return Result.seccess(finishedGoodsInventoryService.getselectAllocateFinishedOperateLog(pageNum,pageSize,finishedOperateLog));
    }
 
    /*订单领出*/
    @PostMapping("/updateFinishedGoodsInventoryTakeOut")
    public Result updateFinishedGoodsInventoryTakeOut( @RequestBody Map<String,Object>  object){
 
        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryTakeOut(object)){
            return Result.seccess();
 
        }else {
            throw new ServiceException(Constants.Code_500,"领出失败");
 
        }
    }
 
    /*领出记录查询*/
    @PostMapping("/getSelectOperateRecord/{pageNum}/{pageSize}")
    public Result getSelectOperateRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedOperateLog finishedOperateLog){
        return Result.seccess(finishedGoodsInventoryService.getSelectOperateRecord(pageNum,pageSize,finishedOperateLog));
    }
 
    /*订单返工*/
    @PostMapping("/updateFinishedGoodsInventoryRework")
    public Result updateFinishedGoodsInventoryRework( @RequestBody Map<String,Object>  object){
 
        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryRework(object)){
            return Result.seccess();
 
        }else {
            throw new ServiceException(Constants.Code_500,"返工失败");
 
        }
    }
 
 
 
    /*订单审核*/
    @PostMapping("/updateFinishedGoodsInventoryToExamine")
    public Result updateFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object>  object){
 
        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"审核")){
            return Result.seccess();
 
        }else {
            throw new ServiceException(Constants.Code_500,"领出失败");
 
        }
    }
    /*订单反审*/
    @PostMapping("/updateFinishedGoodsInventoryCounterexamination")
    public Result updateFinishedGoodsInventoryCounterexamination( @RequestBody Map<String,Object>  object){
 
        if(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"反审")){
            return Result.seccess();
 
        }else {
            throw new ServiceException(Constants.Code_500,"领出失败");
 
        }
    }
}