ZengTao
2025-10-11 eae026a90011e77c1a3947021c87a2eea786d1b1
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
package com.mes.loadglassdevicetaskhistory.controller;
 
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mes.job.PlcLoadGlassTask;
import com.mes.loadglassdevicetaskhistory.entity.request.LoadGlassRequest;
import com.mes.opctask.entity.LoadGlassDeviceTaskHistory;
import com.mes.opctask.entity.request.LoadGlassDeviceTaskHistoryRequest;
import com.mes.opctask.service.LoadGlassDeviceTaskHistoryService;
import com.mes.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author wf
 * @since 2025-03-12
 */
@RestController
@RequestMapping("/loadglassdevicetaskhistory")
public class LoadGlassDeviceTaskHistoryController {
 
    @Resource
    PlcLoadGlassTask plcLoadGlassTask;
    @Autowired
    private LoadGlassDeviceTaskHistoryService loadGlassDeviceTaskHistoryService;
 
    @ApiOperation("按照查询条件查询上片历史任务")
    @PostMapping("/queryLoadGlassHistoryTask") //查询现在上片机的玻璃信息
    public Result<Page<LoadGlassDeviceTaskHistory>> queryBigStorageCageHistoryTask(@RequestBody @Validated LoadGlassDeviceTaskHistoryRequest request) {
        return Result.build(200, "查询成功", loadGlassDeviceTaskHistoryService.queryLoadGlassHistoryTask(request));
    }
 
    @ApiOperation("查询线路所有数据")
    @PostMapping("/queryAllMessage") //查询现在上片机的玻璃信息
    public Result<String> queryAllMessage(@RequestBody @Validated LoadGlassRequest request) {
        return Result.build(200, "查询成功", plcLoadGlassTask.loadGlassChild(request.getRedisRequest(), request.getStationCell(),
                request.getTableName(), request.getWebSocketName()));
    }
 
}