czt
2025-06-04 688fd8243286b342bfdeb3ee0b4ee45be4c005cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
package com.fzzy.igds.dzhwk.controller;
 
import com.fzzy.igds.dzhwk.data.DzhwkConfigData;
import com.fzzy.igds.dzhwk.domain.Dept;
import com.fzzy.igds.dzhwk.manager.WebManager;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
 
/**
 * @Description
 */
@Slf4j
@Controller
@RequestMapping("/dzhwk")
public class WebController {
 
    private static final String prefix = "dzhwk/";
 
    @Resource
    private DzhwkConfigData dzhwkConfigData;
    @Resource
    private WebManager webManager;
 
    /**
     * 首页
     * @param gid 廒间id
     * @param view
     * @return
     */
    @RequestMapping("/index")
    public String index(@RequestParam(value = "gid", required = false) String gid, ModelMap view) {
 
        String videoUrl = dzhwkConfigData.getDzhwkVideo().replace(dzhwkConfigData.getProfile(),"/profile/");
        view.put("videoUrl", videoUrl);
        return prefix + "index";
    }
 
    /**
     * 电子货位卡
     * @param view
     * @return
     */
    @RequestMapping("/dzhwk")
    public String dzhwk(ModelMap view) {
        view.put("flag", "dzhwk");
        return prefix + "dzhwk";
    }
 
    /**
     * 仓储保管作业-粮温检测
     * @param view
     * @return
     */
    @RequestMapping("/grain")
    public String grain(ModelMap view) {
        view.put("flag", "grain");
        return prefix + "grain";
    }
 
    /**
     * 仓储保管作业-粮温检测
     * @param view
     * @return
     */
    @RequestMapping("/grain-check1")
    public String grainCheck1(ModelMap view) {
        return prefix + "grain-check1";
    }
 
    /**
     * 仓储保管作业-气体检测
     * @param view
     * @return
     */
    @RequestMapping("/gas")
    public String gas(ModelMap view) {
        view.put("flag", "gas");
        return prefix + "gas";
    }
 
    /**
     * 仓储保管作业-粮温检测
     * @param view
     * @return
     */
    @RequestMapping("/gas-check")
    public String gasCheck(ModelMap view) {
        return prefix + "gas-check";
    }
 
    /**
     * 仓储保管作业-虫害检测
     * @param view
     * @return
     */
    @RequestMapping("/pest")
    public String pest(ModelMap view) {
        view.put("flag", "pest");
        return prefix + "pest";
    }
 
    /**
     * 仓储保管作业-粮温检测
     * @param view
     * @return
     */
    @RequestMapping("/pest-check")
    public String pestCheck(ModelMap view) {
        return prefix + "pest-check";
    }
 
    /**
     * 仓储保管作业-通风作业
     * @param view
     * @return
     */
    @RequestMapping("/verb")
    public String verb(ModelMap view) {
        view.put("flag", "verb");
        return prefix + "verb";
    }
 
    /**
     * 仓储保管作业-通风控制
     * @param view
     * @return
     */
    @RequestMapping("/verb-control")
    public String verbControl(ModelMap view) {
        return prefix + "verb-control";
    }
 
    /**
     * 仓储保管作业-温控作业
     * @param view
     * @return
     */
    @RequestMapping("/recir")
    public String recir(ModelMap view) {
        view.put("flag", "recir");
        return prefix + "recir";
    }
 
    /**
     * 仓储保管作业-通风控制
     * @param view
     * @return
     */
    @RequestMapping("/recir-control")
    public String recirControl(ModelMap view) {
        return prefix + "recir-control";
    }
 
    /**
     * 仓储保管作业-气调作业
     * @param view
     * @return
     */
    @RequestMapping("/n2")
    public String n2(ModelMap view) {
        view.put("flag", "n2");
        return prefix + "n2";
    }
 
    /**
     * 仓储保管作业-通风控制
     * @param view
     * @return
     */
    @RequestMapping("/n2-control")
    public String n2Control(ModelMap view) {
        return prefix + "n2-control";
    }
 
    /**
     * 仓储保管作业-安全管理
     * @param view
     * @return
     */
    @RequestMapping("/security")
    public String security(ModelMap view) {
        view.put("flag", "security");
        return prefix + "security";
    }
 
    /**
     * 电子门禁
     * @param view
     * @return
     */
    @RequestMapping("/door")
    public String door(ModelMap view) {
        view.put("flag", "door");
        return prefix + "door";
    }
 
    /**
     * AI专家决策
     * @param view
     * @return
     */
    @RequestMapping("/ai")
    public String ai(ModelMap view) {
        view.put("flag", "ai");
        return prefix + "ai";
    }
 
    /**
     * 粮油专卡
     * @param view
     * @return
     */
    @RequestMapping("/card")
    public String card(ModelMap view) {
        view.put("flag", "card");
        return prefix + "card";
    }
 
    /**
     * 粮油专卡
     * @param view
     * @return
     */
    @RequestMapping("/card-food-oil")
    public String cardFoodOil(ModelMap view) {
        return prefix + "card-food-oil";
    }
 
    /**
     * 巡检打卡
     * @param view
     * @return
     */
    @RequestMapping("/patrol")
    public String patrol(ModelMap view) {
        view.put("flag", "patrol");
        return prefix + "patrol";
    }
 
    /**
     * 粮油专卡
     * @param view
     * @return
     */
    @RequestMapping("/sys")
    public String sys(ModelMap view) {
        view.put("flag", "sys");
        return prefix + "sys";
    }
 
    /**
     * 锁屏
     * @param view
     * @return
     */
    @RequestMapping("/lock")
    public String lock(@RequestParam(value = "flag", required = true) String flag, ModelMap view) {
        view.put("flag", flag);
        return prefix + "lock";
    }
 
    /**
     * 视频预览页面
     *
     * @return
     */
    @RequestMapping("/dept-video")
    public String deptVideo(@RequestParam(value = "id", required = true) String id,
                            ModelMap view) {
 
        if(StringUtils.isNotEmpty(id)){
            Dept dept = webManager.getDeptFile(id);
            view.put("videoPath", dept.getVideoFilePath());
        }
 
        return prefix + "dept-video";
    }
 
    /**
     * 鸟瞰图预览页面
     *
     * @return
     */
    @RequestMapping("/dept-img")
    public String deptImg(@RequestParam(value = "id", required = true) String id,
                          ModelMap view) {
 
        if(StringUtils.isNotEmpty(id)){
            Dept dept = webManager.getDeptFile(id);;
            view.put("imgPath", dept.getImgFilePath());
        }
 
        return prefix + "dept-img";
    }
}