ReceivingController.java
2.51 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package com.huaheng.pc.receipt.receiving.controller;
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.receipt.receiptContainerHeader.domain.ReceiptContainerView;
import com.huaheng.pc.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* 入库单主 信息操作处理
*
* @author huaheng
* @date 2018-08-19
*/
@Controller
@RequestMapping("/receipt/receiving")
public class ReceivingController extends BaseController
{
private String prefix = "receipt/receiving";
@Autowired
private IReceiptContainerHeaderService receiptContainerHeaderService;
@RequiresPermissions("receipt:receiving:view")
@GetMapping()
public String receiving()
{
return prefix + "/receiving";
}
/**
* 获取订单明细
*/
@ResponseBody
@PostMapping("/scanBill")
@RequiresPermissions("receipt:receiving:add")
@Log(title = "入库-入库单", operating ="PC端扫描收货单号", action = BusinessType.OTHER)
public AjaxResult scanBill(String code) {
AjaxResult result = receiptContainerHeaderService.scanReceiptCode(code);
return result;
}
/**
* 获取收货信息
*/
@ResponseBody
@PostMapping("/getReceiptInfoByBill")
@RequiresPermissions("receipt:receiving:add")
@Log(title = "入库-入库单", operating ="获取收货信息", action = BusinessType.OTHER)
public AjaxResult getReceiptInfoByBill(String code) {
AjaxResult result = receiptContainerHeaderService.getReceiptInfoByBill(code);
return result;
}
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 保存收货
*/
@ResponseBody
@PostMapping("/save")
@RequiresPermissions("receipt:receiving:add")
@Log(title = "入库-入库单", operating ="PC端保存收货", action = BusinessType.OTHER)
public AjaxResult save(ReceiptContainerView record){
AjaxResult result = receiptContainerHeaderService.save(record);
return result;
}
}