AdminReceiptHeaderController.java
2.34 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
package com.huaheng.pc.receipt.receiptHeader.controller;
import com.huaheng.common.support.Convert;
import com.huaheng.common.utils.StringUtils;
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.framework.web.domain.RetCode;
import com.huaheng.framework.web.page.TableDataInfo;
import com.huaheng.pc.config.zone.service.IZoneService;
import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
import com.huaheng.pc.receipt.receiptDetail.service.IReceiptDetailService;
import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
import com.huaheng.pc.receipt.receiptHeader.service.IReceiptHeaderService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 入库单主 信息操作处理
*
* @author huaheng
* @date 2019-05-21
*/
@Controller
@RequestMapping("/admin/receiptHeader")
public class AdminReceiptHeaderController extends BaseController
{
private String prefix = "admin/receiptHeader";
@Autowired
private IReceiptHeaderService receiptHeaderService;
@GetMapping()
public String receiptHeader()
{
return prefix + "/receiptHeader";
}
/**
* 查询入库单主列表
*/
@Log(title = "入库-入库单", operating = "查看入库主单列表", action = BusinessType.GRANT)
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(ReceiptHeader receiptHeader, String time)
{
receiptHeader.setDeleted(false);
startPage();
List<ReceiptHeader> list = new ArrayList<>();
if(StringUtils.isEmpty(time)) {
list=receiptHeaderService.selectListEntityByLike(receiptHeader);
}else {
list=receiptHeaderService.selectListByCreated();
}
return getDataTable(list);
}
@PostMapping("/getReceiptHeader")
@ResponseBody
public AjaxResult<ReceiptHeader> getShipmentHeader(int id){
return AjaxResult.success(receiptHeaderService.selectEntityById(id));
}
}