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