liuqq 3 лет назад
Родитель
Сommit
247b9bd299

+ 7 - 5
src/main/java/com/diagbot/facade/ViewFacade.java

@@ -290,8 +290,10 @@ public class ViewFacade {
         this.getHomePage(homepageSql);
         this.getHomeDiagnose(diagSql);
         this.getHomeOperation(opsSql);
-        //查询门急诊诊断
-        String diagnoseSql = "select diagnoseName from homePage_diag where behospitalCode= '" + xyHomePageVo.getBehospitalCode() + "' and behospitalnum= '" + xyHomePageVo.getFileCode() + "' and diagnosetype='门诊诊断'";
+        //查询门急诊诊断diagnoseName
+        String diagnoseSql = "select * from homePage_diag where " +
+                " behospitalCode= '" + xyHomePageVo.getBehospitalCode() + "' " +
+                "and behospitalnum= '" + xyHomePageVo.getFileCode() + "' and diagnoseType='门诊诊断'";
         HomePage homePage=getHomeDiagnoseAndCode(diagnoseSql);
         UpdateWrapper<HomePage> updateWrapper=new UpdateWrapper<>();
         updateWrapper.eq("behospital_code",behospitalCode)
@@ -529,12 +531,12 @@ public class ViewFacade {
             medicalRecordList = tzDBConn.getMedicalRecord(sql);
             if (medicalRecordList.size() > 0) {
                 medicalRecordList.forEach(s -> {
-                    //获取文书详情
+                    /*//获取文书详情
                     String recId = s.getRecId();
                     //截取rec_id後面的_次數跟接口相對潁上
                     int inedx = s.getRecId().lastIndexOf("_");
-                    s.setRecId(s.getRecId().substring(0, inedx));
-                    this.getRecordContent(recId);
+                    s.setRecId(s.getRecId().substring(0, inedx));*/
+                    this.getRecordContent(s.getRecId());
                 });
             }
             aMedicalRecordFacade.execute(medicalRecordList);

+ 9 - 4
src/main/java/com/diagbot/facade/data/AMedicalRecordContentFacade.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AMedicalRecordContentDTO;
+import com.diagbot.entity.MedicalRecord;
 import com.diagbot.entity.MedicalRecordContent;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.facade.ViewFacade;
@@ -85,10 +86,14 @@ public class AMedicalRecordContentFacade extends MedicalRecordContentServiceImpl
                         MedicalRecordContent mrContent = this.getOne(queryWrapper, false);
                         if (mrContent != null) {
                             s.setGmtModified(new Date());
-                            updateE.add(s);
+                            this.update(s,new UpdateWrapper<MedicalRecordContent>()
+                                    .eq("rec_id", s.getRecId())
+                                    .eq("hospital_id", s.getHospitalId()));
+                            //updateE.add(s);
                         } else {
                             s.setGmtCreate(new Date());
-                            addE.add(s);
+                            this.save(s);
+                            //addE.add(s);
                         }
                     } catch (Exception e) {
                         log.error(e.getMessage(), e);
@@ -96,12 +101,12 @@ public class AMedicalRecordContentFacade extends MedicalRecordContentServiceImpl
                     }
                 });
             }
-            if (addE.size() > 0) {
+            /*if (addE.size() > 0) {
                 medicalRecordContentService.saveBatch(addE);
             }
             if (updateE.size() > 0) {
                 medicalRecordContentService.updateBatchByKey(updateE);
-            }
+            }*/
         } catch (Exception e) {
             log.error(e.getMessage(), e);
         }

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

@@ -439,11 +439,11 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
                     if (mRecord != null) {
                         s.setGmtModified(new Date());
                         s.setIsDeleted(IsDeleteEnum.N.getKey());
-//                        this.update(new UpdateWrapper<MedicalRecord>()
-//                                .eq("rec_id", s.getRecId())
-//                                .eq("hospital_id", s.getHospitalId())
-//                                .eq("behospital_code", s.getBehospitalCode()));
-                        updateE.add(s);
+                        this.update(s,new UpdateWrapper<MedicalRecord>()
+                                .eq("rec_id", s.getRecId())
+                                .eq("hospital_id", s.getHospitalId())
+                                .eq("behospital_code", s.getBehospitalCode()));
+                        //updateE.add(s);
                     } else {
                         s.setGmtCreate(new Date());
                         this.save(s);
@@ -451,12 +451,12 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
                     }
                 });
             }
