guoyuji
2024-05-29 a85adf40d5e30d3b9e2a848cf8fd073998ff5c8b
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
package com.example.erp.controller.pp;
 
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.entity.pp.Rework;
import com.example.erp.entity.sd.Delivery;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.pp.ReworkService;
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.util.List;
import java.util.Map;
 
@RestController
@Api(value="返工controller",tags={"返工操作接口"})
@RequestMapping("/rework")
public class ReworkController {
 
    @Autowired
    ReworkService reworkService;
 
 
 
    /*发货订单查询*/
    @ApiOperation("可返工数据查询接口")
    @SaCheckPermission("AddRework.search")
    @PostMapping("/getSelectRework/{pageNum}/{pageSize}")
    public Result getSelectRework(@PathVariable Integer pageNum, @PathVariable Integer pageSize){
        return Result.seccess(reworkService.getSelectRework(pageNum,pageSize));
    }
 
    @ApiOperation("返工数据查询接口")
    @SaCheckPermission("SelectRework.search")
    @PostMapping("/SelectRework/{pageNum}/{pageSize}/{selectDate}")
    public Result SelectRework(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate,@RequestBody Rework rework){
        return Result.seccess(reworkService.SelectRework(pageNum,pageSize,selectDate,rework));
    }
 
 
    @ApiOperation("返工接口新增")
    @SaCheckPermission("AddRework.add")
    @PostMapping("/saveRework")
    public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){
        return Result.seccess(reworkService.saveRework(object));
    }
 
    @ApiOperation("返工审核接口")
    @SaCheckPermission("SelectRework.review")
    @PostMapping("/updateRework")
    public Result updateRework( @RequestBody Map<String,Object> object){
        return Result.seccess(reworkService.updateRework(object));
    }
}