|
|
@ -2,19 +2,19 @@ package com.ruoyi.web.controller.api;
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
import com.ruoyi.system.domain.TDoctor;
|
|
|
|
import com.ruoyi.system.domain.THospital;
|
|
|
|
import com.ruoyi.system.domain.THospital;
|
|
|
|
|
|
|
|
import com.ruoyi.system.domain.TPatientHospitalDoctor;
|
|
|
|
import com.ruoyi.system.domain.TRecord;
|
|
|
|
import com.ruoyi.system.domain.TRecord;
|
|
|
|
import com.ruoyi.system.service.ITHospitalService;
|
|
|
|
import com.ruoyi.system.service.*;
|
|
|
|
import com.ruoyi.system.service.ITRecordService;
|
|
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -32,6 +32,12 @@ public class AppController extends BaseController
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private ITHospitalService tHospitalService;
|
|
|
|
private ITHospitalService tHospitalService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private ITDoctorService tDoctorService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private ITPatientHospitalDoctorService itPatientHospitalDoctorService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 完成AI诊断
|
|
|
|
* 完成AI诊断
|
|
|
@ -54,4 +60,45 @@ public class AppController extends BaseController
|
|
|
|
List<THospital> tHospitals = tHospitalService.selectTHospitalList(new THospital());
|
|
|
|
List<THospital> tHospitals = tHospitalService.selectTHospitalList(new THospital());
|
|
|
|
return AjaxResult.success(tHospitals);
|
|
|
|
return AjaxResult.success(tHospitals);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 医生信息获取
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param doctorId 医生id
|
|
|
|
|
|
|
|
* @return {@code AjaxResult}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@ApiOperation("医生信息获取")
|
|
|
|
|
|
|
|
@GetMapping("/doctorInformation")
|
|
|
|
|
|
|
|
public AjaxResult doctorInformation(Long doctorId)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TDoctor tDoctor = tDoctorService.selectTDoctorById(doctorId);
|
|
|
|
|
|
|
|
return AjaxResult.success(tDoctor);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 病人预约
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param tPatientHospitalDoctor tPatientHospitalDoctor
|
|
|
|
|
|
|
|
* @return {@code AjaxResult}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@ApiOperation("患者预约")
|
|
|
|
|
|
|
|
@GetMapping("/getDoctorInfo")
|
|
|
|
|
|
|
|
public AjaxResult patientsToMakeAnAppointment(TPatientHospitalDoctor tPatientHospitalDoctor)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// 患者预约,新增t_record中的一条记录;判断关联表是否存在当前关系
|
|
|
|
|
|
|
|
TRecord tRecord = new TRecord();
|
|
|
|
|
|
|
|
tRecord.setHospitalId(tPatientHospitalDoctor.getHospitalId());
|
|
|
|
|
|
|
|
tRecord.setPatientId(tPatientHospitalDoctor.getPatientId());
|
|
|
|
|
|
|
|
tRecord.setDoctorId(tPatientHospitalDoctor.getDoctorId());
|
|
|
|
|
|
|
|
tRecord.setStatus("0");
|
|
|
|
|
|
|
|
tRecord.setCreateBy(getUsername());
|
|
|
|
|
|
|
|
tRecordService.insertTRecord(tRecord);
|
|
|
|
|
|
|
|
List<TPatientHospitalDoctor> tPHDs = itPatientHospitalDoctorService.selectTPatientHospitalDoctorList(tPatientHospitalDoctor);
|
|
|
|
|
|
|
|
if (tPHDs.isEmpty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
itPatientHospitalDoctorService.insertTPatientHospitalDoctor(tPatientHospitalDoctor);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return AjaxResult.success();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|