|
|
@@ -38,7 +38,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
@RestController
|
|
|
@AllArgsConstructor
|
|
|
@RequestMapping("/bus/hospital")
|
|
|
-@Api(tags = "医院管理",description = "统一权限前缀(bus:hospital),例如新增bus:hospital:add")
|
|
|
+@Api(tags = "医院管理",description = "统一权限前缀(bus:hospital),例如新增bus:hospital:add。查询无需权限")
|
|
|
public class BusHospitalController extends BaseCrudController<BusHospitalEntity, String> {
|
|
|
private final LocalBusHospitalService hospitalService;
|
|
|
private final HospitalManagerRegister hospitalManagerRegister;
|
|
|
@@ -53,6 +53,11 @@ public class BusHospitalController extends BaseCrudController<BusHospitalEntity,
|
|
|
return "bus:hospital";
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void queryAuth() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public BaseService<? extends Mapper<BusHospitalEntity>, BusHospitalEntity, String> getService() {
|
|
|
return hospitalService;
|
|
|
@@ -76,8 +81,8 @@ public class BusHospitalController extends BaseCrudController<BusHospitalEntity,
|
|
|
}
|
|
|
|
|
|
@PostMapping("/publish/script")
|
|
|
- @SaCheckPermission("bus:hospital:script:pub")
|
|
|
- @ApiOperation(value = "发布脚本",notes = "医院必选,发布脚本,发布后即用该脚本解析his数据,权限【bus:hospital:script:pub】")
|
|
|
+ @SaCheckPermission("bus:hospital:script:edit")
|
|
|
+ @ApiOperation(value = "发布脚本",notes = "医院必选,发布脚本,发布后即用该脚本解析his数据,权限【bus:hospital:script:edit】")
|
|
|
public R publishScript(@RequestAttribute("tenantId")@ApiParam(hidden = true) String tenantId){
|
|
|
BusHospitalEntity hospital = hospitalService.getById(tenantId);
|
|
|
if (ObjectUtil.isNull(hospital.getDraftScript())||StrUtil.isEmpty(hospital.getDraftScript().getContent())) {
|
|
|
@@ -111,8 +116,7 @@ public class BusHospitalController extends BaseCrudController<BusHospitalEntity,
|
|
|
|
|
|
|
|
|
@PostMapping("/validate")
|
|
|
- @SaCheckPermission(mode = SaMode.OR,value = {"bus:hospital:edit","bus:hospital:add"})
|
|
|
- @ApiOperation(value = "校验医院名称是否重复",notes = "权限【bus:hospital:edit 或 bus:hospital:edit】")
|
|
|
+ @ApiOperation(value = "校验医院名称是否重复",notes = "权限【无】")
|
|
|
public R<Boolean> validate(@RequestBody String name){
|
|
|
return R.success(this.hospitalService.isExistName(name));
|
|
|
}
|