ReceiptController.java
1.25 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
40
package com.huaheng.api.general.controller;
import com.huaheng.api.general.domain.Receipt;
import com.huaheng.api.general.service.ReceiptService;
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* Created by Enzo Cotter on 2019/11/4.
* @author mahuandong
*/
@RestController
@RequestMapping("/api/receipt")
@Api(tags = {"入库接口"}, value = "入库接口receiptApi")
public class ReceiptController {
@Resource
private ReceiptService receiptService;
/**
* 入库单下发
*/
@Log(title = "入库单下发", action = BusinessType.INSERT)
@PostMapping("/insertReceipt")
@ApiOperation("入库单下发接口")
@ResponseBody
public AjaxResult MaterialApi(@RequestBody Receipt receipt) {
System.out.println("————————开始接收入库单——————————");
System.out.println(receipt);
AjaxResult ajaxResult = receiptService.insertReceipt(receipt);
return ajaxResult;
}
}