|
@@ -1,19 +1,19 @@
|
|
package com.imed.costaccount.web;
|
|
package com.imed.costaccount.web;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
|
-
|
|
|
|
import com.imed.costaccount.common.util.PageUtils;
|
|
import com.imed.costaccount.common.util.PageUtils;
|
|
import com.imed.costaccount.common.util.Result;
|
|
import com.imed.costaccount.common.util.Result;
|
|
import com.imed.costaccount.model.Hospital;
|
|
import com.imed.costaccount.model.Hospital;
|
|
import com.imed.costaccount.model.User;
|
|
import com.imed.costaccount.model.User;
|
|
import com.imed.costaccount.model.dto.HosptailDto;
|
|
import com.imed.costaccount.model.dto.HosptailDto;
|
|
-import com.imed.costaccount.service.HosptailService;
|
|
|
|
|
|
+import com.imed.costaccount.service.HospitalService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.apache.shiro.SecurityUtils;
|
|
import org.apache.shiro.SecurityUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 医院表
|
|
* 医院表
|
|
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*;
|
|
@Api(tags = "医院相关操作")
|
|
@Api(tags = "医院相关操作")
|
|
public class HospitalController {
|
|
public class HospitalController {
|
|
@Autowired
|
|
@Autowired
|
|
- private HosptailService hosptailService;
|
|
|
|
|
|
+ private HospitalService hospitalService;
|
|
|
|
|
|
// /**
|
|
// /**
|
|
// * 列表
|
|
// * 列表
|
|
@@ -48,7 +48,7 @@ public class HospitalController {
|
|
@RequestParam(value = "name",required = false) String name){
|
|
@RequestParam(value = "name",required = false) String name){
|
|
User user = (User) SecurityUtils.getSubject().getPrincipal();
|
|
User user = (User) SecurityUtils.getSubject().getPrincipal();
|
|
Integer hospId = user.getHospId();
|
|
Integer hospId = user.getHospId();
|
|
- PageUtils pageUtils = hosptailService.queryList(page,pageSize,hospId,name);
|
|
|
|
|
|
+ PageUtils pageUtils = hospitalService.queryList(page,pageSize,hospId,name);
|
|
return Result.ok(pageUtils);
|
|
return Result.ok(pageUtils);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -58,7 +58,7 @@ public class HospitalController {
|
|
@GetMapping("/getById")
|
|
@GetMapping("/getById")
|
|
@ApiOperation("根据Id查询医院信息")
|
|
@ApiOperation("根据Id查询医院信息")
|
|
public Result info(Integer id){
|
|
public Result info(Integer id){
|
|
- Hospital hospital = hosptailService.getById(id);
|
|
|
|
|
|
+ Hospital hospital = hospitalService.getById(id);
|
|
return Result.ok(hospital);
|
|
return Result.ok(hospital);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -68,7 +68,7 @@ public class HospitalController {
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
@ApiOperation("保存医院信息")
|
|
@ApiOperation("保存医院信息")
|
|
public Result save(@RequestBody HosptailDto hosptailDto){
|
|
public Result save(@RequestBody HosptailDto hosptailDto){
|
|
- hosptailService.saveHosptail(hosptailDto);
|
|
|
|
|
|
+ hospitalService.saveHosptail(hosptailDto);
|
|
return Result.ok();
|
|
return Result.ok();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -80,7 +80,7 @@ public class HospitalController {
|
|
@ApiOperation("修改医院信息")
|
|
@ApiOperation("修改医院信息")
|
|
public Result update(@RequestBody HosptailDto hosptailDto){
|
|
public Result update(@RequestBody HosptailDto hosptailDto){
|
|
// 作废操作
|
|
// 作废操作
|
|
- hosptailService.updateByHosptail(hosptailDto);
|
|
|
|
|
|
+ hospitalService.updateByHosptail(hosptailDto);
|
|
return Result.ok();
|
|
return Result.ok();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -90,7 +90,7 @@ public class HospitalController {
|
|
@DeleteMapping("/delete")
|
|
@DeleteMapping("/delete")
|
|
@ApiOperation("删除医院信息")
|
|
@ApiOperation("删除医院信息")
|
|
public Result delete(@RequestBody Integer[] ids){
|
|
public Result delete(@RequestBody Integer[] ids){
|
|
- hosptailService.removeByIds(Arrays.asList(ids));
|
|
|
|
|
|
+ hospitalService.removeByIds(Arrays.asList(ids));
|
|
return Result.ok();
|
|
return Result.ok();
|
|
}
|
|
}
|
|
|
|
|