package com.fs.app.controller.store;


import com.fs.app.utils.JwtUtils;
import com.fs.common.core.domain.R;
import com.fs.hisStore.domain.FsDepartmentScrm;
import com.fs.hisStore.service.IFsDepartmentScrmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


@Api("科室接口")
@RestController
@RequestMapping(value="/store/app/department")
public class DepartmentScrmController {
	@Autowired
    JwtUtils jwtUtils;
	@Autowired
	private IFsDepartmentScrmService departmentService;
	@ApiOperation("获取科室列表")
	@GetMapping("/getDepartmentList")
	public R getDepartmentList(FsDepartmentScrm param, HttpServletRequest request){
		try {
			param.setStatus(1);
			List<FsDepartmentScrm> list=departmentService.selectFsDepartmentList(param);
			return R.ok().put("data",list);
		} catch (Exception e){
			return R.error("操作异常");
		}
	}



}
