yangys
2024-04-04 ed4a5236bab800094be4a8378f5098eebe3de6ac
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
package com.qianwen.smartman.modules.coproduction.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import javax.validation.Valid;
import com.qianwen.smartman.common.cache.RegionCache;
import com.qianwen.core.boot.ctrl.BladeController;
import com.qianwen.core.oss.model.BladeFile;
import com.qianwen.core.scanner.modular.annotation.GetResource;
import com.qianwen.core.scanner.modular.annotation.PostResource;
import com.qianwen.core.scanner.modular.stereotype.ApiResource;
import com.qianwen.core.secure.annotation.PreAuth;
import com.qianwen.core.tool.api.R;
import com.qianwen.smartman.modules.coproduction.dto.JuxtapositionReportDTO;
import com.qianwen.smartman.modules.coproduction.dto.ReportWorkDTO;
import com.qianwen.smartman.modules.coproduction.dto.ReportWorkDetailDTO;
import com.qianwen.smartman.modules.coproduction.service.IOrderReportRecordService;
import com.qianwen.smartman.modules.coproduction.vo.OpRecordExportVO;
import com.qianwen.smartman.modules.coproduction.vo.OrderChildRecordVO;
import com.qianwen.smartman.modules.coproduction.vo.OrderReportRecordResVO;
import com.qianwen.smartman.modules.coproduction.vo.OrderReportRecordSearchVO;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
@Api(value = "blade_order_report_record管理", tags = {"blade_order_report_record管理"})
@ApiResource({"blade-coproduction/order-report-record"})
@RestController
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/coproduction/controller/OrderReportRecordController.class */
public class OrderReportRecordController extends BladeController {
    private final IOrderReportRecordService orderReportRecordService;
 
    public OrderReportRecordController(final IOrderReportRecordService orderReportRecordService) {
        this.orderReportRecordService = orderReportRecordService;
    }
 
    @ApiOperationSupport(order = 1)
    @GetResource({"/report-work-detail"})
    @ApiOperation(value = "工单工序报工详情", notes = "传入processId:工单工序id")
    public R<ReportWorkDetailDTO> getReportWorkDetail(@RequestParam("processId") Long processId) {
        return R.data(this.orderReportRecordService.getReportWorkDetail(processId));
    }
 
    @ApiOperationSupport(order = 2)
    @PostResource({"/page-query"})
    @ApiOperation("分页查询工单报工记录")
    @PreAuth
    public R<IPage<OrderReportRecordResVO>> pageQuery(@RequestBody OrderReportRecordSearchVO vo) {
        return R.data(this.orderReportRecordService.pageQuery(vo));
    }
 
    @ApiOperationSupport(order = 3)
    @PostResource({"/record-export"})
    @ApiOperation("导出报工记录")
    @PreAuth
    public R<BladeFile> recordExport(@RequestBody OpRecordExportVO vo) {
        return R.data(this.orderReportRecordService.recordExport(vo));
    }
 
    @ApiOperationSupport(order = 4)
    @GetResource({"/remove-report-record"})
    @ApiOperation(value = "删除报工记录id", notes = "传入报工记录id")
    @PreAuth
    public R<Boolean> removeReportRecord(@RequestParam("recordId") Long recordId) {
        return R.data(this.orderReportRecordService.removeReportRecord(recordId));
    }
 
    @ApiOperationSupport(order = RegionCache.VILLAGE_LEVEL)
    @PostResource({"/edit-parallel-record"})
    @ApiOperation(value = "编辑并行序报工记录", notes = "传入reportWorkDTO")
    @PreAuth
    public R<Boolean> editOrderParallelRecord(@Valid @RequestBody ReportWorkDTO reportWorkDTO) {
        return R.data(this.orderReportRecordService.editParallelProcessRecord(reportWorkDTO));
    }
 
    @ApiOperationSupport(order = 6)
    @PostResource({"/edit-common-record"})
    @ApiOperation(value = "编辑非行序报工记录", notes = "传入reportWorkDTO")
    @PreAuth
    public R<Boolean> editOrderRecord(@Valid @RequestBody ReportWorkDTO reportWorkDTO) {
        return R.data(this.orderReportRecordService.editOrderProcessRecord(reportWorkDTO));
    }
 
    @ApiOperationSupport(order = 7)
    @GetResource({"/query-child-record"})
    @ApiOperation("查询主序下子序相关信息")
    @PreAuth
    public R<List<OrderChildRecordVO>> queryChildRecord(@RequestParam("mainRecordId") String mainRecordId) {
        return R.data(this.orderReportRecordService.queryChildRecord(mainRecordId));
    }
 
    @ApiOperationSupport(order = 8)
    @GetResource({"/report-record-detail"})
    @ApiOperation("编辑报工记录展开详情")
    public R<List<JuxtapositionReportDTO>> reportRecordsDetail(@RequestParam("recordId") Long recordId) {
        return R.data(this.orderReportRecordService.reportRecordsDetail(recordId));
    }
}