# Conflicts:
#	yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/ultrasonicController.java
This commit is contained in:
lxd 2024-10-25 21:59:20 +08:00
commit c4e49c9265
2 changed files with 128 additions and 142 deletions

View File

@ -52,6 +52,7 @@ public interface PatientexamlistMapper extends BaseMapperX<PatientexamlistDO> {
.eqIfPresent(PatientexamlistDO::getDeviceType, reqVO.getDeviceType()) .eqIfPresent(PatientexamlistDO::getDeviceType, reqVO.getDeviceType())
.likeIfPresent(PatientexamlistDO::getPName, reqVO.getPname()) .likeIfPresent(PatientexamlistDO::getPName, reqVO.getPname())
.isNotNull(PatientexamlistDO::getDiagDate) .isNotNull(PatientexamlistDO::getDiagDate)
.eq(PatientexamlistDO::getReportstatus, "已审核")
.orderByDesc(PatientexamlistDO::getExamDate)); .orderByDesc(PatientexamlistDO::getExamDate));
} }

View File

@ -189,15 +189,12 @@ public class ultrasonicController {
publicTrees.add(tree); // 添加到公共节点列表 publicTrees.add(tree); // 添加到公共节点列表
} }
} }
if (isprivate.equals("1")) if (isprivate.equals("1")) {
{
// 构建公共树 // 构建公共树
buildTree(privateTrees, "0", treeMap); buildTree(privateTrees, "0", treeMap);
// 将私有节点添加到结果列表 // 将私有节点添加到结果列表
return new ArrayList<>(privateTrees); // return new ArrayList<>(privateTrees); //
} } else {
else
{
// 构建公共树 // 构建公共树
buildTree(publicTrees, "0", treeMap); buildTree(publicTrees, "0", treeMap);
// 将私有节点添加到结果列表 // 将私有节点添加到结果列表
@ -205,7 +202,6 @@ public class ultrasonicController {
} }
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
return new ArrayList<>(); return new ArrayList<>();
} }
@ -333,8 +329,7 @@ public class ultrasonicController {
if (!studyInsta.isEmpty() && !orgID.isEmpty()) { if (!studyInsta.isEmpty() && !orgID.isEmpty()) {
OrgUnitDO unitDO = Service.getonekey(orgID); OrgUnitDO unitDO = Service.getonekey(orgID);
if(!unitDO.getDcmprefix().isEmpty()) if (!unitDO.getDcmprefix().isEmpty()) {
{
Dcmprefix = unitDO.getDcmprefix(); Dcmprefix = unitDO.getDcmprefix();
} }
// 先查询基本信息 一个患者基本信息就一条 // 先查询基本信息 一个患者基本信息就一条
@ -430,10 +425,10 @@ public class ultrasonicController {
return medicalimgService.insimage(medicalimgDO); return medicalimgService.insimage(medicalimgDO);
} }
@PostMapping("/ftpimage") @PostMapping("/ftpimage")
@Operation(summary = "获取图片上传ftp") @Operation(summary = "获取图片上传ftp")
public void FtpImage(@RequestBody insimagescreenshotVO insimagescreenshotVO) public void FtpImage(@RequestBody insimagescreenshotVO insimagescreenshotVO) {
{
String base64String = insimagescreenshotVO.getImagebase(); String base64String = insimagescreenshotVO.getImagebase();
String ftpServer = "192.168.0.110"; //114.55.171.231 String ftpServer = "192.168.0.110"; //114.55.171.231
int ftpPort = 21; // FTP端口默认为21 int ftpPort = 21; // FTP端口默认为21
@ -472,10 +467,13 @@ public class ultrasonicController {
UUID randomUUID = UUID.randomUUID(); UUID randomUUID = UUID.randomUUID();
medicalimgDO medicalimgDO = new medicalimgDO(); medicalimgDO medicalimgDO = new medicalimgDO();
medicalimgDO.setId(randomUUID.toString()); medicalimgDO.setId(randomUUID.toString());
medicalimgDO.setImgUrl("/video/"+fileName); medicalimgDO.setImgUrl("http://192.168.0.110:48082/" + fileName);
medicalimgDO.setCreatePerson(""); medicalimgDO.setCreatePerson("");
medicalimgDO.setCreateDate(dateTime); medicalimgDO.setCreateDate(dateTime);
medicalimgDO.setRegId(insimagescreenshotVO.getID()); medicalimgDO.setRegId(insimagescreenshotVO.getID());
if (insimagescreenshotVO.getOrgId() != null && !insimagescreenshotVO.getOrgId().trim().equals(""))
medicalimgDO.setOrgId(insimagescreenshotVO.getOrgId().trim());
else if (user != null && user.getOrgId() != null)
medicalimgDO.setOrgId(user.getOrgId()); medicalimgDO.setOrgId(user.getOrgId());
medicalimgDO.setSelected("0"); medicalimgDO.setSelected("0");
if (insimagescreenshotVO.getImgType() == null || insimagescreenshotVO.getImgType().trim().equals("")) if (insimagescreenshotVO.getImgType() == null || insimagescreenshotVO.getImgType().trim().equals(""))
@ -511,14 +509,12 @@ public class ultrasonicController {
@Operation(summary = "影像信息") @Operation(summary = "影像信息")
public CommonResult<String> InsImageInfo(@RequestBody List<PatientInfoVO> patientInfoVOS) throws ParseException { public CommonResult<String> InsImageInfo(@RequestBody List<PatientInfoVO> patientInfoVOS) throws ParseException {
try { try {
if(!patientInfoVOS.isEmpty()) if (!patientInfoVOS.isEmpty()) {
{
List<dicompatientsDO> dicompatientsDOList = new ArrayList<>(); List<dicompatientsDO> dicompatientsDOList = new ArrayList<>();
List<dicomstudiesDO> dicomstudiesDOList = new ArrayList<>(); List<dicomstudiesDO> dicomstudiesDOList = new ArrayList<>();
List<dicomseriesDO> dicomseriesDOList = new ArrayList<>(); List<dicomseriesDO> dicomseriesDOList = new ArrayList<>();
List<dicomimagesDO> dicomimagesDOList = new ArrayList<>(); List<dicomimagesDO> dicomimagesDOList = new ArrayList<>();
for (PatientInfoVO patientInfo : patientInfoVOS) for (PatientInfoVO patientInfo : patientInfoVOS) {
{
//获取基础信息 //获取基础信息
String PatientID = patientInfo.getPatientID(); String PatientID = patientInfo.getPatientID();
String PatientNam = patientInfo.getPatientNam(); String PatientNam = patientInfo.getPatientNam();
@ -540,10 +536,8 @@ public class ultrasonicController {
dicompatientsDO.setDataSync("1"); dicompatientsDO.setDataSync("1");
dicompatientsDOList.add(dicompatientsDO); dicompatientsDOList.add(dicompatientsDO);
if(!studyVOS.isEmpty()) if (!studyVOS.isEmpty()) {
{ for (StudyVO studyVO : studyVOS) {
for (StudyVO studyVO :studyVOS)
{
// study表的主键 // study表的主键
// String StudyInsta= UUID.randomUUID().toString(); // String StudyInsta= UUID.randomUUID().toString();
String StudyInsta = studyVO.getStudyID(); String StudyInsta = studyVO.getStudyID();
@ -563,11 +557,9 @@ public class ultrasonicController {
dicomstudiesDOList.add(dicomstudiesDO); dicomstudiesDOList.add(dicomstudiesDO);
List<SeriesVO> series = studyVO.getSeries(); List<SeriesVO> series = studyVO.getSeries();
if (!series.isEmpty()) if (!series.isEmpty()) {
{
for (SeriesVO seriesVO:series) for (SeriesVO seriesVO : series) {
{
//service表主键 //service表主键
String SeriesInst = UUID.randomUUID().toString(); String SeriesInst = UUID.randomUUID().toString();
// String SeriesInst= seriesVO.getSeriesNumb(); // String SeriesInst= seriesVO.getSeriesNumb();
@ -587,10 +579,8 @@ public class ultrasonicController {
dicomseriesDO.setOrgId(orgId); dicomseriesDO.setOrgId(orgId);
dicomseriesDOList.add(dicomseriesDO); dicomseriesDOList.add(dicomseriesDO);
List<ImageVO> imageVOS = seriesVO.getImage(); List<ImageVO> imageVOS = seriesVO.getImage();
if (!imageVOS.isEmpty()) if (!imageVOS.isEmpty()) {
{ for (ImageVO imageVO : imageVOS) {
for (ImageVO imageVO:imageVOS)
{
//image主键 //image主键
String SOPInstanc = UUID.randomUUID().toString(); String SOPInstanc = UUID.randomUUID().toString();
dicomimagesDO dicomimagesDO = new dicomimagesDO(); dicomimagesDO dicomimagesDO = new dicomimagesDO();
@ -618,18 +608,13 @@ public class ultrasonicController {
} }
} }
if (!dicompatientsDOList.isEmpty()&&!dicomstudiesDOList.isEmpty()&&!dicomseriesDOList.isEmpty()&&!dicomimagesDOList.isEmpty()) if (!dicompatientsDOList.isEmpty() && !dicomstudiesDOList.isEmpty() && !dicomseriesDOList.isEmpty() && !dicomimagesDOList.isEmpty()) {
{
dicompatientsService.insertAll(dicompatientsDOList, dicomstudiesDOList, dicomseriesDOList, dicomimagesDOList); dicompatientsService.insertAll(dicompatientsDOList, dicomstudiesDOList, dicomseriesDOList, dicomimagesDOList);
} }
} } else {
else
{
return success("参数为空"); return success("参数为空");
} }
} } catch (Exception e) {
catch (Exception e)
{
return success(e.getMessage()); return success(e.getMessage());
} }