whycrzg
2021-02-03 f3e160c4c6690232da3258adb42c1f702cd8bb07
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
package com.fgkj.controller;
 
import com.fgkj.util.*;
 
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.User_task_batt_check;
import com.fgkj.services.User_task_batt_checkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
@RequestMapping("UserTaskBattCheck")
@RestController
@Api(tags = "UserTaskBattCheck接口")
public class User_task_batt_checkController{
 
    @Resource
    private User_task_batt_checkService service;
    
    @PostMapping("/")
    @ApiOperation(notes = "",value="新增")
     public ServiceModel add(@RequestBody User_task_batt_check utbc) {
        ServiceModel model=service.add(utbc);
        
        return model;
        
    }
    //4.1提交,复查作业
    @PutMapping("/")
    @ApiOperation(notes = "num 为update条件",value="提交,复查作业")
    public ServiceModel update(@RequestBody User_task_batt_check utbc) {
        ServiceModel model=service.update(utbc);
        
        return model;
    }
 
    @DeleteMapping("/")
    @ApiOperation(notes = "", value = "删除")
    public ServiceModel delete(@RequestParam Integer num) {
        User_task_batt_check utbc = new User_task_batt_check();
        utbc.setNum(num);
        ServiceModel model = service.delete(utbc);
 
        return model;
    }
 
    @PostMapping("byCondition")
    @ApiOperation(notes = "",value="task_id查询user_task_batt_check信息")
     public ServiceModel serchByCondition(@RequestParam Integer task_id) {
        User_task_batt_check utbc = new User_task_batt_check();
        utbc.setTask_id(task_id);
         ServiceModel model=service.serchByCondition(utbc);
         
         return model;
    }
    @GetMapping("all")
    @ApiOperation(notes = "",value="all")
    public ServiceModel searchAll(){
         ServiceModel model=service.searchAll();
         
         return model;
    }
 
}