-            if (addE.size() > 0) {
+            /*if (addE.size() > 0) {
                 medicalRecordService.saveBatch(addE);
             }
             if (updateE.size() > 0) {
                 medicalRecordService.updateBatchByKey(updateE);
-            }
+            }*/
             if (modelHospitalList.size() > 0) {
                 modelHospitalFacade.saveBatch(modelHospitalList);
             }

+ 7 - 5
src/main/java/com/diagbot/util/PushFeedbackConn.java

@@ -131,11 +131,11 @@ public class PushFeedbackConn {
             String visitId=feedbackHosVO.getBehospitalCode().split("_")[1];
             int re=0;
             connection = getConnection();
-            connection.setAutoCommit(false);//事物开始
+            connection.setAutoCommit(false);
             PreparedStatement state=connection.prepareStatement("insert into MEDICAL_QC_MSG " +
                     "(PATIENT_ID,VISIT_ID,MESSAGE,ISSUED_BY,ISSUED_DATE_TIME,TOPIC_ID,DEPT_STAYED,MSG_STATUS,EXPLAININFO,POINT,DETAILCODE" +
-                    ",CCIDS,POINT_TYPE,SENDER_DOCTOR,DOCTOR_IN_CHARGE_ID,APPLY_ENV,QA_EVENT_TYPE)"+
-                    "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
+                    ",CCIDS,POINT_TYPE,SENDER_DOCTOR,DOCTOR_IN_CHARGE_ID,APPLY_ENV,QA_EVENT_TYPE,QC_MSG_CODE)"+
+                    "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
             state.setString(1, patientId);
             state.setString(2, visitId);
             state.setString(3,feedbackHosVO.getQcresultDetailMsg());
@@ -150,7 +150,7 @@ public class PushFeedbackConn {
                 state.setString(11,Long.toString(feedbackHosVO.getCasesEntryId()));//缺陷编号
             }
             state.setString(12,feedbackHosVO.getCcCodes());//抄送人工号集合
-            state.setString(13,"1");//扣分类型,0,自动扣分,1:手动扣分
+            state.setInt(13,1);//扣分类型,0,自动扣分,1:手动扣分
             state.setString(14,feedbackHosVO.getSenderCode());//提交人工号
             state.setString(15,feedbackHosVO.getReceiverCode());//接收人工号
             state.setString(16,"MEDDOC");
@@ -170,6 +170,7 @@ public class PushFeedbackConn {
                 operationType="其他";
             }
             state.setString(17,operationType);
+            state.setString(18,Long.toString(feedbackHosVO.getModeId()));
             re = state.executeUpdate();
             if(re < 0){               //插入失败
                 connection.rollback();      //回滚
@@ -239,7 +240,7 @@ public class PushFeedbackConn {
             String sql =" update MEDICAL_QC_MSG set " +
                     " MESSAGE=?,ISSUED_BY=?,ISSUED_DATE_TIME=?,TOPIC_ID=?,DEPT_STAYED=?,MSG_STATUS=?,EXPLAININFO=?," +
                     " POINT=?,CCIDS=?,POINT_TYPE=?,SENDER_DOCTOR=?,DOCTOR_IN_CHARGE_ID=?," +
-                    " APPLY_ENV=?,QA_EVENT_TYPE=?";
+                    " APPLY_ENV=?,QA_EVENT_TYPE=?,QC_MSG_CODE=?";
             sql+=" where PATIENT_ID = ? and VISIT_ID = ? and DETAILCODE=?";
             PreparedStatement state=connection.prepareStatement(sql);
             state.setString(1,feedbackHosVO.getQcresultDetailMsg());
@@ -273,6 +274,7 @@ public class PushFeedbackConn {
             state.setString(15, patientId);
             state.setString(16, visitId);
             state.setString(17,Long.toString(feedbackHosVO.getCasesEntryId()));//缺陷编号
+            state.setString(18,Long.toString(feedbackHosVO.getModeId()));
             re = state.executeUpdate();
             if(re < 0){               //修改失败
                 connection.rollback();      //回滚

+ 5 - 0
src/main/java/com/diagbot/vo/his/FeedbackHosVO.java

@@ -45,6 +45,11 @@ public class FeedbackHosVO {
      */
     private String behospitalCode;
 
+    /**
+     * 模块id
+     */
+    private Long modeId;
+
     /**
      * 模块名称
      */