package com.openhis.web.check.controller;

import com.core.common.core.domain.R;
import com.openhis.web.check.appservice.ILisGroupInfoAppService;
import org.springframework.web.bind.annotation.*;
import com.openhis.check.domain.LisGroupInfo;

import javax.annotation.Resource;

@RestController
@RequestMapping("/check/lisGroupInfo")
public class LisGroupInfoController {
    @Resource
    private ILisGroupInfoAppService lisGroupInfoAppService;

    /*
    *
    * 获取Lis分组信息
    *
    * */
    @GetMapping("/list")
    public R<?> getLisGroupInfoList(){
        return R.ok(lisGroupInfoAppService.getLisGroupInfoList());
    }

    /*
     *
     * 新增Lis分组信息
     *
     * */
    @PostMapping("/add")
    public R<?> addLisGroupInfo(@RequestBody LisGroupInfo lisGroupInfo){
        return R.ok(lisGroupInfoAppService.add(lisGroupInfo));
    }

    /*
     *
     * 修改Lis分组信息
     *
     * */
    @PutMapping("/update")
    public R<?> updateLisGroupInfo(@RequestBody LisGroupInfo lisGroupInfo){
        return R.ok(lisGroupInfoAppService.update(lisGroupInfo));
    }

    /*
     *
     * 删除Lis分组信息
     *
     * */
    @DeleteMapping("/{lisGroupInfoId}")
    public R<?> deleteLisGroupInfo(@PathVariable Integer lisGroupInfoId){
        return R.ok(lisGroupInfoAppService.delete(lisGroupInfoId));
    }

}
