guoyujie
2025-11-20 5fb1f180d0e6eceb83cda226c1daeca3f634e813
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
package com.example.erp.controller;
 
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.example.erp.common.Result;
import com.example.erp.dto.pp.WorkInProgressDTO;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.service.mm.FinishedGoodsInventoryService;
import com.example.erp.service.mm.MaterialInventoryService;
import com.example.erp.service.pp.ReportService;
import com.example.erp.service.sd.DeliveryService;
import com.example.erp.service.sd.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
 
@RestController
@RequestMapping("/app")
@RequiredArgsConstructor
@Api(value="App专属接口",tags={"App专属接口"})
public class AppController {
    private final OrderService orderService;
    private final DeliveryService deliveryService;
    private final MaterialInventoryService materialInventoryService;
    private final FinishedGoodsInventoryService finishedGoodsInventoryService;
    private final ReportService reportService;
 
    @ApiOperation("订单报表")
    @PostMapping("/getOrderList")
    public Result getOrderList(@RequestBody List<String> dates) {
        return Result.success(orderService.appGetOrderList(dates));
    }
 
    @ApiOperation("发货报表")
    @PostMapping("/getDeliveryList")
    public Result getDeliveryList(@RequestBody List<String> dates) {
        return Result.success(deliveryService.appGetDeliveryList(dates));
    }
 
    @ApiOperation("原片库存报表")
    @PostMapping("/getOriginalGlassList")
    public Result getOriginalGlassList() {
        return Result.success(materialInventoryService.appGetStockList());
    }
 
 
    @ApiOperation("成品库存报表")
    @PostMapping("/getFinishedGoodsInventoryList")
    public Result getFinishedGoodsInventoryList() {
        return Result.success(finishedGoodsInventoryService.appFinishedGoodsInventoryList());
    }
 
    @ApiOperation("半成品库存报表")
    @PostMapping("/getWorkInProgress/{selectProcesses}")
    public Result getworkInProgress(@PathVariable String selectProcesses,WorkInProgressDTO workInProgressDTO) {
        return Result.success(reportService.workInProgressSv(1, 999999999, "", "", selectProcesses,"","", workInProgressDTO));
 
    }
 
    @ApiOperation("可入库的成品查询接口")
    @PostMapping("/getSelectWarehousingList")
    public Result getSelectWarehousingList(@RequestBody String processId){
        return Result.success(finishedGoodsInventoryService.getSelectWarehousingApp(processId));
    }
 
    @ApiOperation("成品入库接口")
    @PostMapping("/addSelectWarehousing")
    public Result addSelectWarehousing( @RequestBody Map<String,Object> object){
        return Result.success(finishedGoodsInventoryService.addSelectWarehousing(object));
 
    }
 
    @ApiOperation("可发货的成品查询接口")
    @PostMapping("/getSelectDeliveryDetailList")
    public Result getSelectDeliveryDetailList(){
        return Result.success(finishedGoodsInventoryService.getSelectDeliveryDetailApp());
    }
 
    @ApiOperation("成品出库接口")
    @PostMapping("/addDeliveryDetail")
    public Result addDeliveryDetail( @RequestBody Map<String,Object>  object){
        return Result.success(finishedGoodsInventoryService.addDeliveryDetail(object));
    }
}