春风项目四线(合箱线、总装线)
hdy
2024-01-15 80004530f9a99f3b423168700268bd265789d76d
提交 | 用户 | 时间
fd2207 1 package com.jcdm.main.om.productionOrde.controller;
2
3 import java.util.List;
4 import javax.servlet.http.HttpServletResponse;
5 import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
6 import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
df1f2b 7 import com.jcdm.main.webservice.service.ReceivingServices;
fd2207 8 import org.springframework.security.access.prepost.PreAuthorize;
9 import org.springframework.beans.factory.annotation.Autowired;
10 import org.springframework.web.bind.annotation.GetMapping;
11 import org.springframework.web.bind.annotation.PostMapping;
12 import org.springframework.web.bind.annotation.PutMapping;
13 import org.springframework.web.bind.annotation.DeleteMapping;
14 import org.springframework.web.bind.annotation.PathVariable;
15 import org.springframework.web.bind.annotation.RequestBody;
16 import org.springframework.web.bind.annotation.RequestMapping;
17 import org.springframework.web.bind.annotation.RestController;
18 import com.jcdm.common.annotation.Log;
19 import com.jcdm.common.core.controller.BaseController;
20 import com.jcdm.common.core.domain.AjaxResult;
21 import com.jcdm.common.enums.BusinessType;
22 import com.jcdm.common.utils.poi.ExcelUtil;
23 import com.jcdm.common.core.page.TableDataInfo;
24
25 /**
26  * 生产工单Controller
27  * 
28  * @author ruimin
29  * @date 2023-12-11
30  */
31 @RestController
32 @RequestMapping("/om/productionOrde")
33 public class OmProductionOrdeInfoController extends BaseController
34 {
35     @Autowired
36     private IOmProductionOrdeInfoService omProductionOrdeInfoService;
37
38     /**
39      * 查询生产工单列表
40      */
41     @PreAuthorize("@ss.hasPermi('om:productionOrde:list')")
42     @GetMapping("/list")
43     public TableDataInfo list(OmProductionOrdeInfo omProductionOrdeInfo)
44     {
45         startPage();
46         List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.selectOmProductionOrdeInfoList(omProductionOrdeInfo);
47         return getDataTable(list);
48     }
49
50     /**
51      * 导出生产工单列表
52      */
53     @PreAuthorize("@ss.hasPermi('om:productionOrde:export')")
54     @Log(title = "生产工单", businessType = BusinessType.EXPORT)
55     @PostMapping("/export")
56     public void export(HttpServletResponse response, OmProductionOrdeInfo omProductionOrdeInfo)
57     {
58         List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.selectOmProductionOrdeInfoList(omProductionOrdeInfo);
59         ExcelUtil<OmProductionOrdeInfo> util = new ExcelUtil<OmProductionOrdeInfo>(OmProductionOrdeInfo.class);
60         util.exportExcel(response, list, "生产工单数据");
61     }
62
63     /**
64      * 获取生产工单详细信息
65      */
66     @PreAuthorize("@ss.hasPermi('om:productionOrde:query')")
67     @GetMapping(value = "/{id}")
68     public AjaxResult getInfo(@PathVariable("id") Long id)
69     {
70         return success(omProductionOrdeInfoService.selectOmProductionOrdeInfoById(id));
71     }
72
73     /**
74      * 新增生产工单
75      */
76     @PreAuthorize("@ss.hasPermi('om:productionOrde:add')")
77     @Log(title = "生产工单", businessType = BusinessType.INSERT)
78     @PostMapping
79     public AjaxResult add(@RequestBody OmProductionOrdeInfo omProductionOrdeInfo)
80     {
81         return toAjax(omProductionOrdeInfoService.insertOmProductionOrdeInfo(omProductionOrdeInfo));
82     }
83
84     /**
85      * 修改生产工单
86      */
87     @PreAuthorize("@ss.hasPermi('om:productionOrde:edit')")
88     @Log(title = "生产工单", businessType = BusinessType.UPDATE)
89     @PutMapping
90     public AjaxResult edit(@RequestBody OmProductionOrdeInfo omProductionOrdeInfo)
91     {
92         return toAjax(omProductionOrdeInfoService.updateOmProductionOrdeInfo(omProductionOrdeInfo));
93     }
94
95     /**
96      * 删除生产工单
97      */
98     @PreAuthorize("@ss.hasPermi('om:productionOrde:remove')")
99     @Log(title = "生产工单", businessType = BusinessType.DELETE)
100     @DeleteMapping("/{ids}")
101     public AjaxResult remove(@PathVariable Long[] ids)
102     {
103         return toAjax(omProductionOrdeInfoService.deleteOmProductionOrdeInfoByIds(ids));
104     }
105
106     /**
107      * table列上移下移
108      */
109     @Log(title = "生产工单", businessType = BusinessType.DELETE)
110     @GetMapping("/upDownMove")
111     public AjaxResult upDownMove(OmProductionOrdeInfo omProductionOrdeInfo)
112     {
113         return omProductionOrdeInfoService.upDownMove(omProductionOrdeInfo);
114     }
df1f2b 115
116     /**
117      * table列上移下移
118      */
119     @GetMapping("/getProductionNotice")
120     public AjaxResult getProductionNotice(OmProductionOrdeInfo omProductionOrdeInfo)
121     {
122         ReceivingServices.insertWebserviceData(omProductionOrdeInfo.getProductionNotice());
123         return AjaxResult.success();
124     }
fd2207 125 }