whycrzg
2021-02-02 086b0d677e761bb5d528e6f29232d663af6e83c7
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
package com.fgkj.controller;
 
import com.fgkj.util.*;
 
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.User_task_param;
import com.fgkj.services.User_task_paramService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
import javax.annotation.Resource;
 
@RequestMapping("userTaskParam")
@RestController
@Api(tags = "userTaskParam接口")
public class User_task_paramController{
    @Resource
    private User_task_paramService service;
 
    //4.2作业参数(新增作业参数)
    @PostMapping("/")
    @ApiOperation(notes = "tp_task_notice_starttime 等时间参数不能为空 { \"tp_name\": \"\", \"tp_taskname\": \"\", \"tp_tasktype\": 0, \"tp_autoinc_daycount\": 0, \"tp_taskdelay_daycount\": 0, \"tp_pass_saturday\": 0, \"tp_pass_sunday\": 0, \"tp_pass_jiejiari\": 0, \"tp_task_notice_count\": 0, \"tp_task_notice_time_interval\": 0, \"tp_task_notice_starttime\": \"2021-01-07 08:16:26\", \"tp_task_notice_endtime\": \"2021-01-07 08:16:26\", \"tp_task_enabled\": 0, \"tp_master_id\": \"\", \"tp_notice_master_enabled\": 0, \"tp_task_battlife_var\": 0, \"tp_task_battyong_test80_month\": 0, \"tp_task_battold_test80_month\": 0, \"tp_task_battyong_test40_month\": 0, \"tp_task_battold_test40_month\": 0, \"tp_task_batt_checkcircle_month\": 0, \"tp_task_batt_checklimit_month\": 0, \"tp_task_batt_lazhacircle_month\": 0, \"tp_task_batt_lazhalimit_month\": 0 }",value="作业参数(新增作业参数)")
    public ServiceModel add(@RequestBody User_task_param utp) {
        ServiceModel model=service.add(utp);
        
        return model;
        
    }
    //4.2作业参数(重命名操作)
    @PutMapping("/")
    @ApiOperation(notes = "",value="作业参数(重命名操作)")
    public ServiceModel update(@RequestBody User_task_param utp) {
//        System.out.println("utp = " + utp);
        ServiceModel model=service.update(utp);
        
        return model;
    }
    
    //4.2作业参数(重命名操作)
    @PutMapping("pro")
    @ApiOperation(notes = "tp_task_notice_starttime 时间参数不能为空",value="作业参数(重命名操作)")
    public ServiceModel updatePro(@RequestBody List<User_task_param> uplist) {
        ServiceModel model=service.updatePro(uplist);
        
        return model;
    }
    
    //4.2作业参数(删除)
    @DeleteMapping("/")
    @ApiOperation(notes = "",value="作业参数(删除)")
    public ServiceModel delete(@RequestBody User_task_param utp) {
        ServiceModel model=service.delete(utp);
        
        return model;
    }
    
    //4.2查询所有参数种类
    @GetMapping("all")
    @ApiOperation(notes = "",value="查询所有参数种类")
    public ServiceModel searchAll(){
        ServiceModel model=service.searchAll();
        
        return model;
    }
    
    //4.2根据参数id查基本参数和模板参数 100001
    @PostMapping("byCondition")
    @ApiOperation(notes = "",value="参数id查基本参数和模板参数")
    public ServiceModel serchByCondition(@RequestParam Integer tp_num){
        User_task_param utp = new User_task_param();
        utp.setTp_num(tp_num);
        ServiceModel model=service.serchByCondition(utp);
        
        return model;
    }
 
}