Blame view

src/main/java/com/huaheng/api/U8/controller/ICSCyclecountApi.java 1.63 KB
周鸿 authored
1
2
3
4
5
6
7
8
9
10
11
12
13
package com.huaheng.api.U8.controller;


/**
 *  盘点差异上传接口
 *   @author huaheng
 *   @date 2019-1-9
 */

import com.huaheng.common.utils.StringUtils;
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.domain.AjaxResult;
tongzhonghao authored
14
import com.huaheng.pc.u8.service.ICSCyclecountAPIService;
周鸿 authored
15
16
17
18
19
20
21
22
23
24
25
26
27
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/icsCyclecount")
@Api(tags = {"icsCyclecount"}, description = "ICS差异上传接口")
public class ICSCyclecountApi {
tongzhonghao authored
28
29
    @Autowired
    private ICSCyclecountAPIService icsCyclecountAPIService;
周鸿 authored
30
31
32
33
34

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