chenlu
2025-12-01 1e56bd5cc3be7f7957788f2606c7f56cb4d27f50
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
package com.example.erp.controller.sd;
 
import com.example.erp.common.Result;
import com.example.erp.service.sd.OrderFileService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
import java.io.IOException;
import java.util.List;
import java.util.Map;
 
@RestController
@Api(value="订单文件controller",tags={"订单文件操作接口"})
@RequestMapping("/orderFile")
@RequiredArgsConstructor
public class OrderFileController {
    private final OrderFileService orderFileService;
 
    @PostMapping("/updateOrderFileByOrderNumber/{orderId}/{orderNumber}")
    public Result updateOrderFileByOrderNumber(@RequestParam("file") MultipartFile file, @PathVariable String orderId, @PathVariable String orderNumber) throws IOException {
 
        return  Result.success(orderFileService.updateOrderFileByOrderNumber(file,orderId,orderNumber));
    }
    @PostMapping("/getOrderFilePicture")
    public Result getOrderFilePicture(@RequestBody List<Map<String,Object>> orderDetails) throws NoSuchFieldException {
        return Result.success(orderFileService.getOrderFilePicture(orderDetails));
    }
 
    @PostMapping("/getOrderNumberFile/{orderId}/{orderNumber}")
    public Result getOrderNumberFile(@PathVariable String orderId,@PathVariable String orderNumber){
        return Result.success(orderFileService.getOrderNumberFile(orderId,orderNumber));
    }
    @PostMapping("/deleteOrderNumberFile/{orderId}/{orderNumber}")
    public Result deleteOrderNumberFile(@PathVariable String orderId,@PathVariable String orderNumber){
        return Result.success(orderFileService.deleteOrderNumberFile(orderId,orderNumber));
    }
 
}