提交 | 用户 | 时间
|
9f7aa7
|
1 |
package com.billion.main.om.controller; |
吴 |
2 |
|
|
3 |
import com.billion.common.annotation.Log; |
|
4 |
import com.billion.common.core.controller.BaseController; |
|
5 |
import com.billion.common.core.domain.AjaxResult; |
|
6 |
import com.billion.common.core.page.TableDataInfo; |
|
7 |
import com.billion.common.enums.BusinessType; |
|
8 |
import com.billion.common.utils.poi.ExcelUtil; |
|
9 |
import com.billion.main.om.domain.OmOrderScheduling; |
|
10 |
import com.billion.main.om.service.IOmOrderSchedulingService; |
|
11 |
import org.springframework.beans.factory.annotation.Autowired; |
|
12 |
import org.springframework.security.access.prepost.PreAuthorize; |
|
13 |
import org.springframework.web.bind.annotation.*; |
|
14 |
|
|
15 |
import javax.servlet.http.HttpServletResponse; |
|
16 |
import java.util.List; |
|
17 |
|
|
18 |
/** |
|
19 |
* 订单排产Controller |
|
20 |
* |
|
21 |
* @author Billion |
|
22 |
* @date 2024-11-20 |
|
23 |
*/ |
|
24 |
@RestController |
|
25 |
@RequestMapping("/main/scheduling") |
|
26 |
public class OmOrderSchedulingController extends BaseController |
|
27 |
{ |
|
28 |
@Autowired |
|
29 |
private IOmOrderSchedulingService omOrderSchedulingService; |
|
30 |
|
|
31 |
/** |
|
32 |
* 查询订单排产列表 |
|
33 |
*/ |
|
34 |
@PreAuthorize("@ss.hasPermi('main:scheduling:list')") |
|
35 |
@GetMapping("/list") |
|
36 |
public TableDataInfo list(OmOrderScheduling omOrderScheduling) |
|
37 |
{ |
|
38 |
startPage(); |
|
39 |
List<OmOrderScheduling> list = omOrderSchedulingService.selectOmOrderSchedulingList(omOrderScheduling); |
|
40 |
return getDataTable(list); |
|
41 |
} |
|
42 |
|
|
43 |
/** |
|
44 |
* 导出订单排产列表 |
|
45 |
*/ |
|
46 |
@PreAuthorize("@ss.hasPermi('main:scheduling:export')") |
|
47 |
@Log(title = "订单排产", businessType = BusinessType.EXPORT) |
|
48 |
@PostMapping("/export") |
|
49 |
public void export(HttpServletResponse response, OmOrderScheduling omOrderScheduling) |
|
50 |
{ |
|
51 |
List<OmOrderScheduling> list = omOrderSchedulingService.selectOmOrderSchedulingList(omOrderScheduling); |
|
52 |
ExcelUtil<OmOrderScheduling> util = new ExcelUtil<OmOrderScheduling>(OmOrderScheduling.class); |
|
53 |
util.exportExcel(response, list, "订单排产数据"); |
|
54 |
} |
|
55 |
|
|
56 |
/** |
|
57 |
* 获取订单排产详细信息 |
|
58 |
*/ |
|
59 |
@PreAuthorize("@ss.hasPermi('main:scheduling:query')") |
|
60 |
@GetMapping(value = "/{id}") |
|
61 |
public AjaxResult getInfo(@PathVariable("id") Long id) |
|
62 |
{ |
|
63 |
return success(omOrderSchedulingService.selectOmOrderSchedulingById(id)); |
|
64 |
} |
|
65 |
|
|
66 |
/** |
|
67 |
* 新增订单排产 |
|
68 |
*/ |
|
69 |
@PreAuthorize("@ss.hasPermi('main:scheduling:add')") |
|
70 |
@Log(title = "订单排产", businessType = BusinessType.INSERT) |
|
71 |
@PostMapping |
|
72 |
public AjaxResult add(@RequestBody OmOrderScheduling omOrderScheduling) |
|
73 |
{ |
|
74 |
return toAjax(omOrderSchedulingService.insertOmOrderScheduling(omOrderScheduling)); |
|
75 |
} |
|
76 |
|
|
77 |
/** |
|
78 |
* 修改订单排产 |
|
79 |
*/ |
|
80 |
@PreAuthorize("@ss.hasPermi('main:scheduling:edit')") |
|
81 |
@Log(title = "订单排产", businessType = BusinessType.UPDATE) |
|
82 |
@PutMapping |
|
83 |
public AjaxResult edit(@RequestBody OmOrderScheduling omOrderScheduling) |
|
84 |
{ |
|
85 |
return toAjax(omOrderSchedulingService.updateOmOrderScheduling(omOrderScheduling)); |
|
86 |
} |
|
87 |
|
|
88 |
/** |
|
89 |
* 删除订单排产 |
|
90 |
*/ |
|
91 |
@PreAuthorize("@ss.hasPermi('main:scheduling:remove')") |
|
92 |
@Log(title = "订单排产", businessType = BusinessType.DELETE) |
|
93 |
@DeleteMapping("/{ids}") |
|
94 |
public AjaxResult remove(@PathVariable Long[] ids) |
|
95 |
{ |
|
96 |
return toAjax(omOrderSchedulingService.deleteOmOrderSchedulingByIds(ids)); |
|
97 |
} |
|
98 |
} |