MobileOneByOneReceiptController.java 1.53 KB
package com.huaheng.mobile.receipt;

import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerView;
import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 *
 * @author Enzo Cotter
 * @date 2019/12/16
 */
@CrossOrigin
@RestController
@RequestMapping("/mobile/receipt/oneByOne")
@Api(tags = {"移动端逐件收货"}, value = "移动端逐件收货MobileOneByOneReceiptController")
public class MobileOneByOneReceiptController {

    @Resource
    private ReceiptContainerHeaderService receiptContainerHeaderService;

    @PostMapping("/save")
    @ApiOperation("移动端逐件收货保存")
    @Log(title = "移动端逐件收货保存", action = BusinessType.OTHER)
    public AjaxResult save(@RequestBody @ApiParam(value="容器号") ReceiptContainerView record) throws Exception {
        record.setQty(new BigDecimal("1"));
        AjaxResult retResult = receiptContainerHeaderService.saveContainer(record.getReceiptCode(), record.getReceiptContainerCode(),
                record.getReceiptDetailId(), record.getLocationCode(), record.getQty(), null,null);
        return retResult;
    }
}