自动化立体仓库 - WMS系统
zwl
4 天以前 632bde0f32999a2b319b706e23d90bc1b5dd8cc2
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
package com.zy.asrs.controller;
 
import com.core.annotations.ManagerAuth;
import com.core.common.Cools;
import com.core.common.R;
import com.zy.asrs.service.InboundCameraCaptureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.Map;
 
@RestController
public class PhotoController {
 
    @Autowired
    private InboundCameraCaptureService inboundCameraCaptureService;
 
    @GetMapping("/photo/loc/auth")
    @ManagerAuth
    public R loc(@RequestParam String locNo) {
        return R.ok(inboundCameraCaptureService.resolveLocPicUrls(locNo));
    }
 
    @PostMapping("/photo/resolve/auth")
    @ManagerAuth
    public R resolve(@RequestBody(required = false) Map<String, Object> body,
                     @RequestParam(required = false) String pic) {
        String value = pic;
        if (Cools.isEmpty(value) && body != null && body.get("pic") != null) {
            value = String.valueOf(body.get("pic"));
        }
        return R.ok(inboundCameraCaptureService.resolvePicUrls(value));
    }
}