Browse Source

增加异常日志记录到数据库

liuqq 4 years ago
parent
commit
3e30d3f42f
40 changed files with 671 additions and 267 deletions
  1. 158 0
      src/main/java/com/diagbot/entity/MedAbnormalInfo.java
  2. 27 23
      src/main/java/com/diagbot/facade/data/ABasDeptInfoFacade.java
  3. 26 22
      src/main/java/com/diagbot/facade/data/ABasDoctorInfoFacade.java
  4. 32 27
      src/main/java/com/diagbot/facade/data/ABehospitalInfoFacade.java
  5. 30 22
      src/main/java/com/diagbot/facade/data/ADoctorAdviceFacade.java
  6. 32 23
      src/main/java/com/diagbot/facade/data/AHomeDiagnoseInfoFacade.java
  7. 32 24
      src/main/java/com/diagbot/facade/data/AHomeOperationInfoFacade.java
  8. 49 47
      src/main/java/com/diagbot/facade/data/AHomePageFacade.java
  9. 26 0
      src/main/java/com/diagbot/facade/data/AMedAbnormalInfoFacade.java
  10. 4 0
      src/main/java/com/diagbot/facade/data/AMedAdmissionNoteFacade.java
  11. 4 0
      src/main/java/com/diagbot/facade/data/AMedBloodResultFacade.java
  12. 5 0
      src/main/java/com/diagbot/facade/data/AMedBloodTransfusionFacade.java
  13. 4 0
      src/main/java/com/diagbot/facade/data/AMedConsultationApplyFacade.java
  14. 4 0
      src/main/java/com/diagbot/facade/data/AMedConsultationNoteFacade.java
  15. 4 0
      src/main/java/com/diagbot/facade/data/AMedConsultationResultFacade.java
  16. 31 23
      src/main/java/com/diagbot/facade/data/AMedCrisisFacade.java
  17. 4 0
      src/main/java/com/diagbot/facade/data/AMedCrisisNoteFacade.java
  18. 4 0
      src/main/java/com/diagbot/facade/data/AMedDeathDiscussionFacade.java
  19. 4 0
      src/main/java/com/diagbot/facade/data/AMedDeathNoteFacade.java
  20. 4 0
      src/main/java/com/diagbot/facade/data/AMedDifficultCaseFacade.java
  21. 4 0
      src/main/java/com/diagbot/facade/data/AMedFirstRecordFacade.java
  22. 4 0
      src/main/java/com/diagbot/facade/data/AMedIllCriticallyFacade.java
  23. 4 0
      src/main/java/com/diagbot/facade/data/AMedIllSeriouslFacade.java
  24. 4 0
      src/main/java/com/diagbot/facade/data/AMedLeaveHospitalFacade.java
  25. 4 0
      src/main/java/com/diagbot/facade/data/AMedOperativeFirstRecord.java
  26. 4 0
      src/main/java/com/diagbot/facade/data/AMedOperativeNoteFacade.java
  27. 4 0
      src/main/java/com/diagbot/facade/data/AMedPeriodConclusionFacade.java
  28. 4 0
      src/main/java/com/diagbot/facade/data/AMedPreoperativeDiscussionFacade.java
  29. 31 22
      src/main/java/com/diagbot/facade/data/AMedRecordTypeFacade.java
  30. 4 0
      src/main/java/com/diagbot/facade/data/AMedRescueNoteFacade.java
  31. 4 0
      src/main/java/com/diagbot/facade/data/AMedTransferInNoteFacade.java
  32. 4 1
      src/main/java/com/diagbot/facade/data/AMedTransferOutNoteFacade.java
  33. 4 0
      src/main/java/com/diagbot/facade/data/AMedWardRecordFacade.java
  34. 32 23
      src/main/java/com/diagbot/facade/data/AMedicalRecordContentFacade.java
  35. 2 8
      src/main/java/com/diagbot/facade/data/AMedicalRecordFacade.java
  36. 3 2
      src/main/java/com/diagbot/facade/data/ColumnFacade.java
  37. 16 0
      src/main/java/com/diagbot/mapper/MedAbnormalInfoMapper.java
  38. 16 0
      src/main/java/com/diagbot/service/MedAbnormalInfoService.java
  39. 20 0
      src/main/java/com/diagbot/service/impl/MedAbnormalInfoServiceImpl.java
  40. 19 0
      src/main/resources/mapper/MedAbnormalInfoMapper.xml

+ 158 - 0
src/main/java/com/diagbot/entity/MedAbnormalInfo.java

@@ -0,0 +1,158 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-06-24
+ */
+public class MedAbnormalInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "abnormal_id", type = IdType.AUTO)
+    private Long abnormalId;
+
+    /**
+     * 模块名称
+     */
+    private String moduleName;
+
+    /**
+     * 入参
+     */
+    private String paramIn;
+
+    /**
+     * 出参
+     */
+    private String paramOut;
+
+    /**
+     * 异常描述
+     */
+    private String ramark;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    public Long getAbnormalId() {
+        return abnormalId;
+    }
+
+    public void setAbnormalId(Long abnormalId) {
+        this.abnormalId = abnormalId;
+    }
+    public String getModuleName() {
+        return moduleName;
+    }
+
+    public void setModuleName(String moduleName) {
+        this.moduleName = moduleName;
+    }
+    public String getParamIn() {
+        return paramIn;
+    }
+
+    public void setParamIn(String paramIn) {
+        this.paramIn = paramIn;
+    }
+    public String getParamOut() {
+        return paramOut;
+    }
+
+    public void setParamOut(String paramOut) {
+        this.paramOut = paramOut;
+    }
+    public String getRamark() {
+        return ramark;
+    }
+
+    public void setRamark(String ramark) {
+        this.ramark = ramark;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    @Override
+    public String toString() {
+        return "MedAbnormalInfo{" +
+            "abnormalId=" + abnormalId +
+                ", moduleName=" + moduleName +
+            ", paramIn=" + paramIn +
+            ", paramOut=" + paramOut +
+            ", ramark=" + ramark +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+        "}";
+    }
+}

+ 27 - 23
src/main/java/com/diagbot/facade/data/ABasDeptInfoFacade.java

