ShipmentApi.java 2.56 KB
package com.huaheng.api.general.Controller;

import com.alibaba.fastjson.JSON;
import com.huaheng.api.general.service.ShipmentAPIService;
import com.huaheng.common.exception.service.ServiceException;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.common.utils.http.HttpUtils;
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.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.general.company.domain.Company;
import com.huaheng.pc.general.company.service.ICompanyService;
import com.huaheng.pc.general.material.domain.Material;
import com.huaheng.pc.general.material.service.IMaterialService;
import com.huaheng.pc.general.warehouse.domain.Warehouse;
import com.huaheng.pc.general.warehouse.service.IWarehouseService;
import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
import com.huaheng.pc.shipment.shipmentDetail.service.IShipmentDetailService;
import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentModel;
import com.huaheng.pc.shipment.shipmentHeader.service.IShipmentHeaderService;
import com.huaheng.pc.system.dict.service.IDictDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 *  出库下发和回传接口
 *    @author huaheng
 *    @date 2018-12-18
 *
 *
 *
 */
@RestController
@RequestMapping("/api/shipment")
@Api(tags = {"shipment"}, description = "出库接口")
public class ShipmentApi extends BaseController {
    @Autowired
    private ShipmentAPIService shipmentAPIService;

    //出库单下发
    @Log(title = "出库单下发", action = BusinessType.INSERT)
    @PostMapping("/insertShipment")
    @ApiOperation("出库单下发公共接口")
    @ResponseBody
    public AjaxResult insertShipment(@RequestBody ShipmentModel shipmentModel){
       return shipmentAPIService.insertShipment(shipmentModel);
    }



    //出库单回传
    @Log(title = "出库单回传", action = BusinessType.INSERT)
    @PostMapping("/confirmShipment")
    @ApiOperation("出库单回传公共接口")
    @ResponseBody
    public AjaxResult confirmShipment(String url)
    {

        return shipmentAPIService.confirmShipment(url);
    }


}