春风项目四线(合箱线、总装线)
wujian
2024-01-24 78830ddf56a41d16ab440a1ed3019ef77b3db4af
提交 | 用户 | 时间
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
9ebb88 53     @PreAuthorize("@ss.hasPermi('da:passingStationCollection:list')")
W 54     @GetMapping("/getProduceNumToday")
55     public R getProduceNumToday(String fieldName)
56     {
57         Integer num = daPassingStationCollectionService.getProduceNumToday(fieldName);
58         return R.ok(num);
59     }
60
fd2207 61     /**
ff985a 62      * 查询产品过站采集列表
63      */
64     @GetMapping("/insertRepairRecordByIds")
65     public AjaxResult insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection)
66     {
67         daPassingStationCollectionService.insertRepairRecordByIds(daPassingStationCollection);
68         return AjaxResult.success();
69     }
70
71     /**
fd2207 72      * 导出产品过站采集列表
73      */
74     @PreAuthorize("@ss.hasPermi('da:passingStationCollection:export')")
75     @Log(title = "产品过站采集", businessType = BusinessType.EXPORT)
76     @PostMapping("/export")
77     public void export(HttpServletResponse response, DaPassingStationCollection daPassingStationCollection)
78     {
79         List<DaPassingStationCollection> list = daPassingStationCollectionService.selectDaPassingStationCollectionList(daPassingStationCollection);
80         ExcelUtil<DaPassingStationCollection> util = new ExcelUtil<DaPassingStationCollection>(DaPassingStationCollection.class);
81         util.exportExcel(response, list, "产品过站采集数据");
82     }
83
84     /**
85      * 获取产品过站采集详细信息
86      */
87     @PreAuthorize("@ss.hasPermi('da:passingStationCollection:query')")
88     @GetMapping(value = "/{id}")
89     public AjaxResult getInfo(@PathVariable("id") Long id)
90     {
91         return success(daPassingStationCollectionService.selectDaPassingStationCollectionById(id));
92     }
93
94     /**
95      * 新增产品过站采集
96      */
97     @PreAuthorize("@ss.hasPermi('da:passingStationCollection:add')")
98     @Log(title = "产品过站采集", businessType = BusinessType.INSERT)
99     @PostMapping
100     public AjaxResult add(@RequestBody DaPassingStationCollection daPassingStationCollection)
101     {
102         daPassingStationCollection.setCreateBy(getUsername());
103         daPassingStationCollection.setCreateTime(DateUtils.getNowDate());
104         return toAjax(daPassingStationCollectionService.insertDaPassingStationCollection(daPassingStationCollection));
105     }
106
107     /**
108      * 修改产品过站采集
109      */
110     @PreAuthorize("@ss.hasPermi('da:passingStationCollection:edit')")
111     @Log(title = "产品过站采集", businessType = BusinessType.UPDATE)
112     @PutMapping
113     public AjaxResult edit(@RequestBody DaPassingStationCollection daPassingStationCollection)
114     {
115         daPassingStationCollection.setUpdateBy(getUsername());
116         daPassingStationCollection.setUpdateTime(DateUtils.getNowDate());
117         return toAjax(daPassingStationCollectionService.updateDaPassingStationCollection(daPassingStationCollection));
118     }
119
120     /**
121      * 删除产品过站采集
122      */
123     @PreAuthorize("@ss.hasPermi('da:passingStationCollection:remove')")
124     @Log(title = "产品过站采集", businessType = BusinessType.DELETE)
125     @DeleteMapping("/{ids}")
126     public AjaxResult remove(@PathVariable Long[] ids)
127     {
128         return toAjax(daPassingStationCollectionService.deleteDaPassingStationCollectionByIds(ids));
129     }
130 }