MobileOneByOneReceiptController.java
1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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, record.getZCode());
return retResult;
}
}