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