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