huang
2025-04-17 3a0087aa5e3eed5d9d7a793a17dc01fd1d6df80c
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
package com.mes.md.controller;
 
 
import com.mes.md.service.TaskingLogService;
import com.mes.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.Map;
 
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wu
 * @since 2024-08-28
 */
@RestController
@RequestMapping("/taskingLog")
public class TaskingLogController {
 
    @Autowired
    TaskingLogService taskingLogService;
 
    @ApiOperation("提交日志以及报工数据到九牧数据库")
    @PostMapping("/reportTaskingLog")
    @ResponseBody
    public Result reportTaskingLog(@RequestBody Map<String, String> map) {
        try {
            taskingLogService.reportTaskingLog();
            return Result.build(200,"提交成功",map);
        }catch (Exception e) {
            return Result.build(199,"提交异常",map);
        }
    }
 
    @ApiOperation("提交 设备联机记录到九牧数据库")
    @PostMapping("/reportOnLine")
    @ResponseBody
    public Result reportOnLine(@RequestBody Map<String, String> map) {
        try {
            taskingLogService.reportTaskingLog();
            return Result.build(200,"提交成功",map);
        }catch (Exception e) {
            return Result.build(199,"提交异常",map);
        }
    }
 
    @ApiOperation("提交 设备开机记录到九牧数据库")
    @PostMapping("/reportPowerOn")
    @ResponseBody
    public Result reportPowerOn(@RequestBody Map<String, String> map) {
        try {
            taskingLogService.reportTaskingLog();
            return Result.build(200,"提交成功",map);
        }catch (Exception e) {
            return Result.build(199,"提交异常",map);
        }
    }
 
}