ソースを参照

特门查询参数与门诊统筹参数不一样

hurugang 3 年 前
コミット
8fc5dd9cb3

+ 6 - 2
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzPatientMiMapper.java

@@ -201,6 +201,10 @@ public interface MzPatientMiMapper {
      * @param patientId
      * @return
      */
-    @Select("select balc from t_si_pat_info where pat_no=#{patientId} and times=-1 and insutype='310' ")
-    String selectMztczfsf(@Param("patientId") String patientId);
+    @Select({"<script>","select balc from t_si_pat_info where pat_no=#{patientId} and times=#{times}",
+            "<when test='insutype!=null'>",
+            "  and insutype=#{insutype} ",
+            "</when>",
+            "</script>"})
+    String selectMztczfsf(@Param("patientId") String patientId,@Param("times") Integer times,@Param("insutype") String insutype);
 }

+ 2 - 2
src/main/java/cn/hnthyy/thmz/service/impl/thmz/TsmzServiceImpl.java

@@ -39,7 +39,7 @@ public class TsmzServiceImpl implements TsmzService {
 
     @Override
     public PayInfo uploadFees(String staffId, String patientId, Integer times, Integer receiptNo) {
-        String balc = mzPatientMiMapper.selectMztczfsf(patientId);
+        String balc = mzPatientMiMapper.selectMztczfsf(patientId,times,null);
         if (balc == null) {
            return null;
         }
@@ -238,7 +238,7 @@ public class TsmzServiceImpl implements TsmzService {
             int code = (int) resultJSONO.get("code");
             String msg = (String) resultJSONO.get("msg");
             if (code == 0) {
-                String balc = mzPatientMiMapper.selectMztczfsf(patientId);
+                String balc = mzPatientMiMapper.selectMztczfsf(patientId,-1,"310");
                 if (balc == null) {
                     resultMap.put("code", -1);
                     resultMap.put("message", "该患者无门诊共济信息!");