GeneralApi.java 1.61 KB
package com.huaheng.api.U8.controller;

import com.huaheng.api.U8.domain.ICSInventoryModel;
import com.huaheng.api.U8.domain.ICSWarehouseModel;
import com.huaheng.api.U8.service.GeneralService;
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/api/material")
@Api(tags = {"Material"}, description = "物料接口")
public class GeneralApi extends BaseController {

    @Autowired
    private GeneralService generalService;

    /**
     * 同步物料
     */
//    @RequiresPermissions("api:ICSInventory")
    @Log(title = "物料添加", action = BusinessType.INSERT)
    @PostMapping("/ICSInventory")
    @ResponseBody
    public AjaxResult ICSInventory(@RequestBody ICSInventoryModel iCSInventory)
    {
       AjaxResult ajaxResult = generalService.ICSInventory(iCSInventory);
       return ajaxResult;
    }

    /**
     * 同步仓库和货主
     */
//    @RequiresPermissions("api:ICSWarehouse")
    @Log(title = "物料添加", action = BusinessType.INSERT)
    @PostMapping("/ICSWarehouse")
    @ResponseBody
    public AjaxResult ICSWarehouse(@RequestBody ICSWarehouseModel iCSWarehouse)
    {
        AjaxResult ajaxResult = generalService.ICSWarehouse(iCSWarehouse);
        return ajaxResult;
    }

}