ICSCyclecountApi.java 1.46 KB
package com.huaheng.api.U8.controller;


/**
 *  盘点差异上传接口
 *   @author huaheng
 *   @date 2019-1-9
 */
import com.huaheng.api.U8.Service.ICSCyclecountAPIService;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.common.utils.security.ShiroUtils;
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
    public AjaxResult ICSComputationUnit(String code , String sourceCode)
    {
        if(StringUtils.isEmpty(code)){
            return AjaxResult.error("差异调整单号不能为空!");
        }
        if(StringUtils.isEmpty(sourceCode)){
            return AjaxResult.error("盘点单编码不能为空!");
        }
        AjaxResult ajaxResult = icsCyclecountAPIService.confirm(code,sourceCode);
        return ajaxResult;
    }
}