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