Ver código fonte

再次申诉获取操作类型接口

songxinlu 3 anos atrás
pai
commit
12e1e9dbdd

+ 11 - 1
report-service/src/main/java/com/lantone/report/facade/MedAppealInfoManagementFacade.java

@@ -341,9 +341,19 @@ public class MedAppealInfoManagementFacade {
         Map<String, String> out = Maps.newHashMap();
         //通过缺陷id获取缺陷
         QcresultDetail qcresultDetail = qcresultDetailFacade.getById(getAppealOperationTypeVO.getQcresultDetailId());
+        QcresultDetail nowQcresultDetail = null;
+        if (qcresultDetail == null) {
+            //获取最新的缺陷
+            nowQcresultDetail = qcresultDetailFacade.list(new QueryWrapper<QcresultDetail>()
+                    .eq("hospital_id",qcresultDetail.getHospitalId())
+                    .eq("behospital_code",qcresultDetail.getBehospitalCode())
+                    .eq("cases_entry_id",qcresultDetail.getCasesEntryId())
+                    .orderByDesc("gmt_create")).get(0);
+        }
+
         switch (getAppealOperationTypeVO.getAppealOperationType()) {
             case "0":
-                if (qcresultDetail == null) {
+                if (nowQcresultDetail == null) {
                     Asserts.fail("质控缺陷条目不存在");
                 }
                 if (IsDeleteEnum.N.getKey().equals(qcresultDetail.getIsDeleted())) {