@@ -1,13 +1,14 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.ABasDeptInfoDTO;
 import com.diagbot.entity.BasDeptInfo;
 import com.diagbot.service.impl.BasDeptInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
 import com.diagbot.util.TZDBConn;
 import com.diagbot.vo.data.ABasDeptInfoVO;
-import com.diagbot.util.BeanUtil;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -22,6 +23,8 @@ public class ABasDeptInfoFacade extends BasDeptInfoServiceImpl{
     @Autowired
     @Qualifier("basDeptInfoServiceImpl")
     private BasDeptInfoServiceImpl basDeptInfoService;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     private TZDBConn tzDBConn = new TZDBConn();
 
@@ -73,29 +76,30 @@ public class ABasDeptInfoFacade extends BasDeptInfoServiceImpl{
     }
 
     public void execute(List<BasDeptInfo> basDeptInfoList){
-        long startTime=System.currentTimeMillis();
-        List<BasDeptInfo> addE=Lists.newArrayList();
-        List<BasDeptInfo> updateE=Lists.newArrayList();
-        basDeptInfoList.stream().forEach(s -> {
-            BasDeptInfo basDeptInfo =this.getOne(new QueryWrapper<BasDeptInfo>()
-            .eq("dept_id", s.getDeptId())
-            .eq("hospital_id", s.getHospitalId()), false);
-            if (basDeptInfo != null) {
-                s.setGmtModified(new Date());
-                updateE.add(s);
-            } else {
-                s.setGmtCreate(new Date());
-                addE.add(s);
+        try{
+            List<BasDeptInfo> addE=Lists.newArrayList();
+            List<BasDeptInfo> updateE=Lists.newArrayList();
+            basDeptInfoList.stream().forEach(s -> {
+                BasDeptInfo basDeptInfo =this.getOne(new QueryWrapper<BasDeptInfo>()
+                        .eq("dept_id", s.getDeptId())
+                        .eq("hospital_id", s.getHospitalId()), false);
+                if (basDeptInfo != null) {
+                    s.setGmtModified(new Date());
+                    updateE.add(s);
+                } else {
+                    s.setGmtCreate(new Date());
+                    addE.add(s);
+                }
+            });
+            if(updateE.size()>0){
+                basDeptInfoService.updateBatchByKey(updateE);
             }
-        });
-        if(updateE.size()>0){
-            basDeptInfoService.updateBatchByKey(updateE);
-        }
-        if(addE.size()>0){
-            basDeptInfoService.saveBatch(addE);
+            if(addE.size()>0){
+                basDeptInfoService.saveBatch(addE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("科室信息", JSON.toJSONString(basDeptInfoList),"",e.getMessage());
         }
-
-        long endTime=System.currentTimeMillis();
-        System.out.println("程序运行时间: "+(endTime - startTime)+"ms");
     }
 }

+ 26 - 22
src/main/java/com/diagbot/facade/data/ABasDoctorInfoFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.ABasDoctorInfoDTO;
@@ -21,6 +22,8 @@ public class ABasDoctorInfoFacade extends BasDoctorInfoServiceImpl {
     @Autowired
     @Qualifier("basDoctorInfoServiceImpl")
     private BasDoctorInfoServiceImpl basDoctorInfoService;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     private TZDBConn tzDBConn = new TZDBConn();
 
@@ -68,29 +71,30 @@ public class ABasDoctorInfoFacade extends BasDoctorInfoServiceImpl {
     }
 
     public void execute(List<BasDoctorInfo> basDoctorInfoList){
-        long startTime=System.currentTimeMillis();
-        List<BasDoctorInfo> addE=Lists.newArrayList();
-        List<BasDoctorInfo> updateE=Lists.newArrayList();
-        basDoctorInfoList.stream().forEach(s -> {
-            BasDoctorInfo basDoctorInfo =this.baseMapper.selectOne(new QueryWrapper<BasDoctorInfo>()
-                    .eq("doctor_id", s.getDoctorId())
-                    .eq("hospital_id", s.getHospitalId()));
-            if (basDoctorInfo != null) {
-                s.setGmtModified(new Date());
-                updateE.add(s);
-            } else {
-                s.setGmtCreate(new Date());
-                addE.add(s);
+        try {
+            List<BasDoctorInfo> addE=Lists.newArrayList();
+            List<BasDoctorInfo> updateE=Lists.newArrayList();
+            basDoctorInfoList.stream().forEach(s -> {
+                BasDoctorInfo basDoctorInfo =this.baseMapper.selectOne(new QueryWrapper<BasDoctorInfo>()
+                        .eq("doctor_id", s.getDoctorId())
+                        .eq("hospital_id", s.getHospitalId()));
+                if (basDoctorInfo != null) {
+                    s.setGmtModified(new Date());
+                    updateE.add(s);
+                } else {
+                    s.setGmtCreate(new Date());
+                    addE.add(s);
+                }
+            });
+            if(updateE.size()>0){
+                basDoctorInfoService.updateBatchByKey(updateE);
             }
-        });
-        if(updateE.size()>0){
-            basDoctorInfoService.updateBatchByKey(updateE);
-        }
-        if(addE.size()>0){
-            basDoctorInfoService.saveBatch(addE);
+            if(addE.size()>0){
+                basDoctorInfoService.saveBatch(addE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("医生信息", JSON.toJSONString(basDoctorInfoList),"",e.getMessage());
         }
-
-        long endTime=System.currentTimeMillis();
-        System.out.println("程序运行时间: "+(endTime - startTime)+"ms");
     }
 }

+ 32 - 27
src/main/java/com/diagbot/facade/data/ABehospitalInfoFacade.java

@@ -1,9 +1,12 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.ABehospitalInfoDTO;
-import com.diagbot.entity.*;
+import com.diagbot.entity.BehospitalInfo;
+import com.diagbot.entity.MedicalRecord;
+import com.diagbot.entity.QcType;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.facade.QcAbnormalFacade;
 import com.diagbot.facade.QcTypeFacade;
@@ -23,17 +26,15 @@ import java.util.List;
 
 @Component
 public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
-
     @Autowired
     @Qualifier("behospitalInfoServiceImpl")
     private BehospitalInfoServiceImpl behospitalInfoService;
-
     @Autowired
     private QcTypeFacade qcTypeFacade;
-
     @Autowired
     private AMedicalRecordFacade aMedicalRecordFacade;
-
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
     @Autowired
     private QcAbnormalFacade qcAbnormalFacade;
 
@@ -108,30 +109,34 @@ public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
     }
 
     public void execute(List<BehospitalInfo> behospitalInfoList){
-        List<BehospitalInfo> addE = Lists.newLinkedList();
-        List<BehospitalInfo> updateE = Lists.newLinkedList();
-        behospitalInfoList.stream().forEach(s -> {
-            BehospitalInfo behospitalInfo = this.getOne(new QueryWrapper<BehospitalInfo>()
-                    .eq("behospital_code", s.getBehospitalCode())
-                    .eq("hospital_id", s.getHospitalId())
-                    .eq("is_deleted",IsDeleteEnum.N), false);
-            if (behospitalInfo != null) {
-                s.setGmtModified(new Date());
-                s.setQcTypeId(initQcTypeId(s));
-                updateE.add(s);
-            } else {
-                s.setGmtCreate(new Date());
-                s.setQcTypeId(initQcTypeId(s));
-                addE.add(s);
+        try {
+            List<BehospitalInfo> addE = Lists.newLinkedList();
+            List<BehospitalInfo> updateE = Lists.newLinkedList();
+            behospitalInfoList.stream().forEach(s -> {
+                BehospitalInfo behospitalInfo = this.getOne(new QueryWrapper<BehospitalInfo>()
+                        .eq("behospital_code", s.getBehospitalCode())
+                        .eq("hospital_id", s.getHospitalId())
+                        .eq("is_deleted",IsDeleteEnum.N), false);
+                if (behospitalInfo != null) {
+                    s.setGmtModified(new Date());
+                    s.setQcTypeId(initQcTypeId(s));
+                    updateE.add(s);
+                } else {
+                    s.setGmtCreate(new Date());
+                    s.setQcTypeId(initQcTypeId(s));
+                    addE.add(s);
+                }
+            });
+            if(addE.size()>0){
+                behospitalInfoService.saveBatch(addE);
             }
-        });
-        if(addE.size()>0){
-            behospitalInfoService.saveBatch(addE);
-        }
-        if(updateE.size()>0){
-            behospitalInfoService.updateBatchByKey(updateE);
+            if(updateE.size()>0){
+                behospitalInfoService.updateBatchByKey(updateE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病人住院登记", JSON.toJSONString(behospitalInfoList),"",e.getMessage());
         }
-
     }
 
     /**

+ 30 - 22
src/main/java/com/diagbot/facade/data/ADoctorAdviceFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.ADoctorAdviceDTO;
@@ -24,6 +25,8 @@ public class ADoctorAdviceFacade extends DoctorAdviceServiceImpl{
     @Autowired
     @Qualifier("doctorAdviceServiceImpl")
     private DoctorAdviceServiceImpl doctorAdviceService;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     private TZDBConn tzDBConn = new TZDBConn();
 
@@ -82,28 +85,33 @@ public class ADoctorAdviceFacade extends DoctorAdviceServiceImpl{
     }
 
     public void execute(List<DoctorAdvice> doctorAdviceList){
-        List<DoctorAdvice> addE = Lists.newLinkedList();
-        List<DoctorAdvice> updateE = Lists.newLinkedList();
-        if (doctorAdviceList != null && doctorAdviceList.size() > 0) {
-            doctorAdviceList.stream().forEach(s -> {
-                DoctorAdvice doctorAdvice = this.getOne(new QueryWrapper<DoctorAdvice>()
-                        .eq("doctor_advice_id", s.getDoctorAdviceId())
-                        .eq("hospital_id", s.getHospitalId())
-                        .eq("behospital_code",s.getBehospitalCode()), false);
-                if (doctorAdvice != null) {
-                    s.setGmtModified(new Date());
-                    updateE.add(s);
-                } else {
-                    s.setGmtCreate(new Date());
-                    addE.add(s);
-                }
-            });
-        }
-        if(addE.size()>0){
-            doctorAdviceService.saveBatch(addE);
-        }
-        if(updateE.size()>0){
-            doctorAdviceService.updateBatchByKey(updateE);
+        try {
+            List<DoctorAdvice> addE = Lists.newLinkedList();
+            List<DoctorAdvice> updateE = Lists.newLinkedList();
+            if (doctorAdviceList != null && doctorAdviceList.size() > 0) {
+                doctorAdviceList.stream().forEach(s -> {
+                    DoctorAdvice doctorAdvice = this.getOne(new QueryWrapper<DoctorAdvice>()
+                            .eq("doctor_advice_id", s.getDoctorAdviceId())
+                            .eq("hospital_id", s.getHospitalId())
+                            .eq("behospital_code",s.getBehospitalCode()), false);
+                    if (doctorAdvice != null) {
+                        s.setGmtModified(new Date());
+                        updateE.add(s);
+                    } else {
+                        s.setGmtCreate(new Date());
+                        addE.add(s);
+                    }
+                });
+            }
+            if(addE.size()>0){
+                doctorAdviceService.saveBatch(addE);
+            }
+            if(updateE.size()>0){
+                doctorAdviceService.updateBatchByKey(updateE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("医嘱信息", JSON.toJSONString(doctorAdviceList),"",e.getMessage());
         }
     }
 }

+ 32 - 23
src/main/java/com/diagbot/facade/data/AHomeDiagnoseInfoFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AHomeDiagnoseDTO;
@@ -23,6 +24,9 @@ public class AHomeDiagnoseInfoFacade extends HomeDiagnoseInfoServiceImpl{
     @Qualifier("homeDiagnoseInfoServiceImpl")
     private HomeDiagnoseInfoServiceImpl homeDiagnoseInfoService;
 
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
+
     private TZDBConn tzDBConn = new TZDBConn();
 
     /**
@@ -56,30 +60,35 @@ public class AHomeDiagnoseInfoFacade extends HomeDiagnoseInfoServiceImpl{
     }
 
     public void execute(List<HomeDiagnoseInfo> homeDiagnoseList){
-        List<HomeDiagnoseInfo> addE = Lists.newLinkedList();
-        List<HomeDiagnoseInfo> updateE = Lists.newLinkedList();
-        if (homeDiagnoseList != null && homeDiagnoseList.size() > 0) {
-            homeDiagnoseList.stream().forEach(s -> {
-                if(s.getHomePageId()!=null && !"".equals(s.getDiagnoseOrderNo())){
-                    HomeDiagnoseInfo diagnoseInfo = this.getOne(new QueryWrapper<HomeDiagnoseInfo>()
-                            .eq("home_page_id", s.getHomePageId())
-                            .eq("hospital_id", s.getHospitalId())
-                            .eq("diagnose_order_no", s.getDiagnoseOrderNo()), false);
-                    if (diagnoseInfo != null) {
-                        s.setGmtModified(new Date());
-                        updateE.add(s);
-                    } else {
-                        s.setGmtCreate(new Date());
-                        addE.add(s);
+        try{
+            List<HomeDiagnoseInfo> addE = Lists.newLinkedList();
+            List<HomeDiagnoseInfo> updateE = Lists.newLinkedList();
+            if (homeDiagnoseList != null && homeDiagnoseList.size() > 0) {
+                homeDiagnoseList.stream().forEach(s -> {
+                    if(s.getHomePageId()!=null && !"".equals(s.getDiagnoseOrderNo())){
+                        HomeDiagnoseInfo diagnoseInfo = this.getOne(new QueryWrapper<HomeDiagnoseInfo>()
+                                .eq("home_page_id", s.getHomePageId())
+                                .eq("hospital_id", s.getHospitalId())
+                                .eq("diagnose_order_no", s.getDiagnoseOrderNo()), false);
+                        if (diagnoseInfo != null) {
+                            s.setGmtModified(new Date());
+                            updateE.add(s);
+                        } else {
+                            s.setGmtCreate(new Date());
+                            addE.add(s);
+                        }
                     }
-                }
-            });
-        }
-        if(addE.size()>0){
-            homeDiagnoseInfoService.saveBatch(addE);
-        }
-        if(updateE.size()>0){
-            homeDiagnoseInfoService.updateBatchByKey(updateE);
+                });
+            }
+            if(addE.size()>0){
+                homeDiagnoseInfoService.saveBatch(addE);
+            }
+            if(updateE.size()>0){
+                homeDiagnoseInfoService.updateBatchByKey(updateE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页-医嘱", JSON.toJSONString(homeDiagnoseList),"",e.getMessage());
         }
     }
 }

+ 32 - 24
src/main/java/com/diagbot/facade/data/AHomeOperationInfoFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.data.AHomeOperationDTO;
 import com.diagbot.entity.HomeOperationInfo;
@@ -22,6 +23,8 @@ public class AHomeOperationInfoFacade extends HomeOperationInfoServiceImpl{
     @Autowired
     @Qualifier("homeOperationInfoServiceImpl")
     private HomeOperationInfoServiceImpl homeOperationInfoService;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     private TZDBConn tzDBConn = new TZDBConn();
 
@@ -58,31 +61,36 @@ public class AHomeOperationInfoFacade extends HomeOperationInfoServiceImpl{
     }
 
     public void execute(List<HomeOperationInfo> homeOperationList){
-        List<HomeOperationInfo> addE = Lists.newLinkedList();
-        List<HomeOperationInfo> updateE = Lists.newLinkedList();
-        if (homeOperationList != null && homeOperationList.size() > 0) {
-            homeOperationList.stream().forEach(s -> {
-                if(s.getHomePageId()!=null && !"".equals(s.getOperationOrderNo())) {
-                    QueryWrapper<HomeOperationInfo> queryWrapper = new QueryWrapper<>();
-                    queryWrapper.eq("home_page_id", s.getHomePageId());
-                    queryWrapper.eq("hospital_id", s.getHospitalId());
-                    queryWrapper.eq("operation_order_no", s.getOperationOrderNo());
-                    HomeOperationInfo operationInfo = this.getOne(queryWrapper, false);
-                    if (operationInfo != null) {
-                        s.setGmtModified(new Date());
-                        updateE.add(s);
-                    } else {
-                        s.setGmtCreate(new Date());
-                        addE.add(s);
+        try {
+            List<HomeOperationInfo> addE = Lists.newLinkedList();
+            List<HomeOperationInfo> updateE = Lists.newLinkedList();
+            if (homeOperationList != null && homeOperationList.size() > 0) {
+                homeOperationList.stream().forEach(s -> {
+                    if(s.getHomePageId()!=null && !"".equals(s.getOperationOrderNo())) {
+                        QueryWrapper<HomeOperationInfo> queryWrapper = new QueryWrapper<>();
+                        queryWrapper.eq("home_page_id", s.getHomePageId());
+                        queryWrapper.eq("hospital_id", s.getHospitalId());
+                        queryWrapper.eq("operation_order_no", s.getOperationOrderNo());
+                        HomeOperationInfo operationInfo = this.getOne(queryWrapper, false);
+                        if (operationInfo != null) {
+                            s.setGmtModified(new Date());
+                            updateE.add(s);
+                        } else {
+                            s.setGmtCreate(new Date());
+                            addE.add(s);
+                        }
                     }
-                }
-            });
-        }
-        if(addE.size()>0){
-            homeOperationInfoService.saveBatch(addE);
-        }
-        if(updateE.size()>0){
-            homeOperationInfoService.updateBatchByKey(updateE);
+                });
+            }
+            if(addE.size()>0){
+                homeOperationInfoService.saveBatch(addE);
+            }
+            if(updateE.size()>0){
+                homeOperationInfoService.updateBatchByKey(updateE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页-手术", JSON.toJSONString(homeOperationList),"",e.getMessage());
         }
     }
 }

+ 49 - 47
src/main/java/com/diagbot/facade/data/AHomePageFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.AnalyzeRunDTO;
 import com.diagbot.dto.RespDTO;
@@ -45,19 +46,10 @@ public class AHomePageFacade extends HomePageServiceImpl{
     @Autowired
     private ReadProperties readProperties;
 
-    private TZDBConn tzDBConn = new TZDBConn();
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
-    /*public static void main(String[] args){
-        int mod=Math.floorMod(5012,500);
-        int div=Math.floorDiv(5012,500);
-        if(mod!=0){
-            div+=1;
-        }
-        System.out.println(mod+"---"+div);
-        for (int i = 0; i < div; i++) {
-            System.out.println((i*500)+"---"+(i+1)*500);
-        }
-    }*/
+    private TZDBConn tzDBConn = new TZDBConn();
 
     /**
      * 同步前一天病案首页
@@ -136,19 +128,24 @@ public class AHomePageFacade extends HomePageServiceImpl{
      * @param aHomePageIngVO
      */
     private void updateHomePageIng(AHomePageIngVO aHomePageIngVO){
-        List<HomePage> homePageList=Lists.newArrayList();
-        aHomePageIngVO.getHomePages().stream().forEach(s->{
-            //初始化入参
-            HomePage homePage=new HomePage();
-            BeanUtil.copyProperties(s,homePage);
-            homePage.setBirthday(DateUtil.parseDate(s.getBirthday()));
-            homePageList.add(homePage);
+        try {
+            List<HomePage> homePageList=Lists.newArrayList();
+            aHomePageIngVO.getHomePages().stream().forEach(s->{
+                //初始化入参
+                HomePage homePage=new HomePage();
+                BeanUtil.copyProperties(s,homePage);
+                homePage.setBirthday(DateUtil.parseDate(s.getBirthday()));
+                homePageList.add(homePage);
 
-            //初始化诊断和手术,并同步到数据库
-            aHomeDiagnoseInfoFacade.executeHomeDiagnose(s.getLeaveDiags());//首页诊断
-            aHomeOperationInfoFacade.executeHomeOperation(s.getOperations());//首页手术
-        });
-        execute(homePageList);
+                //初始化诊断和手术,并同步到数据库
+                aHomeDiagnoseInfoFacade.executeHomeDiagnose(s.getLeaveDiags());//首页诊断
+                aHomeOperationInfoFacade.executeHomeOperation(s.getOperations());//首页手术
+            });
+            execute(homePageList);
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页", JSON.toJSONString(aHomePageIngVO),"",e.getMessage());
+        }
     }
 
     /**
@@ -202,7 +199,7 @@ public class AHomePageFacade extends HomePageServiceImpl{
 
 
     /**
-     * 终末质控-通过接口更新病案首页
+     * 通过接口更新病案首页-不包含医嘱和手术
      * @param list
      * @return
      */
@@ -243,28 +240,33 @@ public class AHomePageFacade extends HomePageServiceImpl{
      * @param homePageList
      */
     public void execute(List<HomePage> homePageList){
-        List<HomePage> addE = Lists.newLinkedList();
-        List<HomePage> updateE = Lists.newLinkedList();
-        if (homePageList != null && homePageList.size() > 0) {
-            homePageList.stream().forEach(s -> {
-                HomePage homePage = this.getOne(new QueryWrapper<HomePage>()
-                        .eq("home_page_id", s.getHomePageId())
-                        .eq("hospital_id", s.getHospitalId())
-                        .eq("behospital_code", s.getBehospitalCode()), false);
-                if (homePage != null) {
-                    s.setGmtModified(new Date());
-                    updateE.add(s);
-                } else {
-                    s.setGmtCreate(new Date());
-                    addE.add(s);
-                }
-            });
-        }
-        if(addE.size()>0){
-            homePageService.saveBatch(addE);
-        }
-        if(updateE.size()>0){
-            homePageService.updateBatchByKey(updateE);
+        try {
+            List<HomePage> addE = Lists.newLinkedList();
+            List<HomePage> updateE = Lists.newLinkedList();
+            if (homePageList != null && homePageList.size() > 0) {
+                homePageList.stream().forEach(s -> {
+                    HomePage homePage = this.getOne(new QueryWrapper<HomePage>()
+                            .eq("home_page_id", s.getHomePageId())
+                            .eq("hospital_id", s.getHospitalId())
+                            .eq("behospital_code", s.getBehospitalCode()), false);
+                    if (homePage != null) {
+                        s.setGmtModified(new Date());
+                        updateE.add(s);
+                    } else {
+                        s.setGmtCreate(new Date());
+                        addE.add(s);
+                    }
+                });
+            }
+            if(addE.size()>0){
+                homePageService.saveBatch(addE);
+            }
+            if(updateE.size()>0){
+                homePageService.updateBatchByKey(updateE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病案首页", JSON.toJSONString(homePageList),"",e.getMessage());
         }
     }
 }

+ 26 - 0
src/main/java/com/diagbot/facade/data/AMedAbnormalInfoFacade.java

@@ -0,0 +1,26 @@
+package com.diagbot.facade.data;
+
+import com.diagbot.entity.MedAbnormalInfo;
+import com.diagbot.service.impl.MedAbnormalInfoServiceImpl;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+@Component
+public class AMedAbnormalInfoFacade extends MedAbnormalInfoServiceImpl {
+    /**
+     * 接口日志记录
+     * @param paramIn
+     * @param paramOut
+     * @param remark
+     */
+    public void saveAbnormalInfo(String moduleName,String paramIn,String paramOut,String remark){
+        MedAbnormalInfo medAbnormalInfo=new MedAbnormalInfo();
+        medAbnormalInfo.setModuleName(moduleName);
+        medAbnormalInfo.setParamIn(paramIn);
+        medAbnormalInfo.setParamOut(paramOut);
+        medAbnormalInfo.setRamark(remark);
+        medAbnormalInfo.setGmtCreate(new Date());
+        this.save(medAbnormalInfo);
+    }
+}

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedAdmissionNoteFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedAdmissionNoteFacade extends MedAdmissionNoteServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -65,6 +68,7 @@ public class AMedAdmissionNoteFacade extends MedAdmissionNoteServiceImpl {
             }
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("入院记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
     }
 

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedBloodResultFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedBloodResultFacade extends MedBloodResultServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -60,6 +63,7 @@ public class AMedBloodResultFacade extends MedBloodResultServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("输血效果评价", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 5 - 0
src/main/java/com/diagbot/facade/data/AMedBloodTransfusionFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -22,6 +23,9 @@ public class AMedBloodTransfusionFacade extends MedBloodTransfusionServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
 
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
+
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
         list.forEach(s->{
@@ -65,6 +69,7 @@ public class AMedBloodTransfusionFacade extends MedBloodTransfusionServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("输血记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedConsultationApplyFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedConsultationApplyFacade extends MedConsultationApplyServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -66,6 +69,7 @@ public class AMedConsultationApplyFacade extends MedConsultationApplyServiceImpl
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("会诊申请单", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedConsultationNoteFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -22,6 +23,8 @@ public class AMedConsultationNoteFacade extends MedConsultationNoteServiceImpl {
 
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -68,6 +71,7 @@ public class AMedConsultationNoteFacade extends MedConsultationNoteServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("会诊单(申请和结果)", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedConsultationResultFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -22,6 +23,8 @@ public class AMedConsultationResultFacade extends MedConsultationResultServiceIm
 
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -68,6 +71,7 @@ public class AMedConsultationResultFacade extends MedConsultationResultServiceIm
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("会诊结果单", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 31 - 23
src/main/java/com/diagbot/facade/data/AMedCrisisFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AMedCrisisDTO;
@@ -22,6 +23,8 @@ public class AMedCrisisFacade extends MedCrisisInfoServiceImpl{
     @Autowired
     @Qualifier("medCrisisInfoServiceImpl")
     private MedCrisisInfoServiceImpl medCrisisInfoService;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public RespDTO<List<AMedCrisisDTO>> executeMedCrisis(List<AMedCrisisVO> list) {
         if(list!=null && list.size()>0){
@@ -56,29 +59,34 @@ public class AMedCrisisFacade extends MedCrisisInfoServiceImpl{
     }
 
     public void execute(List<MedCrisisInfo> medCrisisList){
-        List<MedCrisisInfo> addE = Lists.newLinkedList();
-        List<MedCrisisInfo> updateE = Lists.newLinkedList();
-        if (medCrisisList != null && medCrisisList.size() > 0) {
-            medCrisisList.stream().forEach(s -> {
-                MedCrisisInfo medCrisisInfo = this.getOne(new QueryWrapper<MedCrisisInfo>()
-                .eq("rec_id", s.getRecId())
-                .eq("hospital_id", s.getHospitalId())
-                .eq("behospital_code", s.getBehospitalCode())
-                .eq("rec_type", s.getRecType()), false);
-                if (medCrisisInfo != null) {
-                    s.setGmtModified(new Date());
-                    updateE.add(s);
-                } else {
-                    s.setGmtCreate(new Date());
-                    addE.add(s);
-                }
-            });
-        }
-        if(addE.size()>0){
-            medCrisisInfoService.saveBatch(addE);
-        }
-        if(updateE.size()>0){
-            medCrisisInfoService.updateBatchByKey(updateE);
+        try{
+            List<MedCrisisInfo> addE = Lists.newLinkedList();
+            List<MedCrisisInfo> updateE = Lists.newLinkedList();
+            if (medCrisisList != null && medCrisisList.size() > 0) {
+                medCrisisList.stream().forEach(s -> {
+                    MedCrisisInfo medCrisisInfo = this.getOne(new QueryWrapper<MedCrisisInfo>()
+                            .eq("rec_id", s.getRecId())
+                            .eq("hospital_id", s.getHospitalId())
+                            .eq("behospital_code", s.getBehospitalCode())
+                            .eq("rec_type", s.getRecType()), false);
+                    if (medCrisisInfo != null) {
+                        s.setGmtModified(new Date());
+                        updateE.add(s);
+                    } else {
+                        s.setGmtCreate(new Date());
+                        addE.add(s);
+                    }
+                });
+            }
+            if(addE.size()>0){
+                medCrisisInfoService.saveBatch(addE);
+            }
+            if(updateE.size()>0){
+                medCrisisInfoService.updateBatchByKey(updateE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("数据解析", JSON.toJSONString(medCrisisList),"",e.getMessage());
         }
     }
 }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedCrisisNoteFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedCrisisNoteFacade extends MedCrisisNoteServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -63,6 +66,7 @@ public class AMedCrisisNoteFacade extends MedCrisisNoteServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("危急值记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedDeathDiscussionFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedDeathDiscussionFacade extends MedDeathDiscussionServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -66,6 +69,7 @@ public class AMedDeathDiscussionFacade extends MedDeathDiscussionServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("死亡病例讨论记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedDeathNoteFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedDeathNoteFacade extends MedDeathNoteServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -66,6 +69,7 @@ public class AMedDeathNoteFacade extends MedDeathNoteServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("死亡记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedDifficultCaseFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedDifficultCaseFacade extends MedDifficultCaseServiceImpl{
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -63,6 +66,7 @@ public class AMedDifficultCaseFacade extends MedDifficultCaseServiceImpl{
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("疑难病例讨论记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedFirstRecordFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -22,6 +23,8 @@ public class AMedFirstRecordFacade extends MedFirstRecordServiceImpl {
 
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -64,6 +67,7 @@ public class AMedFirstRecordFacade extends MedFirstRecordServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("首次病程录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedIllCriticallyFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -22,6 +23,8 @@ public class AMedIllCriticallyFacade extends MedIllCriticallyServiceImpl {
 
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -63,6 +66,7 @@ public class AMedIllCriticallyFacade extends MedIllCriticallyServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病危通知单", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedIllSeriouslFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -22,6 +23,8 @@ public class AMedIllSeriouslFacade extends MedIllSeriouslServiceImpl {
 
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -63,6 +66,7 @@ public class AMedIllSeriouslFacade extends MedIllSeriouslServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病重通知单", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedLeaveHospitalFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedLeaveHospitalFacade extends MedLeaveHospitalServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -66,6 +69,7 @@ public class AMedLeaveHospitalFacade extends MedLeaveHospitalServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("出院小结", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedOperativeFirstRecord.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -22,6 +23,8 @@ public class AMedOperativeFirstRecord extends MedOperativeFirstRecordServiceImpl
 
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -68,6 +71,7 @@ public class AMedOperativeFirstRecord extends MedOperativeFirstRecordServiceImpl
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("术后首程", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedOperativeNoteFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedOperativeNoteFacade extends MedOperativeNoteServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -67,6 +70,7 @@ public class AMedOperativeNoteFacade extends MedOperativeNoteServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("手术记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedPeriodConclusionFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -23,6 +24,8 @@ public class AMedPeriodConclusionFacade extends MedPeriodConclusionServiceImpl {
 
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -65,6 +68,7 @@ public class AMedPeriodConclusionFacade extends MedPeriodConclusionServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("阶段小结", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedPreoperativeDiscussionFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedPreoperativeDiscussionFacade extends MedPreoperativeDiscussionServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -65,6 +68,7 @@ public class AMedPreoperativeDiscussionFacade extends MedPreoperativeDiscussionS
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("术前讨论小结", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 31 - 22
src/main/java/com/diagbot/facade/data/AMedRecordTypeFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AMedicalRecordTypeDTO;
@@ -23,6 +24,8 @@ public class AMedRecordTypeFacade extends MedRecordTypeServiceImpl {
     @Autowired
     @Qualifier("medRecordTypeServiceImpl")
     private MedRecordTypeServiceImpl medRecordTypeService;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     private TZDBConn tzDBConn = new TZDBConn();
 
@@ -64,28 +67,34 @@ public class AMedRecordTypeFacade extends MedRecordTypeServiceImpl {
     }
 
     public void execute(List<MedRecordType> medRecordTypeList){
-        List<MedRecordType> addE = Lists.newLinkedList();
-        List<MedRecordType> updateE = Lists.newLinkedList();
-        if (medRecordTypeList != null && medRecordTypeList.size() != 0) {
-            medRecordTypeList.stream().forEach(s -> {
-                MedRecordType mrType = this.getOne(new QueryWrapper<MedRecordType>()
-                        .eq("type_id", s.getTypeId())
-                        .eq("hospital_id", s.getHospitalId())
-                        .eq("is_deleted",IsDeleteEnum.N), false);
-                if (mrType != null) {
-                    s.setGmtModified(new Date());
-                    updateE.add(s);
-                } else {
-                    s.setGmtCreate(new Date());
-                    addE.add(s);
-                }
-            });
-        }
-        if(addE.size()>0){
-            medRecordTypeService.saveBatch(addE);
-        }
-        if(updateE.size()>0){
-            medRecordTypeService.updateBatchByKey(updateE);
+        try {
+            List<MedRecordType> addE = Lists.newLinkedList();
+            List<MedRecordType> updateE = Lists.newLinkedList();
+            if (medRecordTypeList != null && medRecordTypeList.size() != 0) {
+                medRecordTypeList.stream().forEach(s -> {
+                    MedRecordType mrType = this.getOne(new QueryWrapper<MedRecordType>()
+                            .eq("type_id", s.getTypeId())
+                            .eq("hospital_id", s.getHospitalId())
+                            .eq("is_deleted",IsDeleteEnum.N), false);
+                    if (mrType != null) {
+                        s.setGmtModified(new Date());
+                        updateE.add(s);
+                    } else {
+                        s.setGmtCreate(new Date());
+                        addE.add(s);
+                    }
+                });
+            }
+            if(addE.size()>0){
+                medRecordTypeService.saveBatch(addE);
+            }
+            if(updateE.size()>0){
+                medRecordTypeService.updateBatchByKey(updateE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("文书类别", JSON.toJSONString(medRecordTypeList),"",e.getMessage());
         }
+
     }
 }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedRescueNoteFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedRescueNoteFacade extends MedRescueNoteServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -65,6 +68,7 @@ public class AMedRescueNoteFacade extends MedRescueNoteServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("抢救记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedTransferInNoteFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -22,6 +23,8 @@ public class AMedTransferInNoteFacade extends MedTransferInNoteServiceImpl {
 
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -64,6 +67,7 @@ public class AMedTransferInNoteFacade extends MedTransferInNoteServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("转入记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 1
src/main/java/com/diagbot/facade/data/AMedTransferOutNoteFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -22,6 +23,8 @@ public class AMedTransferOutNoteFacade extends MedTransferOutNoteServiceImpl {
 
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -61,9 +64,9 @@ public class AMedTransferOutNoteFacade extends MedTransferOutNoteServiceImpl {
                         .eq("hospital_id", medTransferOutNote.getHospitalId())
                         .eq("behospital_code", medTransferOutNote.getBehospitalCode()));
             }
-
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("转出记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 4 - 0
src/main/java/com/diagbot/facade/data/AMedWardRecordFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
 import com.diagbot.dto.data.ColumnZhAndChDTO;
@@ -21,6 +22,8 @@ import java.util.Map;
 public class AMedWardRecordFacade extends MedWardRecordServiceImpl {
     @Autowired
     private ColumnFacade columnFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     public void getColumnZhAndCh(){
         List<ColumnZhAndChDTO> list=this.baseMapper.getColumnZhAndCh();
@@ -65,6 +68,7 @@ public class AMedWardRecordFacade extends MedWardRecordServiceImpl {
 
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("查房记录", JSON.toJSONString(entityMap),"",e.getMessage());
         }
 
     }

+ 32 - 23
src/main/java/com/diagbot/facade/data/AMedicalRecordContentFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade.data;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AMedicalRecordContentDTO;
@@ -13,7 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
-import java.util.*;
+import java.util.Date;
+import java.util.List;
 
 @Component
 public class AMedicalRecordContentFacade extends MedicalRecordContentServiceImpl{
@@ -21,6 +23,8 @@ public class AMedicalRecordContentFacade extends MedicalRecordContentServiceImpl
     @Qualifier("medicalRecordContentServiceImpl")
     @Autowired
     private MedicalRecordContentServiceImpl medicalRecordContentService;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     private TZDBConn tzDBConn = new TZDBConn();
 
@@ -51,28 +55,33 @@ public class AMedicalRecordContentFacade extends MedicalRecordContentServiceImpl
     }
 
     public void execute(List<MedicalRecordContent> mrContentList){
-        List<MedicalRecordContent> addE = Lists.newLinkedList();
-        List<MedicalRecordContent> updateE = Lists.newLinkedList();
-        if (mrContentList != null && mrContentList.size() > 0) {
-            mrContentList.stream().forEach(s -> {
-                QueryWrapper<MedicalRecordContent> queryWrapper = new QueryWrapper<>();
-                queryWrapper.eq("rec_id", s.getRecId());
-                queryWrapper.eq("hospital_id", s.getHospitalId());
-                MedicalRecordContent mrContent = this.getOne(queryWrapper, false);
-                if (mrContent != null) {
-                    s.setGmtModified(new Date());
-                    updateE.add(s);
-                } else {
-                    s.setGmtCreate(new Date());
-                    addE.add(s);
-                }
-            });
-        }
-        if(addE.size()>0){
-            medicalRecordContentService.saveBatch(addE);
-        }
-        if(updateE.size()>0){
-            medicalRecordContentService.updateBatchByKey(updateE);
+        try {
+            List<MedicalRecordContent> addE = Lists.newLinkedList();
+            List<MedicalRecordContent> updateE = Lists.newLinkedList();
+            if (mrContentList != null && mrContentList.size() > 0) {
+                mrContentList.stream().forEach(s -> {
+                    QueryWrapper<MedicalRecordContent> queryWrapper = new QueryWrapper<>();
+                    queryWrapper.eq("rec_id", s.getRecId());
+                    queryWrapper.eq("hospital_id", s.getHospitalId());
+                    MedicalRecordContent mrContent = this.getOne(queryWrapper, false);
+                    if (mrContent != null) {
+                        s.setGmtModified(new Date());
+                        updateE.add(s);
+                    } else {
+                        s.setGmtCreate(new Date());
+                        addE.add(s);
+                    }
+                });
+            }
+            if(addE.size()>0){
+                medicalRecordContentService.saveBatch(addE);
+            }
+            if(updateE.size()>0){
+                medicalRecordContentService.updateBatchByKey(updateE);
+            }
+        }catch (Exception e){
+            log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("文书内容", JSON.toJSONString(mrContentList),"",e.getMessage());
         }
     }
 }

+ 2 - 8
src/main/java/com/diagbot/facade/data/AMedicalRecordFacade.java

@@ -36,31 +36,25 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
     @Autowired
     @Qualifier("medicalRecordServiceImpl")
     private MedicalRecordServiceImpl medicalRecordService;
-
     @Autowired
     private ModelHospitalFacade modelHospitalFacade;
-
     @Autowired
     private AMedicalRecordContentFacade aMedicalRecordContentFacade;
-
     @Autowired
     private BehospitalInfoFacade behospitalInfoFacade;
-
     @Autowired
     @Qualifier("qcAbnormalServiceImpl")
     private QcAbnormalServiceImpl qcAbnormalService;
-
     @Autowired
     private QcTypeFacade qcTypeFacade;
-
     @Autowired
     private ColumnFacade columnFacade;
-
     @Autowired
     private ReadProperties readProperties;
-
     @Autowired
     private BasHospitalInfoFacade basHospitalInfoFacade;
+    @Autowired
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     @Value("${encrypt.enable}")
     Boolean encryptFlag;

+ 3 - 2
src/main/java/com/diagbot/facade/data/ColumnFacade.java

@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
 import com.diagbot.dto.OutputInfo;
 import com.diagbot.dto.Response;
 import com.diagbot.enums.CacheKeyEnum;
-import com.diagbot.facade.BasHospitalInfoFacade;
 import com.diagbot.facade.QcClientFacade;
 import com.diagbot.service.impl.ColumnServiceImpl;
 import com.diagbot.vo.QueryVo;
@@ -22,7 +21,7 @@ public class ColumnFacade extends ColumnServiceImpl {
     @Autowired
     private QcClientFacade qcClientFacade;
     @Autowired
-    private BasHospitalInfoFacade basHospitalInfoFacade;
+    private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
 
     /**
      * 解析
@@ -49,6 +48,7 @@ public class ColumnFacade extends ColumnServiceImpl {
             }
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("数据解析", JSON.toJSONString(queryVo),"",e.getMessage());
         }
 
     }
@@ -109,6 +109,7 @@ public class ColumnFacade extends ColumnServiceImpl {
             log.info(modelName+"---- 解析完成!");
         }catch (Exception e){
             log.error(e.getMessage(),e);
+            aMedAbnormalInfoFacade.saveAbnormalInfo("数据解析异常", JSON.toJSONString(columnMap),"",e.getMessage());
         }
     }
 

+ 16 - 0
src/main/java/com/diagbot/mapper/MedAbnormalInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.MedAbnormalInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-06-24
+ */
+public interface MedAbnormalInfoMapper extends BaseMapper<MedAbnormalInfo> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/MedAbnormalInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.MedAbnormalInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-06-24
+ */
+public interface MedAbnormalInfoService extends IService<MedAbnormalInfo> {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/MedAbnormalInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.MedAbnormalInfo;
+import com.diagbot.mapper.MedAbnormalInfoMapper;
+import com.diagbot.service.MedAbnormalInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-06-24
+ */
+@Service
+public class MedAbnormalInfoServiceImpl extends ServiceImpl<MedAbnormalInfoMapper, MedAbnormalInfo> implements MedAbnormalInfoService {
+
+}

+ 19 - 0
src/main/resources/mapper/MedAbnormalInfoMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.MedAbnormalInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.MedAbnormalInfo">
+        <id column="abnormal_id" property="abnormalId" />
+        <result column="module_name" property="moduleName" />
+        <result column="param_in" property="paramIn" />
+        <result column="param_out" property="paramOut" />
+        <result column="ramark" property="ramark" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+    </resultMap>
+
+</mapper>