shiyue 4 роки тому
батько
коміт
c9db6e4eb7

+ 26 - 15
src/main/java/com/diagbot/facade/data/ABehospitalInfoFacade.java

@@ -19,8 +19,10 @@ import com.diagbot.util.StringUtil;
 import com.diagbot.util.TZDBConn;
 import com.diagbot.vo.data.ABehospitalInfoVO;
 import com.diagbot.vo.data.ADeleteFlagVO;
+import com.diagbot.vo.data.AMedicalRecordVO;
 import com.diagbot.vo.data.APlaceFileVO;
 import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.beans.factory.annotation.Value;
@@ -40,6 +42,8 @@ public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
     private AMedAbnormalInfoFacade aMedAbnormalInfoFacade;
     @Value("${log_switch.enable}")
     private boolean logSwitch;
+    @Autowired
+    private AMedicalRecordFacade aMedicalRecordFacade;
 
     private TZDBConn tzDBConn = new TZDBConn();
 
@@ -154,25 +158,32 @@ public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
      */
     private Long initQcTypeId(BehospitalInfo s) {
         Long qcTypeId = Long.valueOf("0");
-        //根据科室查找对应质控类型
-        QcType qcTypeList = qcTypeFacade.getOne(new QueryWrapper<QcType>()
-                .eq("beh_dept_id", s.getBehDeptId())
-                .eq("hospital_id", s.getHospitalId())
-                .eq("default_module", 0)
-                .eq("sex",s.getSex())
-                .eq("is_deleted", IsDeleteEnum.N));
-        if(qcTypeList == null){
-            //无质控类型时,新增后初始化
-            QcType qcType = qcTypeFacade.getOne(new QueryWrapper<QcType>()
-                    .eq("default_module", 1)
+        MedicalRecord medicalRecord= aMedicalRecordFacade.getOne(new QueryWrapper<MedicalRecord>()
+        .eq("mode_id",1)
+        .eq("behospital_code",s.getBehospitalCode())
+        .eq("hospital_id",s.getHospitalId())
+        .eq("is_deleted",IsDeleteEnum.N));
+        if (medicalRecord != null){
+            //根据科室查找对应质控类型
+            QcType qcTypeList = qcTypeFacade.getOne(new QueryWrapper<QcType>()
+                    .eq("beh_dept_id", s.getBehDeptId())
                     .eq("hospital_id", s.getHospitalId())
+                    .eq("default_module", 0)
                     .eq("sex",s.getSex())
                     .eq("is_deleted", IsDeleteEnum.N));
-            if(qcType!=null){
-                qcTypeId = qcType.getId();
+            if(qcTypeList == null){
+                //无质控类型时,新增后初始化
+                QcType qcType = qcTypeFacade.getOne(new QueryWrapper<QcType>()
+                        .eq("default_module", 1)
+                        .eq("hospital_id", s.getHospitalId())
+                        .eq("sex",s.getSex())
+                        .eq("is_deleted", IsDeleteEnum.N));
+                if(qcType!=null){
+                    qcTypeId = qcType.getId();
+                }
+            }else {
+                qcTypeId = qcTypeList.getId();
             }
-        }else {
-            qcTypeId = qcTypeList.getId();
         }
         return qcTypeId;
     }

+ 2 - 5
src/main/java/com/diagbot/facade/data/AHomePageFacade.java

@@ -120,12 +120,9 @@ public class AHomePageFacade extends HomePageServiceImpl{
             //装载数据
             updateHomePageIng(aHomePageIngVO);
 
-            if(xmlAnalyse){
-                //评分后返回结构体
-                return homePageIng(aHomePageIngVO);
-            }
             //评分后返回结构体
-            return RespDTO.onSuc("操作成功!");
+            return homePageIng(aHomePageIngVO);
+
         }else{
             return RespDTO.onError("未接收到数据!");
         }