chenlu
2024-05-07 c4188e7d4bd1fb06be6a5e96a344e0a0504a4954
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
package com.example.erp.controller.pp;
 
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.entity.pp.DamageDetails;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.Report;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.pp.ReportService;
import com.example.erp.service.pp.WorkOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.sql.Date;
import java.util.List;
import java.util.Map;
 
@RestController
@Api(value="生产报表controller",tags={"生产报表操作接口"})
@RequestMapping("/report")
public class ReportController {
    private final ReportService reportService;
 
    public ReportController(ReportService reportService) {
        this.reportService = reportService;
    }
 
    //流程卡进度
    @ApiOperation("流程卡进度")
    @PostMapping  ("/processCardProgress/{orderId}")
    public Result processCardProgress(@PathVariable String orderId, @RequestBody List<Integer> columns){
        return Result.seccess(reportService.processCardProgressSv(orderId,columns));
    }
 
    @ApiOperation("跨工序次破")
    @PostMapping("/crossProcessBreaking/{pageNum}/{pageSize}/{selectDate}")
    public Result getOrderReport(@PathVariable Integer pageNum,
                                 @PathVariable Integer pageSize,
                                 @PathVariable List<String> selectDate,
                                 @RequestBody DamageDetails damageDetails)  {
        return  Result.seccess(reportService.crossProcessBreakingSv(pageNum,pageSize,selectDate,damageDetails));
 
    }
 
    @ApiOperation("在制品报表")
    @PostMapping("/workInProgress/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}")
    public Result workInProgress(
                                 @PathVariable Date selectTime1,
                                 @PathVariable Date selectTime2,
                                 @PathVariable String orderId,
                                 @PathVariable String inputProject,
                                 @PathVariable String selectProcesses,
                                 @RequestBody Report report)  {
        return  Result.seccess(reportService.workInProgressSv(selectTime1,selectTime2,orderId,inputProject,selectProcesses,report));
 
    }
 
    @ApiOperation("工序待完成报表")
    @PostMapping("/selectProcessToBeCompleted/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}")
    public Result selectProcessToBeCompleted(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @PathVariable String orderId,
            @PathVariable String inputProject,
            @PathVariable String selectProcesses,
            @RequestBody Report report)  {
        return  Result.seccess(reportService.selectProcessToBeCompletedSv(selectTime1,selectTime2,orderId,inputProject,selectProcesses,report));
 
    }
 
}