update===>:修改筛查相关接口。
This commit is contained in:
parent
e59814d2f6
commit
a194bfc947
@ -82,6 +82,8 @@ xinelu:
|
||||
left-eye-piture-url: /leftEyePitureUrl
|
||||
#眼底病变筛查右眼图片地址
|
||||
right-eye-piture-url: /rightEyePitureUrl
|
||||
#阿尔兹海默症结果文件地址
|
||||
alzheimer-file-url: /alzheimerFileUrl
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
@ -252,10 +254,10 @@ fd:
|
||||
|
||||
# 腾讯云音视频
|
||||
trtc:
|
||||
sdkappid: 1400236771
|
||||
sdksecretkey: 83ab78d1a8513af6626d58cc2bacd7b28bfb2af06515fa02b0204129ebb53422
|
||||
secretid: AKIDOBpP2ICALat0wP4lcIiAMtZ7XgUJ5vMO
|
||||
secretkey: zxjJhGcx75lECyweHgphKYefWCkBPSHt
|
||||
sdkappid: 1600006944
|
||||
sdksecretkey: 6ddbc3e7e4aa128b52898df27a35f8f3d5acdca6f34ffa17b87ebc33e83314f1
|
||||
secretid: AKIDjKo7GF2g9PQJ7KMBpGUTFrFZP7cw2upY
|
||||
secretkey: c1HajkZCdrrhLsDRUL1XotpeUAkAOSM7
|
||||
|
||||
# 微信小程序参数配置信息
|
||||
applet-chat-config:
|
||||
|
||||
@ -101,6 +101,11 @@ public class XinELuConfig {
|
||||
*/
|
||||
public String rightEyePitureUrl;
|
||||
|
||||
/**
|
||||
* 阿尔兹海默症筛查结果文件地址
|
||||
*/
|
||||
private String alzheimerFileUrl;
|
||||
|
||||
/**
|
||||
* 修改会员App用户头像上传
|
||||
*/
|
||||
@ -640,4 +645,12 @@ public class XinELuConfig {
|
||||
public void setRightEyePitureUrl(String rightEyePitureUrl) {
|
||||
this.rightEyePitureUrl = rightEyePitureUrl;
|
||||
}
|
||||
|
||||
public String getAlzheimerFileUrl() {
|
||||
return alzheimerFileUrl;
|
||||
}
|
||||
|
||||
public void setAlzheimerFileUrl(String alzheimerFileUrl) {
|
||||
this.alzheimerFileUrl = alzheimerFileUrl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -283,6 +283,10 @@ public class Constants {
|
||||
*/
|
||||
public static final String RIGHT_EYE_PICTURE_URL = "rightEyePitureUrl";
|
||||
|
||||
/**
|
||||
* 阿尔兹海默症结果文件地址
|
||||
*/
|
||||
public static final String ALZHEIMER_FILE_URL = "alzheimerFileUrl";
|
||||
/**
|
||||
* 护理站模板信息下载
|
||||
*/
|
||||
|
||||
@ -10,6 +10,12 @@ import com.xinelu.common.utils.DateUtils;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
import com.xinelu.common.utils.uuid.Seq;
|
||||
import com.xinelu.common.utils.uuid.UUID;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@ -352,4 +358,27 @@ public class FileUploadUtils {
|
||||
return StringUtils.format("{}.{}",
|
||||
FilenameUtils.getBaseName(file.getOriginalFilename()), getExtension(file));
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取文件
|
||||
*
|
||||
* @param filePath 文件地址
|
||||
* @param response 响应流
|
||||
* @return void
|
||||
* @author gaoyu
|
||||
* @date 2022-01-05 11:43
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public static void read(String filePath, HttpServletResponse response) {
|
||||
File file = new File(filePath);
|
||||
try (InputStream in = new BufferedInputStream(new FileInputStream(file));
|
||||
OutputStream os = new BufferedOutputStream(response.getOutputStream())) {
|
||||
byte[] buffer = new byte[in.available()];
|
||||
in.read(buffer);
|
||||
os.write(buffer);
|
||||
os.flush();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,6 +29,8 @@ public class MimeTypeUtils {
|
||||
|
||||
public static final String[] VIDEO_EXTENSION = {"mp4", "avi", "rmvb"};
|
||||
|
||||
public static final String[] FILE_EXTENSION = {"doc", "docx", "pdf"};
|
||||
|
||||
public static final String[] DEFAULT_ALLOWED_EXTENSION = {
|
||||
// 图片
|
||||
"bmp", "gif", "jpg", "jpeg", "png",
|
||||
|
||||
@ -2,16 +2,18 @@ package com.xinelu.applet.controller.appletscreeningrecord;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.common.annotation.RepeatSubmit;
|
||||
import com.xinelu.common.config.XinELuConfig;
|
||||
import com.xinelu.common.constant.ScreeningProjectConstants;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.DateUtils;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
import com.xinelu.common.utils.file.FileUploadUtils;
|
||||
import com.xinelu.common.utils.file.FileUtils;
|
||||
import com.xinelu.manage.dto.screeningrecord.ScreeningApplyDTO;
|
||||
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordDTO;
|
||||
import com.xinelu.manage.service.patientinfo.IPatientInfoService;
|
||||
import com.xinelu.manage.service.screeningrecord.IScreeningRecordService;
|
||||
import com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -19,11 +21,13 @@ import io.swagger.annotations.ApiOperation;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
@ -41,9 +45,6 @@ public class AppletScreeningRecordController extends BaseController {
|
||||
@Resource
|
||||
private IScreeningRecordService screeningRecordService;
|
||||
|
||||
@Resource
|
||||
private IPatientInfoService patientService;
|
||||
|
||||
@GetMapping("/record")
|
||||
@ApiOperation(value = "获取筛查结果记录")
|
||||
public TableDataInfo record(ScreeningRecordDTO query) {
|
||||
@ -134,4 +135,18 @@ public class AppletScreeningRecordController extends BaseController {
|
||||
JSONObject jsonObject = screeningRecordService.getInfo(assessRecordId);
|
||||
return R.ok(jsonObject);
|
||||
}
|
||||
|
||||
@ApiOperation("阿尔兹海默症结果预览")
|
||||
@GetMapping("/fileview")
|
||||
public void fileview(@RequestParam("filePath") String filePath, HttpServletResponse response) {
|
||||
if (StringUtils.isNotEmpty(filePath)) {
|
||||
String fileDir = XinELuConfig.getProfile() + filePath.replaceAll("/profile", "");
|
||||
File file = new File(fileDir);
|
||||
if (file.exists() && file.isFile()) {
|
||||
FileUploadUtils.read(fileDir, response);
|
||||
} else {
|
||||
throw new ServiceException("未找到文件");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,10 @@ import com.xinelu.common.custominterface.Update;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.hospitalinfo.HospitalInfo;
|
||||
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
|
||||
import com.xinelu.manage.service.hospitalinfo.IHospitalInfoService;
|
||||
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
|
||||
import com.xinelu.system.service.ISysRoleService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
@ -39,6 +42,10 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class HospitalInfoController extends BaseController {
|
||||
@Resource
|
||||
private IHospitalInfoService hospitalInfoService;
|
||||
@Resource
|
||||
private IHospitalPersonInfoService hospitalPersonInfoService;
|
||||
@Resource
|
||||
private ISysRoleService roleService;
|
||||
|
||||
/**
|
||||
* 查询医院信息管理列表
|
||||
@ -56,9 +63,15 @@ public class HospitalInfoController extends BaseController {
|
||||
* 查询医院信息管理列表
|
||||
*/
|
||||
@ApiOperation("查询医院信息管理列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospital:list')")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult getList(HospitalInfo hospitalInfo) {
|
||||
// TODO 根据用户权限获取医院列表,机构管理员只能看自己机构,超级管理员查看所有
|
||||
if (!getLoginUser().getUser().isAdmin()) {
|
||||
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId());
|
||||
if (hospitalPersonInfo != null) {
|
||||
hospitalInfo.setId(hospitalPersonInfo.getHospitalId());
|
||||
}
|
||||
}
|
||||
List<HospitalInfo> list = hospitalInfoService.selectHospitalInfoList(hospitalInfo);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ package com.xinelu.manage.controller.screeningproject;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
|
||||
import com.xinelu.manage.domain.screeningproject.ScreeningProject;
|
||||
@ -37,32 +36,44 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class ScreeningProjectController extends BaseController {
|
||||
@Resource
|
||||
private IScreeningProjectService projectService;
|
||||
|
||||
@Resource
|
||||
private IHospitalPersonInfoService personInfoService;
|
||||
|
||||
@ApiOperation("服务项目分页列表")
|
||||
@GetMapping("list")
|
||||
public TableDataInfo list(ScreeningProject project) {
|
||||
public TableDataInfo list(ScreeningProject project) throws Exception {
|
||||
if (!getLoginUser().getUser().isAdmin()) {
|
||||
HospitalPersonInfo personInfo = personInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId());
|
||||
if (personInfo != null) {
|
||||
project.setHospitalId(personInfo.getHospitalId());
|
||||
} else {
|
||||
throw new Exception("该账号未绑定医生账号");
|
||||
}
|
||||
}
|
||||
startPage();
|
||||
List<ScreeningProject> list = projectService.findList(project);
|
||||
return getDataTable(list);
|
||||
List<ScreeningProject> list = projectService.findList(project);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("服务项目列表")
|
||||
@GetMapping("getList")
|
||||
public R<List<ScreeningProject>> getList(ScreeningProject project) {
|
||||
List<ScreeningProject> list = projectService.findList(project);
|
||||
return R.ok(list);
|
||||
public R<List<ScreeningProject>> getList(ScreeningProject project) throws Exception {
|
||||
// TODO 根据角色判断查看数据范围
|
||||
if (!getLoginUser().getUser().isAdmin()) {
|
||||
HospitalPersonInfo personInfo = personInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId());
|
||||
if (personInfo != null) {
|
||||
project.setHospitalId(personInfo.getHospitalId());
|
||||
} else {
|
||||
throw new Exception("该账号未绑定医生账号");
|
||||
}
|
||||
}
|
||||
List<ScreeningProject> list = projectService.findList(project);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@ApiOperation("新增服务项目")
|
||||
@PostMapping("add")
|
||||
public R<String> add(@RequestBody ScreeningProject project) {
|
||||
// 根据当前登录用户获取医生主键
|
||||
HospitalPersonInfo hospitalPersonInfo = personInfoService.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
|
||||
project.setHospitalId(hospitalPersonInfo.getHospitalId());
|
||||
project.setHospitalName(hospitalPersonInfo.getPersonName());
|
||||
if (projectService.checkSameProjectName(project.getProjectName(), project.getHospitalId(), null)) {
|
||||
return R.fail("【" + project.getHospitalName() + "】已存在服务项目【" + project.getProjectName() + "】,不能重复添加");
|
||||
}
|
||||
|
||||
@ -7,9 +7,11 @@ import com.xinelu.common.core.domain.SelectVo;
|
||||
import com.xinelu.common.core.domain.TimelineVo;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
|
||||
import com.xinelu.manage.domain.screeningrecord.ScreeningRecord;
|
||||
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordDTO;
|
||||
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordSaveDTO;
|
||||
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
|
||||
import com.xinelu.manage.service.screeningrecord.IScreeningRecordService;
|
||||
import com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -40,9 +42,19 @@ public class ScreeningRecordController extends BaseController {
|
||||
@Resource
|
||||
private IScreeningRecordService screeningRecordService;
|
||||
|
||||
@Resource
|
||||
private IHospitalPersonInfoService personInfoService;
|
||||
|
||||
@GetMapping("/screeningList")
|
||||
@ApiOperation(value = "居民预约筛查列表")
|
||||
public TableDataInfo screeningList(ScreeningRecordDTO query) {
|
||||
public TableDataInfo screeningList(ScreeningRecordDTO query) throws Exception {
|
||||
if (!getLoginUser().getUser().isAdmin()) {
|
||||
HospitalPersonInfo personInfo = personInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId());
|
||||
if (personInfo == null) {
|
||||
throw new Exception("该账号未绑定医生账号");
|
||||
}
|
||||
query.setHospitalId(personInfo.getHospitalId());
|
||||
}
|
||||
startPage();
|
||||
try {
|
||||
return getDataTable(screeningRecordService.screeningList(query));
|
||||
|
||||
@ -26,6 +26,6 @@ public interface ScreeningProjectMapper {
|
||||
|
||||
int updateByPrimaryKey(ScreeningProject record);
|
||||
|
||||
Integer checkSameName(@Param("projectName") String projectName, @Param("deptId") Long deptId, @Param("projectId") String projectId);
|
||||
Integer checkSameName(@Param("projectName") String projectName, @Param("hospitalId") Long hospitalId, @Param("projectId") String projectId);
|
||||
|
||||
}
|
||||
|
||||
@ -196,10 +196,12 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
|
||||
hospitalPersonCertificate.setUpdateBy(SecurityUtils.getUsername());
|
||||
hospitalPersonCertificate.setCertificateCode(Constants.CERTIFICATE_CODE + generateSystemCodeUtil.generateSystemCode(Constants.CERTIFICATE_CODE));
|
||||
}
|
||||
int hospitalPersonCertificates = hospitalPersonCertificateMapper.insertHospitalPersonCertificateList(hospitalPersonInfo.getHospitalPersonCertificateList());
|
||||
if (hospitalPersonCertificates <= 0) {
|
||||
throw new ServiceException("修改科室人员资质证书信息失败,请联系管理员!");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(hospitalPersonInfo.getHospitalPersonCertificateList())) {
|
||||
int hospitalPersonCertificates = hospitalPersonCertificateMapper.insertHospitalPersonCertificateList(hospitalPersonInfo.getHospitalPersonCertificateList());
|
||||
if (hospitalPersonCertificates <= 0) {
|
||||
throw new ServiceException("修改科室人员资质证书信息失败,请联系管理员!");
|
||||
}
|
||||
}
|
||||
//删除人员的头像
|
||||
if (StringUtils.isNotBlank(personInfo.getPersonPictureUrl()) && StringUtils.isNotBlank(hospitalPersonInfo.getPersonPictureUrl()) && !personInfo.getPersonPictureUrl().equals(hospitalPersonInfo.getPersonPictureUrl())) {
|
||||
this.deletePictureUrl(personInfo.getPersonPictureUrl());
|
||||
|
||||
@ -454,6 +454,18 @@ public class NurseStationServiceImpl implements INurseStationService {
|
||||
case Constants.PERSON_CERTIFICATE_URL:
|
||||
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPersonCertificateUrl();
|
||||
break;
|
||||
case Constants.PLATELET_PICTURE_URL:
|
||||
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPlateletPitureUrl();
|
||||
break;
|
||||
case Constants.LEFT_EYE_PICTURE_URL:
|
||||
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getLeftEyePitureUrl();
|
||||
break;
|
||||
case Constants.RIGHT_EYE_PICTURE_URL:
|
||||
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getRightEyePitureUrl();
|
||||
break;
|
||||
case Constants.ALZHEIMER_FILE_URL:
|
||||
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getAlzheimerFileUrl();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -461,7 +473,13 @@ public class NurseStationServiceImpl implements INurseStationService {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
//上传
|
||||
String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION);
|
||||
String pictureName = "";
|
||||
if (StringUtils.isNotBlank(type) && StringUtils.equals(type, Constants.ALZHEIMER_FILE_URL)) {
|
||||
pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.FILE_EXTENSION);
|
||||
} else {
|
||||
pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION);
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(pictureName)) {
|
||||
throw new ServiceException("图片上传失败,请联系管理员!");
|
||||
}
|
||||
|
||||
@ -21,11 +21,11 @@ public interface IScreeningProjectService {
|
||||
/**
|
||||
* 检验机构是否存在相同名称服务项目
|
||||
* @param projectName 项目名称
|
||||
* @param deptId 机构id
|
||||
* @param hospitalId 机构id
|
||||
* @param projectId 项目业务主键
|
||||
* @return {@link boolean}
|
||||
* @author gaoyu
|
||||
* @date 2022-11-23 10:20
|
||||
*/
|
||||
boolean checkSameProjectName(String projectName, Long deptId, String projectId);
|
||||
boolean checkSameProjectName(String projectName, Long hospitalId, String projectId);
|
||||
}
|
||||
|
||||
@ -32,12 +32,14 @@ public class ScreeningProjectServiceImpl implements IScreeningProjectService {
|
||||
}
|
||||
|
||||
@Override public int insert(ScreeningProject project) {
|
||||
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
|
||||
if (hospitalPersonInfo != null) {
|
||||
project.setHospitalId(hospitalPersonInfo.getHospitalId());
|
||||
HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId());
|
||||
if (hospital != null) {
|
||||
project.setHospitalName(hospital.getHospitalName());
|
||||
if (project.getHospitalId() == null) {
|
||||
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
|
||||
if (hospitalPersonInfo != null) {
|
||||
project.setHospitalId(hospitalPersonInfo.getHospitalId());
|
||||
HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId());
|
||||
if (hospital != null) {
|
||||
project.setHospitalName(hospital.getHospitalName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return projectMapper.insertSelective(project);
|
||||
@ -45,12 +47,14 @@ public class ScreeningProjectServiceImpl implements IScreeningProjectService {
|
||||
|
||||
@Override
|
||||
public int update(ScreeningProject project) {
|
||||
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
|
||||
if (hospitalPersonInfo != null) {
|
||||
project.setHospitalId(hospitalPersonInfo.getHospitalId());
|
||||
HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId());
|
||||
if (hospital != null) {
|
||||
project.setHospitalName(hospital.getHospitalName());
|
||||
if (project.getHospitalId() == null) {
|
||||
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
|
||||
if (hospitalPersonInfo != null) {
|
||||
project.setHospitalId(hospitalPersonInfo.getHospitalId());
|
||||
HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId());
|
||||
if (hospital != null) {
|
||||
project.setHospitalName(hospital.getHospitalName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return projectMapper.updateByPrimaryKey(project);
|
||||
@ -60,7 +64,7 @@ public class ScreeningProjectServiceImpl implements IScreeningProjectService {
|
||||
projectMapper.updateByPrimaryKeySelective(project);
|
||||
}
|
||||
|
||||
@Override public boolean checkSameProjectName(String projectName, Long deptId, String projectId) {
|
||||
return projectMapper.checkSameName(projectName, deptId, projectId) != null;
|
||||
@Override public boolean checkSameProjectName(String projectName, Long hospitalId, String projectId) {
|
||||
return projectMapper.checkSameName(projectName, hospitalId, projectId) != null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,12 +61,6 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
|
||||
@Override
|
||||
public List<ScreeningRecordVo> screeningList(ScreeningRecordDTO query) throws Exception {
|
||||
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
|
||||
if (hospitalPersonInfo != null) {
|
||||
query.setHospitalId(hospitalPersonInfo.getHospitalId());
|
||||
} else {
|
||||
throw new Exception("该账号未关联医生");
|
||||
}
|
||||
return screeningRecordMapper.screeningList(query);
|
||||
}
|
||||
|
||||
@ -463,7 +457,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
String uploadPathUrl = XinELuConfig.getProfile() + url + "/";
|
||||
String fileName = screeningId + ".jpg";
|
||||
QrCodeUtils.createTxm(content, uploadPathUrl, fileName);
|
||||
return uploadPathUrl + "/" + fileName;
|
||||
return uploadPathUrl + fileName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -36,6 +36,9 @@
|
||||
<select id="selectHospitalInfoList" parameterType="com.xinelu.manage.domain.hospitalinfo.HospitalInfo" resultMap="HospitalInfoResult">
|
||||
<include refid="selectHospitalInfoVo"/>
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="hospitalName != null and hospitalName != ''">
|
||||
and hospital_name like concat('%', #{hospitalName}, '%')
|
||||
</if>
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
and project_name like concat( '%' ,#{projectName}, '%')
|
||||
</if>
|
||||
<if test="hospitalId != null and hospitalId != ''">
|
||||
and hospital_id = #{hospitalId}
|
||||
and (hospital_id = #{hospitalId} or hospital_id = 0)
|
||||
</if>
|
||||
<if test="projectType != null and projectType != ''">
|
||||
and project_type = #{projectType}
|
||||
|
||||
@ -174,10 +174,7 @@
|
||||
and patient_name like concat(#{patientName}, '%')
|
||||
</if>
|
||||
<if test="identity != null and identity != ''">
|
||||
and identity = #{identity}
|
||||
</if>
|
||||
<if test="address != null and address != ''">
|
||||
and address like concat('%', #{address}, '%')
|
||||
and `identity` = #{identity}
|
||||
</if>
|
||||
<if test="hospitalId != null and hospitalId != ''">
|
||||
and hospital_id = #{hospitalId}
|
||||
@ -214,8 +211,8 @@
|
||||
</if>
|
||||
</sql>
|
||||
<select id="screeningList" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
|
||||
select r.resident_name,r.gender,r.birthday,r.phone,r.`identity`
|
||||
,r.manage_status,r.manage_time,d.screening_id,d.patient_id,d.project_id,d.project_name
|
||||
select r.patient_name,r.sex as gender,r.birth_date as birthday,r.phone,r.card_no as `identity`
|
||||
,d.screening_id,d.patient_id,d.project_id,d.project_name
|
||||
,d.hospital_id,d.hospital_name,d.apply_start_time,d.apply_end_time,
|
||||
d.diagnostic_result,d.attachment,d.attachment_two,
|
||||
d.registration_date,d.registration_code, d.registration_barcode,d.screening_type,d.push_date,
|
||||
@ -225,9 +222,9 @@
|
||||
else '0' end as hasResult,
|
||||
case when diagnostic_result is not null then '1'
|
||||
else '0' end as hasDiagnose
|
||||
from screening_record d left join patient_info r on d.patient_id = r.patient_id
|
||||
from screening_record d left join patient_info r on d.patient_id = r.id
|
||||
<where>
|
||||
d.screening_status != '2' and r.del_flag = '0' and r.status = '0'
|
||||
d.screening_status != '2' and r.del_flag = '0'
|
||||
<if test="screeningStatus != null and screeningStatus != ''">
|
||||
and d.screening_status = #{screeningStatus}
|
||||
</if>
|
||||
@ -235,7 +232,7 @@
|
||||
and r.patient_name like concat(#{patientName}, '%')
|
||||
</if>
|
||||
<if test="identity != null and identity != ''">
|
||||
and r.identity = #{identity}
|
||||
and r.card_no = #{identity}
|
||||
</if>
|
||||
<if test="address != null and address != ''">
|
||||
and r.address like concat('%', #{address}, '%')
|
||||
@ -321,9 +318,8 @@
|
||||
ssr.disease,ssr.hospital_id,IFNULL(ssr.hospital_name, '') as hospital_name,ssr.project_id, ssr.project_name,
|
||||
ssr.apply_start_time,ssr.apply_end_time, ssr.screening_date,ssr.content,ssr.diagnostic_result,ssr.attachment,ssr.attachment_two,
|
||||
ssr.doctor_id,IFNULL(ssr.doctor_name,'') as doctor_name,ssr.apply_barcode,ssr.registration_date,ssr.screening_type,ssr.push_date,ssr.assess_record_id,
|
||||
ssr.remark,sf.suffix as fileType
|
||||
ssr.remark,substring_index(ssr.attachment, '.', -1) as fileType
|
||||
from screening_record ssr
|
||||
LEFT JOIN sys_file sf ON sf.file_id=ssr.attachment
|
||||
where 1=1
|
||||
<include refid="where"></include>
|
||||
order by screening_date desc
|
||||
|
||||
Loading…
Reference in New Issue
Block a user