package com.fs.app.controller;


import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.fs.app.annotation.Login;
import com.fs.app.param.SignParam;
import com.fs.app.utils.CityTreeUtil;
import com.fs.app.utils.JwtUtils;
import com.fs.app.vo.CityVO;
import com.fs.common.config.FSConfig;
import com.fs.common.core.domain.AjaxResult;
import com.fs.common.core.domain.R;
import com.fs.common.exception.file.OssException;
import com.fs.common.utils.sign.Md5Utils;
import com.fs.his.domain.FsCity;
import com.fs.his.domain.FsDepartment;
import com.fs.his.domain.FsPatient;
import com.fs.his.service.IFsCityService;
import com.fs.his.service.IFsDepartmentService;
import com.fs.system.oss.CloudStorageService;
import com.fs.system.oss.OSSFactory;
import com.fs.system.service.ISysDictDataService;
import com.google.common.collect.Lists;
import com.tencentyun.TLSSigAPIv2;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

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


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



}
