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