From 37dd2155534e2cd52b5e3f21cdd505e5cb0b792f Mon Sep 17 00:00:00 2001
From: leijx <1477272687@qq.com>
Date: Wed, 23 Sep 2020 10:27:13 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=96=B0=E5=A2=9E=E5=85=B6=E4=BB=96?=
=?UTF-8?q?=E5=A4=A7=E7=B1=BB=E6=A3=80=E9=AA=8C=E3=80=81=E4=BB=A5=E5=8F=8A?=
=?UTF-8?q?=E5=85=B6=E4=BB=96=E6=8A=A5=E5=91=8A=E3=80=81=E6=A0=B8=E5=8C=BB?=
=?UTF-8?q?=E5=AD=A6=E6=8A=A5=E5=91=8A=202=E3=80=81=E5=B0=86=E6=A3=80?=
=?UTF-8?q?=E6=9F=A5=E6=A3=80=E9=AA=8C=20=E6=A0=A1=E9=AA=8C=E5=90=88?=
=?UTF-8?q?=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
WholeCheckInterface.iml | 17 +++++-
.../java/com/ann/demo/TestController.java | 21 +------
.../ann/demo/entity/filing/ArchiveMaster.java | 5 ++
.../ann/demo/entity/filing/ExamApplyDto.java | 2 +
.../impl/HomepageDictionaryImpl.java | 55 ++++++++++++-------
.../repository/ArchiveDetailRepository.java | 8 +--
.../impl/ArchiveDetailServiceImpl.java | 6 +-
src/main/resources/application.yml | 32 +++++++----
8 files changed, 87 insertions(+), 59 deletions(-)
diff --git a/WholeCheckInterface.iml b/WholeCheckInterface.iml
index 9a11b43..bf75017 100644
--- a/WholeCheckInterface.iml
+++ b/WholeCheckInterface.iml
@@ -22,7 +22,6 @@
-
@@ -37,6 +36,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/ann/demo/TestController.java b/src/main/java/com/ann/demo/TestController.java
index 83c621c..9c6bb44 100644
--- a/src/main/java/com/ann/demo/TestController.java
+++ b/src/main/java/com/ann/demo/TestController.java
@@ -1,24 +1,11 @@
package com.ann.demo;
-import com.ann.demo.entity.filing.ArchiveDetail;
-import com.ann.demo.interfaces.impl.HomepageDictionaryImpl;
-import com.ann.demo.repository.ArchiveDetailRepository;
-import com.ann.demo.repository.ArchiveMasterRepository;
-import com.ann.demo.service.ArchiveDetailService;
-import com.ann.demo.service.ArchiveMasterService;
import com.ann.demo.service.impl.ArchiveDetailServiceImpl;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
-import sun.net.ftp.FtpClient;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
/**
* @Author: LeiJiaXin
@@ -55,7 +42,7 @@ public class TestController {
Object[] objects = new Object[0];
// invoke("方法名",参数1,参数2,参数3....);
try {
- objects = client.invoke("CheckData", "010affd1-cba8-4ece-97a2-ef49931151ed");
+ objects = client.invoke("CheckData", "a3a93afa-6e7e-43fd-99af-18cb7437bc4c");
} catch (Exception e) {
e.printStackTrace();
}
@@ -64,12 +51,8 @@ public class TestController {
@RequestMapping("/haha")
- public String createJob() {
- List list = new ArrayList();
- list.add("10");
- // archiveDetailService.getInspectionReportNotExits(list,"02e4bec6-633f-49cf-9acd-a3d332376800");
+ public void createJob() {
- return "123";
}
// Integer result = archiveMasterService.countByIdAndIsValid(masterId);
diff --git a/src/main/java/com/ann/demo/entity/filing/ArchiveMaster.java b/src/main/java/com/ann/demo/entity/filing/ArchiveMaster.java
index c9e2a3e..4784294 100644
--- a/src/main/java/com/ann/demo/entity/filing/ArchiveMaster.java
+++ b/src/main/java/com/ann/demo/entity/filing/ArchiveMaster.java
@@ -143,4 +143,9 @@ public class ArchiveMaster {
private String emrNurseCmt;
private String emrDoctorCmt;
+
+
+ // 死亡字段
+ private String deathFlag = "0";
+
}
diff --git a/src/main/java/com/ann/demo/entity/filing/ExamApplyDto.java b/src/main/java/com/ann/demo/entity/filing/ExamApplyDto.java
index 13158fe..d2e997a 100644
--- a/src/main/java/com/ann/demo/entity/filing/ExamApplyDto.java
+++ b/src/main/java/com/ann/demo/entity/filing/ExamApplyDto.java
@@ -9,4 +9,6 @@ public class ExamApplyDto {
private String applyId;
private String name;
+
+ private String reportType;
}
diff --git a/src/main/java/com/ann/demo/interfaces/impl/HomepageDictionaryImpl.java b/src/main/java/com/ann/demo/interfaces/impl/HomepageDictionaryImpl.java
index a091e22..292d342 100644
--- a/src/main/java/com/ann/demo/interfaces/impl/HomepageDictionaryImpl.java
+++ b/src/main/java/com/ann/demo/interfaces/impl/HomepageDictionaryImpl.java
@@ -5,12 +5,14 @@ import com.ann.demo.entity.filing.ArchiveMaster;
import com.ann.demo.interfaces.HomepageDictionary;
import com.ann.demo.service.ArchiveDetailService;
import com.ann.demo.service.ArchiveMasterService;
+import com.google.common.base.Objects;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.jws.WebService;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -75,31 +77,42 @@ public class HomepageDictionaryImpl implements HomepageDictionary {
List types = Arrays.asList(mustCheckDataArray);
String typeIsExits = archiveDetailService.getTypeNotExits(types, masterId);
if (typeIsExits != null) {
- sb.append(typeIsExits + "缺失");
- }
- }
-
- // 检查申请单
- if (!checkReportType.equals("")) {
- String[] checkReportTypeArray = checkReportType.split(",");
- List types = Arrays.asList(checkReportTypeArray);
- String checkReportNotExits = archiveDetailService.getCheckReportNotExits(types, masterId);
- if (checkReportNotExits != null) {
- if (sb.length() != 0) {
- sb.append(";");
- }
- sb.append(checkReportNotExits);
- }else{
- String typeIsExits1 = archiveDetailService.getCheckReportNotExits1(types, masterId);
- if (typeIsExits1 != null) {
- if (sb.length() != 0) {
- sb.append(";");
+ //----------------单独处理出院记录
+ List list = new ArrayList();
+ list.add("113");
+ String dischargeType = archiveDetailService.getTypeNotExits(list, masterId);
+ if(dischargeType != null){
+ if(Objects.equal( archiveMaster.getDeathFlag(),"1" ) ){
+ sb.append(typeIsExits +",死亡记录缺失");
+ }else{
+ sb.append(typeIsExits + ",出院记录缺失");
}
- sb.append(typeIsExits1);
}
-
+ //----------------单独处理出院记录
}
}
+
+// // 检查申请单
+// if (!checkReportType.equals("")) {
+// String[] checkReportTypeArray = checkReportType.split(",");
+// List types = Arrays.asList(checkReportTypeArray);
+// String checkReportNotExits = archiveDetailService.getCheckReportNotExits(types, masterId);
+// if (checkReportNotExits != null) {
+// if (sb.length() != 0) {
+// sb.append(";");
+// }
+// sb.append(checkReportNotExits);
+// }else{
+// String typeIsExits1 = archiveDetailService.getCheckReportNotExits1(types, masterId);
+// if (typeIsExits1 != null) {
+// if (sb.length() != 0) {
+// sb.append(";");
+// }
+// sb.append(typeIsExits1);
+// }
+//
+// }
+// }
// 检验申请单
if (!inspectionReportType.equals("")) {
String[] inspectionReportTypeArray = inspectionReportType.split(",");
diff --git a/src/main/java/com/ann/demo/repository/ArchiveDetailRepository.java b/src/main/java/com/ann/demo/repository/ArchiveDetailRepository.java
index 77b8ca6..c3b3f4e 100644
--- a/src/main/java/com/ann/demo/repository/ArchiveDetailRepository.java
+++ b/src/main/java/com/ann/demo/repository/ArchiveDetailRepository.java
@@ -28,7 +28,7 @@ public interface ArchiveDetailRepository extends JpaRepository '后台' and a.apply_id = e.apply_id and a.assortid in ?1 ) " +
+ " where not exists (select 1 from archive_detail a where source <> '后台' and a.apply_id = e.apply_id and a.assortid in ?1 and a.masterId = ?2 ) " +
" and exists (select 1 from archive_master m " +
" where m.inp_no = e.inp_no and m.visit_id = e.visit_id and m.patient_id = e.patient_id and " +
" m.ID = ?2 ) " +
@@ -89,17 +89,17 @@ public interface ArchiveDetailRepository extends JpaRepository '后台' ",nativeQuery = true)
+ " and d.flag = 0 and source <> '后台' order by assortid ",nativeQuery = true)
List getInspectionApply(List type,String masterId);
- @Query(value = " select e.apply_id as applyId,e.name from exam_apply e " +
+ @Query(value = " select e.apply_id as applyId,e.name,e.report_type as reportType from exam_apply e " +
" where e.report_type in ?1 and e.is_valid = 0 and e.is_open_his = 'E' and e.is_open_other = 'E' " +
" and exists " +
" (select 1 from archive_master m where m.inp_no = e.inp_no and m.visit_id = e.visit_id " +
" and m.patient_id = e.patient_id " +
- " and m.ID = ?2) ",nativeQuery = true)
+ " and m.ID = ?2) order by e.report_type ",nativeQuery = true)
List