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;
|
}
|
|
}
|