ICSBasicDataApi.java 3.96 KB
package com.huaheng.api.U8.controller;

import com.huaheng.api.U8.Service.*;
import com.huaheng.api.U8.domain.*;
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 io.swagger.annotations.ApiOperation;
import org.junit.platform.commons.logging.Logger;
import org.junit.platform.commons.logging.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/icsBasicData")
@Api(tags = {"icsBasicData"}, description = "ICS基本数据接口")
public class ICSBasicDataApi extends BaseController {

    private static final Logger logger = LoggerFactory.getLogger(ICSBasicDataApi.class);

    @Autowired
    private  ComputationUnitApiService computationUnitApiService;

    @Autowired
    private CustomerAPIService customerService;

    @Autowired
    private DeptAPIService icsDepartmentService;

    @Autowired
    private MaterialAPIService ICSInventoryService;

    @Autowired
    private UserAPIService icsPersonApiService;

    @Autowired
    private SupplierAPIService icsVendorService;

    @Autowired
    private WarehouseAPIService icsWarehouseService;

    @Log(title = "计量单位添加", action = BusinessType.INSERT)
    @PostMapping("/GetICSComputationUnit")
    @ApiOperation("ICS计量单位添加接口")
    @ResponseBody
    public AjaxResult ICSComputationUnit(@RequestBody ICScomputationUnitModel icsComputationUnit)
    {
        AjaxResult ajaxResult = computationUnitApiService.ICSUnit(icsComputationUnit);
        return ajaxResult;
    }

    @Log(title = "客户档案添加", action = BusinessType.INSERT)
    @PostMapping("/GetICSCustomer")
    @ApiOperation("ICS客户档案添加接口")
    @ResponseBody
    public AjaxResult ICSCustomer(@RequestBody ICSCustomerModel icsCustomer)
    {
        AjaxResult ajaxResult = customerService.ICSCustomer(icsCustomer);
        return ajaxResult;
    }

    @Log(title = "部门档案添加", action = BusinessType.INSERT)
    @PostMapping("/GetICSDepartment")
    @ApiOperation("ICS部门档案添加接口")
    @ResponseBody
    public AjaxResult ICSDepartment(@RequestBody ICSDepartmentModel icsDepartment)
    {
        AjaxResult ajaxResult = icsDepartmentService.ICSDepartment(icsDepartment);
        return ajaxResult;
    }

    @Log(title = "物料添加", operating = "物料添加",action = BusinessType.INSERT)
    @PostMapping("/GetICSInventory")
    @ApiOperation("ICS物料添加接口")
    @ResponseBody
    public AjaxResult ICSInventory(@RequestBody List<ICSMaterialModel> iCSInventorys)
    {
        AjaxResult ajaxResult = ICSInventoryService.ICSInventory(iCSInventorys);
        return ajaxResult;
    }

    @Log(title = "人员档案添加", action = BusinessType.INSERT)
    @PostMapping("/GetICSPerson")
    @ApiOperation("ICS人员档案添加接口")
    @ResponseBody
    public AjaxResult ICSPerson(@RequestBody ICSPersonModel icsPerson)
    {
        AjaxResult ajaxResult = icsPersonApiService.ICSPerson(icsPerson);
        return ajaxResult;
    }

    @Log(title = "供应商档案添加", action = BusinessType.INSERT)
    @PostMapping("/GetICSVendor")
    @ApiOperation("ICS供应商档案添加接口")
    @ResponseBody
    public AjaxResult ICSVendor(@RequestBody ICSVendorModel icsVendor){
        AjaxResult ajaxResult = icsVendorService.ICSVendor(icsVendor);
        return ajaxResult;
    }

//    @Log(title = "仓库档案添加", action = BusinessType.INSERT)
//    @PostMapping("/GetICSWarehouse")
//    @ApiOperation("ICS仓库档案添加接口")
//    @ResponseBody
//    public AjaxResult ICSWarehouse(@RequestBody ICSWarehouseModel icsWarehouse){
//        AjaxResult ajaxResult = icsWarehouseService.ICSWarehouse(icsWarehouse);
//        return ajaxResult;
//    }
}