Blame view

src/main/java/com/huaheng/api/U8/controller/ICSCyclecountApi.java 1.46 KB
游杰 authored
1
2
3
4
5
6
7
8
9
package com.huaheng.api.U8.controller;


/**
 *  盘点差异上传接口
 *   @author huaheng
 *   @date 2019-1-9
 */
import com.huaheng.api.U8.Service.ICSCyclecountAPIService;
xqs authored
10
11
import com.huaheng.common.utils.StringUtils;
import com.huaheng.common.utils.security.ShiroUtils;
游杰 authored
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/icsCyclecount")
@Api(tags = {"icsCyclecount"}, description = "ICS差异上传接口")
public class ICSCyclecountApi {

    @Autowired
    private ICSCyclecountAPIService icsCyclecountAPIService;

    @Log(title = "盘点差异上传", action = BusinessType.INSERT)
    @PostMapping("/cycleCountDiff")
    @ApiOperation("ICS差异上传接口")
    @ResponseBody
32
    public AjaxResult ICSComputationUnit(String code , String sourceCode)
游杰 authored
33
    {
xqs authored
34
35
36
37
38
39
        if(StringUtils.isEmpty(code)){
            return AjaxResult.error("差异调整单号不能为空!");
        }
        if(StringUtils.isEmpty(sourceCode)){
            return AjaxResult.error("盘点单编码不能为空!");
        }
40
        AjaxResult ajaxResult = icsCyclecountAPIService.confirm(code,sourceCode);
游杰 authored
41
42
43
        return ajaxResult;
    }
}